mirror of
https://github.com/FranLMSP/rmg-001.git
synced 2024-11-23 10:12:11 +00:00
mbc5 bitmask
This commit is contained in:
parent
c0fde459e0
commit
c009c65c45
@ -704,7 +704,7 @@ impl ROM for MBC5 {
|
|||||||
if address <= 0x1FFF {
|
if address <= 0x1FFF {
|
||||||
self.ram_enable = data == 0b00001010;
|
self.ram_enable = data == 0b00001010;
|
||||||
} else if address >= 0x2000 && address <= 0x2FFF {
|
} else if address >= 0x2000 && address <= 0x2FFF {
|
||||||
self.rom_bank = (self.rom_bank & 0x000) | data as u16;
|
self.rom_bank = (self.rom_bank & 0x100) | data as u16;
|
||||||
} else if address >= 0x3000 && address <= 0x3FFF {
|
} else if address >= 0x3000 && address <= 0x3FFF {
|
||||||
self.rom_bank = (((data & 1) as u16) << 8) | (self.rom_bank & 0xFF);
|
self.rom_bank = (((data & 1) as u16) << 8) | (self.rom_bank & 0xFF);
|
||||||
} else if address >= 0x4000 && address <= 0x5FFF {
|
} else if address >= 0x4000 && address <= 0x5FFF {
|
||||||
|
Loading…
Reference in New Issue
Block a user