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


Forums > C64 Coding > retro replay file format
2015-12-14 23:49
AlexC

Registered: Jan 2008
Posts: 299
retro replay file format

Since rr files aren't in CRT format could somebody please point me to (hopefully existing) document describing its file format?
2015-12-14 23:56
chatGPZ

Registered: Dec 2001
Posts: 11386
what info are you missing for exactly? if we are not talking .crt files, then we have plain binaries... which are just that. *shrug*
2015-12-15 09:05
AlexC

Registered: Jan 2008
Posts: 299
I know I could go through Vice sources but maybe someone will be kind enough to to tell me how emulator validates the file then? And what is the internal structure since RR is using banking?
2015-12-15 09:21
Frantic

Registered: Mar 2003
Posts: 1648
As for the internal "structure", it is just one bank after another, in order.. raw data as Gpz said. Dunno how VICE does the validation.
2015-12-15 09:48
AlexC

Registered: Jan 2008
Posts: 299
So at first sight it seems that only file size could be a tip. @Groepaz & Frantic: thank you :)
2015-12-15 10:57
chatGPZ

Registered: Dec 2001
Posts: 11386
yup, VICE only checks the file size for binaries
2015-12-15 13:19
AlexC

Registered: Jan 2008
Posts: 299
So is there any minimal and maxium size? I guess minimal size could be 32kb?

The reason for my question is that I'm writing code for detecting file types and I'd like to include detection code for RR compatible ROMs.
2015-12-15 13:32
Frantic

Registered: Mar 2003
Posts: 1648
Dunno. What I *do* know is that I generated 64kb cart images from my code at one point and that worked fine.
2015-12-15 13:39
AlexC

Registered: Jan 2008
Posts: 299
The original RR specs define 128kb ROM so I guess this would be the limit but I'd like to have confirmation from someone who knows this topic better than I do. The RR file is 64kb long so your experience is right.
2015-12-15 13:52
chatGPZ

Registered: Dec 2001
Posts: 11386
it will accept 32k, 64k and 128k binaries. however, that is not a good way to detect valid RR images :)
2015-12-15 14:39
AlexC

Registered: Jan 2008
Posts: 299
So could you please share better approach with us...
2015-12-15 14:52
Frantic

Registered: Mar 2003
Posts: 1648
I think he just meant that there are zillions of files (especially cartridge images) that have these file sizes.

As for the contents of the ROM image files.. I'm not sure if there is anything that *must* be positively present or that must be absent in a RR image. I guess in principle it *could* have any contents (such as being filled with data, rather than code). Therefore any attempts to identify RR images based on contents would be heuristic rather than absolute, I think. I may be wrong of course. Anyway, my guess is that the absence of easy ways of identifying RR rom images is precisely the reason for the "less sophisticated" approach to validating RR ROM images, based on file size rather than bothering about contents.

Do you need to distinguish RR ROMS from other type of cart ROMs (or other files in general), or are you just generally curious?
2015-12-15 17:33
Count Zero

Registered: Jan 2003
Posts: 1932
RR Roms have their version string at offset $80 of the file usually. However, as there are plenty of hacks you will be much better off using checksums to detect "known" vs "unknown" binaries. I recently fiddled with custom detection files for clamAV to detect some demomakers and such.
Throwing in a file with all rr.c64.org carts and available commie ROMs seems no problem there.
2015-12-15 17:42
chatGPZ

Registered: Dec 2001
Posts: 11386
AlexC: there simply is no way to detect whether some binary works on the RR or not. you could check for the CBM80 signature in bank0, but thats pretty much all about it.

what are you trying to do anyway?
2015-12-15 19:08
AlexC

Registered: Jan 2008
Posts: 299
I'm writing a small program for detecting file types inside my c64 collection. Since there are number of valid RR rom files around I wanted to add additional check for those but not limit the detection to already known files (like I did for crt files which I detect by checking for CRT and CHIP header data). Seems like it is not entirely possible, but anyway I do appreciate all the input. Thanks guys!

@CZ: As for ClamAV you may consider Yara for your needs as well.
2015-12-15 19:24
Count Zero

Registered: Jan 2003
Posts: 1932
Yara looks interesting. Even led me to http://x64dbg.com/ which I havent seen before.

For clam and easy going its just one line to add to some detection file. Really should put up a public database for such things and get some contributors. Since there already is all that info in e.g. unpack64 and other tools it shouldnt be too hard to create some fingerprinting db for c64 files. Does splunk support file detection on file basis?

Anybody being into alike things pls msg me :)
2015-12-15 19:30
AlexC

Registered: Jan 2008
Posts: 299
Count me in :) You're right, we have all the required bits all around.

As for the debugger I don't use since all the tools I have right now are in Python and are integrated with IDA but if you are used to OllyDBG than this is a choice worth considering. I'd like to write that is has better GUI than WinDBG but on the other hand basically everything else does too ;)
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
csabanw
JackAsser/Booze Design
Twoflower/ΤRIΛD
Jangler/Artline Desi..
Chrx/Design/Chaos
Guests online: 116
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.6)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Triad  (9.3)
5 Censor Design  (9.3)
Top Diskmag Editors
1 Magic  (9.8)
2 hedning  (9.6)
3 Jazzcat  (9.5)
4 Elwix  (9.1)
5 Remix  (9.1)

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