Fix size inconsistency for prg and chr

- Unif shows ROM_size and VROM_size in bytes, while codebase expects these to be
in chunks of 16K for prg and 8K for chr. Update Unif to represent size as its
expected to be.

- Change PRGRomSize and CHRRomSize to represent sizes in bytes to make it consistent
with the rest of the size-related variables in struct CartInfo.
This commit is contained in:
negativeExponent
2020-03-05 21:07:33 +08:00
parent a0458bbf98
commit e9eb314311
5 changed files with 40 additions and 32 deletions

View File

@@ -88,7 +88,7 @@ static void M226Reset(void) {
void Mapper226_Init(CartInfo *info) {
isresetbased = 0;
/* 1536KiB PRG roms have different bank order */
reorder_banks = ((info->PRGRomSize * 16) == 1536) ? 1 : 0;
reorder_banks = ((info->PRGRomSize / 1024) == 1536) ? 1 : 0;
info->Power = M226Power;
info->Reset = M226Reset;
AddExState(&StateRegs, ~0, 0, 0);