Intermittent corruption of disk images

By chalky

Expert (67)

Аватар пользователя chalky

29-12-2019, 18:14

After being a BlueMSX user for years, I have started using openMSX (since someone on here posted a zip of readily configured machines) and have been blown away by the improved experience - openMSX is just so much better and easier to use!

My favourite improvement is its ability to dynamically handle a disk change (dir as disk) - but there have been several occasions when it has trashed the contents of a disk image following a disk change (from dir to .dsk). I *think* it only happens if I toggle the throttle on/off during a session, but because the fault is intermittent I am unable to pinpoint the exact events needed to make it happen.

Is this a known issue?

Also - is there a way to have 'toys' (i.e. Info Panel) switched on by default?

Для того, чтобы оставить комментарий, необходимо регистрация или !login

By wouter_

Hero (524)

Аватар пользователя wouter_

30-12-2019, 12:31

Bugs are always possible of course, but currently I'm not aware of any bugs in the openMSX dir-as-disk implementation.

However there is a limitation that originates from the limited capacity of MSXDOS disks (~713kB). When the sum of the file sizes in the host directory succeeds that capacity, then obviously not all host information can be represented in the MSX disk. And possibly this looks like corruption??

Can you confirm that when you saw corruption, you also got openMSX warning messages about truncated files (because of too little capacity)? If this is indeed the cause then we can think about how to handle this situation more gracefully. Ideas are always welcome.

There is no builtin way to auto-enable toys. But you can automatically execute extra commands when openMSX starts. Either via a Tcl script (place a 'my-script.tcl' file in your openmsx/share/scripts directory which contains the commands). Or via the openMSX command line options '-script' or '-command' (the latter is pretty recent).

By chalky

Expert (67)

Аватар пользователя chalky

01-01-2020, 11:14

The corruption is with the disk contents (MFT - does that exist on these types of disks?) rather than the files themselves. I start openMSX with a disk image, then switch back and forth [a lot!] between the .dsk image and dir-as-disk (I am using Notepad++ to edit my MSX-BASIC program then loading it via dir-as-disk before swapping to a .dsk image and saving it). After a while, the disk image gets 'corrupted' - i.e. all .BAS files disappear, as do most other files (.SPR, .BIN, .DAT etc.) to be replaced by a [shorter] list of .ASC files (.ASC was the extension type I am loading/saving from/to dir-as-disk and .dsk).

This is permanent - the 'corruption' persists after closing and restarting openMSX, and any lost files are gone forever.

By Manuel

Ascended (19467)

Аватар пользователя Manuel

01-01-2020, 13:53

Can you confirm that when you saw corruption, you also got openMSX warning messages about truncated files (because of too little capacity)?

By gdx

Enlighted (6214)

Аватар пользователя gdx

01-01-2020, 14:00

I noticed also corruptions when using folder as disk (Mac version).

chalky wrote:

openMSX is just so much better and easier to use!

By cons, this is not the case for the debugger.

By chalky

Expert (67)

Аватар пользователя chalky

01-01-2020, 16:01

@Manuel - openMSX gave no warning messages, and DSKF(0) reported 382kb free before the corruption.

By Manuel

Ascended (19467)

Аватар пользователя Manuel

01-01-2020, 22:03

Hmm, OK, that sounds interesting. What would help the most is to have a simple scenario in which we can reproduce the issue... Can you try to find one?

By sdsnatcher73

Prophet (3954)

Аватар пользователя sdsnatcher73

02-01-2020, 18:33

I noticed similar but hard to reproduce issues. To work around it I us a machine with 2 disk drives, use the DSK in one drive and dir-2-disk in the other. I created a FS-A1GT2 for that purpose by modifying the original and adding a second drive (and more RAM Wink.

By pgimeno

Champion (328)

Аватар пользователя pgimeno

08-01-2020, 00:18

I've found this post which reports something interesting.

https://www.msx.org/forum/msx-talk/development/msx-basic-tok...

The symptoms seem to describe this issue pretty well. Then it mentions this:

farique wrote:

Deleting the .cmos file on the "persistent" folder helps when booting normally but the savestate is irreparable.

By Manuel

Ascended (19467)

Аватар пользователя Manuel

08-01-2020, 09:12

pgimeno: that issue is about using savestates in combination with dir-as-disk. That will typically cause the dir-as-disk to become read-only.

So, chalky: are you using savestates/replays in the scenarios where you had corruption?