Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Serial Server and LOAD "$"
ZXpand+ and ZXpand classic (with "TROLL" firmware) can LOAD directly from a serial connection.
With the appropriate serial cable connections made and the server program running on your PC/Mac type:
The zeddy's screen will blank and the green LED on the zxpand will flash rapidly. Some moments later, the program will have loaded.
RUNNING THE SERIAL SERVER
A cross-platform executable suitable for running directly on Windows or under the MONO runtime on Linux/Mac should be downloaded from the serial-server repository. The C# source is in the same folder, in case you fancy making changes or improvements or don't like to run code you haven't compiled yourself. If you're downloading it I assume you know how to compile it using MONO.
zxsvr.exe [path to P file] [serial port name]
On windows the serial port name will be something like COM1. for OSX it will be something like /dev/tty...
An example run is as follows, taken from an OSX based machine.
charlie$ mono zxsvr.exe alphaprobe.p /dev/tty.usbserial-FTALEZNL Using serial port '/dev/tty.usbserial-FTALEZNL' 38400,8,N,1 11016 bytes read. Server running. I -> 11016 T 0, 256 -> $52EF T 1, 256 -> $35E1 T 2, 256 -> $27EC T 3, 256 -> $327C ... T 40, 256 -> $8000 T 41, 256 -> $740C T 42, 256 -> $5030 T 43, 8 -> $0544 X -> OK!
Here the output of the server shows the ZXpand asking for file Information, and the server's response.
I -> 11016
ZXpand then requests Transfer of a block. The block number and desired length is given, and the server responds by sending the required data and a checksum.
T 3, 256 -> $327C
If the checksum calculated by the ZXpand matches the one received from the server then the next block is processed, or the last block requested again.
This continues until the last byte is processed, at which point the ZXpand signs off with a kiss.
X -> OK!
This is V2.5 of the classic ZXPand firmware, and the second in the newly minted 'mythical creatures' series. Collect them all!
ZXpand uses 5V TTL signalling levels. Be sure that whatever you connect to your device will neither damage your ZXp nor be damaged by it!
Transmit and receive labels shown here are ZXpand-relative, i.e. ZXpand TX should connect to RX on the computer hosting the server.
For ZXpand+ connection information read the fine manual, the extension connector's pinout is detailed there.
For ZXpand classic, use the following connections, which will need to be soldered to the pads of the PIC's pins:
For those of a more visual nature here is some visual. Pictured is an issue 3 board but the connections are the same for issue 1.
ZX-IDE AND LOAD "$"
ZX-IDE can be configured to invoke the server upon successful assembly of your program. A new feature in version 1.7 allows the execution of a batch file when compilation completes. If a batch file named the same as your program source exists on disk then it will be executed when the compilation result window is closed. An example general-purpose winDOS batch file might look something like this:
@echo off rem - construct the target filename using the name of this batch file itself. rem - '%~n0' will yield the name of the batch file without its extension. rem - this script assumes that zxsvr.exe is available in the path. rem - change the com port to the one used by your computer set PORT=COM999 set PNAME=%~n0.p @zxsvr %PNAME% %PORT%
The script above can be used unaltered with any program. Just save it with the same name as the source you are using with the extension changed to '.bat', e.g.:
The workflow becomes:
- compile program
- dismiss compilation report window
- [server runs]
- type LOAD "$" on the zeddy
- [loading occurs]
Which is nice.