Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in 
CSDb User Forums

Forums > Requests > Looking for corrupt T64 images
2016-07-05 19:04

Registered: Jan 2005
Posts: 334
Looking for corrupt T64 images

Hey there,

I'm developing a small tool to 'fix' corrupt T64 images, so hopefully we can one day get rid of this crappy format.

I know there's a lot faulty images out there, so far I've been looking for them with pokefinder, but this means downloading and testing every image and hoping I find a corrupted one.
This obviously takes way too much time, so I was hoping some people here know about faulty T64 images, perhaps on CSDb, perhaps on one of the FTP servers.

To give you an idea of what I'm attempting to fix, here's a run of my tool, first on a proper image, and then on a corrupt one:
compyx@aspire-7740 ~/projects/t64fix $ ./t64fix ~/projects/c64-toolkit/data/compunet.t64 
tape magic  : "C64 tape image file"
tape version: 0100
tape name   : "FBI CREW 1989"
file records: 3/4
blocks filename           type rep. memory  real memory  status
  140  "COMPUNET +7  /GP" prg  $0801-$92b0  $0801-$92b0  OK
   18  "COMPUNET RIP /GP" prg  $0801-$190f  $0801-$190f  OK
  152  "COMPUNET / MD 64" prg  $0801-$9e93  $0801-$9e93  OK
OK, proper image

compyx@aspire-7740 ~/projects/t64fix $ ./t64fix ~/projects/c64-toolkit/data/kikstart-iii-corrupt-endaddr.t64
t64fix: warning: current records count reported as 0, adjusting to 1
t64fix: warning: reported size of $bbc5 does not match actual size of $795a
t64fix: illegal value $44 for C1541 file type, assuming $82 (prg)
tape magic  : "C64S tape file
Demo tape......"
tape version: 0100
tape name   : "DEMO TAPE"
file records: 1/30
blocks filename           type rep. memory  real memory  status
  190  "FILE            " prg  $0801-$c3c6  $0801-$815b  fixed
faulty image: fixes applied: 3

As you can see, quite a few corruptions can be fixed. I'm also looking for T64 images which contain snapshots (FRZ files) from the C64S emulator, the one that originated the T64 file format. Would be nice to see how those files are stored, so I can skip them when extracting files from a T64 into a D64 or something similar.

2016-07-05 21:35

Registered: Sep 2003
Posts: 385
Freeze of v2.52:
2016-07-05 21:54

Registered: Dec 2001
Posts: 8545
perhaps also change the magic to "C64S tape file"? or whatever the original docs said/what c64s created.
2016-07-06 09:53

Registered: Jan 2005
Posts: 334
Quote: Freeze of v2.52:


Looks like Peter Schepers' T64 article is correct: C64S filetype > 1 && C1541 filetype == 0: memory snapshot.
Both load and end address are set to 0, so apparently a snapshot has a fixed size that C64S knows about, in this case $104f4.
2016-07-06 10:06

Registered: Jan 2005
Posts: 334
Quote: perhaps also change the magic to "C64S tape file"? or whatever the original docs said/what c64s created.

Yes, a magic check/fix would also guard against feeding my tool a D64 which will likely result in a big mess. ;)
Perhaps add a --force switch for T64 files with really fucked up headers I have yet to encounter.

Seems like "C64S tape image file" in ASCII, padded with $00 to make it 32 bytes long is the original magic for the containers. I'll go with that.
2016-07-08 14:21

Registered: Mar 2003
Posts: 1339
How come T64 files tend to be corrupt? Is there some particular tool that tends to produce faulty/incompatible T64's?
2016-07-08 14:37

Registered: Jan 2005
Posts: 334
From what I understand, an old tool called CONV64 produced T64 images with the end address of files always set to $c3c6, no matter how large the files actually were (see kikstart-iii here on CSDb). Which caused a lot of tools and emulators to fail.

Other tools seem to get the number of files in the T64 container wrong: the number of files is set to 0. I haven't been able to pinpoint these tools yet.

Then there's the variety of 'magic' bytes in the headers, I think the proper magic should be 'C64S tape image file', in ASCII, padded with 0x00 to a length of 32 bytes (that's what C64S 2.52 uses, which is the emulator that spawned the hell that T64 is).

Also the C1541 file type is usually screwed, shouldn't matter too much, T64 can basically only store PRG files and memory snapshots.

Then there's the version number, which is either 0x100 or 0x101, but knowbody knows the difference.

So perhaps back in the day when bandwidth or BBS storage space mattered, T64 seemed like a good choice. Now, not so much.
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Users Online
JackAsser/Booze Design
Guests online: 23
Top Demos
1 Uncensored  (9.7)
2 Comaland 100%  (9.7)
3 Edge of Disgrace  (9.7)
4 Coma Light 13  (9.6)
5 The Shores of Reflec..  (9.6)
6 Wonderland XII  (9.6)
7 We Come in Peace  (9.6)
8 Lunatico  (9.6)
9 Incoherent Nightmare  (9.5)
10 Wonderland XIII  (9.5)
Top onefile Demos
1 FMX Music Demo  (9.5)
2 Pandemoniac Part 2 o..  (9.5)
3 Daah, Those Acid Pil..  (9.5)
4 Dawnfall V1.1  (9.5)
5 Treu Love [reu]  (9.5)
6 In Memoriam BHF  (9.5)
7 Merry Xmas 2017  (9.4)
8 Dawnfall  (9.4)
9 SWiRL  (9.4)
10 Synthesis  (9.4)
Top Groups
1 Oxyron  (9.4)
2 Booze Design  (9.4)
3 Censor Design  (9.4)
4 Finnish Gold  (9.4)
5 Crest  (9.3)
Top NTSC-Fixers
1 Pudwerx  (10)
2 Horizon  (9.8)
3 The Mind Slayer  (9.7)
4 The Shadow  (9.7)
5 Stormbringer  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2018
Page generated in: 0.063 sec.