Getsnapx - XMODEM receive a .SNA file over serial link on +3 (or +2A) & run it
Gsnx128  - do the same on a 128 or +2

Public domain by Russell Marks.


Getsnapx loads a .SNA file from the +3's serial port and runs it.
Gsnx128 is a version which works on the 128. You'll need a suitable
null modem lead and another computer to XMODEM transfer the .SNA file
from. No software other than something capable of XMODEM transfers is
needed for the other computer.

Getsnapx uses a couple of routines in ROM 1 on the +3. If your ROM
version differs from mine (v4.0) it might not work. OTOH, I doubt they
moved the routines. It might even work on a +2A. Maybe. Try it and
see. :-)

I reckon gsnx128 should work on all 128s and the grey +2, but I've
only tested it on a single 128.


To use getsnapx, you need to get the file getsnapx.bin across to your
+3. Good luck. :-) You could type in a hex dump, at a stretch, but at
~600 bytes it would take a while. Only recommended for real hex
veterans...

Using zfst is probably an easy way to transfer it. That's on
ftp.nvg.unit.no somewhere under /pub/sinclair (can't remember where
now). Get zfst to add a CODE header when transferring.

Alternatively, you could use CP/M to transfer it. If so, you'll need
to add a header `by hand' - COPY "getsnapx.bin" TO SPECTRUM FORMAT
from Basic should do that. (Be sure to then copy getsnapx.hed over
getsnapx.bin, so it has the right filename.)

Then type this in and save it as 'getsnapx':

	10 CLEAR 25399
	20 LOAD "getsnapx.bin" CODE 25400
	30 RANDOMIZE USR 25400

Run this, XMODEM across a snapshot, and maybe it'll even work! :-)

(Obviously with gsnx128 (or getsnapx on a +2A) you have to instead
load the basic and code from tape before you can XMODEM the snapshot
across, but it's still at least 3 minutes quicker than loading from
tape.)

The screen background is filled with purple as the snapshot loads;
when it's full the whole snap has loaded, so the attributes are copied
back and the snap is started up. (The first line of the screen is
corrupted by some of the code and stack used to get the snap running -
sorry.)

If something goes wrong with the transfer, you should get the error 'R
Tape loading error'. If you want to abort a transfer, hit BREAK.

Transfers will be done at the "format line" speed - 9600 if you
haven't altered it since power-on/reset. At 9600 baud, a snap takes
about a minute to load.


If you want to look at the source for some reason, it's supplied (in a
format friendly to zmac from comp.sources.unix volume 9) as getsnapx.z
(and gsnx128.z). And yes, I already know the code is horrible.


I should add a final disclaimer - this doesn't work with a few snaps
I've tried (notably Matchday 2). I'm not sure why.


Have fun,
-Rus.
