Disk drives

The place for codemasters or beginners to talk about programming any language for the Spectrum.
User avatar
djnzx48
Microbot
Posts: 145
Joined: Wed Dec 06, 2017 2:13 am
Location: New Zealand

Disk drives

Post by djnzx48 » Thu Jun 14, 2018 12:29 am

Let's say I'm working on a game and considering disk drive support. Which drives would be the best ones to go for?

Beta 128 and +3 seem like the obvious choices since they're widely available, both in emulation and real hardware. What about other drives like DISCiPLE, +D and Opus? Then there are the more modern SD card ones. With Sword of Ianna there was at least some demand for a multiload tape version, for hardware devices that only support .tap files. I thought about microdrives, but does anyone actually use them these days, either in emulators or the real thing?

I'm also wondering about the software side of these drives. Do any of them require some area of memory reserved? Is it possible to 'bypass' the ROM loaders and use a custom one, or is it just better to use them as they're designed? And do any of these drives have special features that the others don't, for example, the ability to load or save data while simultaneously running some interrupt routine?

As you can see I'm inexperienced with these drives and I need help making a decision!
0 x

User avatar
Pegaz
Microbot
Posts: 137
Joined: Mon Nov 13, 2017 1:44 pm

Re: Disk drives

Post by Pegaz » Thu Jun 14, 2018 7:26 am

Beta disk interface with TR-DOS would always be my first choice.
It uses standard floppies and has the largest software collection on disk.
0 x

User avatar
Ast A. Moore
Manic Miner
Posts: 598
Joined: Mon Nov 13, 2017 3:16 pm

Re: Disk drives

Post by Ast A. Moore » Thu Jun 14, 2018 8:26 am

djnzx48 wrote:
Thu Jun 14, 2018 12:29 am
Let's say I'm working on a game and considering disk drive support. Which drives would be the best ones to go for?
I think you need to take a step back and focus on this: What platform are you developing a game (games) for?

Do you target real hardware or emulators? If it’s the latter, what kind of emulator in particular? A software emulator? (Which software emulator, then?) A hardware emulator? (Again, which hardware emulator?) If it’s the former, what kind of hardware? Original Spectrums? Clones? If so, which clones?

Only when you answer these questions will you be able to answer the question of “disk drive support” (if indeed this question still arises).

In other words, are you working on a Spectrum game or a game for a gazillion of Z80-based microcomputers (real or emulated) that are based (to a larger or lesser extent) on the ZX Spectrum?

If you’re targeting the original ZX Spectrum, then the answer is kind of obvious. Even though you’re limiting yourself to the +3—the only machine that came standard with a disk drive—they’re plentiful and readily available.

The Beta Disk interface, however, is only common among the clones (I doubt many original interfaces exist in the wild), so if you’re targeting clones, you might want to consider that option. (The original Spectrums are virtually out of the question, though.)

If you’re targeting emulators, most of them support both interfaces, so choose whichever you take a shine to.

SD–card-based interfaces have the advantage of working with most (all?) original Spectrums (but not necessarily the clones), and a few people already have them. For others, that’s an additional expense.

Finally, what particular features of your game require a disk interface? If that’s simply a matter of data storage space (i.e. level loading), then, considering that almost everybody now has some form of a digital audio player, it’s trivial to write a super fast turbo loader for the standard tape interface, and thus reduce loading times down to a few seconds per level. If, however, you need to store some data as well, this may prove to be a little trickier for the end user, but not impossible either. That covers real hardware (both original Spectrums* and clones).

Emulatiors, naturally, will load your levels almost instantly anyway, while saving data can be performed by the user at any time using snapshots.

Sorry for such a longwinded answer, but these are my thoughts on the subject.

———————
*Granted, without a mod (albeit a simple one), the +2 and +2A machines will need tape adaptors to load games from external audio sources.
0 x
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.

User avatar
djnzx48
Microbot
Posts: 145
Joined: Wed Dec 06, 2017 2:13 am
Location: New Zealand

Re: Disk drives

Post by djnzx48 » Thu Jun 14, 2018 9:13 am

Good points, thanks. I guess my main goal at the moment is to get a game working on the main 128K models (the original, the +2 and the +3), as well as on most emulators. For the +3 disk support is an easy decision to make, but I was wondering more about the toastrack and +2 models and what drives people use with those. Nowadays I'd imagine the most common interface would be one of the SD card ones, but I want to consider other options as well. The modern interfaces also have the issue of being unlikely to be supported by emulators, and so impossible to test without physically owning one.

Tape multiloads would be the last resort. I'd rather not require using a turbo loader because those can be tricky to get working and can be unreliable.

Finally, I'm not certain yet whether I'll end up using disks at all, but I want to be prepared in case it ends up getting too big to fit in 128K.
0 x

User avatar
Ast A. Moore
Manic Miner
Posts: 598
Joined: Mon Nov 13, 2017 3:16 pm

Re: Disk drives

Post by Ast A. Moore » Thu Jun 14, 2018 10:07 am

djnzx48 wrote:
Thu Jun 14, 2018 9:13 am
I was wondering more about the toastrack and +2 models and what drives people use with those. Nowadays I'd imagine the most common interface would be one of the SD card ones, but I want to consider other options as well. The modern interfaces also have the issue of being unlikely to be supported by emulators, and so impossible to test without physically owning one.
I’m an old-fashioned purist, so I always target the lowest common denominator—the tape interface. I don’t own (and, in the foreseeable future, am not planning to purchase) any modern interface, so all the testing that I do on my +2A and Toast Rack, I do by loading my code via an audio lead. My idiosyncrasies aside, however, Fuse, for example, supports a broad range of modern storage interfaces:

—DivIDE
—DivMMC
—Simple 8-bit IDE
—ZXATASP
—ZXCF
—ZXMMC

At least in this regard, testing them an emulator is trivial.
djnzx48 wrote:
Thu Jun 14, 2018 9:13 am
Tape multiloads would be the last resort. I'd rather not require using a turbo loader because those can be tricky to get working and can be unreliable.
I’ll have to respectfully disagree (again, with the caveat that the end user will be relying on digital audio sources, rather than actual tapes). Turbo loaders are both quite trivial to implement and very reliable. When I was writing the turbo loader for Yankee, for example, I opted for a modest ~3x data rate (compared to the standard ROM loader), but only because I wanted to give it a fighting chance of loading on fairly low-quality tape recorders. I can easily adjust the loader’s timing constants to operate at a much higher data rate, comparable to that of some disk-based systems. (Admittedly, I never tried to write a turbo-save routine, though.)

Since you seem to be targeting the original Spectrums, your options are automatically limited to (a) the +3’s disk interface (which, obviously, excludes all other machines), (b) modern storage interfaces (one or more), and (c) the good-old tape interface. Everything else is too obscure nowadays. Thus, logically, if you want to include all 128K Spectrums, your only options are (b) and (c). If you want to extend support to most emulators as well, then it’s just (c).
0 x
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.

User avatar
RMartins
Manic Miner
Posts: 328
Joined: Thu Nov 16, 2017 3:26 pm

Re: Disk drives

Post by RMartins » Thu Jun 14, 2018 10:10 am

Alternatively, you can use something like my NOXROM Cartridge, with either 128K, 256K or 512K of ROM, addressable in 16KB blocks.
viewtopic.php?f=22&t=241

But this is specific to ZX Spectrum, and requires a ROM interface, like "ZX Interface 2", "RAM Turbo", "Kempston Pro" or some modern equivalent (Spectra interface), which most people usually have one of these.

There are other cartridge systems around too, like the ZXC1, ZXC2, ZXc3, ZXC4 (from fruitcake website), or the ZX Dandanator interface, just to name a few.
0 x

User avatar
Ivanzx
Site Admin
Posts: 97
Joined: Tue Nov 14, 2017 9:51 am

Re: Disk drives

Post by Ivanzx » Thu Jun 14, 2018 10:16 am

Sounds like you are coding a very big game, any clues on what it is? 😉
0 x

Ralf
Manic Miner
Posts: 743
Joined: Mon Nov 13, 2017 11:59 am
Location: Poland

Re: Disk drives

Post by Ralf » Thu Jun 14, 2018 11:00 am

I believe that there are only two disk systems for Spectrum that matter:

- CP/M, used on Spectrum +3 with 3inch disks
- Tr-Dos, not used in original Spectrum machines but very popular on Russian clones like Pentagon

They are both supported by most popular emulators so people playing your game through emulation would enjoy it too.

All the other systems are owned and used by 10 people in the world each ;)

If you are doing a serious, quasi-commercial project, there is also a possibility of putting your game on cartridge like it was done with Sword of Ianna.
0 x

hikoki
Manic Miner
Posts: 251
Joined: Thu Nov 16, 2017 10:54 am

Re: Disk drives

Post by hikoki » Thu Jun 14, 2018 11:30 am

Is TRD compatible with divide which is quite popular? I think so..
Multiload is quite appealing.. I don't see any problem in having the player load small amounts of data from the cassette many times? Small blocks would not take long to load and all it needs is just pressing a key or the Play button from time to time. How may times? maybe pressing 20 times or more in a game session? So what? No big deal so long as loading times are bearable enough? Not enough room in a cassette tape? I wonder if it'd be of help to make the player rewind the cassette to reload parts of the program with different data.
One modern turboloader which is reliable is Setoload: viewtopic.php?f=6&t=290#p3339
0 x

User avatar
djnzx48
Microbot
Posts: 145
Joined: Wed Dec 06, 2017 2:13 am
Location: New Zealand

Re: Disk drives

Post by djnzx48 » Thu Jun 14, 2018 11:21 pm

Ast A. Moore wrote:
Thu Jun 14, 2018 10:07 am
Fuse, for example, supports a broad range of modern storage interfaces:

—DivIDE
—DivMMC
—Simple 8-bit IDE
—ZXATASP
—ZXCF
—ZXMMC

At least in this regard, testing them an emulator is trivial.
That's the problem, there's just so many of them that I don't know which ones would be best to use! If I knew which ones were more popular I'd design for those first and maybe do the others later.
Ast A. Moore wrote:
Thu Jun 14, 2018 10:07 am
I’ll have to respectfully disagree (again, with the caveat that the end user will be relying on digital audio sources, rather than actual tapes). Turbo loaders are both quite trivial to implement and very reliable. When I was writing the turbo loader for Yankee, for example, I opted for a modest ~3x data rate (compared to the standard ROM loader), but only because I wanted to give it a fighting chance of loading on fairly low-quality tape recorders. I can easily adjust the loader’s timing constants to operate at a much higher data rate, comparable to that of some disk-based systems. (Admittedly, I never tried to write a turbo-save routine, though.)
I guess it depends on the loading setup you're using. I've had trouble getting turbo loaders to work in the past using external amplifiers, but maybe I was using the wrong equipment.
Ast A. Moore wrote:
Thu Jun 14, 2018 10:07 am
Since you seem to be targeting the original Spectrums, your options are automatically limited to (a) the +3’s disk interface (which, obviously, excludes all other machines), (b) modern storage interfaces (one or more), and (c) the good-old tape interface. Everything else is too obscure nowadays. Thus, logically, if you want to include all 128K Spectrums, your only options are (b) and (c). If you want to extend support to most emulators as well, then it’s just (c).
My idea was to have a separate version of the game for each different disk interface, similar to what Sword of Ianna did. So it would be possible to have a +3 version, a modern interface version, and maybe a tape version.
RMartins wrote:
Thu Jun 14, 2018 10:10 am
Alternatively, you can use something like my NOXROM Cartridge, with either 128K, 256K or 512K of ROM, addressable in 16KB blocks.
viewtopic.php?f=22&t=241

But this is specific to ZX Spectrum, and requires a ROM interface, like "ZX Interface 2", "RAM Turbo", "Kempston Pro" or some modern equivalent (Spectra interface), which most people usually have one of these.

There are other cartridge systems around too, like the ZXC1, ZXC2, ZXc3, ZXC4 (from fruitcake website), or the ZX Dandanator interface, just to name a few.
That looks interesting, thanks! I'll have to look into that.
Ivanzx wrote:
Thu Jun 14, 2018 10:16 am
Sounds like you are coding a very big game, any clues on what it is? 😉
It's in the early stages at the moment and I haven't got too much to show, but if you send me a PM I'll show you the (very) limited progress I've made so far ;)
Ralf wrote:
Thu Jun 14, 2018 11:00 am
I believe that there are only two disk systems for Spectrum that matter:

- CP/M, used on Spectrum +3 with 3inch disks
- Tr-Dos, not used in original Spectrum machines but very popular on Russian clones like Pentagon
Yeah, those look like good options and I'll probably end up adding them. I'm just not sure how many people use TR-DOS with the Sinclair/Amstrad machines outside of emulators.
hikoki wrote:
Thu Jun 14, 2018 11:30 am
Is TRD compatible with divide which is quite popular? I think so..
Multiload is quite appealing.. I don't see any problem in having the player load small amounts of data from the cassette many times? Small blocks would not take long to load and all it needs is just pressing a key or the Play button from time to time. How may times? maybe pressing 20 times or more in a game session? So what? No big deal so long as loading times are bearable enough? Not enough room in a cassette tape? I wonder if it'd be of help to make the player rewind the cassette to reload parts of the program with different data.
One modern turboloader which is reliable is Setoload: viewtopic.php?f=6&t=290#p3339
I suppose it wouldn't be too bad to have multiload. The problem is I'm imagining that the game will involve going back and forth between different sections, which would require a lot of rewinding to get back to earlier bits. With turboloading in emulators it's not so much of a problem, but it could get annoying on real hardware.

Sorry for all these questions, but are any of these interfaces easier to use from the programming side of things? +3 DOS and TR-DOS just use ROM calls, but do they require any area of memory to not be touched by the rest of the program?
0 x

Post Reply