fix addressing for tiny EEPROM.

This commit is contained in:
StapleButter 2017-04-11 01:21:35 +02:00
parent 84664a6ded
commit 0b981f2a4d
2 changed files with 2 additions and 4 deletions

View File

@ -379,8 +379,6 @@ s32 ARM::Execute()
} }
} }
//if (R[15]==0x037F9364) printf("R8=%08X R9=%08X\n", R[8], R[9]);
if (Num==0) if (Num==0)
{ {
s32 diff = Cycles - lastcycles; s32 diff = Cycles - lastcycles;

View File

@ -284,7 +284,7 @@ void Write_EEPROMTiny(u8 val, bool islast)
} }
else else
{ {
SRAM[(Addr & 0xFF) | ((CurCmd==0x0A)?0x100:0)] = val; SRAM[(Addr + ((CurCmd==0x0A)?0x100:0)) & 0x1FF] = val;
Addr++; Addr++;
} }
break; break;
@ -298,7 +298,7 @@ void Write_EEPROMTiny(u8 val, bool islast)
} }
else else
{ {
Data = SRAM[(Addr & 0xFF) | ((CurCmd==0x0B)?0x100:0)]; Data = SRAM[(Addr + ((CurCmd==0x0B)?0x100:0)) & 0x1FF];
Addr++; Addr++;
} }
break; break;