mirror of https://github.com/bsnes-emu/bsnes.git
Correctly emulating the unused OAM memory in DMG mode
This commit is contained in:
parent
cc8664b0a8
commit
bebb5c7a41
|
@ -114,12 +114,16 @@ static uint8_t read_high_memory(GB_gameboy_t *gb, uint16_t addr)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (addr < 0xFF00) {
|
if (addr < 0xFF00) {
|
||||||
/* Unusable, simulate Gameboy Color */
|
/* Unusable. CGB results are verified, but DMG results were tested on a SGB2 */
|
||||||
if ((gb->io_registers[GB_IO_STAT] & 0x3) >= 2) { /* Seems to be disabled in Modes 2 and 3 */
|
if ((gb->io_registers[GB_IO_STAT] & 0x3) >= 2) { /* Seems to be disabled in Modes 2 and 3 */
|
||||||
return 0xFF;
|
return 0xFF;
|
||||||
}
|
}
|
||||||
|
if (gb->is_cgb) {
|
||||||
return (addr & 0xF0) | ((addr >> 4) & 0xF);
|
return (addr & 0xF0) | ((addr >> 4) & 0xF);
|
||||||
}
|
}
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if (addr < 0xFF80) {
|
if (addr < 0xFF80) {
|
||||||
switch (addr & 0xFF) {
|
switch (addr & 0xFF) {
|
||||||
|
|
Loading…
Reference in New Issue