Hi, I'm an 8086 16 bit assembly programmer.
I need to be able to store large arrays of pixel data outside of memory. It's map data for a game.
The idea is that maps will be loaded from storage into memory (during level transitions), then screen sized chunks of it will be copied as a frame into the video buffer.
Anyway, I had originally intended to store the map data on my 40 meg fat16 hard drive, so I had to do a huge amount of research on File allocation tables and how they work.
After I started writing the routines, I realized that instead of doing all of this hard work I could probably just completely format a floppy disc to all zeros (Remove the filesystem) then just directly fill the sectors of the floppy disc with the array data.
That way, I wouldn't have to worry about adhering to the weird structure of the FAT. I don't need DOS to be able to read the disc, the floppy disc need only be used as a data disc for my game.
My 286 laptop has no floppy drive, so I tested this out in Dosbox using a mounted floppy drive image, and it Works!
I can just specify a sector on the floppy, then either read it, or write memory out to it.
However, I know that fat12 included some error correcting redundancy stuff built in. Are real floppies really that unreliable? If I tested this on actual hardware would garbage data be a very common occurrence?
Maybe I could just have the data mirrored in several places on the floppy disc, then read it twice to make sure the bytes match, or maybe I'd just need a bunch of nops between reads and writes?
I need to be able to store large arrays of pixel data outside of memory. It's map data for a game.
The idea is that maps will be loaded from storage into memory (during level transitions), then screen sized chunks of it will be copied as a frame into the video buffer.
Anyway, I had originally intended to store the map data on my 40 meg fat16 hard drive, so I had to do a huge amount of research on File allocation tables and how they work.
After I started writing the routines, I realized that instead of doing all of this hard work I could probably just completely format a floppy disc to all zeros (Remove the filesystem) then just directly fill the sectors of the floppy disc with the array data.
That way, I wouldn't have to worry about adhering to the weird structure of the FAT. I don't need DOS to be able to read the disc, the floppy disc need only be used as a data disc for my game.
My 286 laptop has no floppy drive, so I tested this out in Dosbox using a mounted floppy drive image, and it Works!
I can just specify a sector on the floppy, then either read it, or write memory out to it.
However, I know that fat12 included some error correcting redundancy stuff built in. Are real floppies really that unreliable? If I tested this on actual hardware would garbage data be a very common occurrence?
Maybe I could just have the data mirrored in several places on the floppy disc, then read it twice to make sure the bytes match, or maybe I'd just need a bunch of nops between reads and writes?