diff options
Diffstat (limited to 'src/NDS.h')
-rw-r--r-- | src/NDS.h | 41 |
1 files changed, 38 insertions, 3 deletions
@@ -74,12 +74,42 @@ enum IRQ_IPCSync, IRQ_IPCSendDone, IRQ_IPCRecv, - IRQ_CartSendDone, - IRQ_CartIREQMC, + IRQ_CartSendDone, // TODO: less misleading name + IRQ_CartIREQMC, // IRQ triggered by game cart (example: Pokémon Typing Adventure, BT controller) IRQ_GXFIFO, IRQ_LidOpen, IRQ_SPI, - IRQ_Wifi + IRQ_Wifi, + + // DSi IRQs + IRQ_DSi_DSP = 24, + IRQ_DSi_Camera, + IRQ_DSi_Unk26, + IRQ_DSi_Unk27, + IRQ_DSi_NDMA0, + IRQ_DSi_NDMA1, + IRQ_DSi_NDMA2, + IRQ_DSi_NDMA3, +}; + +enum +{ + // DSi ARM7-side IE2/IF2 + IRQ2_DSi_GPIO18_0 = 0, + IRQ2_DSi_GPIO18_1, + IRQ2_DSi_GPIO18_2, + IRQ2_DSi_Unused35, + IRQ2_DSi_GPIO33_0, + IRQ2_DSi_Headphone, + IRQ2_DSi_PowerButton, + IRQ2_DSi_GPIO33_3, // "sound enable input" + IRQ2_DSi_SDMMC, + IRQ2_DSi_SD_Data1, + IRQ2_DSi_SDIO, + IRQ2_DSi_SDIO_Data1, + IRQ2_DSi_AES, + IRQ2_DSi_I2C, + IRQ2_DSi_MicExt }; typedef struct @@ -109,6 +139,8 @@ extern u32 ARM9ClockShift; extern u32 IME[2]; extern u32 IE[2]; extern u32 IF[2]; +extern u32 IE2; +extern u32 IF2; extern Timer Timers[8]; extern u16 PowerControl9; @@ -162,8 +194,11 @@ void Halt(); void MapSharedWRAM(u8 val); +void UpdateIRQ(u32 cpu); void SetIRQ(u32 cpu, u32 irq); void ClearIRQ(u32 cpu, u32 irq); +void SetIRQ2(u32 irq); +void ClearIRQ2(u32 irq); bool HaltInterrupted(u32 cpu); void StopCPU(u32 cpu, u32 mask); void ResumeCPU(u32 cpu, u32 mask); |