mirror of https://github.com/mgba-emu/mgba.git
GBA: Only unhalt CPU if an IRQ actually fires
This commit is contained in:
parent
8aeafeb762
commit
4085b9cdc5
1
CHANGES
1
CHANGES
|
@ -33,6 +33,7 @@ Bugfixes:
|
||||||
- GBA BIOS: Implement BitUnPack
|
- GBA BIOS: Implement BitUnPack
|
||||||
- GBA: Add savegame override for Crash Bandicoot 2
|
- GBA: Add savegame override for Crash Bandicoot 2
|
||||||
- ARM7: PSR mode bits should not get sign extended
|
- ARM7: PSR mode bits should not get sign extended
|
||||||
|
- GBA: Only unhalt CPU if an IRQ actually fires
|
||||||
Misc:
|
Misc:
|
||||||
- SDL: Remove scancode key input
|
- SDL: Remove scancode key input
|
||||||
- GBA Video: Clean up unused timers
|
- GBA Video: Clean up unused timers
|
||||||
|
|
|
@ -147,6 +147,7 @@ void ARMReset(struct ARMCore* cpu) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ARMRaiseIRQ(struct ARMCore* cpu) {
|
void ARMRaiseIRQ(struct ARMCore* cpu) {
|
||||||
|
cpu->halted = 0;
|
||||||
if (cpu->cpsr.i) {
|
if (cpu->cpsr.i) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -664,7 +664,6 @@ void GBAWriteIME(struct GBA* gba, uint16_t value) {
|
||||||
|
|
||||||
void GBARaiseIRQ(struct GBA* gba, enum GBAIRQ irq) {
|
void GBARaiseIRQ(struct GBA* gba, enum GBAIRQ irq) {
|
||||||
gba->memory.io[REG_IF >> 1] |= 1 << irq;
|
gba->memory.io[REG_IF >> 1] |= 1 << irq;
|
||||||
gba->cpu->halted = 0;
|
|
||||||
|
|
||||||
if (gba->memory.io[REG_IME >> 1] && (gba->memory.io[REG_IE >> 1] & 1 << irq)) {
|
if (gba->memory.io[REG_IME >> 1] && (gba->memory.io[REG_IE >> 1] & 1 << irq)) {
|
||||||
ARMRaiseIRQ(gba->cpu);
|
ARMRaiseIRQ(gba->cpu);
|
||||||
|
|
Loading…
Reference in New Issue