Jump to content
IGNORED

Using IBM Floppy Disks


toddtmw

Recommended Posts

In Altirra, is it possible to use a 3.5" IBM Floppy disk as a virtual Atari Disk without putting an .ATR image on it.

 

I can point it to a directory, but it appears when I do that, the directory is read-only.

 

If I put an ATR image on the disk, it has to read the entire image before it can use it.

 

I'm thinking it might be fun to use real 3.5" disks with the emulator to get closer to an old-school experience without relying on 30-year-old technology (rather, relying on 20-year-old technology :grin: instead.)

 

Thoughts on how I could do this?

 

Thanks.

  • Like 1
Link to comment
Share on other sites

Use the "Disk Drives" pulldown item instead of the "Open image" or "Boot image" item.

Set the mode to "R/W" for that drive before opening the image with the "..." button. That should do what you want and without reading the entire image first.

 

As for the "experience" - I suspect it'll be a bit underwhelming. A standard HD 3.5" floppy is formatted with 18 x 512 byte sectors per track, and double sided makes that 36 sectors or 18K per cylinder.

So, an 88K 810 image will occupy about 2.5 cylinders, a 130K 1050 image will occupy about 3.5 cylinders (vs 40 tracks on a real drive).

But potentially you could use large ATR images which use the entire floppy. You could also have multiple virtual drives using images on 1 floppy though it'd cause slowdown. The actual speed - from memory PC floppies run about 20K or maybe a bit more per second so a disk image could be read fairly quickly. Also, it'll probably be cached so subsequent reads might be just as fast as a HDD based image.

Edited by Rybags
Link to comment
Share on other sites

Use the "Disk Drives" pulldown item instead of the "Open image" or "Boot image" item.

Set the mode to "R/W" for that drive before opening the image with the "..." button. That should do what you want and without reading the entire image first.

 

As for the "experience" - I suspect it'll be a bit underwhelming. A standard HD 3.5" floppy is formatted with 18 x 512 byte sectors per track, and double sided makes that 36 sectors or 18K per cylinder.

So, an 88K 810 image will occupy about 2.5 cylinders, a 130K 1050 image will occupy about 3.5 cylinders (vs 40 tracks on a real drive).

But potentially you could use large ATR images which use the entire floppy. You could also have multiple virtual drives using images on 1 floppy though it'd cause slowdown. The actual speed - from memory PC floppies run about 20K or maybe a bit more per second so a disk image could be read fairly quickly. Also, it'll probably be cached so subsequent reads might be just as fast as a HDD based image.

 

On linux at least, you can set weird formats as you like. Lots of controllers don't support FM, but you can probably convince them to do 130k mode, by telling it you have a 40 track drive that is single sided, and to use 128 byte sectors, and to use 26 sectors per track.

 

Of course, you need a *real* floppy controller for that, USB floppies aren't going to cut it.

 

Also, I bet there's a way to disable the caching in linux, I just don't know it.

 

Windows? you're screwed regardless, without writing new software, and possibly even a special driver to do the atari formats.

Edited by Joey Z
Link to comment
Share on other sites

He's just wanting to use floppies that hold the ATR images to achieve the "feel" of it - the problem encountered was that when you use the read-only mode the emulator precaches the entire image which defeats the purpose of doing it that way.

yes, I suppose I fell into the 'answering the question' rather than 'answering the problem' trap. He asked if there was a way he could use the floppy without just putting an ATR on it, so I answered *that*. What he really wanted, was a way to convince the floppy to act similarly to how it would if it was an actual Atari disk drive.

Link to comment
Share on other sites

Thanks for the suggestion. I'll try a R/W ATR tonight. Is it possible to make an ATR that is 1.44MB in size?

 

Thanks, again!

yes, but you'll have to make it exactly as big as the available space on the floppy disk (formatted capacity is smaller than unformatted). Also, you'll need to remember than an ATR has a 16 byte header when you make the file.

 

Lastly, not all DOSes support odd sizes. I'm not well versed in this area, I typically stick with standard disk sizes to avoid this issue, so I just haven't learned what does and doesn't work, or how to make it work when it doesn't but should.

Link to comment
Share on other sites

Use the "Disk Drives" pulldown item instead of the "Open image" or "Boot image" item.

Set the mode to "R/W" for that drive before opening the image with the "..." button. That should do what you want and without reading the entire image first.

 

As for the "experience" - I suspect it'll be a bit underwhelming. A standard HD 3.5" floppy is formatted with 18 x 512 byte sectors per track, and double sided makes that 36 sectors or 18K per cylinder.

So, an 88K 810 image will occupy about 2.5 cylinders, a 130K 1050 image will occupy about 3.5 cylinders (vs 40 tracks on a real drive).

But potentially you could use large ATR images which use the entire floppy. You could also have multiple virtual drives using images on 1 floppy though it'd cause slowdown. The actual speed - from memory PC floppies run about 20K or maybe a bit more per second so a disk image could be read fairly quickly. Also, it'll probably be cached so subsequent reads might be just as fast as a HDD based image.

 

Unfortunately, this does not work. I created a .ATR file. (Seems like the biggest I can create is about 720k) made it R/W and then saved it to a floppy. Then I wrote DOS to it which was funny because it made all the disk noises and then when it was done, the floppy spun up for a few seconds while it wrote the changes.

 

Then I unmounted the disk and while leaving the slot R/W, I selected it again and it paused to read the whole thing before it let me do anything. I'm assuming this happens with regular images, but they are so small and hard drives are so fast no one notices.

 

Ah well, it was an interesting idea. Guess it was not meant to be.

 

Thanks.

-Todd

Link to comment
Share on other sites

It would be pretty cool if Altirra supported a 10502PC type device that would give it an SIO port so it could talk to real, physical drives, printers and modems.

 

Actually, if it would just allow a "folder" (in this case the entire floppy) to look like a disk image that could be read/write and booted from, it would allow what I am trying to do.

 

To be clear, this is just a pipe dream. I'm trying to get as close the real experience without having to devote space to a real computer. Just playing around with ways to make it closer to the real experience. I miss the boxes of disks and physically putting them in a drive, but I do not miss the bulky size of the 8-bit drives.

 

Just playing around and looking for new ways to make it real....

 

Thanks all for your comments and ideas.

Link to comment
Share on other sites

I think floppy drives might be attached as "Optimize for performance" which means they're cached.

Possibly you could change it to "Optimize for quick removal" which performs writes immediately and should only read on-demand without caching.

 

I can't test, don't have a drive attached, haven't actually used one for years.

Link to comment
Share on other sites

I think floppies default to write-through in Windows, but that still allows for read buffering and prefetch. Bypassing the cache would actually make the floppy I/O slower than on the real Atari because the sector interleave and rotational speeds don't match up. Atari disks rotate at 288 RPM and space out successive sectors halfway around the disks; PC disks rotate at 360 RPM and arrange the sectors in order (1:1 interleave). Reading the PC floppy at Atari timings without caching is actually ~60% slower. USB floppy drives are even weirder as some of them actually run at 2x speeds. Trying to use the PC floppy like the Atari floppy is like cooking your dinner in a dishwasher -- it's doable but not terribly practical.

 

There's also the little issue that not a single one of my current PCs has a floppy drive.

Link to comment
Share on other sites

I think floppies default to write-through in Windows, but that still allows for read buffering and prefetch. Bypassing the cache would actually make the floppy I/O slower than on the real Atari because the sector interleave and rotational speeds don't match up. Atari disks rotate at 288 RPM and space out successive sectors halfway around the disks; PC disks rotate at 360 RPM and arrange the sectors in order (1:1 interleave). Reading the PC floppy at Atari timings without caching is actually ~60% slower. USB floppy drives are even weirder as some of them actually run at 2x speeds. Trying to use the PC floppy like the Atari floppy is like cooking your dinner in a dishwasher -- it's doable but not terribly practical.

 

There's also the little issue that not a single one of my current PCs has a floppy drive.

 

I'm not hung up on when the Atari is accessing the floppy, the floppy has to be spinning, so I don't think Caching would be bad. I think the big thing would be detecting when a disk had been changed. (Both in Windows, and in the emulator).

 

I'd be happy to buy you a USB floppy drive if you had any interest in even trying to make this work.

 

-Todd

Link to comment
Share on other sites

Read cacheing would mean it'd probably read the image file once and the floppy would stop dead. 130K of data to a modern PC's cache is nothing and if you have more than about 2 Gig Ram it can hang around a long time before something flushes it out.

Media change detection, IMO way beyond the scope of what an emulator should be doing. The modern day philosophy is that file access abstraction is media type independant and an application talks to the file, not the device.

 

One idea, no idea if it's possible or will work - fairly sure that if you access a file over network share the caching will be minimal at your own end. Whether it's possible though to mount a floppy drive or folder within to appear as a network folder, I don't know.

Edited by Rybags
Link to comment
Share on other sites

 

Unfortunately, this does not work. I created a .ATR file. (Seems like the biggest I can create is about 720k) made it R/W and then saved it to a floppy.

 

This cannot work. An "ATR" is not a raw floppy image - an "XFD" is. ATR has a header that specifies the density and capacity of the disk. You first have to strip off the header, essentially 16 bytes.

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...