DS BIOS: Add DS9 BIOS
Vicki Pfau vi@endrift.com
Mon, 30 Jan 2017 16:41:05 -0800
2 files changed,
13 insertions(+),
2 deletions(-)
M
src/ds/bios.c
→
src/ds/bios.c
@@ -22,3 +22,14 @@
void DS7Swi32(struct ARMCore* cpu, int immediate) { DS7Swi16(cpu, immediate >> 16); } + +void DS9Swi16(struct ARMCore* cpu, int immediate) { + mLOG(DS_BIOS, DEBUG, "SWI9: %02X r0: %08X r1: %08X r2: %08X r3: %08X", + immediate, cpu->gprs[0], cpu->gprs[1], cpu->gprs[2], cpu->gprs[3]); + + ARMRaiseSWI(cpu); +} + +void DS9Swi32(struct ARMCore* cpu, int immediate) { + DS9Swi16(cpu, immediate >> 16); +}
M
src/ds/ds.c
→
src/ds/ds.c
@@ -165,8 +165,8 @@
void DS9InterruptHandlerInit(struct ARMInterruptHandler* irqh) { irqh->reset = DS9Reset; irqh->processEvents = DS9ProcessEvents; - irqh->swi16 = NULL; - irqh->swi32 = NULL; + irqh->swi16 = DS9Swi16; + irqh->swi32 = DS9Swi32; irqh->hitIllegal = DSIllegal; irqh->readCPSR = DS9TestIRQ; irqh->writeCP15 = DS9WriteCP15;