2011-01-02 04:46:54 +00:00
|
|
|
#ifdef CARTRIDGE_CPP
|
|
|
|
|
|
|
|
uint8 Cartridge::MBC0::mmio_read(uint16 addr) {
|
2011-12-26 10:49:48 +00:00
|
|
|
if((addr & 0x8000) == 0x0000) { //$0000-7fff
|
2011-01-04 10:42:27 +00:00
|
|
|
return cartridge.rom_read(addr);
|
|
|
|
}
|
|
|
|
|
2011-12-26 10:49:48 +00:00
|
|
|
if((addr & 0xe000) == 0xa000) { //$a000-bfff
|
2011-01-04 10:42:27 +00:00
|
|
|
return cartridge.ram_read(addr & 0x1fff);
|
|
|
|
}
|
|
|
|
|
2011-01-02 04:46:54 +00:00
|
|
|
return 0x00;
|
|
|
|
}
|
|
|
|
|
|
|
|
void Cartridge::MBC0::mmio_write(uint16 addr, uint8 data) {
|
2011-12-26 10:49:48 +00:00
|
|
|
if((addr & 0xe000) == 0xa000) { //$a000-bfff
|
2011-01-04 10:42:27 +00:00
|
|
|
cartridge.ram_write(addr & 0x1fff, data);
|
|
|
|
return;
|
|
|
|
}
|
2011-01-02 04:46:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void Cartridge::MBC0::power() {
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|