start refactoring shit: more accurate timing and way of counting cycles.

This commit is contained in:
StapleButter
2017-01-30 18:36:11 +01:00
parent 296212ac49
commit 6f3b0498db
17 changed files with 636 additions and 595 deletions

18
NDS.h
View File

@ -36,6 +36,22 @@ typedef struct _SchedEvent
} SchedEvent;
enum
{
Event_ScanlineStart = 0,
Event_Timer9_0,
Event_Timer9_1,
Event_Timer9_2,
Event_Timer9_3,
Event_Timer7_0,
Event_Timer7_1,
Event_Timer7_2,
Event_Timer7_3,
Event_MAX
};
enum
{
IRQ_VBlank = 0,
@ -105,6 +121,8 @@ void RunEvents(s32 cycles);
// DO NOT CALL FROM ARM7!!
void CompensateARM7();
void debug(u32 p);
void Halt();
void MapSharedWRAM(u8 val);