DS: Unstub TestIRQ

This commit is contained in:
Vicki Pfau 2017-02-20 16:55:14 -08:00
parent dfdc2b3edd
commit 7b13335caf
1 changed files with 14 additions and 4 deletions

View File

@ -577,16 +577,26 @@ void DSBreakpoint(struct ARMCore* cpu, int immediate) {
void DS7TestIRQ(struct ARMCore* cpu) { void DS7TestIRQ(struct ARMCore* cpu) {
struct DS* ds = (struct DS*) cpu->master; struct DS* ds = (struct DS*) cpu->master;
if (0) { if (!ds->memory.io7[DS_REG_IME >> 1]) {
ds->ds7.springIRQ = 1; return;
}
uint32_t test = (ds->memory.io7[DS_REG_IE_LO >> 1] & ds->memory.io7[DS_REG_IF_LO >> 1]);
test |= (ds->memory.io7[DS_REG_IE_HI >> 1] & ds->memory.io7[DS_REG_IF_HI >> 1]) << 16;
if (test) {
ds->ds7.springIRQ = test;
cpu->nextEvent = cpu->cycles; cpu->nextEvent = cpu->cycles;
} }
} }
void DS9TestIRQ(struct ARMCore* cpu) { void DS9TestIRQ(struct ARMCore* cpu) {
struct DS* ds = (struct DS*) cpu->master; struct DS* ds = (struct DS*) cpu->master;
if (0) { if (!ds->memory.io9[DS_REG_IME >> 1]) {
ds->ds9.springIRQ = 1; return;
}
uint32_t test = (ds->memory.io9[DS_REG_IE_LO >> 1] & ds->memory.io9[DS_REG_IF_LO >> 1]);
test |= (ds->memory.io9[DS_REG_IE_HI >> 1] & ds->memory.io9[DS_REG_IF_HI >> 1]) << 16;
if (test) {
ds->ds9.springIRQ = test;
cpu->nextEvent = cpu->cycles; cpu->nextEvent = cpu->cycles;
} }
} }