sameboi: fix lag flag and input callback on non-sgb mode
This commit is contained in:
parent
fd63acd644
commit
d640c16cff
Binary file not shown.
|
@ -135,13 +135,15 @@ static uint8_t read_high_memory(GB_gameboy_t *gb, uint16_t addr)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (addr < 0xFF80) {
|
if (addr < 0xFF80) {
|
||||||
if (addr == 0xff00 && gb->is_sgb)
|
if (addr == 0xff00)
|
||||||
{
|
{
|
||||||
if (gb->input_callback)
|
if (gb->input_callback)
|
||||||
gb->input_callback(gb);
|
gb->input_callback(gb);
|
||||||
gb->lagged = false;
|
gb->lagged = false;
|
||||||
|
if (gb->is_sgb) {
|
||||||
return sgb_read_ff00(gb->cycles_since_epoch);
|
return sgb_read_ff00(gb->cycles_since_epoch);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
switch (addr & 0xFF) {
|
switch (addr & 0xFF) {
|
||||||
case GB_IO_IF:
|
case GB_IO_IF:
|
||||||
|
|
Loading…
Reference in New Issue