New tool: SnapToTap R2

edited August 2012 in Announcements
it's basically a gui update to VSC. But it's now simpler to convert sna files into tap files.

what is special about SnapToTap?
it converts snapshots into a single, standard CODE block. You can use LOAD "" CODE from basic and then use a USR xxx to start the game.

You can copy these blocks to any storage unit, microdrives, +3 disks or tapes, you name it. Tool can inject microdrive and tape loaders if you want.

Requirements:
MS .net framework 2.0+ (win XP/Vista/7)

snaptotap_scrshot.jpg

Features:
Bitbuster compression (amazing really. Chuckie Egg compresses into 10k, loads fast.)
Standard code blocks.

Download:
http://arda.kisafilm.org/fish/SnaptoTap-r2.zip (240kb zip file) (updated: r2.1)

bug reports or feature requests may be posted here or blog entry.

Tips:
* Create snapshots when the screen is blank. Doing this produces a smaller tap file (about 3k), shorter loading time.
* If you don't want to see a corrupted screen, make the snapshot just before the program refreshing the screen (use "tape event>tape stop" debugger command in specemu).
* SNA files are 48k images generated by a 48k computler. So they may not work if resulting tap loaded into a 128k computer.
* Here is an a example Mdr file, snaptotap can manage 6 full snapshot into ONE microdrive cart: Cyclone, Action Force 2, Chuckie Egg, Skooldaze, Snooker and Thrust 2.
Post edited by Arda on
«1

Comments

  • jpjp
    edited March 2011
    Very cool - thanks for this new release
  • edited March 2011
    How does the user work out what address to start the game via RANDOMIZE USR ?
  • edited March 2011
    Hercules wrote: »
    How does the user work out what address to start the game via RANDOMIZE USR ?

    eheh, good question, maybe I should add it :)

    just check the tape paremeters in your favourite emulator (eg.zxspin) while I add the start address output textbox into tool :)

    edit:
    OK it's added, it's shown when you try to save the tap file. Also, the address is appended into the output filename. Just re-download the archive. (Archive filenames are same but it's now R2.1 in the about box.)

    taken from usage.txt:
    Eg. USR address is 43000, use this program to load the snapsot: CLEAR 42999:LOAD ""CODE:RANDOMIZE USR 43000
  • edited March 2011
    Arda wrote: »
    eheh, good question, maybe I should add it :)

    just check the tape paremeters in your favourite emulator (eg.zxspin) while I add the start address output textbox into tool :)

    edit:
    OK it's added, it's shown when you try to save the tap file. Also, the address is appended into the output filename. Just re-download the archive. (Archive filenames are same but it's now R2.1 in the about box.)

    taken from usage.txt:
    Eg. USR address is 43000, use this program to load the snapsot: CLEAR 42999:LOAD ""CODE:RANDOMIZE USR 43000

    Ah, got it ! Same as doing CAT "T:" to find start address on +2A and +3. Now I know the start address is the start of the code, I can have some fun with your program !

    Thanks again Arda !
  • edited March 2011
    Very nice! I will add this to the list of very important tools. Any plans on adding the option to create TAPs from other snapshots, not just .SNA?
  • edited March 2011
    Now I know the start address is the start of the code
    yes, the decompresser code resides at start of the code block.
    zxbruno wrote: »
    Very nice! I will add this to the list of very important tools. Any plans on adding the option to create TAPs from other snapshots, not just .SNA?

    My real aim is to add 128k snapshots, it's more complicated than loading 48k snaps. I'm still thinking about this, if I can manage this, there will be .z80 support too.

    Also I can get feature requests as I'm taking responsibility of my program. But not promising anything :)

    thank you for feedback :)
  • edited March 2011
    Looks like my Microdrives are going to get some abuse this weekend ;)

    Awesome!
  • edited March 2011
    Here is a video of using SnapToTap to transfer a 48k snapshot into an +3 disk.

    http://dl.dropbox.com/u/18567419/SnapToDisk_tutorial_xvid.avi

    (needs xvid codec)

    You can use a real +3 instead of spectaculator emulator parts.

    Same technique may be applied to any storage medium.

    Come on, it isn't that hard :)
  • edited March 2011
    excellent utility thanks!
  • edited March 2011
    Arda wrote: »
    Here is a video of using SnapToTap to transfer a 48k snapshot into an +3 disk.

    http://dl.dropbox.com/u/18567419/SnapToDisk_tutorial_xvid.avi

    (needs xvid codec)

    You can use a real +3 instead of spectaculator emulator parts.

    Same technique may be applied to any storage medium.

    Come on, it isn't that hard :)

    Great tutorial Arda, thanks. :)
  • edited March 2011
    football manager goes down to under 15K :smile:
  • edited March 2011
    I tested SnapToTap with a few games and everything works great and compression is really fantastic.
    Also i used the "stop tape" command in specemu debuger, but still have a corrupted screens and I saw that the problem remains in Arda's tutorial too.
    Is it possible to avoid this somehow?
  • edited March 2011
    torot wrote: »
    football manager goes down to under 15K :smile:

    Here is a weekend update:

    http://arda.kisafilm.org/fish/SnaptoTap-R22.zip

    Just added "Clear Screen" option, so compressor clears the screen *before* compressing, increasing compression ratio. Note that, when you load the snapshow you'll see a blank screen. SO it's crucial to create a snapshot just before it redraws the screen (see tutorial video).

    it can save up to 4k depending on the screen complexity.
  • edited March 2011
    Still corrupts the first third of the screen, except when the "clear" option is turned on, but then we lose the loading screen.
  • edited March 2011
    Pegaz wrote: »
    Still corrupts the first third of the screen, except when the "clear" option is turned on, but then we lose the loading screen.

    AS this is a cut-down version, relocation of loader is disabled. It's set to default at screen memory. If you got courage, you can use older, manual version, VSC (R1). Essentially they are both same program with different gui.

    But I must state that, there is no way loading a snapshot file into memory without corrupting some part of snapshot. Because a snapshot contains ALL ram data PLUS Cpu registers and border colour data. Ofcourse this corruption may be reduced to ~40 bytes (as some utilties do), it will need a custom loader, thus rendering whole "standardized code block" idea useless.

    Well, SnapToTap's main goal is to convert SNA files into Standard CODE blocks, tape files are just another output format (I may add others as well). You can carry these blocks to any storage medium easily as they are compressed to keep Sinclair Basic running. But decompressing these blocks needs 80bytes long decompressor code, decompressor cache, as data cannot extract onto itself, some safety offset about 64bytes, relocator code, register restoration code. At the end, I end up corrupting 400bytes of memory. Safest place is the start of the memory, so it is first 400 bytes of screen gets corrupted.
  • edited March 2011
    Pegaz wrote: »
    Still corrupts the first third of the screen, except when the "clear" option is turned on, but then we lose the loading screen.

    Well if you want the loading screen you could use a program to pack it (something like screen scrunger from Your Spectrum), then alter the loader to load the loading screen, depack it, use that poke that hides the "Bytes:" message, load the compressed game code then run the decompressor. :smile:
  • edited March 2011
    The only games that there is a problem with the screen corruption are games like driller which load the game border panel as a screen$ and never refresh it during the game.

    What could be done to get around this is relocate the decompression code to the updated 'game window' and moderate the code with jumps across the left hand and right hand borders.

    Used to do this with microdrive code loading snaps. :smile:
  • edited March 2011
    torot wrote: »
    Well if you want the loading screen you could use a program to pack it (something like screen scrunger from Your Spectrum), then alter the loader to load the loading screen, depack it, use that poke that hides the "Bytes:" message, load the compressed game code then run the decompressor. :smile:

    Better idea for mdrive

    make a menu program for the cart with all the loading screens in higher memory with a small LDIR program to copy them to the screen such as 33, 0, 128, 17, 0, 64, 1, 0, 27, 237, 176, 201

    when the choice of game is made poke the address of the screen into prog and run it, then the menu prog loads and runs the compressed program

    THEN compress the whole menu program with screens in higher memory with snapToTap

    then save the compressed menu program as 'run'

    This way I got tir na nog, dun darach and marsport with menu program with loading screens for 88K :smile: the menu program with three full loading screens went down to around 9K
  • edited March 2011
    torot wrote: »
    Better idea for mdrive

    make a menu program for the cart with all the loading screens in higher memory with a small LDIR program to copy them to the screen such as 33, 0, 128, 17, 0, 64, 1, 0, 27, 237, 176, 201

    when the choice of game is made poke the address of the screen into prog and run it, then the menu prog loads and runs the compressed program

    THEN compress the whole menu program with screens in higher memory with snapToTap

    then save the compressed menu program as 'run'

    This way I got tir na nog, dun darach and marsport with menu program with loading screens for 88K :smile: the menu program with three full loading screens went down to around 9K

    Interesting effort :) And I know Bitbuster is fun.

    Well, at my first announce post, there is an example mdr file, which includes a "menu program" (run) gets the contents of microdrive, and build a fancy menu automatically for them. But your loading system is more fun. Btw, I tested snaptotap outputs on real microdrives. Loading was so fast games load in maximum of 3 seconds. :) Microdrive rulez! I love them. (I want more carts, anyone care to sell me a big box of them?)

    Now my plan is to add an optional turbo loader for Tape Output and 128k snapshot support.
  • edited April 2011
    Any news on the tape fastloader for this cracking little utility?

    Did a microdrive cart yesterday - manic miner, jetset willy and jetset willy 2 in 64K :smile:
  • edited April 2011
    torot wrote: »
    Any news on the tape fastloader for this cracking little utility?

    Did a microdrive cart yesterday - manic miner, jetset willy and jetset willy 2 in 64K :smile:

    I'M not planning any turbo loader, as I don't know how to write one :D But I know one program does that, it's Z802TZX from Tomcat. It's dos only but works brilliantly.

    I don't have enough time to update this tool nowadays, but I'll definitely add 128k support in this summer. I already made some work on this, it's still buggy and corrupts screen but it compresses 128k batman into 70kb tap file. I may be possible to fit a 128k game into single microdrive!

    As my microdrive cartridges generally hold about 80KB due to old age, it's fantastic :)

    By the way, today I realized author of bacteria released a similar tool, called desprot. It uses it's custom loader, so the games cannot be copied to something other than a tape, but it can convert 128k snapshots. Here is the google translate link:
    http://translate.google.com/translate?js=n&prev=_t&hl=en&ie=UTF-8&layout=2&eotf=1&sl=es&tl=en&u=http%3A%2F%2Fwww.speccy.org%2Fforo%2Fviewtopic.php%3Ff%3D6%26t%3D2258
  • edited April 2011
    Cheers Arda. No matter about the fastload - that can be done at the speccy end no problem. Good luck with the 128K snap version but 128K speccys don't interest me really, I don't do 128K!

    Thanks again for the utility :smile:
  • edited April 2011
    Arda wrote: »
    I'M not planning any turbo loader

    My old snapshot compressor has had the turbo loader option for a couple of years at least :)

    Shame it's not available to anyone ;)
  • edited April 2011
    Woody wrote: »
    My old snapshot compressor has had the turbo loader option for a couple of years at least :)

    Shame it's not available to anyone ;)
    And I suspect it's written in asm...
    I wanna tell you a story 'bout a woman I know...
  • edited April 2011
    Woody wrote: »
    My old snapshot compressor has had the turbo loader option for a couple of years at least :)

    Shame it's not available to anyone ;)

    Its OK, this one is very good and I can add the turbo load on to the output files as I said. Not a shame at all.
  • edited April 2011
    Woody wrote: »
    My old snapshot compressor has had the turbo loader option for a couple of years at least :)

    Shame it's not available to anyone ;)

    Ah did you write the original version? Sorry !
  • edited April 2011
    Woody wrote: »
    Shame it's not available to anyone ;)

    good, if it was available, then I wouldn't get all this attention and fame! Keep it that way!

    btw, the whole point of the utility was loading the snapshot with standard rom loader. :D Adding kraplock to it beats the purpose. Still I would love to learn how to make a custom loader for microdrives (if it's possible), but my z80 skills are close to none :D
  • edited April 2011
    It doesn't add kraplock. It creates compressed standard ROM loaders or turbo loaders. And you have nothing to worry about it taking away any of your attention or fame :D
  • edited April 2011
    Woody wrote: »
    It doesn't add kraplock. It creates compressed standard ROM loaders or turbo loaders. And you have nothing to worry about it taking away any of your attention or fame :D

    Yeah, I have a copy and I never figured out how to get it to work. ;)
  • edited April 2011
    aowen wrote: »
    Yeah, I have a copy and I never figured out how to get it to work. ;)

    Heh, well I wasn't withholding it from anybody, just saving them from it :)
Sign In or Register to comment.