From: leslie <unknown> Date: Sun, 8 Jun 2008 04:16:48 +0000 (+0800) Subject: update testing X-Git-Tag: 0.9.1~90 X-Git-Url: http://www.vanbest.org/gitweb/?a=commitdiff_plain;h=365c2e9bf201c243b970b3649d41416128d9f285;p=sasc-ng.git update testing --- 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<n ; l++) printf("%02x ",buffer[l]); diff --git a/testing/compat.h b/testing/compat.h index f5b2b3f..c02ddbd 100644 --- a/testing/compat.h +++ b/testing/compat.h @@ -2,5 +2,6 @@ bool DllsLoad(const char *libdir); void InitAll(const char *cfgdir); void LogAll(void); +void LogNone(void); void SDump(const unsigned char *buffer, int n); int ReadRaw(const char *name, unsigned char *buff, int maxlen); diff --git a/testing/testN2RunEmu.c b/testing/testN2RunEmu.c index b77c232..a6c697d 100644 --- a/testing/testN2RunEmu.c +++ b/testing/testN2RunEmu.c @@ -9,6 +9,17 @@ #include "compat.h" +void printreg(const char *name, unsigned char * ptr, int maxlen) +{ + int i; + while(maxlen > 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); + } }