From 365c2e9bf201c243b970b3649d41416128d9f285 Mon Sep 17 00:00:00 2001 From: leslie Date: Sun, 8 Jun 2008 12:16:48 +0800 Subject: [PATCH] update testing --- testing/compat.c | 6 ++++++ testing/compat.h | 1 + testing/testN2RunEmu.c | 25 +++++++++++++++++++++++++ 3 files changed, 32 insertions(+) diff --git a/testing/compat.c b/testing/compat.c index 8a0ec39..f6074bc 100644 --- a/testing/compat.c +++ b/testing/compat.c @@ -73,6 +73,12 @@ void LogAll(void) cLogging::SetModuleOptions(LCLASS(i,0xFFFFFFFF)); } +void LogNone(void) +{ + for(int i=0; i<32; i++) + cLogging::SetModuleOptions(LCLASS(i,0)); +} + void SDump(const unsigned char *buffer, int n) { for(int l=0 ; l 1 && ptr[maxlen-1]==0) + maxlen--; + printf("%s(LE): ", name); + for(i = 0; i < maxlen; i++) + printf("%02x", ptr[i]); + printf("\n"); +} + int main(int argc, char *argv[]) { if(argc<4) { @@ -27,4 +38,18 @@ int main(int argc, char *argv[]) HEXDUMP(L_SYS_EMU,data,len,"Input"); if(emmP->RunEmu(data,len,0x90,0x90,0x00,0x00,0x460)>=0) HEXDUMP(L_SYS_EMU,data,0x460,"Output"); + + LogNone(); + static unsigned char dumpreg[4096] = { + 0x8A,0x9B,0xB6,0x0D,0x88,0x17,0x0D,0xA6, 0x11,0xB7,0x48,0x5F,0xD6,0x00,0xBA,0xB7, + 0x44,0x5C,0xD6,0x00,0xBA,0xB7,0x45,0x5C, 0xD6,0x00,0xBA,0x5C,0x89,0xCD,0x38,0x40, + 0x85,0xA3,0x0F,0x26,0xE7,0x84,0xB7,0x0D, 0x86,0x81,0x00,0xF0,0x09,0x01,0x00,0x0A, + 0x01,0x88,0x0B,0x02,0x10,0x0C,0x02,0x98, 0x0D}; + if(emmP->RunEmu(dumpreg,0x100,0x90,0x90,0x00,0x00,0x460)>=0) { + printreg("J",dumpreg+0xf0, 0x08); + printreg("A",dumpreg+0x100,0x88); + printreg("B",dumpreg+0x188,0x88); + printreg("C",dumpreg+0x210,0x88); + printreg("D",dumpreg+0x298,0x88); + } } -- 2.39.5