Menu

#1455 D64 image extension handling for 36-39 tracks

v3.6
closed-fixed
gpz
None
GTK3
Drives
2021-12-30
2021-04-01
SlagDog
No

VICE does not handle D64 image extension in a sane way.
Whenever a mounted D64 image is extended capacitywise from 35 tracks to anything lower than track 40 the D64 image size will result in just the used tracks bytes added as extension.
E.g. a D64 image with track 36 formatted is becoming 179200 bytes. (Testprogram: https://csdb.dk/release/?id=20557 )

Most applications being able to open D64 images will accept 35, 40 and (sometimes) 41 tracks only though and see the VICE created images as invalid. (42 tracks is quite debatable and never saw an image "in the wild")

https://ist.uwaterloo.ca/~schepers/formats/D64.TXT describes these standard file sizes:

 Disk type                  Size
 ---------                  ------
 35 track, no errors        174848
 35 track, 683 error bytes  175531
 40 track, no errors        196608
 40 track, 768 error bytes  197376

An image getting extended should therefore become a 40 track image to make sure it can be re-used elsewhere. (Unsure on 41/42 track images - there it should be ok to extend just by the track)

One might oppose that unformatted tracks cannot properly be represented in D64 images and therefore the current behaviour is to be preferred BUT it is not possible to just format track 38 and leave out 36+37 either.
Such use cases should of course be pointed towards G64 usage and compatibility to the rest of the world is surely preferred.

Discussion

  • gpz

    gpz - 2021-04-01

    i think not even VICE itself accepts a d64 that has 36 tracks (or even worse: 36 tracks + errorinfo. wtf?)

    so yes, it should get extended to 40 tracks, always

     
  • gpz

    gpz - 2021-04-01

    should be fixed in r39890 - please test.

    it should extend to 40, then 42, then +1 track

     
  • gpz

    gpz - 2021-04-02
    • status: open --> pending-fixed
    • assigned_to: gpz
     
  • Querino

    Querino - 2021-04-03

    what the hell am i doing wrong!?

    i tried the prog from https://csdb.dk/release/?id=20557

    but it doesn't do anything on the .d64 image.

    • x64sc.exe -default
    • attach some .d64 image of size 174848 bytes
    • set "40-track-policy" to "ask.."
    • format it using above prog
    • prog seems to do the job, (also vice asks at track #36, i press YES) finishes with 00, OK,00,00
    • exit vice

    nothing happened. the image is still exactly byte identical as before.
    not formatted, not extended in any way.

     
  • gpz

    gpz - 2021-04-03

    You didnt accidently format the autostart d64? :)

     
  • Querino

    Querino - 2021-04-03

    meh... indeed that happened.

    forgot with -default VICE uses autostart.d64 for starting .prg files.

    and the autostart.d64 is nicely hidden in the %appdata% folder.

     

    Last edit: Querino 2021-04-07
  • Querino

    Querino - 2021-05-13

    i checked this again, sort of.

    is it correct we get lots of error messages in the log type

    Filesystem Image DXX: Error - Could not find data sector of T:xx S:xx
    

    strange there are also some with tracks below 36, such as 31 and 25

     
  • gpz

    gpz - 2021-05-13

    Did you test with this "Master Format" Program? Its kindof buggy - make sure to at least show the directory once before formatting. It doesnt do a proper headbump, so it starts formatting at Track 2 instead of Track 1... and yes, then you get those errors

     
  • Querino

    Querino - 2021-05-17

    yes, after showing the directory at least the errors of tracks below 37 are gone.

     
  • SlagDog

    SlagDog - 2021-06-24

    Tested a little using Speeddos 40 tracks format - recently set default as "ask' seems fine and the written images are also ok.
    Close from my side :)

     
  • gpz

    gpz - 2021-06-24

    so be it :)

     
  • gpz

    gpz - 2021-06-24
    • status: pending-fixed --> closed-fixed
     

Log in to post a comment.

Auth0 Logo