ROM Header: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 3:
 
{| class="wikitable"
|+
!Offset
!Size
Line 15 ⟶ 14:
 
 
All known commercial games use 0x80<code>80 0x3737 0x1212 0x4040</code> in these bytes.
 
 
Line 29 ⟶ 28:
 
 
Cruis'n USA sets this field to 0x3B9ACAF0x3A07F50, which results in a value of 608500060850000 (60.85MHz). Other titles, such as Star Fox 64, set this field to 0x3A07F5F0x3B9ACA0, which results in a value of 625000062500000 (62.5MHz).
|-
|0x08
Line 64 ⟶ 63:
|Revision version of libultra, as ASCII letter.
|}
For instance, libultra version "2.0L" is reported as 0x14<code>00 0x4C.00 14 4C</code>
 
 
Line 71 ⟶ 70:
|0x10
|0x8
|Check Code
|64-bit check code calculated on 1 Mbyte of ROM contents starting from offset 0x1000 (after IPL3). This check code is computed with a custom algorithm implemented by IPL3 that verifies the integrity of the ROM before booting it. If the check code doesn't match, IPL3 refuses to boot the ROM and hangs the console.
 
 
Sometimes, these 8 bytes are referred to as "CRC HI" / "CRC LO" or "CRC1/2", but the check code algorithm is not a CRC, and splitting it into two 4-byte words seem confusing when it is really a 64-bit value.
 
 
Line 86 ⟶ 85:
 
 
For the Conker's Bad Fur Day debug ROM, this field is set to <code>6F 23 01 3A 2F C9 CB 36</code>. For the Perfect Dark debug ROM, this field is set to <code>54 E4 D8 38 2F BD 95 36</code>. Since both of these games were made by RAREWARE, this field could be a check code for their Security Dongle hardware, which was required to be able to boot these games on the N64.
 
 
Line 103 ⟶ 102:
|0x3B
|0x4
|Game Code
|The game code is 4 ASCII characters that are split up into 3 parts - the category code, the unique code and the destination code.
{| class="wikitable"
Line 114 ⟶ 113:
|0x0
|0x1
|Category Code
|An alphanumeric character that specifies the kind of media the game is stored on.
{| class="wikitable"
Line 122 ⟶ 121:
|-
!D
|64DD Disk
|-
!C
|Expandable Game: Game Pak Part
|-
!E
|Expandable Game: 64DD Disk Part
|-
!Z
Line 136 ⟶ 135:
|0x1
|0x2
|Unique Code
|Two alphanumeric characters that identify the game.
|-
|0x3
|0x1
|Destination Code
|An alphanumeric character that specifies the destination the game is intended for.
{| class="wikitable"
Line 215 ⟶ 214:
|0xFC0
|IPL3
|This area contains the [[IPL3|IPL3 boot code]]. Each ROM ships its own IPL3 that is meant to work together with the [[CIC]] installed in the ROM. Before running IPL3, IPL2 checks its checksum also using a seed coming from the CIC, which binds each IPL3 code to a specific version of CIC.
|}
 
== Advanced Homebrew ROM Header ==
The Advanced Homebrew ROM Header format is a convention that has been agreed upon in the N64 homebrew community to add additional information in the header, using unused fields. The goal of this convention is to let homebrew ROMs declare the correct saveype and controllers that are expected to play the game. The format has been introduced by the EverDrive 64 flashcard and has been later enhanced by the homebrew community.
 
Line 225 ⟶ 224:
Instead, by using the Advanced Hombrew ROM Header, emulators can automatically configure the required emulated hardware as expected without having to keep any additional database, by simply decoding specific fields of the ROM header. In addition to emulators, also development flashcarts and loaders can use this format to automatically configure the correct savetype when the ROM is loaded.
 
=== Homebrew ROM Header special flags ===
{| class="wikitable"
!Offset
Line 235 ⟶ 234:
|1
|Controller 1
| This byte contains the suggested / expected controller hardware that should be attached to port 1.
Values 0x01-0x7F indicate a standard N64 controller, possibly with some installed pak.
 
Line 255 ⟶ 254:
|N64 controller with Controller Pak
!0x82
|Gamecube controller
|-
!0x03
Line 263 ⟶ 262:
|-
!0xFF
|Nothing attached to this port
!0x84
|Gamecube keyboard
Line 273 ⟶ 272:
|1
|Controller 2
| This byte contains the suggested / expected controller hardware that should be attached to port 2. See byte 0x34 for more information.
|-
|0x36
|1
|Controller 3
| This byte contains the suggested / expected controller hardware that should be attached to port 3. See byte 0x34 for more information.
|-
|0x37
|1
|Controller 4
| This byte contains the suggested / expected controller hardware that should be attached to port 4. See byte 0x34 for more information.
|-
|0x3C
|2
|Game ID
|This must contain the ASCII characters "ED". It is used as an ID to identify that the Advanced Homebrew ROM header format Is being used by this ROM.
|-
|0x3F
Line 332 ⟶ 331:
|}
 
=== Support by emulators ===
Emulators not listed here do not support the advanced homebrew ROM header format.
{| class="wikitable"
|+
!Emulator
!Current support
|-
|Ares
|Supports Savetype only
|-
|cen64
|Supports Savetype only
|}
 
=== Support by flashcarts ===
Support by flashcarts can vary depending on the USB loader being used and/or the flashcart operating system. Notice that flashcarts can emulate a specific savetype but have nothing to do with controllers, so the maximum expected support is related to savetype.
{| class="wikitable"
Line 355 ⟶ 354:
|-
| rowspan="4" |64drive
|64drive official C tool
|None
|-
|64drive menu
|None
|-
3

edits