From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "behavior" |
|---|
| subject | "Format:G64 GCR disk image" |
|---|
| claim | "VICE recognises GCR-1541 and GCR-1571 images by the 8-byte tag; it requires byte 8 (version) to be 0 and byte 9 (half-track count) to be at least 1; tracks = byte9/2; the u16 LE max-track-size at 10 is not checked. A newly created G64 has byte 9 = max_tracks*2 (84 for the 1541, MAX_TRACKS_1541 = 42), max track size 7928 (NUM_MAX_BYTES_TRACK), offset table at 12 and a speed table of the same size after it, each track record u16 length + data." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:G64 GCR disk image" |
|---|
| observed_in | |
|---|
|
|---|
| data | | trigger | "opening or creating a G64/G71 in VICE" |
|---|
| effect | "header validation and layout as stated" |
|---|
| function | "disk_image_check_for_gcr, fsimage_create_gcr" |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "strncmp GCR-1541/GCR-1571, header[8] != 0 rejected, header[9] < 1 rejected, the max-track-length test is #if 0" |
|---|
| repo | "https://github.com/VICE-Team/svn-mirror" |
|---|
| commit | "22cf0cc8eee4dae54f55ff7a738cf0cb7eaa258f" |
|---|
| path | "vice/src/diskimage/fsimage-probe.c" |
|---|
| lines | "453-508" |
|---|
|
| type | "source" |
|---|
| detail | "creator writes the 12-byte header, 84*... offset and speed tables; gcr.h line 38 NUM_MAX_BYTES_TRACK 7928. Reading of track data was not checked" |
|---|
| repo | "https://github.com/VICE-Team/svn-mirror" |
|---|
| commit | "22cf0cc8eee4dae54f55ff7a738cf0cb7eaa258f" |
|---|
| path | "vice/src/diskimage/fsimage-create.c" |
|---|
| lines | "424-470" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "VICE G64 probe and creation" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-19T13:07:46.826Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T16:37:58.696Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read disk_image_check_for_gcr whole (fsimage-probe.c 445-507) and fsimage_create_gcr (fsimage-create.c 430-500) at VICE 22cf0cc8: tag GCR-1541/GCR-1571, header[8] != 0 rejected, header[9] < 1 rejected, max-track-length test inside #if 0, tracks = header[9]/2; creator writes byte 9 = max_tracks*2, 7928 at offset 10, track table at 12, speed table after it, track record u16 length + NUM_MAX_BYTES_TRACK. Note for a created G71 max_tracks is 84 (byte 9 = 168) and only num_tracks entries get non-zero offsets; the fact speaks of G64 only, so it holds." |
|---|
|
|
|---|