From fd1e5d890a0bd8cba0a420acac8f2764a703d105 Mon Sep 17 00:00:00 2001 From: David Voswinkel Date: Mon, 6 Jul 2009 20:06:05 +0200 Subject: [PATCH] tweak regdump stuff --- scripts/query_romsize.py | 2 +- snes/regdump/debug.c | 2 +- snes/regdump/main.c | 31 ++++++++++++++++++++++++++++++- snesram.tmproj | 6 +++--- 4 files changed, 35 insertions(+), 6 deletions(-) diff --git a/scripts/query_romsize.py b/scripts/query_romsize.py index a49fc46..089d426 100644 --- a/scripts/query_romsize.py +++ b/scripts/query_romsize.py @@ -21,7 +21,7 @@ import paramiko from subprocess import Popen -paramiko.util.log_to_file('demo_sftp.log') +paramiko.util.log_to_file('rom_sftp.log') if os.name == 'posix': path = "/home/david/Devel/arch/avr/code/snesram/roms/" diff --git a/snes/regdump/debug.c b/snes/regdump/debug.c index 5674a6b..3649ef4 100644 --- a/snes/regdump/debug.c +++ b/snes/regdump/debug.c @@ -66,7 +66,7 @@ void debug_enable(void) void clears(void) { word i, y; - for (y = 0; y < 20; y++) { + for (y = 0; y < 28; y++) { waitForVBlank(); for (i = 0; i < 32; i++) { *(byte *) 0x2115 = 0x80; diff --git a/snes/regdump/main.c b/snes/regdump/main.c index 5521ec9..28fdc6e 100644 --- a/snes/regdump/main.c +++ b/snes/regdump/main.c @@ -24,9 +24,20 @@ void preInit(void) { // Insert code here to be executed before register init } + +void wait(void) +{ + enablePad(); + pad1 = readPad((byte) 0); + while (!pad1.A) { + waitForVBlank(); + pad1 = readPad((byte) 0); + } +} + + void main(void) { word x,y; - padStatus pad1; unsigned long addr; initInternalRegisters(); @@ -41,6 +52,9 @@ void main(void) { addr = 0x21400; x = 0; y = 0; + //printfs(26,"PRESS A"); + //wait(); + //clears(); for (addr = 0x2100 ; addr < 0x21C0; addr+=8){ waitForVBlank(); printfs(y,"%lX: %02X %02X %02X %02X %02X %02X %02X %02X",addr, @@ -48,6 +62,21 @@ void main(void) { *(byte *) (addr+4),*(byte *) (addr +5),*(byte *) (addr+6),*(byte *) (addr+7)); y++; } + while(1); + printfs(26,"PRESS A"); + //wait(); + clears(); + y = 0; + for (addr = 0x4100 ; addr < 0x41C0; addr+=8){ + waitForVBlank(); + printfs(y,"%lX: %02X %02X %02X %02X %02X %02X %02X %02X",addr, + *(byte *) addr,*(byte *) (addr +1),*(byte *) (addr+2),*(byte *) (addr+3), + *(byte *) (addr+4),*(byte *) (addr +5),*(byte *) (addr+6),*(byte *) (addr+7)); + y++; + } + printfs(26,"PRESS A"); + wait(); + clears(); diff --git a/snesram.tmproj b/snesram.tmproj index e24e15a..47beb1f 100644 --- a/snesram.tmproj +++ b/snesram.tmproj @@ -182,14 +182,14 @@ caret column - 23 + 4 line - 195 + 314 firstVisibleColumn 0 firstVisibleLine - 176 + 298 avr/usbload/sram.c