SA1.ShiftedDB = (uint32) SA1Registers.DB << 16;
S9xSA1SetPCBase (SA1.ShiftedPB + SA1Registers.PC);
+#if !CONF_BUILD_ASM_SA1
S9xSA1UnpackStatus ();
- //S9xSA1FixCycles (); // unused
+ S9xSA1FixCycles ();
+#endif
SA1.VirtualBitmapFormat = (Memory.FillRAM [0x223f] & 0x80) ? 2 : 4;
Memory.BWRAM = Memory.SRAM + (Memory.FillRAM [0x2224] & 7) * 0x2000;
S9xSA1SetBWRAMMemMap (Memory.FillRAM [0x2225]);
if (GetAddress >= (uint8 *) CMemory::MAP_LAST)
return (*(GetAddress + (address & 0xffff)));
- switch ((int) GetAddress)
+ switch ((CMemory::Types)(intptr_t) GetAddress)
{
case CMemory::MAP_PPU:
return (S9xGetSA1 (address & 0xffff));
void S9xSA1SetByte (uint8 byte, uint32 address)
{
- uint8 *Setaddress = SA1.WriteMap [(address >> MEMMAP_SHIFT) & MEMMAP_MASK];
+ uint8 *SetAddress = SA1.WriteMap [(address >> MEMMAP_SHIFT) & MEMMAP_MASK];
- if (Setaddress >= (uint8 *) CMemory::MAP_LAST)
+ if (SetAddress >= (uint8 *) CMemory::MAP_LAST)
{
- *(Setaddress + (address & 0xffff)) = byte;
+ *(SetAddress + (address & 0xffff)) = byte;
return;
}
- switch ((int) Setaddress)
+ switch ((CMemory::Types)(intptr_t) SetAddress)
{
case CMemory::MAP_PPU:
S9xSetSA1 (byte, address & 0xffff);
return;
}
- switch ((int) GetAddress)
+ switch ((CMemory::Types)(intptr_t) GetAddress)
{
case CMemory::MAP_PPU:
SA1.PCBase = Memory.FillRAM - 0x2000;