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 21:04
Compyx

Registered: Jan 2005
Posts: 234
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 23:35
soci

Registered: Sep 2003
Posts: 338
Freeze of v2.52:
http://singularcrew.hu/temp/c64sfreeze.t64
2016-07-05 23:54
Groepaz

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

Registered: Jan 2005
Posts: 234
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 12:06
Compyx

Registered: Jan 2005
Posts: 234
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 16:21
Frantic

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

Registered: Jan 2005
Posts: 234
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
rail slave/Hokuto Fo..
Scan/House Designs
JackAsser/Booze Design
algorithm
Flex/Artline Designs
Guests online: 44
Top Demos
1 Uncensored  (9.7)
2 Edge of Disgrace  (9.7)
3 The Shores of Reflec..  (9.6)
4 Coma Light 13  (9.6)
5 Lunatico  (9.6)
6 Comaland 100%  (9.5)
7 Incoherent Nightmare  (9.5)
8 Wonderland XII  (9.5)
9 Comaland  (9.5)
10 Wonderland XIII  (9.5)
Top onefile Demos
1 Dawnfall V1.1  (9.5)
2 Daah, Those Acid Pil..  (9.5)
3 Treu Love [reu]  (9.4)
4 Dawnfall  (9.3)
5 SidRok  (9.3)
6 Achtung 5 Years Mayd..  (9.3)
7 One-Der  (9.2)
8 Tunnel Vision  (9.2)
9 Globe 2016 [reu]  (9.1)
10 Safe VSP  (9.1)
Top Groups
1 Booze Design  (9.4)
2 Oxyron  (9.4)
3 Censor Design  (9.4)
4 Crest  (9.3)
5 Arsenic  (9.3)
Top Graphicians
1 Mirage  (9.8)
2 Archmage  (9.7)
3 Veto  (9.7)
4 DocJM  (9.7)
5 Carrion  (9.7)

Home - Disclaimer
Copyright © No Name 2001-2017
Page generated in: 0.328 sec.