Jump to content
IGNORED

Altirra, Disk Images and Disk Drive Emulation


morelenmir

Recommended Posts

There was some talk around this subject the other day on the Altirra release thread. I thought It might be useful to get this properly hammered out in my mind.

 

When creating, formatting and working with disk images there are four values which must be specified. These are:

 

Sides

Tracks per Side

Sectors per Track

Bytes per Sector or 'Density'

 

I always think of the 1050 as the 'standard' disk drive. This device supported diskettes with the following characteristic:

 

"Single Sided, Single Density"

 

Sides=1

Tracks per Side=40

Sectors per Track=18

Bytes per Sector=128

TOTAL=92160 Bytes/90kB ==> 1x40x18x128

 

"Single Sided, Enhanced Density"

 

Sides=1

Tracks per side=40

Sectors per track=26

Bytes per Sector=128

TOTAL=133120 Bytes/130kB ==> 1x40x26x128

 

Clearly the "Single Sided, Enhanced Density" format is something of a misnomer as the byte density does not change, rather the number of sectors that can be put on a single track is increased by 8. In the virtual world it is possible to represent these two types of disk unambiguously through the Altirra 'Create new disk' dialog - they have specific entries in the 'Disk Format' drop down listbox.

 

This dialog also allows Altirra to partially emulate other disk drives, significantly the 'XF551', the 'Happy' and the 'Indus GT' models among others. Their primary advantage over the '1050' is they all support 'true double density', giving 256 bytes per sector. Summarised, again directly accessible inside Altirra via the 'Create new disk' dialog and 'Disk Format' drop down listbox:

 

"Single Sided, Double Density"

 

Sides=1

Tracks per side=40

Sectors per track=18

Bytes per Sector=256

TOTAL=184320 Bytes/180kB ==> 1x40x18x256

 

These disk drives ALSO offer a perhaps more important feature, the ability to store data on both sides of appropriately certified diskettes without flipping it over. Therefore:

 

"Double Sided, Single Density"

 

Sides=2

Tracks per Side=40

Sectors per Track=18

Bytes per Sector=128

TOTAL=184320 Bytes/180kB ==> 2x40x18x128

 

"Double Sided, Enhanced Density"

 

Sides=2

Tracks per side=40

Sectors per track=26

Bytes per Sector=128

TOTAL=266240 Bytes/260kB ==> 2x40x26x128

 

"Double Sided, Double Density"

 

Sides=2

Tracks per side=40

Sectors per track=18

Bytes per Sector=256

TOTAL=368640 Bytes/360kB ==> 2x40x18x256

 

THIS is where things get a bit vague within Altirra. There is no specific option for a 'double sided' version of the three pre-set densities. The only way to create a double-sided disk image is to select the 'custom' entry from the 'Disk Format' drop down listbox and enter the appropriate values by hand. However this itself is not a straightforward process as we cannot directly specify the characteristics we want, only the total number of sectors and a density of 128, 256 or 512 bytes per sector. Therefore up to now in order to create a blank "double-sided, double-density" disk image I have made the "sector count" at 1440 (2 sides of 40 tracks with 18 sectors per track) and "Density" as 256. This seems a bit... loose, woolly... to me and I am not certain the resulting *.ATR file that represents the new disk image will be compatible with other emulators or even writeable to a physical 5.25'' floppy (assuming one could find a physical disk drive for the PC!)

 

The problem becomes even more tricky when working with SpartDOS X. Within it's "Format" screen you are given MANY options that relate directly to the physical characteristics of the current floppy diskette/disk image. Here you can ask for really exotic variations like 'DD 512' and 'High' along with the usual 'Double' and 'Single' disk densities. There is an even wider selection of Track counts such as '40 SS', '40 DS', '77 SS', '77 DS', '80 SS' and '80 DS'... How do you CORRECTLY make a blank disk image in Altirra to use say (DD 512, 80 DS):

 

Sides=2

Tracks per side=80

Sectors per track=18

Bytes per sector=512

 

All we can specify is sector count and bytes per sector. Therefore I would guess, using the same loose method above a 2880 Sector Count (2 sides of 80 tracks with 18 sectors per track) and a 512 sector size? However, when I create a blank disk image with these characteristics, mount it and attempt the 'Format' command in SDX I get three muted short beeps and then a "Drive does not respond!" message... This is the case whether using 'XF551', 'Happy' or 'Indus GT' partial emulations.

 

I have only mentioned SDX above, but one can also use MyDOS to work with fairly exotic diskette types.

 

I wonder if Phaeron or any of you other chaps can advise or maybe explain where I am looking at this wrongly?

 

 

 

  • Like 1
Link to comment
Share on other sites

For 512 byte/sector disks, you will usually need to set the boot sector count to 0. This sector size typically corresponds to a mass storage device that doesn't need to support OS booting. It appears that the SpartaDOS X formatter requires this to recognize the disk.

 

Don't worry about ATR compatibility -- the ATR file format doesn't contain disk geometry, only sector size and total sector. Emulators need to guess at the disk geometry from these two values. Fortunately, there aren't many cases where the specific geometry matters.

 

One gotcha: the 810, 1050, and XF551 disk drive emulation modes will restrict the formats recognized and usable by DOS per the actual hardware command limitations. The XF551 mode will only report XF551-compatible formats through its PERCOM commands, 1050 mode won't recognize those commands, and 810 mode won't recognize density bits either. So... don't try formatting a 4MB disk with a virtual XF551. The other modes based on real drives will let you get away with arbitrary disk formats, but this is subject to change in the future.

Link to comment
Share on other sites

Your "misnomer" in the first post would disappear entirely if you chose to look at it like I do, bytes per sector is not the end all, be all, to be used for determination of density type, it is rather the recording method used - FM for the single case of single density and MFM for Enhanced and Double Density. MFM for all higher capacity forms of disks too for that matter, which include the double sided 5.25 and the 2 common 3.5 sizes of 720K and 1.44 meg. Full support for the odd ducks like double sided single and double sided enhanced are not there in MyDOS and I doubt very many other DOSes either so I chose to ignore them for the most part and never use them, the only drive that even did that way back then was the XF551 modified with Woolley's altered ROM which didn't stop such odd ducks from being done but perhaps should have. The problem isn't with the Woolley drive per se, it's with the DOS that doesn't then build a proper VTOC table for the odd duck double sided disk and then you run into big problems with proper file storage and the possibility of several real sectors being used to store two or more files at the same time and you really don't want that to happen ever. It can't be untangled without one file at least being corrupted. One can do these formats in emulators easily, but not so easy on real hardware, get the Woolley modded XF551 and do some odd ducks and take a good look at the VTOC structure using real hardware, it won't be right. There will be sectors claimed to exist that either can't be accessed at all or they wrap around such that they are used twice. I'm thinking the Hyper XF551 does these odd ducks too, so OK that makes two real drives that can do the odd duck format - big deal, it's easier to ignore them than to rewrite formatting code to support them fully, not to mention the confusion they can cause in your disk collection. Use them at your own risk.

 

In the real world, away from Atari emulators especially, disk drive makers primarily aimed at the IBM compatible market, never looked back once they started doing Double density (MFM) and again when they started doing double sides, so the odd ducks aren't in their repertoire at all which is just another reason I can point to for why to ignore them for the most part. When I say they never looked back, they never made a new single density drive model again after that point in time that MFM controllers became plentiful, but would have continued to produce the current runs of those models until the demand for them naturally disappeared from lack of use in the lower capacity models, the same is then true of double sided drive models. Capacity moves onward and upward - never look back.

 

/odd duck rant

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...