mirror of https://github.com/mgba-emu/mgba.git
GB: CPU can still decode instructions during DMAs
This commit is contained in:
parent
0e4f64088c
commit
81f8ad27d5
|
@ -37,6 +37,7 @@ static void _GBMemoryDMAService(struct GB* gb);
|
|||
|
||||
void GBMemoryInit(struct GB* gb) {
|
||||
struct LR35902Core* cpu = gb->cpu;
|
||||
cpu->memory.cpuLoad8 = GBLoad8;
|
||||
cpu->memory.load8 = GBLoad8;
|
||||
cpu->memory.store8 = GBStore8;
|
||||
cpu->memory.setActiveRegion = GBSetActiveRegion;
|
||||
|
|
|
@ -106,7 +106,7 @@ void LR35902Tick(struct LR35902Core* cpu) {
|
|||
cpu->instruction = _LR35902InstructionIRQ;
|
||||
break;
|
||||
}
|
||||
cpu->bus = cpu->memory.load8(cpu, cpu->pc);
|
||||
cpu->bus = cpu->memory.cpuLoad8(cpu, cpu->pc);
|
||||
cpu->instruction = _lr35902InstructionTable[cpu->bus];
|
||||
++cpu->pc;
|
||||
break;
|
||||
|
|
|
@ -48,6 +48,7 @@ enum LR35902ExecutionState {
|
|||
};
|
||||
|
||||
struct LR35902Memory {
|
||||
uint8_t (*cpuLoad8)(struct LR35902Core*, uint16_t address);
|
||||
uint8_t (*load8)(struct LR35902Core*, uint16_t address);
|
||||
void (*store8)(struct LR35902Core*, uint16_t address, int8_t value);
|
||||
|
||||
|
|
Loading…
Reference in New Issue