A snapshot to transfer converter

I'm programming a tool that takes an snapshot file and convert it to a tape file that mimics those created with transfers. This is a long term project, because I haven't done a program in ages and haven't too much spare time.

This is my first release.

What does it do? Not much. It converts a given sna file to a tap file that mimics a transtape saved game (BASIC, CODE 16384,75 and a headerless block of 49052 bytes).

Known bugs/features:
- It does not check for a correct sna file (=49179 bytes), it will try to convert anything.
- The output file is always TRANSTAPE.TAP. You can't choose the output file, and it will overwrite any previous file.
- The BASIC program is named 1942.
- It doesn't check most errors.

This release is a proof of concept and it's only meant to check if it works (it seems it does).

Any TO-DO list?:
Yes, that's the first step into a bigger utility that should:
- Convert SNA, Z80 and SP (Pedro Gimeno) snapshot files.
- Mimic different transfers like Transtape, Phoenix and HILOW).
- Use optimizations (Phoenix shorten loading times, because it didn't save some zero filled memory zones).
- Add some features to transfers (i.e.: saving a 128k game and using a Transtape-like loader to load it).
- Make some games loading using only BASIC commands (so they can be put in +3DOS disks). It would only work with 48k snapshots loaded on 128k machines.

What won't it do?
- It won't create turbo loading tapes (like those created with Phoenix).
- Some transfers that have strange loaders (i,e.: Multiface, Specmate).
I was there, too
An' you know what they said?
Well, some of it was true!
Thanked by 1Bedazzle


  • ZupZup
    edited March 2018
    Another release....

    What does it do now? Mostly the same, but better ;)

    Any enhacement?:
    - It does check the size and (to some extent) content of files before converting.
    - It creates a tap file with the same name (minus extension) that the original file.
    - It includes a little (inacurate) help text. It appears if you use the -h switch or try to run the program without parameters. Only in spanish.
    - Added -f switch that forces 48k mode. It allows some games (i.e.: Jet Pac) to run in 128k machines.
    - Added -v switch that shows information about what's doing the program and some data about the snapshots.
    - Converted games will have the name "Loader" or "Loader48" (if the tape has been converted with -f).
    - Better error management.

    Known Bugs/Features implemented:
    - Some switches (-b y -n) are not implemented.
    Post edited by Zup on
    I was there, too
    An' you know what they said?
    Well, some of it was true!
  • Small update:

    - The project has its own web page.
    - A gross bug has been found and fixed regarding interrupts.
    - Have some doubts about R register. I've got to test if it really works as intended.
    I was there, too
    An' you know what they said?
    Well, some of it was true!
    Thanked by 1Luzie
  • Thanks for this, it's great to see it coming together bit by bit.
  • Another release (v0.40):

    The switch -b works. Using -b, the program creates a tape that doesn't look like old transtape ones. This tape will only work in 128k machines and it contains three blocks that can are loaded from BASIC. The main advantage is that they are easy to transfer to disk (you only need to change the LOAD sentences. It uses page 3 as temporary storage (because page 1 is used as cache in +2A/+3).

    Another bonus POKEs can be easily added: you only need to put them after the last LOAD "" CODE and before the RANDOMIZE USR 24565. Any POKE above 24576 will work.

    Both -b and -f switches can be used simultaneously. In this case, the game will be loaded using BASIC but paging will be locked before it is launched.
    I was there, too
    An' you know what they said?
    Well, some of it was true!
  • ZupZup
    edited December 2018
    Another (old) release (v0.43):

    The switch -n works. Using -n, it will ask for a name for your tape (it will show after "Program: " when loading).

    Also, my (free, unreliable) hosting has been scrapped and the program has been reallocated to my blog. You can get the program using this link.

    (BTW... how can I edit old posts to remove deprecated links?)
    Post edited by Zup on
    I was there, too
    An' you know what they said?
    Well, some of it was true!
  • (BTW... how can I edit old posts to remove deprecated links?)

    you can not
    you can use yr 'sign' to have a latest release link.
    my old website http://home.hccnet.nl/c.born/ has changed to http://www.cborn.nl/zxfiles/ so just click it and select a file
  • ZupZup
    edited June 7
    I've been working on sna2transtape and I've uploaded version 0.47. I've uploaded it because I've been cleaning up
    that mess called source code.

    New features:
    - A new meaningless switch: -s guarantees that your .tap is 100% like a real transtape one (yes, it means the same that not using -b nor -f... and if this switch is included both -b and -f are disabled.
    - No warnings when compiling.
    - A future bug squashed.

    TO DO:
    - Cleaning up a little more.
    - Converting 128k SNA files (but note that transtape didn't do it).
    - Maybe adding an english version?

    Get it my from blog.
    Post edited by Zup on
    I was there, too
    An' you know what they said?
    Well, some of it was true!
    Thanked by 1Alessandro Grussu
  • Some 10 years ago :



    Z80 Snapshot to TZX Tape Converter v1.2

    ->by Tom-Cat<-


    Z802TZX Filename.[z80|sna] [Options]

    -v Verbose Output (Info on conversion)
    -s n Loading Speed (n: 0=1500 1=2250 2=3000 3=6000 bps) Default: 3
    -b n Border (0=Black 1=Blue 2=Red 3=Magenta 4=Green 5=Cyan 6=Yellow 7=White)
    -r Use Bright Colour when filling in the last attribute line
    -$ f Use External Loading Screen in file f (.scr 6912 bytes long file)
    -o f Use f as the Output File (Default: Input File with .tzx extension)
    -l s Use String s as the ZX Loader Name (Loading: name) Up To 8 Chars!
    -g s Use String s as the Game Name (Shown when Loading starts)
    -i1 s Show a line of info when loading (first line)
    -i2 s Show another line of info when loading (second line)

    Strings (s) can be Up To 32 chars long. Use '~' as (C) char.If no Border Colour
    is selected then it will be gathered from the snapshot file. Loading and Game
    Name will be taken from the Filename if you don't use the -l or -g parameters!
  • This is a homage to transfer interfaces, so it uses the same screen corruption and block format that used transtape. In my country, it was very common to get some "transtaped" games when borrowing tapes from friends.

    I knew that there would be other tools that could make the same (i.e.: I knew that fuse included tools to convert between formats... snap2tzx seems similar to Z802TZX), but the main goal of my program was mimic transtape loading (although sna2transtape now includes a 128k mode and that "BASIC" mode that uses different loaders than transtape).

    Z802SNA seems more flexible, but sna2transtape has some unique options:
    -f can make some snapshots (i.e: all 16k and most 48k Ultimate games) compatible with 128k without using 48K BASIC.
    -b can make "easy hackable" tap files (you can POKE almost everything, and easily transfer to other media like floppies).

    Also, although creating tap files prevents you from changing loading speed, there are some devices (like ZX-Uno or divide) that can load from tap but not from tzx (although both devices can load .sna and .z80 directly, so this can be pointless).

    BTW, I've updated my utility to version 1.02 (new feature: converting 128k snapshots). It's funny that one of my test snapshots (Doom Mania, on my blog there is a file called sna test suite that includes it) fails to be converted on both sna2transtape and Z802TZX (maybe the snapshot is from a russian machine?).

    I guess the only new features I will add to sna2transtape will be "intelligent saving" and "UK/US fan service". The first option will trim out memory pages (cut out leading and trailing zeroes so it saves less data), the second one will add english language messages (although that will be a different exe).

    After that, I guess I'll make "sna2phoenix" (still thinking how to make the 128k loader) and maybe make a front-end to avoid using command-line.
    I was there, too
    An' you know what they said?
    Well, some of it was true!
  • I've uptated to version 1.20. New features:
    - It can convert 128k sna files.
    - When converting 128k files, it trims RAM memory pages to reduce space used and load time. I've added a switch (-t) to force saving every bit of memory.

    This time saving option brought a nasty detail about how 128k Spectrum initialize the RAM. The fact is that they don't initialize all RAM to zero (to be more precise, they do initialize to zero but then use some areas). Every 128k machine will use some bytes on RAM 7; +2A/+3 machines uses more bytes on RAM 7 but also uses RAM 1, 3, 4 and 6 for RAMDisk (and fill that memory with non-zero values).

    As a result, a Fairlight 128k snapshot taken on a +2 and converted to tape will take 8m 06s to load, a snapshot taken at the same point in a +3 will take 12m 19s (almost the same time that would took loading all the RAM). Another snapshot taken on a machine with the memory previously zeroed will take 7m 45s.
    I was there, too
    An' you know what they said?
    Well, some of it was true!
  • ZupZup
    edited June 27
    Another update with some bugfixes to older versions:

    - It seems that v1.02 and v1.20 needed some more testing, because two bugs went unnoticed. The first one avoided converting 128k snapshots unless -v option was used; the second one prevented games from working on a +2A/+3. Both versions are fixed now.

    - New version 1.24 with RLE compression. It shortens load times (not too much) but the main advantage is that "fixes" those long loading times when converting a +2A/+3 snapshots. Again, it depends on switch -t: if it is present, you'll get extra long loading times.

    The program is in spanish (again), and can be downloaded from my blog.
    Post edited by Zup on
    I was there, too
    An' you know what they said?
    Well, some of it was true!
Sign In or Register to comment.