Merge pull request #695 from nik012003/master

Add missing break statements in mbc7 writes
This commit is contained in:
Lior Halphon 2025-04-04 13:03:35 +03:00 committed by GitHub
commit dfd3b42929
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -1109,6 +1109,7 @@ static void write_mbc7_ram(GB_gameboy_t *gb, uint16_t addr, uint8_t value)
gb->mbc7.latch_ready = true;
gb->mbc7.x_latch = gb->mbc7.y_latch = 0x8000;
}
break;
}
case 1: {
if (value == 0xAA) {
@ -1116,6 +1117,7 @@ static void write_mbc7_ram(GB_gameboy_t *gb, uint16_t addr, uint8_t value)
gb->mbc7.x_latch = 0x81D0 + 0x70 * gb->accelerometer_x;
gb->mbc7.y_latch = 0x81D0 + 0x70 * gb->accelerometer_y;
}
break;
}
case 8: {
gb->mbc7.eeprom_cs = value & 0x80;
@ -1215,6 +1217,7 @@ static void write_mbc7_ram(GB_gameboy_t *gb, uint16_t addr, uint8_t value)
}
}
gb->mbc7.eeprom_clk = value & 0x40;
break;
}
}
}