Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user maak ! (Registered 2024-04-18) You are not logged in - nap
CSDb User Forums


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

Registered: Jan 2005
Posts: 631
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.

/Compyx
2016-07-05 21:35
soci

Registered: Sep 2003
Posts: 473
Freeze of v2.52:
http://singularcrew.hu/temp/c64sfreeze.t64
2016-07-05 21:54
chatGPZ

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

Registered: Jan 2005
Posts: 631
Quote: Freeze of v2.52:
http://singularcrew.hu/temp/c64sfreeze.t64


Thanks.

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
Compyx

Registered: Jan 2005
Posts: 631
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
Frantic

Registered: Mar 2003
Posts: 1627
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
Compyx

Registered: Jan 2005
Posts: 631
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
Advanced
Users Online
Mike
hedning/G★P
Mr. SID
Matt
Mason/Unicess
Båtsman/Y-front
mutetus/Ald ^ Ons
Yazoo/Arsenic
sln.pixelrat
jeroen1328
zscs
icon/The Silents, Sp..
Guests online: 143
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 The Ghost  (9.6)
10 Bromance  (9.6)
Top onefile Demos
1 It's More Fun to Com..  (9.9)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 Rainbow Connection  (9.5)
6 TRSAC, Gabber & Pebe..  (9.5)
7 Onscreen 5k  (9.5)
8 Dawnfall V1.1  (9.5)
9 Quadrants  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Nostalgia  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Diskmag Editors
1 Jazzcat  (9.4)
2 Magic  (9.4)
3 hedning  (9.2)
4 Newscopy  (9.1)
5 Elwix  (9.1)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.037 sec.