aboutsummaryrefslogtreecommitdiff
path: root/src/NDS.h
diff options
context:
space:
mode:
authorArisotura <thetotalworm@gmail.com>2023-10-30 18:37:49 +0100
committerGitHub <noreply@github.com>2023-10-30 18:37:49 +0100
commit9a450f5f28969cfa601ceda5f225cc1f03243374 (patch)
tree717c933ce1572f5ecd403a7ea8bb7f4bd2754db0 /src/NDS.h
parent21590b070976f8fe343fdc44d4fee599cbda94f4 (diff)
RTC revamp (#1867)
* get this started * implement DSi RTC commands * set up RTC clock timer. lay down basic idea of a clock. * make the date/time registers writable * move RTC state to its own structure, to make it easier to deal with * more RTC work lay base for date/time dialog * get the bulk of the RTC functionality going * much simpler design for RTC stuff * aha, that is what it is * start working on the RTC IRQ * implement all types of RTC IRQ * start refining sleep mode. code still kinda sucks. * implement keypad IRQ * refine it some more * shut the fuck uuuuuupppppppppppppp
Diffstat (limited to 'src/NDS.h')
-rw-r--r--src/NDS.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/NDS.h b/src/NDS.h
index e81e952..de038b2 100644
--- a/src/NDS.h
+++ b/src/NDS.h
@@ -37,6 +37,7 @@ enum
Event_LCD = 0,
Event_SPU,
Event_Wifi,
+ Event_RTC,
Event_DisplayFIFO,
Event_ROMTransfer,
@@ -122,6 +123,33 @@ enum
IRQ2_DSi_MicExt
};
+enum
+{
+ CPUStop_DMA9_0 = (1<<0),
+ CPUStop_DMA9_1 = (1<<1),
+ CPUStop_DMA9_2 = (1<<2),
+ CPUStop_DMA9_3 = (1<<3),
+ CPUStop_NDMA9_0 = (1<<4),
+ CPUStop_NDMA9_1 = (1<<5),
+ CPUStop_NDMA9_2 = (1<<6),
+ CPUStop_NDMA9_3 = (1<<7),
+ CPUStop_DMA9 = 0xFFF,
+
+ CPUStop_DMA7_0 = (1<<16),
+ CPUStop_DMA7_1 = (1<<17),
+ CPUStop_DMA7_2 = (1<<18),
+ CPUStop_DMA7_3 = (1<<19),
+ CPUStop_NDMA7_0 = (1<<20),
+ CPUStop_NDMA7_1 = (1<<21),
+ CPUStop_NDMA7_2 = (1<<22),
+ CPUStop_NDMA7_3 = (1<<23),
+ CPUStop_DMA7 = (0xFFF<<16),
+
+ CPUStop_Wakeup = (1<<29),
+ CPUStop_Sleep = (1<<30),
+ CPUStop_GXStall = (1<<31),
+};
+
struct Timer
{
u16 Reload;
@@ -219,6 +247,7 @@ extern MemRegion SWRAM_ARM9;
extern MemRegion SWRAM_ARM7;
extern u32 KeyInput;
+extern u16 RCnt;
const u32 ARM7WRAMSize = 0x10000;
extern u8* ARM7WRAM;