Zx Spectrum’da SNA to Tap converter

Çevirici

 

 

While I was messing with my zx microdrives, I decided to put some games into one of my old microdrive carts for quick loading. But this proved to be not only difficult task, also it spinned off two different tools out of discussion: zxBoot and SnapToTap.

 

Converting sinclair zx spectrum snapshot (sna) files into standard loading tap files: Not an easy task at all!

There were some tolls to convert snapshots into Tape files, but because of the very nature of snapshot files and the way of starting them once they loaded, it is impossible (read:impossible) to load a snapshot into zx spectrum without corrupting the snapshot itself. To do this properly you need additional hardware.

a Snapshot file is a full memory backup *with* extra CPU register data. Speaking of which, that data resides *inside* CPU. So you need a way to put the data into CPU before resuming snapshot state. Ofcourse this task also need to handled with CPU itself, which needs some code to reside in RAM, which also corrupts snapshot image. But this is not the only issue.

The goal was to put snapshot files into zx microdrive. But you will need a custom loader which loads the data from microdrive. There are none. Or you will need a converter which converts the snapshot into a standard loading code block. You couldn’t find one of thouse either.

Standard loader always tries to return to basic after loading is done. Because it is a basic component. But a snapshot occupies whole memory, so basic will be overwritten while you load snapshot block. And even if you manage to load the all 48k of ram from tape, it will crash your machine because standard rom loader will return to address that’s not there anymore.

The trick is the preserve small portion of basic just to execute the loaded code.

I used bitbuster (originally developed for MSX by team bomba) compressor. It’s very effective windows based packer normally reduces almost every 48k image atleast by %10 which produces about 5k, more than enough for us to fit in basic. Also the z80 decompressor is 79bytes long, plus some bytes as buffer, that it won’t be corrupting that much.

So I managed to create a clever program to decompress, move, merge the snapshot data, load the registers into cpu and finaly jump the the program counter location of snapsot image thus executing image.

The result was VSC, a proof of concept, an experiment over converting snapshots into tap files.

While this program re-invented in WOS forums a while ago, and people complained about the crapness of gui, I prepared a simplistic gui with automatic converting: it is SnapToTap. You drag and drop the file and it will create a tapfile highly compressed thus loaded in seconds, and with standard loader!

So there are two versions. Here is the downloads:

1. Latest version 2.4: Snaptotap 2.4 download)

2. First release: Visual Snapshot Converter – 250kb advanced controls, optional uncompressed converter, you can decide where to put executer code thus preserving screen or any other data–do not try to use this, I really messed up while creating a gui. 🙂

Snaptotap r2

A little bit warning about the tools:

No error checking, so it may crash time to time, it’s normal. Resart the app and try again.

Those are dotnet framework binaries, you will need .net framework 2.0+ to run them. Windows Only!

If snaptotap didn’t work for you, try asm’s zxboot for command line support, but it’s still windows only.

10 thoughts on “Zx Spectrum’da SNA to Tap converter”

    1. senin de tahmin ettiğin gibi bu işlem bir makine “durumunu” aktarmaktan ibaret. Yani burda kaset çevrimi yapmaktan çok, genellikle emülasyon ya da freezer kartuşlar kullanılarak yaratılmış olan “durum” dosyalarını ek bir donanım kullanmadan makine üzerinde çalıştırmaca yapılıyor.

      Özetle, multiload formatta bir state dosyası olmadığı için sorun bu duruma uymuyor. Büyük olasılıkla, teyp emülasyonu olmadan öyle bir sistem yapmak da imkansız olurdu.

  1. O zaman zamanının uyanık Commodorecuları gibi yapacağız ve bu tür oyunların her levelını tek tek yükleyip snapshot alacağız. Sonra da ilanlarımıza “kimsede olmayan gerçek kaset versiyonu Hostages gelmiştir” diyeceğiz 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *