Menu

#454 Fuse cannot merge disk sides with different bpt

NextRelease
pending-fixed
nobody
disk (15)
5
2023-11-04
2019-04-28
No

With this patch fuse can merge disk sides with different byte per track (bpt).

This patch based on patch of [bugs:#451] and [bugs:#452]

  1. peripherals/disk/fdd.h and disk.h:
    • c_bpt moved from fdd.h[struct fdd_t] to disk.h[struct disk_t]
    • in DISK_SET_TRACK_IDX() macro, the calculation changed to uses individual track lengths and c_bpt
  2. peripherals/disk/fdd.c, upd_fdc.c and wd_fdc.c:
    • in fdd.c we use disk.c_bpt instead of fdd.c_bpt
  3. peripherals/disk/disk.c:
    • position_context_{save,restore}() also deal with the c_bpt
    • in disk_write() we use the position_context_{save,restore}() instead of 'custom' code
    • in all functions() we use c_bpt instead of bpt (the bpt value used for 'allocation')
    • in disk_alloc() we set all track length after allocate the data structure
    • so in disk_new() and in disk_open2() we do not need to call disk_update_tlens() anymore
    • in open_cpc() we set bpt = 6500 only those tracks, which have more data than a normal DD track (tracks with a 8k sector with more than 6k sector data)
    • in disk_merge_sides() at now, we enable merge disk sides with different bpt, so the 2 sided disk allocated with the bigger bpt, and all track use their own bpt value.
  4. in disk_open() we a little bit more relaxed the filename rule
  5. in open_cpc() if we encounter with a bpt greater than 6250 but not any 'special' case (eg. 10x512 sector in a track - action_countdown_1989_us_gold..., or 18x256 sector in a track - california_games_1987_u.s._gold...) than we calculate a suitable gap3 value to all sector fit on track

I tested the patch to load more than 1700 .dsk images.
Not loaded:
- 007 Trans-Master (1988)(ZX-Guaranteed)(+3)(Side A)[samdisk].dsk (the same as mentioned in [bugs:#450])
- Castle Master (1990)(Incentive)(+3)[a].dsk - this image looks like truncated (corrupted?) at track 20. In the image track 20 has only 1 sector data instead of 9 and there is no more data
- and 14 unformatted "B" side -- images only 256 byte length

I tested the patch to start 124 '.dsk' with 'special' track layout:
- 95 have track with 8k sector 6k or less stored sector data
- 14 have track with 8k sector more than 6k sector data
- 12 have track with 1x 8k sector with 6k sector data and a couple of 512 byte sectors (most of the image have 10x512 byte sector)
- 19 have a track with 128/256/512/1024/2048... sectors and +1 has a track with 256/512/1024/2048... sectors
- 2 have a track with 512/256/512/256/512/256/512/256/512 sectors

Not started:
- F-16 Combat Pilot (1991)(Digital Integration)(+3).dsk -- start, but i cannot select 1- English or 2 - Espanol -- does not respond to any key
- Ghouls 'n' Ghosts (1989)(U.S. Gold)(+3).dsk -- loading screen o.k. but after that just load.. and 'load'...

All 'not loaded' and 'not started' -- the same with fuse master.

1 Attachments

Related

Bugs: #450
Bugs: #451
Bugs: #452
Bugs: #476
Patches: #385

Discussion

  • Sergio Baldoví

    Sergio Baldoví - 2023-11-04
    • status: open --> pending-fixed
    • Group: future --> NextRelease
     
  • Sergio Baldoví

    Sergio Baldoví - 2023-11-04

    Thank you. Committed in [edac60].

     

    Related

    Commit: [edac60]


Log in to post a comment.