X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=megaed-sv%2Fmain.c;h=fa0c16343081e3f4035d0135eae0279c98a60808;hb=c6d1079a7b38a586ea977236d1075075d1e50d57;hp=6486a05e7cf950b279ee604192f781dae8c31bf8;hpb=fb63f62c5cd251738be58922d0b210809b04fb59;p=megadrive.git diff --git a/megaed-sv/main.c b/megaed-sv/main.c index 6486a05..fa0c163 100644 --- a/megaed-sv/main.c +++ b/megaed-sv/main.c @@ -389,6 +389,17 @@ static int do_test(OsRoutine *ed, u8 b3) switch (b3) { + case '0': + printf("reading..\n"); + test_joy_read_log((void *)0x200000, 0x20000); + //test_joy_read_log((void *)0xff0200, 0x0f000); + printf("done\n"); + return 0; + case '1': + printf("reading w/vsync..\n"); + test_joy_read_log_vsync((void *)0x200000, 3600 * 2); + printf("done\n"); + return 0; case 'j': test_joy_latency(&min, &max); printf("latency: %d - %d\n\n", min, max); @@ -507,12 +518,16 @@ int main() printf("\n"); printf("version: %02x, start_hvc: %04x\n", read8(0xa10001), start_hvc); - printf("ED os/fw: %x/%x\n\n", ed->osGetOsVersion(), + printf("ED os/fw: %d/%d\n\n", ed->osGetOsVersion(), ed->osGetFirmVersion()); for (;;) { if (!ed->usbRdReady()) { - asm volatile("stop #0x2000"); + /* note: stop corrupts SDRAM */ + //asm volatile("stop #0x2000"); + asm volatile( + "move.l #1000/10, %0\n" + "0: dbra %0, 0b\n" : "=r" (i) :: "cc"); continue; }