tdlabac / MSX1_MiSTer

GNU General Public License v2.0
21 stars 4 forks source link

Disk saving problem, corrupt dsk??? #17

Closed nonochus closed 1 year ago

nonochus commented 1 year ago

When I insert a dsk file, if I don't modify nothing, everything is fine.

If, for example, I want to change something in the loader or modify the file "autoexec.bas" when making the modifications in basic and re-record that same file with the same name, it gives me recorded OK but after that ok of the recording, the DSK does not work again, it becomes like corrupt, it stops working, nothing goes from that dsk.

I have tried to restart the core and it is still corrupt, turning off and on the mister, it is still corrupt, it has already happened to me in 4 DSK.

It's easy to simulate the failure, insert any dsk, edit any file, just by adding a simple: 1 cls or edit something in basic then save"autoexec.bas" after recording, the dsk stops working.Have to make some modification on dsk, the save corrup dsk file?

Very thanks.

GuerreroNinja commented 1 year ago

I reproduced the bug saving a small basic program (10 print "test") and the disk got corrupted.

Checking DSK contents, I see the corrupted DSK show some deleted content at &h200-&h2a1 / &h800-&h8a1 / &h1000 - &h1080 and &h1c400 / &h1c600. While on original disk there is data on those addresses, on corrupted disk they are all 0.

To further investigate, I formatted a disk and it does not work, it gives the MSX-DOS error message "Unsupported media type error reading drive". The header is empty, but there is data at &h1c00.

MSX-DOS disk for tests: https://archive.org/details/MSXDOS

tdlabac commented 1 year ago

Fixed in version 20221111

nonochus commented 1 year ago

Tested!Working Perfect!

Appreciated!!!Very Thanks!