pub enum Region {
Ntsc,
Pal,
}Expand description
The emulated console region, selecting the AI video clock.
Variants§
Implementations§
Source§impl Region
impl Region
Sourcepub const fn video_clock(self) -> u32
pub const fn video_clock(self) -> u32
The video clock (Hz) this region feeds into the AI DAC divider.
Sourcepub const fn from_destination_code(code: u8) -> Self
pub const fn from_destination_code(code: u8) -> Self
The region a cartridge’s destination code (ROM header byte 0x3E, the
last character of the 4-byte game code) implies.
The destination characters are the N64brew Wiki ROM Header §Standard
header table (read from n64brew_wiki/html/ROM Header.xhtml — the markdown
mirror renders that table as a bare [TABLE] placeholder):
A All · B Brazil · C China · D Germany · E North America ·
F France · G Gateway 64 (NTSC) · H Netherlands · I Italy ·
J Japan · K Korea · L Gateway 64 (PAL) · N Canada · P Europe ·
S Spain · U Australia · W Scandinavia · X/Y/Z Europe
Provenance, and its limit. That table gives destinations, not TV
standards — only G/L are labeled NTSC/PAL by the wiki itself. The
50/60 Hz classification of the remaining countries is the broadcast
standard for each territory, not a hardware-documented N64 fact, and
there is no oracle for it (no test ROM checks region detection). It is
therefore modeled and ledgered as documented-but-ungated rather than
presented as measured — see docs/accuracy-ledger.md (T-71-005).
Three cases are decided explicitly rather than guessed:
BBrazil → NTSC. Brazil broadcast PAL-M, which is a 60 Hz standard; for the AI divisor it behaves as NTSC, not as 50 Hz PAL.CChina → NTSC. A PAL territory, but with no known retail N64; the default is kept rather than inventing a 50 Hz cartridge that never shipped.A“All” → NTSC. Names no single region, so it takes the default.
Any unrecognized byte also returns Region::Ntsc, so an unknown or
homebrew code is behavior-preserving rather than silently retuning audio.