Zardoz89 / dcpu_vm

Another DCPU-16 Virtual Machine
http://zardoz89.github.io/dcpu_vm/
MIT License
6 stars 2 forks source link

Mackpar Floppy drive #12

Open Zardoz89 opened 11 years ago

Zardoz89 commented 11 years ago

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 :

Zardoz89 commented 11 years ago

I actually improved a lot the test program. Now does what I said. Also, I fixed a bug that when the floppy get the command of read, instead try to write on it, erasing all data. I fixed it. The test program works well, but Now Pixelator, can't read well his own data, and I don't know why.

Zardoz89 commented 11 years ago

I did some bugfixes in the floppy drive code and the test program. I can very that the data write/read from the floppy it's ok.

lamogui commented 11 years ago

Founds problems : there were confusion between what the drive read and what he put on the ram :

Exemple if i have 0xFFAA, 0xBEC0 on a dsk i will have 0xAAFF,0xBEC0 on the ram (inverse endian) AND NOT 0x00ff, 0x00AA, 0x00BE,0x00C0

Zardoz89 commented 11 years ago

Check it with Pixelator. The last time that I tested it (like a month) was working without problems.

lamogui commented 11 years ago

I made a Big mistake i just found the doc of the drive here http://dcpu.com/floppy-drive/ It specified that floppy sectors contains 512 WORDS, i will change that

lamogui commented 11 years ago

In fact the notch spec are not compatible with standart floppy

lamogui commented 11 years ago

I corrected my mistake now pixelator save/load work well !

Zardoz89 commented 11 years ago

Thumbs up!

lamogui commented 11 years ago

Implementation of bad sectors finished

Zardoz89 commented 11 years ago

Thumbs up! ^2