pi1541 / Pi1541

Commodore 1541 emulator for the Raspberry Pi
GNU General Public License v3.0
369 stars 80 forks source link

T64 file handling needs to be more tolerant #239

Open DeeKay64 opened 1 year ago

DeeKay64 commented 1 year ago

Besides D64s and D81s, Pi1541 does also mount PRG files (unfortunately not via FB64 for some reason, but via OLED it does!) and T64s. The T64 mounting however should be more fault tolerant, since it seems to only work on certain headers (used e.g. by Gamebase 64 T64s) in the first 32 bytes (i.e. 'C64 tape image file') when it should only check if it starts with the string "C64" and the first 32 bytes contain the word "tape". Also, it seems to expect the file type at offset $41 (or $01 relative for each file) to be $8x, while there are others (e.g. $Cx), so masking out the high 4 bits would seem like a good idea.. Or just assume that anything other than $00 is a PRG file, that seems to be the most compatible standard behaviour (who saves SEQ onto tape?)

Specs for T64 see here: http://unusedino.de/ec64/technical/formats/t64.html