DSKTOOL - A tool for creating Spectrum +3 game loaders

ZX80, ZX 81, ZX Spectrum, TS2068 and other clones
Post Reply
User avatar
jorgegv
Well known member
Posts: 305
Joined: Wed Nov 18, 2020 5:08 pm

DSKTOOL - A tool for creating Spectrum +3 game loaders

Post by jorgegv »

Hi guys,

I have been lately creating the +3 disk version of Cesare the Somnambule and due to the really tight that everything was laid out in memory at load time, using +3DOS for loading it was not really an option. So I set up to create my own loader in assembler, talking directly to the Floppy Controller with interrupts disabled.

The result of this is a tool to create a disk loader for games or programs which uses a specialized disk format (not +3DOS) and a couple of small ASM stubs which are provided.

For those interested, here is the document that describes the design.

A short extract from that document:

"The motivation behind DSKTOOL is to allow creating disk versions of ZX games for the Spectrum +3 as easily as TAP versions, and reusing the same game binaries from the TAP version. The easies way to achieve this is to use the disk as a sort of "virtual tape", or VTAPE, in which the game data is stored and read sequentially, the same way as a real tape would be used.

VTAPE is just a way to format the disk and data inside it, and a convention for accessing that data in an easy way from the game loader.

This tool generates the VTAPE disk image file (in standard DSK format) that can be later used to boot the game in +3 emulators, or used as a master for physical media generation.

A loader API is also provided to access the VTAPE disk and load the game data."
User avatar
dom
Well known member
Posts: 2140
Joined: Sun Jul 15, 2007 10:01 pm

Re: DSKTOOL - A tool for creating Spectrum +3 game loaders

Post by dom »

Interesting, would be fun to add support for that into appmake etc

I can understand that using a filesystem would cause a few memory problems. However, I always thought that DD_READ_SECTOR didn't use any extra memory - you provide it with the XDPB and it just reads the sector.

The benefit of using the ROM would be that the .dsk file would be supported on the Next - the FDC hardware isn't supported directly.

Edit: I might be wrong about FDC calls not being intercepted. Apologies if so.
Timmy
Well known member
Posts: 399
Joined: Sat Mar 10, 2012 4:18 pm

Re: DSKTOOL - A tool for creating Spectrum +3 game loaders

Post by Timmy »

I just want to say that it's a great idea! I have no use myself, but it's nice to have if I ever want to do anything with it in the future.
pjshumphreys
Member
Posts: 83
Joined: Sat Feb 06, 2021 2:32 pm

Re: DSKTOOL - A tool for creating Spectrum +3 game loaders

Post by pjshumphreys »

Same. Something that'll be useful for future projects. :)
User avatar
jorgegv
Well known member
Posts: 305
Joined: Wed Nov 18, 2020 5:08 pm

Re: DSKTOOL - A tool for creating Spectrum +3 game loaders

Post by jorgegv »

Just a comment for those early birds that have already looked at the code (are there any? :-) ):

I found some problems with Gotek drives that in turn were symptoms of deficient FDC emulation in most emulators: everything worked fine except in Gotek drives, and RetroVirtualMachine and Es.Pectrum emulators. It turned out that those emulators had much more faithful FDC emulation, and showed real errors in my code, which other emulators did not catch.

Those errors have been fixed, just in case someone is using the code I published a couple of days ago. Pull again from the repo for updated code.
Post Reply