diff options
author | Michael Pavone <pavone@retrodev.com> | 2017-03-02 22:22:54 -0800 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2017-03-02 22:22:54 -0800 |
commit | a8f00a798faacf15dcfd3939fc55abb921031853 (patch) | |
tree | 6be1f6b3d27d78cf4e24e963dbf3bb3c892cb510 | |
parent | e9b8afabb9c182a6058452e622cabc3602c0cf26 (diff) |
Improve hacky name parsing code to handle Whac a Critter/Mallet Legend
-rw-r--r-- | realtec.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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; } } |