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 > .crt File Format clarifications
2013-12-20 00:56
TWW

Registered: Jul 2009
Posts: 542
.crt File Format clarifications

Hiho

Been trying to read up on the whole cartridge .crt file format depicted in codebase.

Have a couple of things I wish to clarify:

#1: Under CHIP contents, the following is stated:

0008-0009 - Chip type
                      0 - ROM
                      1 - RAM, no ROM data
                      2 - Flash ROM


Does this goes into memory as little or big endian? Can't find any examples of other than type $0000 (not that it would matter anyway but for sake of good order).

#2: Is there any "rule" for which RAM bank is visible first upon bootup?

#3: For the Ocean Type #1 Cartridge, is the following statement correct:

        Size1        - 128Kb (16 banks of 8Kb each, all mapped to $8000)
        Size2        - 256Kb (32 banks of 8Kb each, lower 16 banks are mapped to $8000 and the upper 16 banks are mapped to $a000)
        Size3        - 512Kb (64 banks of 8Kb each, all mapped to $8000)


#4a: If it is, how is it determined where the cartridge banks it's memory (i.e., is it the CHIP header which determines if a memory bank goes to $8000 or $a000 or is something else)?

#4b: How is it really working then?

#5: Under Ocean Type 1 the following is said regarding bank switching: "Bank switching is done by writing to $DE00. The lower six bits give the bank number (ranging from 0-63). Bit 8 in this selection word is always set.". Shouldn't it be "selection byte is always set."?

#6: The Bank Numbering scheme on Ocean Loader #1, how does it look for the different cartridge types (128, 256 & 512kB)?

Cheers!
2013-12-20 04:45
chatGPZ

Registered: Dec 2001
Posts: 11164
look here and here ... (please complain on the bugtracker if something is missing or unclear or even incorrect :))

#1: big endian like all other... however, dont expect it to do anything useful when it is 1 or 2. for ocean cart it should be 0 :)

#2: i dont understand the question... the behaviour of the cartridge depends on the respective hardware type. ocean carts start with bank 0, see here (generally i recommend looking at the respective source file in vice when looking for info on how a cartridge works, they all contain a description of the hardware now)

#3: not exactly correct - see the comment at the top here :o)

#4a see #2 :) the loading address in the chip header is a somewhat strange leftover from the early days, and must match fixed values that are typical for the respective type of cartridge. (similar to the GAME/EXROM setting in the crt header)

#4b see above :=) the whole crt format is somewhat badly defined, many things depend on the actual cartridge hardware (crt id)

#5: yeah bad wording. it should be byte/register/whatever (and bit7 =D)

#6: banks are almost always banked linear in crt files (there are exceptions, unfortunately)
2014-01-06 19:31
TWW

Registered: Jul 2009
Posts: 542
Thanx for the info Gpz.

Based on the linked VICE source code and your comments, I believe I have understood how the cartridge image files are interpeted by the emulator.

As you said, type and then crossreferenced sith size to determine the actual configuration of the cartridge.

Also explains why you need to pad the cartridge to exact size to make it work.
2014-01-06 20:31
TheRyk

Registered: Mar 2009
Posts: 2107
Also be aware that you sometimes have to manipulate the header as a quick and dirty way to make EasyFlash believe non-Ocean type CRT such as RGCD stuff were Ocean ;)
2014-01-07 00:00
Count Zero

Registered: Jan 2003
Posts: 1834
For me building a ROM bin file and running that with the switches for vice usually works best. Finally pass the bin to cartconv and all is fine.
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
Nith/TRIÉ…D
Fred/Channel 4
JEZ
Clayboy
Guests online: 53
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.7)
5 Edge of Disgrace  (9.6)
6 Comaland 100%  (9.6)
7 Uncensored  (9.6)
8 No Bounds  (9.6)
9 Aliens in Wonderland  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 Cubic Dream  (9.6)
3 Party Elk 2  (9.6)
4 Copper Booze  (9.6)
5 Rainbow Connection  (9.5)
6 It's More Fun to Com..  (9.5)
7 Dawnfall V1.1  (9.5)
8 Birth of a Flower  (9.5)
9 Daah, Those Acid Pil..  (9.5)
10 Quadrants  (9.5)
Top Groups
1 Nostalgia  (9.4)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Offence  (9.3)
Top NTSC-Fixers
1 Pudwerx  (10)
2 Booze  (9.7)
3 Stormbringer  (9.7)
4 Fungus  (9.6)
5 Grim Reaper  (9.3)

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