working on mooneye test suite

This commit is contained in:
2025-05-30 00:35:44 -06:00
parent 4d6973304d
commit 1f55455a65
7 changed files with 87 additions and 44 deletions

View File

@ -74,7 +74,9 @@ void fetch_data() {
cpu_set_reg(RT_HL, cpu_read_reg(RT_HL)-1);
return;
case AM_R_A8:
ctx.fetched_data = bus_read(ctx.regs.pc);
u16 addr = bus_read(ctx.regs.pc) | 0xFF00;
emu_cycles(1);
ctx.fetched_data = bus_read(addr);
emu_cycles(1);
ctx.regs.pc++;
return;