mirror of https://github.com/mgba-emu/mgba.git
GBA: Add baseline CP0 (Wii U VC) and CP1 (DCC) implementations
This commit is contained in:
parent
e4e455dd5e
commit
455060ec08
1
CHANGES
1
CHANGES
|
@ -13,6 +13,7 @@ Emulation fixes:
|
||||||
- GB Serialize: Add missing Pocket Cam state to savestates
|
- GB Serialize: Add missing Pocket Cam state to savestates
|
||||||
- GB Video: Implement DMG-style sprite ordering
|
- GB Video: Implement DMG-style sprite ordering
|
||||||
- GBA: Unhandled bkpt should be treated as an undefined exception
|
- GBA: Unhandled bkpt should be treated as an undefined exception
|
||||||
|
- GBA: Add baseline CP0 (Wii U VC) and CP1 (DCC) implementations
|
||||||
- GBA GPIO: Fix gyro read-out start (fixes mgba.io/i/3141)
|
- GBA GPIO: Fix gyro read-out start (fixes mgba.io/i/3141)
|
||||||
- GBA I/O: Fix HALTCNT access behavior (fixes mgba.io/i/2309)
|
- GBA I/O: Fix HALTCNT access behavior (fixes mgba.io/i/2309)
|
||||||
- GBA SIO: Fix MULTI mode SIOCNT bit 7 writes on secondary GBAs (fixes mgba.io/i/3110)
|
- GBA SIO: Fix MULTI mode SIOCNT bit 7 writes on secondary GBAs (fixes mgba.io/i/3110)
|
||||||
|
|
|
@ -40,6 +40,8 @@ static const uint8_t GBA_ROM_MAGIC2[] = { 0x96 };
|
||||||
static const size_t GBA_MB_MAGIC_OFFSET = 0xC0;
|
static const size_t GBA_MB_MAGIC_OFFSET = 0xC0;
|
||||||
|
|
||||||
static void GBAInit(void* cpu, struct mCPUComponent* component);
|
static void GBAInit(void* cpu, struct mCPUComponent* component);
|
||||||
|
static void GBACP0Process(struct ARMCore* cpu, int crn, int crm, int crd, int opcode1, int opcode2);
|
||||||
|
static int32_t GBACP14Read(struct ARMCore* cpu, int crn, int crm, int opcode1, int opcode2);
|
||||||
static void GBAInterruptHandlerInit(struct ARMInterruptHandler* irqh);
|
static void GBAInterruptHandlerInit(struct ARMInterruptHandler* irqh);
|
||||||
static void GBAProcessEvents(struct ARMCore* cpu);
|
static void GBAProcessEvents(struct ARMCore* cpu);
|
||||||
static void GBAHitStub(struct ARMCore* cpu, uint32_t opcode);
|
static void GBAHitStub(struct ARMCore* cpu, uint32_t opcode);
|
||||||
|
@ -72,6 +74,8 @@ static void GBAInit(void* cpu, struct mCPUComponent* component) {
|
||||||
gba->sync = 0;
|
gba->sync = 0;
|
||||||
|
|
||||||
GBAInterruptHandlerInit(&gba->cpu->irqh);
|
GBAInterruptHandlerInit(&gba->cpu->irqh);
|
||||||
|
gba->cpu->cp[0].cdp = GBACP0Process;
|
||||||
|
gba->cpu->cp[14].mrc = GBACP14Read;
|
||||||
GBAMemoryInit(gba);
|
GBAMemoryInit(gba);
|
||||||
|
|
||||||
gba->memory.savedata.timing = &gba->timing;
|
gba->memory.savedata.timing = &gba->timing;
|
||||||
|
@ -186,6 +190,20 @@ void GBADestroy(struct GBA* gba) {
|
||||||
mCoreCallbacksListDeinit(&gba->coreCallbacks);
|
mCoreCallbacksListDeinit(&gba->coreCallbacks);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void GBACP0Process(struct ARMCore* cpu, int crn, int crm, int crd, int opcode1, int opcode2) {
|
||||||
|
UNUSED(cpu);
|
||||||
|
mLOG(GBA, INFO, "Hit Wii U VC opcode: cdp p0, %i, c%i, c%i, c%i, %i", opcode1, crd, crn, crm, opcode2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t GBACP14Read(struct ARMCore* cpu, int crn, int crm, int opcode1, int opcode2) {
|
||||||
|
UNUSED(cpu);
|
||||||
|
UNUSED(crn);
|
||||||
|
UNUSED(crm);
|
||||||
|
UNUSED(opcode1);
|
||||||
|
UNUSED(opcode2);
|
||||||
|
return 0xF000B570;
|
||||||
|
}
|
||||||
|
|
||||||
void GBAInterruptHandlerInit(struct ARMInterruptHandler* irqh) {
|
void GBAInterruptHandlerInit(struct ARMInterruptHandler* irqh) {
|
||||||
irqh->reset = GBAReset;
|
irqh->reset = GBAReset;
|
||||||
irqh->processEvents = GBAProcessEvents;
|
irqh->processEvents = GBAProcessEvents;
|
||||||
|
|
Loading…
Reference in New Issue