Spectranet update

123457»

Comments

  • edited January 2013
    :-) now it's working....everything is ok! Thanks!
  • edited February 2013
    Got me a nice rubberkeys today with a very tidy ram turbo joystick interface and a zipstick.

    Anyhoo the interface works fine connected directly to the speccy.

    The spectranet works fine connected to the speccy.

    But if the ram turbo is either connected with the spectranet then the spectranet will not function correctly. The spectranet will show on the screen but will not interact with the network ( no flashing leds ).

    So is it the ram turbo, the spectranet or the spectrum bus that's at fault??

    Any help appreciated.
  • edited February 2013
    Hi,
    Got my spectranet today! :grin: :grin: :grin:

    1) Does anyone know where I can download a windows binary of tnfsd.exe?
    Answer: Found it.... http://spectrum.alioth.net/doc/index.php/TNFS_server

    2) Also, I am failing to mount vexed4.alioth.net and feertech.com. Are both of these servers live at the moment? (Getting a pause followed by a funny report... i.e.
    %mount 0,"vexed4.alioth.net"
    
    (8 second pause, then)
    , 0:1
    

    However, if I mount to my own server (192.168.8.33) it always mounts immediately AND if I THEN mount an internet based server then works okay! Any ideas why?

    3) As my spectranet is fresh out of the box today, is there a way to pull up the version number of the 4 firmware roms? I thought %fsconfig might show it but doesn't
    Answer:*Got it. The Rnnn number on boot. Did a firmware update from vexed4.alioth.net

    4) How can I find the DHCP assigned IP address of the interface (after it is displayed on screen on boot)?

    Thanks.
  • edited February 2013
    BloodBaz wrote: »
    2) Also, I am failing to mount vexed4.alioth.net and feertech.com. Are both of these servers live at the moment? (Getting a pause followed by a funny report... i.e.
    %mount 0,"vexed4.alioth.net"
    
    (8 second pause, then)
    , 0:1
    

    These two servers are up at the time of writing this. And are rarely down.
    Sorry I can't offer much more help this time of a Saturday night.
    BloodBaz wrote: »
    4) How can I find the DHCP assigned IP address of the interface (after it is displayed on screen on boot)?

    Not sure about 'natively' on the speccy. I would check on my router if I needed to know, and tend to stick to static IP settings when possible.
    Welcome to the Spectranet :D , I'm sure you'll iron out any problems soon enough, and there'll be some more intelligent types awake soon enough.
  • edited February 2013
    BloodBaz wrote: »
    4) How can I find the DHCP assigned IP address of the interface (after it is displayed on screen on boot)?

    Use the GET_IFCONFIG_INET system call (you'll need to be using asm or C).

    http://spectrum.alioth.net/doc/index.php/Get_ifconfig_inet

    Note that if you already have the Spectranet memory paged in, you don't have to use the HLCALL mechanism, you can do this:
       ld de, address
       call GET_IFCONFIG_INET
    

    DE should point to a block of 4 bytes of memory. The GET_IFCONFIG_INET call will place the current address in that memory. The LONG2IPSTRING call will convert this into a human readable string (see: http://spectrum.alioth.net/doc/index.php/Long2ipstring ).

    The addresses of function calls are defined in a file called spectranet.inc which is available from SVN, see: http://spectrum.alioth.net/svn/filedetails.php?repname=Spectranet&path=%2Ftrunk%2Finclude%2Fspectranet.inc
  • edited February 2013
    Winston wrote: »
    Use the GET_IFCONFIG_INET system call (you'll need to be using asm or C).

    http://spectrum.alioth.net/doc/index.php/Get_ifconfig_inet

    Note that if you already have the Spectranet memory paged in, you don't have to use the HLCALL mechanism, you can do this:
       ld de, address
       call GET_IFCONFIG_INET
    

    DE should point to a block of 4 bytes of memory. The GET_IFCONFIG_INET call will place the current address in that memory. The LONG2IPSTRING call will convert this into a human readable string (see: http://spectrum.alioth.net/doc/index.php/Long2ipstring ).

    The addresses of function calls are defined in a file called spectranet.inc which is available from SVN, see: http://spectrum.alioth.net/svn/filedetails.php?repname=Spectranet&path=%2Ftrunk%2Finclude%2Fspectranet.inc

    Thanks Winston.

    This code pokes 16384 to 16387 with the four bytes. I can PEEK them from there
    11 00 40    	LD DE, 16384
    21 6F 3E    	LD HL, GET_IFCONFIG_INET ; =0x3E6F
    CD FA 3F    	CALL HLCALL ; =0x3FFA
    C9          	RET
    
    DATA 17,0,64,33,111,62,205,250,63,201
    
  • edited February 2013
    Saboteur wrote: »
    Got me a nice rubberkeys today with a very tidy ram turbo joystick interface and a zipstick.

    Anyhoo the interface works fine connected directly to the speccy.

    The spectranet works fine connected to the speccy.

    But if the ram turbo is either connected with the spectranet then the spectranet will not function correctly. The spectranet will show on the screen but will not interact with the network ( no flashing leds ).

    So is it the ram turbo, the spectranet or the spectrum bus that's at fault??

    Any help appreciated.

    Same problem :confused:. Using kempston interface and zx spectrum 48k.
  • edited February 2013
    Same problem on a toastrack and a +2a.

    Ram turbo works ok plugged in either as does the spectranet. But the spectranet will not work if both the ram turbo and spectranet are both connected (in either order )

    Any ideas ?
  • edited February 2013
    Saboteur wrote: »
    Same problem on a toastrack and a +2a.

    Ram turbo works ok plugged in either as does the spectranet. But the spectranet will not work if both the ram turbo and spectranet are both connected (in either order )

    Any ideas ?

    The SpectraNet is designed to be invisible to anything plugged in behind it, so must be the first in the chain (it does this by delaying the pass-through of A15, until it is sure that the SpectraNet is not being accessed).

    The SpectraNet is also very particular about the reset signal, and I know of at least one compatibility issue with the Ram-Turbo and the DivIDE in this regard, so the same problem could be causing this SpectraNet issue.

    See here: http://www.truppel-online.de/spc/RAMTurboMod001.pdf

    This is Ingo's original post http://www.worldofspectrum.org/forums/showthread.php?p=648157#post648157

    I've not studied it myself properly yet along with the SpectraNet schematics, but worth considering.
  • edited February 2013
    Power consumption
    A normal Spectrum in good working order has no trouble powering the Spectranet. However, the ethernet PHY will draw from 138mA to 183mA - so it is possible for the Spectranet to draw on the order of 200mA. If other peripherals are also being used, this must be borne in mind

    Maybe this is? I will try more powerful adapter.
  • edited February 2013
    It's just as likely that the problem is being caused by the Ram-Turbo only using partial I/O port decoding, plus the Ram-Turbo configures one of it's joystick ports during reset.

    Mark
    Sinclair FAQ Wiki
    Repair Guides. Spanish Hardware site.
    WoS - can't download? Info here...
    former Meulie Spectrum Archive but no longer available :-(
    Spectranet: the TNFS directory thread

    ! Standby alert !
    “There are four lights!”
    Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb!
    Looking forward to summer in Somerset later in the year :)
  • edited February 2013
    OK it's definately the RAM Turbo causing the problem.

    I've tried it with a DivIDE and a ZXCF and get the same issues.

    Bugger - gonna have to get a kempston interface.
  • fogfog
    edited February 2013
    maybe ben's interface would be of use to you, assuming you don't need 2 player

    http://www.benophetinternet.nl/hobby/sales.htm
  • edited February 2013
    csmith wrote: »
    The SpectraNet is also very particular about the reset signal, and I know of at least one compatibility issue with the Ram-Turbo and the DivIDE in this regard

    Also the /CLK signal, although generally this hasn't been an issue. (The reset circuit is just via a 74HCT1G125 buffer, then to the CPLD. The bare CPLD will 50% of the time stop a Speccy coming out of reset so that's why it's buffered, but even after going through the buffer the reset signal has a very slow rise time and usually the Z80 starts running before the CPLD sees reset being de-asserted. There's a big-ass delay loop in software to make sure that the CPLD is no longer held in reset by the time the software first tries to set which memory pages are mapped).

    Generally, if you have a Spectranet and you get the blue screen but no text or really odd things on the screen at boot it's because reset has remained asserted on the CPLD for much longer than the CPU, and the delay loop ran out (it should never do this, the delay loop was made very very long to ensure it doesn't happen). If it ends up boot looping, it's probably because either /M1 isn't working or /CLK has been loaded down so much that the CPLD doesn't see it.

    Bear in mind things get increasingly dodgy the more things you add to the Spectrum, the bus gets longer and longer which isn't so good for signal integrity.
  • edited February 2013
    When I connect the Spectranet to any 48k/128 toastrack/grey +2 it just works without fail. If I connect to my +2b or +3 the Spectrum needs 2 or 3 resets before it will see the Spectranet. Is this a known thing? :confused:
  • edited February 2013
    Glenn wrote: »
    When I connect the Spectranet to any 48k/128 toastrack/grey +2 it just works without fail. If I connect to my +2b or +3 the Spectrum needs 2 or 3 resets before it will see the Spectranet. Is this a known thing? :confused:

    Nope. It works fine on both of my +3s (well, until one of my +3s developed a memory fault). Most of the Spectranet development was done on a +3 due to its robustness. (My +3 has currently both a Spectranet and a CPLD breakout board connected to it simultaneously, for the development of a new device...)
  • edited February 2013
    The reset circuit in the +3 is rather odd. Even just the computer on its own would sometimes crash on a reset if you don't hold the reset switch in for long enough. There's a limiting resistor in series with the reset switch which means the voltage across the capacitor C13 has a fairly slow decay. This resets some of the chips, including the ASIC but the CPU and edge connector are on the other side of a 100k resistor with another large capacitor to 0v slowing its decay.

    I believe this all means that if you only blip the reset quickly some chips like the ASIC will be reset but the CPU is not causing weird and wonderful behaviour.
  • edited February 2013
    Yeah, that's a good point - I've noted this sort of thing when resetting a +3, so by habit (habit now so ingrained I don't even realise I'm doing it!) I always hold the button down for a good couple of seconds (and make sure it's pushed all the way in).

    That'd certainly make sense why the Spectranet might not come up if the +3 reset wasn't "good enough", since if the CPLD doesn't get reset, it won't trap and so you'll just end up at the +3 menu.

    I have to wonder what the motivation for making such a bizarre reset circuit was. There had to be a good reason!
  • edited February 2013
    Winston wrote: »
    I have to wonder what the motivation for making such a bizarre reset circuit was. There had to be a good reason!

    I believe that the second RC network may be accidental. IIRC I have three Amstrad schematics here and they are all different. Then there's the NOT gate that creates another buffered reset signal which is put on the edge connector, and not used for anything except being joined to the drive select line via a series resistor in such a way that it doesn't appear to ever do anything.

    Basically a lot of the reset circuit makes no sense at all.
  • edited February 2013
    Winston wrote: »
    If it ends up boot looping, it's probably because either /M1 isn't working or /CLK has been loaded down so much that the CPLD doesn't see it.

    Bear in mind things get increasingly dodgy the more things you add to the Spectrum, the bus gets longer and longer which isn't so good for signal integrity.

    Can interfaces buffer the incoming /CLK signal to interfaces behind or will that cause a unacceptable delay?

    Also, can anything be done to the actual spectrum (ULA?) to improve the strength/quality?

    I have one spectrum which performs boot looping when other interfaces are installed. Would be nice to resolve this.
  • edited February 2013
    Yes, you can buffer it. The wave form is quite different depending on the model of Speccy. On the 48K, the /CLK signal is sort of a "shark fin" wave (a triangular wave with a fairly slow rise followed by a faster fall time, spending very little time either at its high level or low level compared to the time spent transitioning). The 128K toastrack is similar but with a reduced amplitude (still meeting TTL thresholds). The +2B and +3 is a strong square wave which reaches all the way to +5v, with a rise and fall time fast enough to cause significant ringing (and a great deal of harmonics, if you look at it on a frequency analyzer).

    What I've started to do is to buffer /CLK via a 74HCTxx (TTL compatible, I think it's 74HCT14 but I'll have to look it up) schmitt trigger inverter. This means the device on the other end gets a clean square wave broadly in phase with the CPU clock which reaches all the way up to Vcc, the wave being squared off by the schmitt trigger action and the inverter function making it be the same sense as what the CPU gets, since the edge connector signal is actually the inverse of the CPU clock (there is a transistor inverter between the ULA and the CPU).

    The buffered signal on a 48K has the rising edge slightly delayed with respect to what the CPU sees due to the schmitt trigger, but the falling edge is very close to what the CPU sees. Since the schmitt trigger inverter is on the peripheral's PCB and has a very short PCB trace (and on a 4 layer board with a ground plane) to where it's going there is not the ringing you see with the similarly fast rising +3 /CLK signal.

    Generally the delay in the CLK rise with respect to the CPU isn't an issue, it should still fall well within the timing limits that we care about.

    The Spectranet doesn't have a buffered /CLK input because during the prototyping stages, no problems showed up. In hindsight though it ought to have one but it'd be a big redesign of the PCB!
  • edited May 2014
    Hi Winston! First of all want to thank you for a great device! This is fantastic device!
    I recently started using the IRC client and I found that it does not support Russian language(charset). Where can I get the source of this program (as well as Twitter client) to adapt it for Russian-speaking users and servers?
  • edited May 2014
    You can get it either via websvn from http://spectrum.alioth.net/ or by using Subversion (svn co http://svn.alioth.net/svn/spectranet/ )

    Note that the utf-8 implementation is very partial. Translation to Russian will require that the routine that prints to the screen will need extending with the necessary characters.

    Also the Twitter client is now only of historic interest. Twitter have changed the authentication methods for the API to one which an 8 bit system isn't really capable in reasonable time (they now use oAuth for the API). An alternative is to use an HTTPS->HTTP proxy and go via their mobile website but then you'll have to deal with the CAPTCHA image. Of course patches/new versions of the program are always welcome.
  • edited July 2014
    Hi,

    I've finally gotten around to playing with the Spectranet board I purchased, and one of the things I want to do (for fun) us to turn a ZX Spectrum into a webserver.

    I'm well versed in building and running Windows webservers etc, but the Spectranet/ZX system is a different matter!

    Any ideas as to how to do this? First thing will be to get the Spectranet/Spectrum to respond internally on my network to it's local IP. I'm new to the Spectranet and don't really know what it's capable of. I have done similar with an Arduino and an ethernet shield there which also used a Wiznet W5100 so from a hardware perspective I'm guessing it's capable.....I just don't know about the Spectranet's firmware. I'm just looking at serving some very basic HTML for fun, and hopefully it could be as easy as writing a wee basic prog on the Spectrum that'll do the biz.

    The idea eventually is that I'll setup a new domain name pointing to my router (static IP) and port forward to the Spectrum.

    Something like:-
    http://zx81-siggi.endoftheinternet.org/index.html

    PS. My Build = R570

    Ian.
    www.ianjohnston.com
  • edited July 2014
    IanJ wrote: »
    Any ideas as to how to do this? First thing will be to get the Spectranet/Spectrum to respond internally on my network to it's local IP. I'm new to the Spectranet and don't really know what it's capable of. I have done similar with an Arduino and an ethernet shield there which also used a Wiznet W5100 so from a hardware perspective I'm guessing it's capable.....I just don't know about the Spectranet's firmware. I'm just looking at serving some very basic HTML for fun, and hopefully it could be as easy as writing a wee basic prog on the Spectrum that'll do the biz.

    Yep, this is all pretty simple and can be done in BASIC.

    Documentation on handling sockets from BASIC is here http://spectrum.alioth.net/doc/index.php/Guide#Opeining_and_closing_sockets

    The examples are just connecting with a telnet client and sending raw text back and forth but demonstrate everything you'd need to implement a simple http server.
  • edited July 2014
    guesser wrote: »
    Yep, this is all pretty simple and can be done in BASIC.

    Documentation on handling sockets from BASIC is here http://spectrum.alioth.net/doc/index.php/Guide#Opeining_and_closing_sockets

    The examples are just connecting with a telnet client and sending raw text back and forth but demonstrate everything you'd need to implement a simple http server.

    Brilliant, just tried it and it works!

    If it's online you should see it here:- http://www.ianj.net:8082/

    Next step start serving some real html......

    Ian.
  • edited July 2014
    Hi all,

    Wee update:-

    HTML FORMATTING:-
    A bit of a challenge to get the web browser to recognize the data sent to it as HTML......all it does is display the html tags no matter how I format it and try to provide headers in the PRINT function. Any ideas?

    STABILITY:-
    Whilst my wee webserver works, it's not very stable.......every now and then it's stops responding, or the BASIC prog aborts with "0 End of file, 30:1". It's basically a copy of this:-

    10 %listen #4,80
    20 %accept #5,4
    30 INPUT #5;a$
    40 PRINT #5;"You are connected to IanJ's ZX Spectrum ";a$
    60 %close #5
    70 %close #4
    100 GOTO 10

    EDITING BASIC ON PC:-
    I'd like to be able to write my ZX BASIC on my PC, i..e boot.zx and simply drop it into my local TNFSD folder, but it appears as though it's not a simple text file. I use NOTEPAD++ but no luck so far in being able to format it accordingly. Any ideas?

    Ian.
  • edited July 2014
    IanJ wrote: »
    EDITING BASIC ON PC:-
    I'd like to be able to write my ZX BASIC on my PC, i..e boot.zx and simply drop it into my local TNFSD folder, but it appears as though it's not a simple text file. I use NOTEPAD++ but no luck so far in being able to format it accordingly. Any ideas?

    The keywords are tokenized.
  • edited July 2014
    aowen wrote: »
    The keywords are tokenized.

    Yep, so looks like I may need to write a plugin for Notepad++, perhaps to convert in, and then save out the file after editing. Was just hoping somebody else had done this already.

    Ian.
  • edited July 2014
    You'd probably be better off doing something like this in C with the z88dk or asm. The Spectranet library looks a lot like the BSD socket library that practically every OS in the world provides so with little modification, example C code you find for Unix will work on the Spectrum. There are examples on the website, too. See the tutorials and API doc here: http://spectrum.alioth.net/doc/index.php/Software

    The main difference is that the Spectranet doesn't implement select(), you must poll instead. There are some examples in SVN.

    With BASIC don't forget to use %oneof (on EOF) to jump to a line when an end-of-file occurs (basically, the web browser will close the socket and cause BASIC to get an end-of-file) and handle closing the stream and freeing up anything else your program might have allocated.

    Also to make your browser do something useful you have to set enough of the HTTP headers, such as the Content-type header (Content-Type: text/html), or your browser won't know what to do with the data.
Sign In or Register to comment.