I did some little test to the implementation of the Floppy drive, and looks that works. I need to improve the test program of it.
Also, I try to use Pixelator with it. It formats, save and load correctly. Something like drawing, going to Disk option, formatting, installing PUS and saving works. Plus If you go back to Draw, and change the image, and then go to Disk option, and try to load the file, it works, restoring the saved image from disk.
But when I reset the machine, or simply exit and load again dcpu-vm, when I "install" PUS filesystem in Pixelator, it erases his own data from the floppy (but not erases the whole disk). I think that is a bug on pixelator, but I'm not very sure about it. Plus it gives a error when I try to save a image (but It saves it!). It's formats, install PUS filesystem correctly, and loads correctly. There is a problem saving, that gets a error at middle of the process, only writing half of the file.
Also, I examined the disk image file with a hex editor, and is the Pixelator data correctly saved.
So the TODO list about the floppy is :
Improve the dumb test floppy program. Actually only writes "Cleaning" in screen, and fills the whole floppy with some data that are the last words of the program data. Should to fills the disk with some pattern to test the writing and say "Disk filled" when it finish. Now read it and check that the pattern it's correct and say it when it finish.
- Implement the Bad Sector bitmap
Add pertinent options in main.cpp to load a arbitrary floppy image.