char valStr[3] = { pos[0], pos[1], '\0' };
unsigned char val = strtoul(valStr, 0, 16);
char valStr[3] = { pos[0], pos[1], '\0' };
unsigned char val = strtoul(valStr, 0, 16);
printf("ROM[0x%lx..0x%lx]=0x%hhx 0x%hhx 0x%hhx\n",
addr + i - 1, addr + i + 1,
ROM[addr + i - 1], ROM[addr + i], ROM[addr + i + 1]);
printf("--> ROM[0x%lx]=0x%hhx\n", addr + i, val);
printf("ROM[0x%lx..0x%lx]=0x%hhx 0x%hhx 0x%hhx\n",
addr + i - 1, addr + i + 1,
ROM[addr + i - 1], ROM[addr + i], ROM[addr + i + 1]);
printf("--> ROM[0x%lx]=0x%hhx\n", addr + i, val);
if (!Settings.HacksEnabled) goto no_hacks;
if (!file) goto no_hacks;
// At this point, the ROM is already loaded.
if (!Settings.HacksEnabled) goto no_hacks;
if (!file) goto no_hacks;
// At this point, the ROM is already loaded.
if (!fp) {
fprintf(stderr, "Can't open hacks file %s: %s\n", file, strerror(errno));
goto no_hacks;
}
if (!fp) {
fprintf(stderr, "Can't open hacks file %s: %s\n", file, strerror(errno));
goto no_hacks;
}
- printf("Hacks: searched %s for crc32 %lx, %d hacks loaded\n",
- file, gameCrc, res);
+ printf("Hacks: searched %s for crc %lX, %d byte%s patched\n",
+ file, gameCrc, res, (res == 1 ? "" : "s"));