diff --git a/snes/fatfstest/dump_mrdo.txt b/snes/fatfstest/dump_mrdo.txt new file mode 100644 index 0000000..83433c5 --- /dev/null +++ b/snes/fatfstest/dump_mrdo.txt @@ -0,0 +1,20 @@ +00000000 18 fb 78 c2 10 e2 20 a2 ff 01 9a a9 00 48 ab a9 |..x... ......H..| +00000010 8f 8d 00 21 a9 03 9c 00 42 8d 01 21 9c 02 21 9c |...!....B..!..!.| +00000020 03 21 a9 09 8d 05 21 9c 06 21 9c 07 21 9c 08 21 |.!....!..!..!..!| +00000030 9c 09 21 9c 0a 21 9c 0b 21 9c 0c 21 9c 0d 21 9c |..!..!..!..!..!.| +00000040 0d 21 9c 0e 21 9c 0e 21 9c 0f 21 9c 0f 21 9c 10 |.!..!..!..!..!..| +00000050 21 9c 10 21 9c 11 21 9c 11 21 9c 12 21 9c 12 21 |!..!..!..!..!..!| +00000060 9c 13 21 9c 13 21 9c 14 21 9c 14 21 a9 80 8d 15 |..!..!..!..!....| +00000070 21 9c 16 21 9c 17 21 9c 1a 21 9c 1b 21 a9 01 8d |!..!..!..!..!...| +00000080 1b 21 9c 1c 21 9c 1c 21 9c 1d 21 9c 1d 21 9c 1e |.!..!..!..!..!..| +00000090 21 8d 1e 21 9c 1f 21 9c 1f 21 9c 20 21 9c 20 21 |!..!..!..!. !. !| + + +Bank: 0x01 Addr: 0x008000 Block: 0x0040 CRC 0xb8ec +Bank: 0x02 Addr: 0x010000 Block: 0x0080 CRC 0x9b9b +Bank: 0x03 Addr: 0x018000 Block: 0x00c0 CRC 0x798e +Bank: 0x04 Addr: 0x020000 Block: 0x0100 CRC 0x1092 +Bank: 0x05 Addr: 0x028000 Block: 0x0140 CRC 0x9d0c +Bank: 0x06 Addr: 0x030000 Block: 0x0180 CRC 0xf960 +Bank: 0x07 Addr: 0x038000 Block: 0x01c0 CRC 0x20ed +Bank: 0x08 Addr: 0x040000 Block: 0x0200 CRC 0xe5a3 diff --git a/snes/fatfstest/main.c b/snes/fatfstest/main.c index f41d4c6..36b6c60 100644 --- a/snes/fatfstest/main.c +++ b/snes/fatfstest/main.c @@ -13,14 +13,22 @@ #include "debug.h" #include "crc.h" - /* - * o debug STA global o optimize internal transfer buffer o direct write to mempage o relocate main code o exec loaded file - */ +/* + +o relocate main code +o exec loaded file + +o debug STA global +o optimize internal transfer buffer +o direct writeto mempage -#define ROM_NAME "MRDO.SMC" -#define BLOCK_SIZE 512 -#define BASE_ADDR 0x008000 +*/ + + +#define ROM_NAME "MRDO.SMC" +#define BLOCK_SIZE 512 +#define BASE_ADDR 0x008000 padStatus pad1; DWORD acc_size; /* Work register for fs command */ @@ -114,16 +122,12 @@ void wait(void) { printfc("SNES::wait: press A to continue\n"); enablePad(); - - // waitForVBlank(); pad1 = readPad((byte) 0); while (!pad1.A) { waitForVBlank(); pad1 = readPad((byte) 0); } printfc("SNES::wait: done\n"); - - // disablePad(); } void boot(void) @@ -233,9 +237,8 @@ void boot(void) printfc("SNES::main: read cnt=%i p1=%li p2=%li s2=%i\n", cnt, p1, p2, s2); - // printfc("SNES::main: file %x %x %x - // %x\n",Buff[0],Buff[1],Buff[2],Buff[3]); - if (res != FR_OK) { + + if (res != FR_OK) { printfc("SNES::main: read failed\n"); put_rc(res); break; @@ -247,27 +250,21 @@ void boot(void) } printfs(1 + bank, "BANK %X ADDR %LX", bank, addr); - /* - * for (i=0; i= MMIO_SECTOR01 && addr <= MMIO_SECTOR04){ sector = data << ( (3 - ( addr - MMIO_SECTOR01)) << 3); #ifdef FATFS_DEBUG - printf("FATFS::mmio_write set sector: byte=%i val=%i sector=%i \n",(3 - ( addr - MMIO_SECTOR01)),data,sector); + printf("BSNES::mmio_write set sector: byte=%i val=%i sector=%i \n",(3 - ( addr - MMIO_SECTOR01)),data,sector); #endif } if (addr == MMIO_COUNT){ count = data; #ifdef FATFS_DEBUG - printf("FATFS::mmio_write set count: count=%i \n",count); + printf("BSNES::mmio_write set count: count=%i \n",count); #endif if (command == CMD_READ) { retval = disk_read (0, (BYTE*)scratch_buffer, sector, count); @@ -123,13 +121,13 @@ void FATFS::mmio_write(unsigned addr, uint8 data) { retval = disk_write (0, (BYTE*)scratch_buffer, sector, count); } else{ #ifdef FATFS_DEBUG - printf("FATFS::mmio_write set offset: no command to trigger \n"); + printf("BSNES::mmio_write set offset: no command to trigger \n"); #endif } } if (addr == MMIO_RETVAL){ #ifdef FATFS_DEBUG - printf("FATFS::mmio_write reg 0x3016 reset\n"); + printf("BSNES::mmio_write reg 0x3016 reset\n"); #endif retval = STA_VOID; } diff --git a/tools/ffsample/linux/fftest b/tools/ffsample/linux/fftest index 7f68ddd..7e00484 100755 Binary files a/tools/ffsample/linux/fftest and b/tools/ffsample/linux/fftest differ