Correctly fix the negative value in "Made In Ore".

This commit is contained in:
normmatt234 2013-09-28 09:07:55 +00:00
parent 624252bf05
commit 04761fed6c
1 changed files with 6 additions and 6 deletions

View File

@ -46,6 +46,7 @@ private:
u32 mode;
u32 handle_save;
u32 save_adr;
u32 rom_mask;
public:
virtual Slot1Info const* info()
@ -64,6 +65,8 @@ public:
subAdr = T1ReadWord(gameInfo.header.unknown5, 0xE) << 17;
rom_mask = (0x020000 << gameInfo.header.cardSize) - 1;
mode = 0;
}
@ -123,12 +126,9 @@ public:
case 0xB2: //Set save position
mode = cmd;
save_adr = protocol.address & gameInfo.mask;
// to Norrmatt: Made in Ore (UORJ, crc 2E7111B8) crash when save_addr < subAdr
if (save_adr > subAdr)
save_adr -= subAdr;
else
save_adr = 0;
save_adr = protocol.address & rom_mask;
// to Normmatt: Made in Ore (UORJ, crc 2E7111B8) crash when save_addr < subAdr
save_adr -= subAdr;
handle_save = 1;
break;
}