diff --git a/src/memory/io.rs b/src/memory/io.rs index 4acf357..8b5afca 100644 --- a/src/memory/io.rs +++ b/src/memory/io.rs @@ -156,10 +156,12 @@ pub trait BusAux: BusIO { self.read(0x147) } + /// Gets the size of the cartridge ROM (in 0x4000 byte banks) fn romsize(&self) -> Option { self.read(0x148).map(|s| 1usize.wrapping_shl(s as u32 + 1)) } + /// Gets the size of the cartridge RAM (in 0x2000 byte banks) fn ramsize(&self) -> Option { self.read(0x149).map(|s| match s { 0x02 => 1,