ROM Header: Difference between revisions

2,778 bytes added ,  1 month ago
 
(7 intermediate revisions by 3 users not shown)
Line 24:
|0x4
|Clock Rate
|Constant value used by libultra versions 2.0I and earlier, to naively calculate how much real-time has passed based on the CPU's Count register.
|This field is masked by 0xFFFFFFF0 to obtain the proper clock rate value.
 
The value is masked by 0xFFFFFFF0, then multiplied by 0.75 to account for the CPU clock's multiplier (1.5x) and that the Count register increments every 2 CPU cycles.
However, if the masked value equals zero, libultra defaults to 0x03B9ACA0 (62,500,000) before multiplying by 0.75.
 
All known ROMs, except those listed below, have this field set to 0x0000000F.
A value of 0 appears to use the default clock rate of 62.5MHz.
{| class="wikitable"
! Clock Rate !! libultra ver. !! Game Code !! Title
|-
| 0x03B9ACAF || 2.0D || NCUP || Cruis'n USA (Europe)
|-
| 0x03B9ACAF || 2.0D || NCUE || Cruis'n USA (USA) (Rev A)
|-
| 0x03B9ACAF || 2.0D || NCUE || Cruis'n USA (USA) (Rev B)
|-
| 0x03B9ACAF || 2.0D || NCUE || Cruis'n USA (USA)
|-
| 0x03A07F5F || 2.0G || NDMP || Doom 64 (Europe)
|-
| 0x03A07F5F || 2.0H || NDMJ || Doom 64 (Japan)
|-
| 0x03A07F5F || 2.0G || NDME || Doom 64 (USA) (Rev A)
|-
| 0x03A07F5F || 2.0G || NDME || Doom 64 (USA)
|-
| 0x03B9ACAF || 2.0G || NXGP || NBA Hangtime (Europe)
|-
| 0x03B9ACAF || 2.0G || NXGE || NBA Hangtime (USA)
|-
| 0x03A07F5F || 2.0I || NRIP || New Tetris, The (Europe)
|-
| 0x03A07F5F || 2.0I || NRIE || New Tetris, The (USA)
|-
| 0x03A07F5F || 2.0H || NQKP || Quake 64 (Europe)
|-
| 0x03A07F5F || 2.0H || NQKE || Quake 64 (USA)
|-
| 0x03A07F5F || 2.0F || NFXJ || Star Fox 64 (Japan)
|-
| 0x03A07F5F || 2.0H || NFXE || Star Fox 64 (USA) (Rev A)
|-
| 0x03A07F5F || 2.0H || NFXE || Star Fox 64 (USA)
|-
| 0x03A07F5F || 2.0D || NSWP || Star Wars - Shadows of the Empire (Europe)
|-
| 0x03A07F5F || 2.0D || NSWE || Star Wars - Shadows of the Empire (USA) (Beta)
|-
| 0x03A07F5F || 2.0D || NSWE || Star Wars - Shadows of the Empire (USA) (Rev A)
|-
| 0x03A07F5F || 2.0D || NSWE || Star Wars - Shadows of the Empire (USA) (Rev B)
|-
| 0x03A07F5F || 2.0D || NSWE || Star Wars - Shadows of the Empire (USA)
|-
| 0x03A07F5F || 2.0D || NSWJ || Star Wars - Teikoku no Kage (Japan)
|-
| 0x03A07F5F || 2.0I || NEPP || Star Wars Episode I - Racer (Europe) (En,Fr,De)
|-
| 0x03A07F5F || 2.0I || NEPJ || Star Wars Episode I - Racer (Japan)
|-
| 0x03A07F5F || 2.0I || NEPE || Star Wars Episode I - Racer (USA)
|}
Using Doom 64 as an example, 0x03A07F5F is masked to 0x03A07F50 (60,850,000), and then multiplied by 0.75 equals 0x02B85F7C (45,637,500).
 
Keep in mind that there is no known way for software to change the clock frequency used by either the RCP or CPU. So if/when games use the Count register divided by 46,875,000 to measure a real-time second, the calculated result will be inaccurate.
 
[[User:Polprzewodnikowy|Polprzewodnikowy]] from the N64brew Discord, experimented with Doom 64 and Star Fox 64 on real hardware. They found that increasing this value increases the delay before the copyright screen or Nintendo logo (respectively) shows up on screen.
Cruis'n USA sets this field to 0x3A07F50, which results in a value of 60850000 (60.85MHz). Other titles, such as Star Fox 64, set this field to 0x3B9ACA0, which results in a value of 62500000 (62.5MHz).
|-
|0x08
|0x4
|Boot Address
|Initial PC in RDRAM. IPL3 will jumpDMA 1 MiB of ROM code from offset 0x1000 to this address when it has finished initializing the hardware, and then jump here to boot the ROM. The most common value for this field is 0x80000400.
 
 
Line 343 ⟶ 402:
|Ares
|Yes
|NoYes
|-
|cen64
Line 389 ⟶ 448:
|ed64
|None
|-
|UNFLoader
|Savetype supported
|-
| rowspan="3" |SummerCart64
|N64FlashcartMenu
|Savetype supported
|-
|sc64deployer
|Savetype supported
|-
|UNFLoader