New Utility to Transfer Z80 Snapshot to +3 Disk

Show us what you're working on, (preferably with screenshots).
User avatar
TomD
Manic Miner
Posts: 376
Joined: Tue Nov 13, 2018 9:47 am
Location: Leeds UK
Contact:

Re: New Utility to Transfer Z80 Snapshot to +3 Disk

Post by TomD »

v2.1 released with some bug fixes and a change regarding the forcing of machine type to improve compatibility. I found while making some compilation disks that games that seem to be 48k only but from circa 1985 and onwards sometimes seem to have code which checks for machine type and adjusts some timings etc.. This caused some games to not work when converted using my utility (Heatland) or to have terrible sound (Hypaball). I've therefore changed the -f3 and -f2 options to do the following:

-f2 - force 128k to 48k. This forces a 128k snapshot to run as 48k but retains paging and the Amstrad 48k ROM. Before it was turning off paging and patching in the Sinclair 48k ROM.
-f3 - force 48k to 128k. This forces a 48k snapshot to run as 128k. Before I had this as an option to stop the auto conversion of 128k to 48k but that made no sense so I've switched it. Heatland by Odin just didn't work until I added this option, it also fixes a lot of other games from 1985 and onwards. It still retains the 48k memory map of 5,2 & 0 but keeps paging on and the Amstrad 48k ROM.

Anyway you can download the new version here https://tomdalby.com/speccy/Z80onDSK_v2.1.zip

TomD
Retro enthusiast and author of Flynn's Adventure in Bombland, The Order of Mazes & Maze Death Rally-X. Check them out at http://tomdalby.com
User avatar
TomD
Manic Miner
Posts: 376
Joined: Tue Nov 13, 2018 9:47 am
Location: Leeds UK
Contact:

Re: New Utility to Transfer Z80 Snapshot to +3 Disk

Post by TomD »

After reading about the +3s memory banks I've redesigned the 48k snapshot routine a little. My initial design patched in the SInclair ROM for 48k snapshots as default but while converting some games I've found the music was off. I didn't realise but it seems that using the special mode makes the upper memory contended (banks 3 & 6) which screws all the timings up. I've therefore flipped the default mode to be standard pages (2 & 0) but with bank switching off which improves compatibility a lot. I've kept the Sinclair ROM as an option but this really only helps with very old or 16k games which don't care about the upper memory being contended.

I addition I've added a 2nd basic loader for disks with only a single snapshot on them so it autoloads it without having to type the name in. You can grab v2.2 here https://tomdalby.com/speccy/Z80onDSK_v2.2.zip

Code: Select all

╔═══════════════════════════════════════════════════════════════════════════════
║ Z80onDSK v2.2 for WINDOWS (c) 2019 Tom Dalby
╠═══════════════════════════════════════════════════════════════════════════════
║ Usage: Z80onDSK [global options] <snapshot>.z80 [snapshot settings] <name>
║
║  <name>: output filename, if nothing specified z80 snapshot filename used
║
║  [global options]
║   -t: output to tape as well as disk
║   -q: quiet mode, turn off all text output (other than error messages)
║   -m: dump memory banks and full compression to binary files. These will
║       named after the SPECTRUM filename
║   -b: do not add autorun basic routine to disk, useful if you want to add
║       your own loader routine later
║   -h: make the loader code, autorun basic & 128k 2nd file visible on disk
║       default is hidden to make things neater when cataloging the disk
║
║ [snapshot settings]
║   -o <name>: define SPECTRUM filename, if nothing is specified snapshot
║              filename used. Truncated to 8 chars with non-alphanumeric
║               & spaces removed to ensure PLUS3DOS compatibility
║   -s <name>.scr: use an alternate loading screen. Must be a .scr 6912bytes
║   -bN: use an alt mem location for 17byte run code, default 23734 (CHANS)
║     1: @16384 (top left of screen pixel area)
║     2: @22511 (bottom right of screen pixel area)
║     3: @23296-23552 program will scan for continuous block of zeros
║          in printer buffer, if no space exists program will error
║     4 <mem>: @16384-32751 user specified memory location
║   -fN: force machine type
║     1: force 16k. Clears top 2 memory banks to remove erroneous data in upper
║        memory for 16k games. Helps reduce snapshot compressed size. If stack
║        or PC are in upper mem (>0x7fff) utility will exit with error.
║     2: force 48k + paging. Works on 128k & 48k snapshots. Only banks 5,0 & 2
║        are stored, retains paging & Amstrad ROM.
║     3: force 48k no paging. For 128k snapshots as this is default for 48k.
║        Only banks 5,0 & 2 are stored, paging off & Amstrad ROM in place.
║     4: force 48k old skool. Only banks 5,0 & 2 stored, paging off &
║        original Sincliar ROM patched in. Note this causes upper mem to be
║        contended which may cause issues with some games.
║
║ Batch Mode is activated if more than one z80 snapshot specified, example:
║
║     Z80onDSK snapshot1.z80 snapshot2.z80 compilation1
║       where "compilation1" is the filename of the resultant disk/tape file
║       (if nothing specified the first snapshot name is used as above)
║
║   each snapshot can have its own settings but options are global, example:
║
║     Z80onDSK -q snapshot1.z80 -s screen1.scr snapshot2.z80 -b1 compilation1
║         which runs in quiet mode, snapshot 1 has an alternate loading screen
║         snapshot 2 has the run code located top left of screen pixel area
║         all outputed to "compliation1.dsk"
║
║   max 16 snapshots per disk/tape
╚═══════════════════════════════════════════════════════════════════════════════
Retro enthusiast and author of Flynn's Adventure in Bombland, The Order of Mazes & Maze Death Rally-X. Check them out at http://tomdalby.com
User avatar
TomD
Manic Miner
Posts: 376
Joined: Tue Nov 13, 2018 9:47 am
Location: Leeds UK
Contact:

Re: New Utility to Transfer Z80 Snapshot to +3 Disk

Post by TomD »

Update to v3.1. Utility now able to restore all the snapshot to memory (well other than the screen) giving much better compatibility especially for games like Adams Family 128k and Rodland 128k which use nearly all the available memory. You can download latest version https://tomdalby.com/other/z80ondsk.html

TomD
Retro enthusiast and author of Flynn's Adventure in Bombland, The Order of Mazes & Maze Death Rally-X. Check them out at http://tomdalby.com
User avatar
TomD
Manic Miner
Posts: 376
Joined: Tue Nov 13, 2018 9:47 am
Location: Leeds UK
Contact:

Re: New Utility to Transfer Z80 Snapshot to +3 Disk

Post by TomD »

I've had a few questions around how to transfer the created disks to a real 3" floppy disk (i.e. no Gotek). Easiest way is using an Amstrad FD-1 connected to a PC with SAMDISK but that is not an option for most so Z80onDSK does have the ability to create a TAPE file which can be transferred to a real disk using a Spectrum +3 and the following steps:
  • Create the tape version of the z80 snapshot using the -t option, for example "z80ondsk -t jsw.z80"
  • Pop a blank floppy into your Spectrum +3 disk drive and format it with FORMAT "A:"
  • Select option 2 & press 0 to start
  • Select Drive A and then press ENTER, then any key on the next prompt and it will then ask you to start the tape
  • Now load in each part of the snapshot tape (again using an APP or PC) and it will copy it all to the blank disk. 48k snapshots will have two files "loader" and "jsw", 128k three files "loader" and two "jsw" files.
  • Once complete reboot
  • Now we need to rename the file(s) on the disk. You should see a file called "jsw" or whatever you called the snapshot. This needs to be "jsw.0", it needs the dot and zero otherwise it won't load. Unfortunately it won't transfer the filename properly from tape so it has to be changed manually. The command to do this is MOVE "jsw" TO "jsw.0". If it is a 128k snapshot there will also be a "jsw.0" which needs to become "jsw.1" (do this first with MOVE "jsw.0" TO "jsw.1")
Once this is done it should work, just needs a basic loader which is:

Code: Select all

10 CLEAR 24387
20 LOAD "loader"CODE
30 RANDOMIZE USR 25012
Save this basic loader to disk using SAVE "DISK" LINE 10 and it will autorun from the main menu.

If you've created a compilation then there will be multiple files on the tape, just copy them all across and do the renaming as above. The loader will automatically check if there is more than one snapshot to load and use the menu if needed.

TomD
Retro enthusiast and author of Flynn's Adventure in Bombland, The Order of Mazes & Maze Death Rally-X. Check them out at http://tomdalby.com
User avatar
TomD
Manic Miner
Posts: 376
Joined: Tue Nov 13, 2018 9:47 am
Location: Leeds UK
Contact:

Re: New Utility to Transfer Z80 Snapshot to +3 Disk

Post by TomD »

Seems there is an even easier way using a utility called dsk2tap http://www.seasip.info/ZX/unix.html. Works much better as no renaming etc... Thanks to Mark Edwards for pointing this out

TomD
Retro enthusiast and author of Flynn's Adventure in Bombland, The Order of Mazes & Maze Death Rally-X. Check them out at http://tomdalby.com
User avatar
Guesser
Manic Miner
Posts: 641
Joined: Wed Nov 15, 2017 2:35 pm
Contact:

Re: New Utility to Transfer Z80 Snapshot to +3 Disk

Post by Guesser »

You can also get files over to the +3 by writing them to a 720k DOS format 3.5" disk and using Garry Lancaster's "msdos" to transfer them to the internal 3" drive.

Or better still make your .dsk files for 720k +3DOS disk and write them directly to a double density diskette using dsktool
User avatar
TomD
Manic Miner
Posts: 376
Joined: Tue Nov 13, 2018 9:47 am
Location: Leeds UK
Contact:

Re: New Utility to Transfer Z80 Snapshot to +3 Disk

Post by TomD »

Small update fixing a crash bug, grab the new version here http://tomdalby.com/other/z80ondsk.html
Retro enthusiast and author of Flynn's Adventure in Bombland, The Order of Mazes & Maze Death Rally-X. Check them out at http://tomdalby.com
User avatar
TomD
Manic Miner
Posts: 376
Joined: Tue Nov 13, 2018 9:47 am
Location: Leeds UK
Contact:

Re: New Utility to Transfer Z80 Snapshot to +3 Disk

Post by TomD »

v3.4 uploaded which fixes a filesize >64k crash bug. Windows only for now till I boot up my Mac. http://tomdalby.com/other/files/Z80onDSK_v3.4.zip

TomD
Retro enthusiast and author of Flynn's Adventure in Bombland, The Order of Mazes & Maze Death Rally-X. Check them out at http://tomdalby.com
schneil
Drutt
Posts: 29
Joined: Mon Aug 17, 2020 9:07 pm

Re: New Utility to Transfer Z80 Snapshot to +3 Disk

Post by schneil »

Hi Tom
I tried out v2.2 and its great.
I mainly do my emulator and spectrum stuff on my laptop. It's old so it runs Ubuntu.
Any chance of a version for ubuntu? A .deb file would be awesome.

Cheers
User avatar
TomD
Manic Miner
Posts: 376
Joined: Tue Nov 13, 2018 9:47 am
Location: Leeds UK
Contact:

Re: New Utility to Transfer Z80 Snapshot to +3 Disk

Post by TomD »

v3.4b uploaded which fixes a bug where v2 48k Z80 snapshots didn't work due to out of order page layout.

http://tomdalby.com/other/files/Z80onDSK_v3.4b.zip

TomD
Retro enthusiast and author of Flynn's Adventure in Bombland, The Order of Mazes & Maze Death Rally-X. Check them out at http://tomdalby.com
Spezzi63
Drutt
Posts: 44
Joined: Sat Dec 28, 2019 1:36 pm

Re: New Utility to Transfer Z80 Snapshot to +3 Disk

Post by Spezzi63 »

I now have the "vcruntime140.dll", but the program does not start under Windows 7 (64-bit) :?

Bye for now,
Guenter
User avatar
Luzie
Manic Miner
Posts: 907
Joined: Fri May 01, 2020 2:07 pm

Re: New Utility to Transfer Z80 Snapshot to +3 Disk

Post by Luzie »

Spezzi63 wrote: Sun Sep 27, 2020 7:33 pm I now have the "vcruntime140.dll", but the program does not start under Windows 7 (64-bit) :?

Bye for now,
Guenter
Do you get any error or other messages while starting the program (via commandline)?

(Starts here under Win10x64).
User avatar
TomD
Manic Miner
Posts: 376
Joined: Tue Nov 13, 2018 9:47 am
Location: Leeds UK
Contact:

Re: New Utility to Transfer Z80 Snapshot to +3 Disk

Post by TomD »

Spezzi63 wrote: Sun Sep 27, 2020 7:33 pm I now have the "vcruntime140.dll", but the program does not start under Windows 7 (64-bit) :?

Bye for now,
Guenter
Which version are you using, winxp or normal?

TomD
Retro enthusiast and author of Flynn's Adventure in Bombland, The Order of Mazes & Maze Death Rally-X. Check them out at http://tomdalby.com
Spezzi63
Drutt
Posts: 44
Joined: Sat Dec 28, 2019 1:36 pm

Re: New Utility to Transfer Z80 Snapshot to +3 Disk

Post by Spezzi63 »

Sorry, it seems my system had a problem with the "vcruntime140.dll".
After restarting and testing again, the tool works.
Very helpful,
Günter
User avatar
Mazinfriki
Drutt
Posts: 28
Joined: Fri Dec 20, 2019 10:58 am
Location: Madrid, Spain

Re: New Utility to Transfer Z80 Snapshot to +3 Disk

Post by Mazinfriki »

I'm using version 2.40 along with your tip for pausing tape after load (whenever it's possible) to avoid the screen corruption issue. I've just used it with The Ice Temple from Bubble Bus and I found a strange behavior: After loading the screen the menu screen scrolls from below??? that doesnt' happen with 3.4. Is it normal?
User avatar
PeterJ
Site Admin
Posts: 6877
Joined: Thu Nov 09, 2017 7:19 pm
Location: Surrey, UK

Re: New Utility to Transfer Z80 Snapshot to +3 Disk

Post by PeterJ »

I'm rather late to the party [mention]TomD[/mention], but this is excellent! Thank you for this and your other tools.
Post Reply