summaryrefslogtreecommitdiff
path: root/realtec.c
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2017-03-02 22:22:54 -0800
committerMichael Pavone <pavone@retrodev.com>2017-03-02 22:22:54 -0800
commita8f00a798faacf15dcfd3939fc55abb921031853 (patch)
tree6be1f6b3d27d78cf4e24e963dbf3bb3c892cb510 /realtec.c
parente9b8afabb9c182a6058452e622cabc3602c0cf26 (diff)
Improve hacky name parsing code to handle Whac a Critter/Mallet Legend
Diffstat (limited to 'realtec.c')
-rw-r--r--realtec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/realtec.c b/realtec.c
index cfdb307..babe1e2 100644
--- a/realtec.c
+++ b/realtec.c
@@ -72,14 +72,14 @@ rom_info realtec_configure_rom(uint8_t *rom, uint32_t rom_size, memmap_chunk con
byteswap_rom(512*1024, (uint16_t *)r->rom_space);
uint8_t *name_start = NULL, *name_end = NULL;
- for (int i = 0x90; i < 0xE0; i++)
+ for (int i = 0x94; i < 0xE0; i++)
{
if (name_start) {
- if (rom[i] < ' ' || rom[i] > 0x80 || !memcmp(rom+i, "ARE", 3)) {
+ if (rom[i] < ' ' || rom[i] > 0x80 || !memcmp(rom+i, "ARE", 3) || !memcmp(rom+i, "are", 3)) {
name_end = rom+i;
break;
}
- } else if (rom[i] > ' ' && rom[i] < 0x80) {
+ } else if (rom[i] > ' ' && rom[i] < 0x80 && rom[i] != ':') {
name_start = rom + i;
}
}