2016-06-28 10:43:47 +00:00
|
|
|
auto Cartridge::MBC0::readIO(uint16 addr) -> uint8 {
|
2011-12-26 10:49:48 +00:00
|
|
|
if((addr & 0x8000) == 0x0000) { //$0000-7fff
|
2016-06-28 10:43:47 +00:00
|
|
|
return cartridge.readROM(addr);
|
2011-01-04 10:42:27 +00:00
|
|
|
}
|
|
|
|
|
2011-12-26 10:49:48 +00:00
|
|
|
if((addr & 0xe000) == 0xa000) { //$a000-bfff
|
2016-06-28 10:43:47 +00:00
|
|
|
return cartridge.readRAM((uint13)addr);
|
2011-01-04 10:42:27 +00:00
|
|
|
}
|
|
|
|
|
2016-01-08 09:23:46 +00:00
|
|
|
return 0xff;
|
2011-01-02 04:46:54 +00:00
|
|
|
}
|
|
|
|
|
2016-06-28 10:43:47 +00:00
|
|
|
auto Cartridge::MBC0::writeIO(uint16 addr, uint8 data) -> void {
|
2011-12-26 10:49:48 +00:00
|
|
|
if((addr & 0xe000) == 0xa000) { //$a000-bfff
|
2016-06-28 10:43:47 +00:00
|
|
|
cartridge.writeRAM((uint13)addr, data);
|
2011-01-04 10:42:27 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-01-02 04:46:54 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 07:36:48 +00:00
|
|
|
auto Cartridge::MBC0::power() -> void {
|
2011-01-02 04:46:54 +00:00
|
|
|
}
|