Menu

#424 Errors loading 40 track single sided MGT disks for the +D

future
open
nobody
None
5
2019-06-10
2018-06-19
No

druellan from the Spectrum Computing forums reports that he gets errors loading 40 track MGT images in Fuse 1.5.4:

The +D emulation does work on both 48k and 128k, but does not seem to honor the settings about tracks and sides of the disk image, at least, I'm not able to read some 40-track images, while other emulators like ZXSpin/SpecEmu/Eightyone have no problems with them.

He reports that using the attached MGT image always fails, e.g.:

1 Attachments

Discussion

  • Gergely Szasz

    Gergely Szasz - 2019-05-15

    Hi Fred!

    Sorry for the long silence.

    This image is 409600 bytes length:
    - 1x80x10x512 or
    - 2x40x10x512
    so, this is a 40 track 2 sided or a 80 track 1 sided disk image. We cannot distinguish. Fuse (now) assumes a 1 sided 80 track disk. (The same situation with OPU/OPD)
    We have three options:
    1. Fuse asks user about
    2. Fuse selects based on disk drive setup
    3. Fuse tries to analyze the file system and if found a file on the 'second side' (track no. >128) selects the 2 sided option

    Maybe the first is the best, And we conbine with no. 3. (give a hint to the user)

     
    • Gergely Szasz

      Gergely Szasz - 2019-05-16

      Hmmm... yes, if i change the source,:to assume 2 sided 40 track, and set the drive to 2 sided 40 track than it looks o.k.

       
  • Gergely Szasz

    Gergely Szasz - 2019-05-25

    Here is a patch, to implement 'option 1'. At now we use an another hint (not. no. 3): if we found a 'B' side of the disk, we assume single sided images...

     
  • Gergely Szasz

    Gergely Szasz - 2019-06-10

    Here is an enchanced patch:

    Fuse uses "auto" disk geometry: when open a disk image then fits the geometry of the drive according to opened disk. (except the +3's first drive). Note: the Disk options only used if we insert a new disk.

    Now we can select between 'auto' and 'fixed' drive parameters. (fixed: Fuse uses Disk options)

    When Fuse cannot distinguish between one sided 80 track or two sided 40 track disk geometry (.mgt or .opd images), then selects the one sided geom.

    Now we can select between Fuse 'use drive geometry' or 'ask user about' in this cases.

    • settings.dat, ui/options.dat:
      • add options and settings: disk_geometry_ambigous and drive_geometry
    • uimedia.c
      • ui_media_drive_insert(): add code to set emulated drive parameters according to drive_geometry settings (auto or from disk options)
    • menu.c
      • menu_tape_detail(): change detail string to display inserted disk geometry
    • disk.[hc]
      • new flag: DISK_FLAG_1SIDED - set if the disk is one sided (e.g.: we found a second side, or from user's reply...)
      • disk_open(): rename preindex -> open_flag because we use it for preindex and mark one sided disks
      • disk_open2(): add code to handle disk_geometry ambigous flag and ask user if neccessary
      • open_img_mgt_opd() : add code to select one or two sided geometry according to open_flag & DISK_FLAG1SIDED
    • man/fuse.1
      • some description about disk_geometry_ambigous and drive_geometry (please review...)
     

Log in to post a comment.