ZXtranSAM
This is a ZX Spectrum to SAM Coupé BASIC translator and variable importer.
š¾ tranSAM.mgt (bootable, includes SAMDOS2)
Use it to convert ZX BASIC (MGT type 01) filesāi.e. those saved to disk using PlusD or DiSCIPLEāto SAM BASIC, *including* any variables saved along with the program.
- Press F9 to boot, then choose T for tape loading or D for disk loading.
- For disk-loading, a directory will automatically be shown. Type the name of your BASIC file at the input. Case doesn't matter but wildcards or file numbers won't be recognised. Must be a ZX BASIC file.
- The tape loading routine will automatically load the next BASIC file on tape, and will show the name of the program.
- Speccy 128 additional tokens PLAY and SPECTRUM can't be translated† but can be REMmed out if you want. Y for this behaviour or N to continue to treat them as 48K UDGs T and U. This will affect all instances of those characters (i.e. UDGs T and U within strings) so choose carefully! Normally a Spectrum program would not have both.
Have a look at Syncytium PLAY for PLAY playback on SAM. Thanks to Samster for that tip! - If the file was saved with an auto-start LINE number, you'll be prompted to autostart or not (press Y or N).
The translation is based on BTRANS from the MGT Utility Tape (also included on the SAMDOS system disk).
ZX Spectrum BASIC variable parsing is based on Variables List by Neil R. Canham.
š Source code on GitHub.
1.1 Added simple PLAY/SPECTRUM token support.
1.2 Fix SAM memory paging (allow larger programs with more variables).
1.3 Reclaim memory used by Spectrum variables once they've been imported.
1.4 Restored tape loading routines from BTRANS.



