diff options
author | StapleButter <thetotalworm@gmail.com> | 2016-11-03 01:38:58 +0100 |
---|---|---|
committer | StapleButter <thetotalworm@gmail.com> | 2016-11-03 01:38:58 +0100 |
commit | 3505ec993b0d700800f77c667078e2c552a38b34 (patch) | |
tree | 35ffbbe7657e6c1b70197d4450e57f1cafa8ba4e /ARM.cpp | |
parent | 5b7ae6dab3fa260903d9348bdac7add6a81b7336 (diff) |
hey look, more crap
no MrRean this doesn't run NSMB yet
Diffstat (limited to 'ARM.cpp')
-rw-r--r-- | ARM.cpp | 50 |
1 files changed, 50 insertions, 0 deletions
@@ -0,0 +1,50 @@ +#include "ARM.h" +#include "NDS.h" + + +ARM::ARM(u32 num) +{ + // well uh + Num = num; + + for (int i = 0; i < 16; i++) + R[i] = 0; + + ExceptionBase = num ? 0x00000000 : 0xFFFF0000; + + // zorp + JumpTo(ExceptionBase); +} + +ARM::~ARM() +{ + // dorp +} + +void ARM::JumpTo(u32 addr) +{ + // pipeline shit + + // TODO: THUMB!! + + NextInstr = Read32(addr); + R[15] = addr+4; +} + +s32 ARM::Execute(s32 cycles) +{ + while (cycles > 0) + { + // TODO THUM SHIT ASGAFDGSUHAJISGFYAUISAGY + + // prefetch + CurInstr = NextInstr; + NextInstr = Read32(R[15]); + R[15] += 4; + + // actually execute + // er... + } + + return cycles; +} |