Menu

#42 os9 dir gives error 216 after floppy image written to by NitrOS-9 in MAME

None
wont-fix
nobody
None
5
2020-04-18
2019-04-23
No

I've been trying NitrOS-9 EOU Beta 3 (6809, under MAME 0.199) and it looks like creating a file on a floppy from OS-9 makes the floppy unreadable by ToolShed's "os9 dir" command.

I used ToolShed 2.2 (under Ubuntu 14.04) to create a new 80-track floppy image (on my Linux system): os9 format example.dsk -ds -t80 -e -9

I successfully tested that I can read its (empty) directory: os9 dir example.dsk,

I started MAME 0.199 on EOU with the new floppy image as the 2nd floppy: -flop1 68emu.dsk -hard1 68sdc.vhd -flop2 example.dsk

I typed DOS and got to the /DD prompt, where I typed "cd /d1", then "build file1", then I entered 3 short lines of text.

I successfully checked the new file with "list file1".

At that point, whether or not I shutdown MAME, giving the "os9 dir example.dsk," command under Linux fails with these error messages:

dir: error 216 opening 'example.dsk,.'
dir: error 216 opening 'example.dsk,'

Discussion

  • Tormod Volden

    Tormod Volden - 2019-04-23
    • Group: 2.2 --> 2.3
     
  • Tormod Volden

    Tormod Volden - 2019-04-23

    Hi Pierre, can you please attach a zipped disk image?

     
  • tim lindner

    tim lindner - 2019-04-24

    I reproduced the steps Pierre explained. And I reproduced the problem. After MAME quits the disk appears corrupt. Toolshed will no longer display the directory. Looking into the specifics now.

    But as an aside: MAME will read in the entire disk image on startup and will not write to the native file until the emulation quits.

    Attached is the corupt (?) disk image.

     
  • Pierre Sarrazin

    Pierre Sarrazin - 2019-04-24

    After the build command, I ran md5sum under Linux on the floppy image before and after closing MAME, and got the same signature.
    To be noted: the modified floppy image is 2 bytes longer than it was right after "os9 format" created it.
    Now that you've reproduced the problem, I assume you won't need my disk images.

     
  • Tormod Volden

    Tormod Volden - 2019-04-24

    MAME adds a 2-byte JVC header [http://tlindner.macmess.org/?page_id=86] when it saves the image. I would consider this a bug in MAME that it adds a header without asking on an image that didn't already have one. If you strip the two bytes, the image will be readable from toolshed again.

     
  • tim lindner

    tim lindner - 2019-04-24

    The irony of this situation is not lost on me.

     
  • Tormod Volden

    Tormod Volden - 2019-04-24

    lol

     
  • Pierre Sarrazin

    Pierre Sarrazin - 2019-04-25

    Intriguing... Is there a story behind this?

    Should this bug be reported to mame-dev?

    I confirm that removing the first 2 bytes fixes the issue. I used this command under Linux:

    dd if=example.dsk of=fixed.dsk ibs=1 skip=2

    Thanks for your help.

     
  • tim lindner

    tim lindner - 2019-04-25

    Yes, please report the bug to mame-dev. I am working on a fix: https://github.com/tlindner/mame/tree/fix_os9_dsk
    but it is not working yet.

     
  • tim lindner

    tim lindner - 2019-04-25
     
  • Tormod Volden

    Tormod Volden - 2020-04-18
    • status: open --> wont-fix
    • Group: 2.3 --> None
     
  • Tormod Volden

    Tormod Volden - 2020-04-18

    Closing this as wontfix since the bug was in MAME, and has been fixed there thanks to Tim.

     

Anonymous
Anonymous

Add attachments
Cancel





Monday.com Logo