notaz.gp2x.de
/
megadrive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
testpico: more timing tests
[megadrive.git]
/
megaed-sv
/
main.c
diff --git
a/megaed-sv/main.c
b/megaed-sv/main.c
index
24a2528
..
a0741b6
100644
(file)
--- a/
megaed-sv/main.c
+++ b/
megaed-sv/main.c
@@
-215,6
+215,17
@@
static noinline int printf(const char *fmt, ...)
return d; // wrong..
}
return d; // wrong..
}
+static u8 gethex(char c)
+{
+ if ('0' <= c && c <= '9')
+ return c - '0';
+ if ('a' <= c && c <= 'f')
+ return c - 'a' + 10;
+ if ('A' <= c && c <= 'F')
+ return c - 'A' + 10;
+ return 0;
+}
+
static const char *exc_names[] = {
NULL,
NULL,
static const char *exc_names[] = {
NULL,
NULL,
@@
-511,11
+522,17
@@
static int do_run(OsRoutine *ed, u8 b3, int tas_sync)
case 'M':
mapper = MTYPE_10M;
break;
case 'M':
mapper = MTYPE_10M;
break;
+ case 'n':
+ // raw numer: hex XX: mtype | x;
+ // x: bits [4-7]: SRAM_ON, SRAM_3M_ON, SNAP_SAVE_ON, MKEY
+ mapper = gethex(ed->usbReadByte()) << 4;
+ mapper |= gethex(ed->usbReadByte());
+ break;
default:
return -1;
}
default:
return -1;
}
- printf("starting mapper %x..\n", mapper);
+ printf("s
yncing and s
tarting mapper %x..\n", mapper);
while (read16(GFX_CTRL_PORT) & 2)
;
while (read16(GFX_CTRL_PORT) & 2)
;
@@
-584,9
+601,8
@@
int main()
/* note: relying on ED menu's font setup here.. */
printf("\n");
/* note: relying on ED menu's font setup here.. */
printf("\n");
- printf("version: %02x, hvc: %04x %04x, zbus: %d\n",
- read8(0xa10001), start_hvc, read16(GFX_CTRL_PORT),
- read8(0xa11100) & 1);
+ printf("version: %02x, hvc: %04x %04x\n",
+ read8(0xa10001), start_hvc, read16(0xc00008));
printf("ED os/fw: %d/%d\n\n", ed->osGetOsVersion(),
ed->osGetFirmVersion());
printf("ED os/fw: %d/%d\n\n", ed->osGetOsVersion(),
ed->osGetFirmVersion());