aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/cpumacro.h48
-rw-r--r--source/cpuops.cpp128
-rw-r--r--source/gfx.cpp2
3 files changed, 58 insertions, 120 deletions
diff --git a/source/cpumacro.h b/source/cpumacro.h
index fc9b4a6..c5ed835 100644
--- a/source/cpumacro.h
+++ b/source/cpumacro.h
@@ -266,9 +266,6 @@ static inline void A_ASL8 ()
static void ASL16 (long Addr)
{
-#ifndef SA1_OPCODES
- CPU.Cycles += ONE_CYCLE;
-#endif
uint16 Work16 = S9xGetWord (Addr);
ICPU._Carry = (Work16 & 0x8000) != 0;
Work16 <<= 1;
@@ -280,9 +277,6 @@ static void ASL16 (long Addr)
static void ASL8 (long Addr)
{
-#ifndef SA1_OPCODES
- CPU.Cycles += ONE_CYCLE;
-#endif
uint8 Work8 = S9xGetByte (Addr);
ICPU._Carry = (Work8 & 0x80) != 0;
Work8 <<= 1;
@@ -382,9 +376,6 @@ static inline void A_DEC8 ()
static void DEC16 (long Addr)
{
-#ifndef SA1_OPCODES
- CPU.Cycles += ONE_CYCLE;
-#endif
#ifdef CPU_SHUTDOWN
CPU.WaitAddress = NULL;
#endif
@@ -398,9 +389,6 @@ static void DEC16 (long Addr)
static void DEC8 (long Addr)
{
-#ifndef SA1_OPCODES
- CPU.Cycles += ONE_CYCLE;
-#endif
#ifdef CPU_SHUTDOWN
CPU.WaitAddress = NULL;
#endif
@@ -450,9 +438,6 @@ static inline void A_INC8 ()
static void INC16 (long Addr)
{
-#ifndef SA1_OPCODES
- CPU.Cycles += ONE_CYCLE;
-#endif
#ifdef CPU_SHUTDOWN
CPU.WaitAddress = NULL;
#endif
@@ -466,9 +451,6 @@ static void INC16 (long Addr)
static void INC8 (long Addr)
{
-#ifndef SA1_OPCODES
- CPU.Cycles += ONE_CYCLE;
-#endif
#ifdef CPU_SHUTDOWN
CPU.WaitAddress = NULL;
#endif
@@ -536,9 +518,6 @@ static inline void A_LSR8 ()
static void LSR16 (long Addr)
{
-#ifndef SA1_OPCODES
- CPU.Cycles += ONE_CYCLE;
-#endif
uint16 Work16 = S9xGetWord (Addr);
ICPU._Carry = Work16 & 1;
Work16 >>= 1;
@@ -550,9 +529,6 @@ static void LSR16 (long Addr)
static void LSR8 (long Addr)
{
-#ifndef SA1_OPCODES
- CPU.Cycles += ONE_CYCLE;
-#endif
uint8 Work8 = S9xGetByte (Addr);
ICPU._Carry = Work8 & 1;
Work8 >>= 1;
@@ -598,9 +574,6 @@ static inline void A_ROL8 ()
static void ROL16 (long Addr)
{
-#ifndef SA1_OPCODES
- CPU.Cycles += ONE_CYCLE;
-#endif
uint32 Work32 = S9xGetWord (Addr);
Work32 <<= 1;
Work32 |= CheckCarry();
@@ -613,9 +586,6 @@ static void ROL16 (long Addr)
static void ROL8 (long Addr)
{
-#ifndef SA1_OPCODES
- CPU.Cycles += ONE_CYCLE;
-#endif
uint16 Work16 = S9xGetByte (Addr);
Work16 <<= 1;
Work16 |= CheckCarry ();
@@ -651,9 +621,6 @@ static inline void A_ROR8 ()
static void ROR16 (long Addr)
{
-#ifndef SA1_OPCODES
- CPU.Cycles += ONE_CYCLE;
-#endif
uint32 Work32 = S9xGetWord (Addr);
Work32 |= (int) CheckCarry() << 16;
ICPU._Carry = (uint8) (Work32 & 1);
@@ -666,9 +633,6 @@ static void ROR16 (long Addr)
static void ROR8 (long Addr)
{
-#ifndef SA1_OPCODES
- CPU.Cycles += ONE_CYCLE;
-#endif
uint16 Work16 = S9xGetByte (Addr);
Work16 |= (int) CheckCarry () << 8;
ICPU._Carry = (uint8) (Work16 & 1);
@@ -840,9 +804,6 @@ static void STZ8 (long Addr)
static void TSB16 (long Addr)
{
-#ifndef SA1_OPCODES
- CPU.Cycles += ONE_CYCLE;
-#endif
uint16 Work16 = S9xGetWord (Addr);
ICPU._Zero = (Work16 & ICPU.Registers.A.W) != 0;
Work16 |= ICPU.Registers.A.W;
@@ -853,9 +814,6 @@ static void TSB16 (long Addr)
static void TSB8 (long Addr)
{
-#ifndef SA1_OPCODES
- CPU.Cycles += ONE_CYCLE;
-#endif
uint8 Work8 = S9xGetByte (Addr);
ICPU._Zero = Work8 & ICPU.Registers.AL;
Work8 |= ICPU.Registers.AL;
@@ -864,9 +822,6 @@ static void TSB8 (long Addr)
static void TRB16 (long Addr)
{
-#ifndef SA1_OPCODES
- CPU.Cycles += ONE_CYCLE;
-#endif
uint16 Work16 = S9xGetWord (Addr);
ICPU._Zero = (Work16 & ICPU.Registers.A.W) != 0;
Work16 &= ~ICPU.Registers.A.W;
@@ -877,9 +832,6 @@ static void TRB16 (long Addr)
static void TRB8 (long Addr)
{
-#ifndef SA1_OPCODES
- CPU.Cycles += ONE_CYCLE;
-#endif
uint8 Work8 = S9xGetByte (Addr);
ICPU._Zero = Work8 & ICPU.Registers.AL;
Work8 &= ~ICPU.Registers.AL;
diff --git a/source/cpuops.cpp b/source/cpuops.cpp
index 3a156a9..cb10b46 100644
--- a/source/cpuops.cpp
+++ b/source/cpuops.cpp
@@ -631,7 +631,7 @@ static void Op06M1 (void)
{
Direct (MODIFY, ASL8);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeed;
+ CPU.Cycles += CPU.MemSpeed /* memory */ + ONE_CYCLE /* opcode */;
#endif
}
@@ -639,7 +639,7 @@ static void Op06M0 (void)
{
Direct (MODIFY, ASL16);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeed;
+ CPU.Cycles += CPU.MemSpeed /* memory */ + ONE_CYCLE /* opcode */;
#endif
}
@@ -647,11 +647,7 @@ static void Op16M1 (void)
{
DirectIndexedX (MODIFY, ASL8);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeed + ONE_CYCLE;
-// if (ICPU.Registers.DL != 0)
-// CPU.Cycles += TWO_CYCLES;
-// else
-// CPU.Cycles += ONE_CYCLE;
+ CPU.Cycles += CPU.MemSpeed + ONE_CYCLE /* memory */ + ONE_CYCLE /* opcode */;
#endif
}
@@ -659,11 +655,7 @@ static void Op16M0 (void)
{
DirectIndexedX (MODIFY, ASL16);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeed + ONE_CYCLE;
-// if (ICPU.Registers.DL != 0)
-// CPU.Cycles += TWO_CYCLES;
-// else
-// CPU.Cycles += ONE_CYCLE;
+ CPU.Cycles += CPU.MemSpeed + ONE_CYCLE /* memory */ + ONE_CYCLE /* opcode */;
#endif
}
@@ -671,7 +663,7 @@ static void Op0EM1 (void)
{
Absolute (MODIFY, ASL8);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeedx2;
+ CPU.Cycles += CPU.MemSpeedx2 /* memory */ + ONE_CYCLE /* opcode */;
#endif
}
@@ -679,7 +671,7 @@ static void Op0EM0 (void)
{
Absolute (MODIFY, ASL16);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeedx2;
+ CPU.Cycles += CPU.MemSpeedx2 /* memory */ + ONE_CYCLE /* opcode */;
#endif
}
@@ -687,7 +679,7 @@ static void Op1EM1 (void)
{
AbsoluteIndexedX (MODIFY, ASL8);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeedx2;
+ CPU.Cycles += CPU.MemSpeedx2 /* memory */ + ONE_CYCLE /* opcode */;
#endif
}
@@ -695,7 +687,7 @@ static void Op1EM0 (void)
{
AbsoluteIndexedX (MODIFY, ASL16);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeedx2;
+ CPU.Cycles += CPU.MemSpeedx2 /* memory */ + ONE_CYCLE /* opcode */;
#endif
}
/**********************************************************************************************/
@@ -1196,7 +1188,7 @@ static void OpC6M1 (void)
{
Direct (MODIFY, DEC8);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeed;
+ CPU.Cycles += CPU.MemSpeed /* memory */ + ONE_CYCLE /* opcode */;
#endif
}
@@ -1204,7 +1196,7 @@ static void OpC6M0 (void)
{
Direct (MODIFY, DEC16);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeed;
+ CPU.Cycles += CPU.MemSpeed /* memory */ + ONE_CYCLE /* opcode */;
#endif
}
@@ -1212,7 +1204,7 @@ static void OpD6M1 (void)
{
DirectIndexedX (MODIFY, DEC8);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeed + ONE_CYCLE;
+ CPU.Cycles += CPU.MemSpeed + ONE_CYCLE /* memory */ + ONE_CYCLE /* opcode */;
// if (ICPU.Registers.DL != 0)
// CPU.Cycles += TWO_CYCLES;
// else
@@ -1224,7 +1216,7 @@ static void OpD6M0 (void)
{
DirectIndexedX (MODIFY, DEC16);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeed + ONE_CYCLE;
+ CPU.Cycles += CPU.MemSpeed + ONE_CYCLE /* memory */ + ONE_CYCLE /* opcode */;
// if (ICPU.Registers.DL != 0)
// CPU.Cycles += TWO_CYCLES;
// else
@@ -1236,7 +1228,7 @@ static void OpCEM1 (void)
{
Absolute (MODIFY, DEC8);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeedx2;
+ CPU.Cycles += CPU.MemSpeedx2 /* memory */ + ONE_CYCLE /* opcode */;
#endif
}
@@ -1244,7 +1236,7 @@ static void OpCEM0 (void)
{
Absolute (MODIFY, DEC16);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeedx2;
+ CPU.Cycles += CPU.MemSpeedx2 /* memory */ + ONE_CYCLE /* opcode */;
#endif
}
@@ -1252,7 +1244,7 @@ static void OpDEM1 (void)
{
AbsoluteIndexedX (MODIFY, DEC8);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeedx2;
+ CPU.Cycles += CPU.MemSpeedx2 /* memory */ + ONE_CYCLE /* opcode */;
#endif
}
@@ -1260,7 +1252,7 @@ static void OpDEM0 (void)
{
AbsoluteIndexedX (MODIFY, DEC16);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeedx2;
+ CPU.Cycles += CPU.MemSpeedx2 /* memory */ + ONE_CYCLE /* opcode */;
#endif
}
@@ -1539,7 +1531,7 @@ static void OpE6M1 (void)
{
Direct (MODIFY, INC8);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeed;
+ CPU.Cycles += CPU.MemSpeed /* memory */ + ONE_CYCLE /* opcode */;
#endif
}
@@ -1547,7 +1539,7 @@ static void OpE6M0 (void)
{
Direct (MODIFY, INC16);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeed;
+ CPU.Cycles += CPU.MemSpeed /* memory */ + ONE_CYCLE /* opcode */;
#endif
}
@@ -1555,7 +1547,7 @@ static void OpF6M1 (void)
{
DirectIndexedX (MODIFY, INC8);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeed + ONE_CYCLE;
+ CPU.Cycles += CPU.MemSpeed + ONE_CYCLE /* memory */ + ONE_CYCLE /* opcode */;
// if (ICPU.Registers.DL != 0)
// CPU.Cycles += TWO_CYCLES;
// else
@@ -1567,7 +1559,7 @@ static void OpF6M0 (void)
{
DirectIndexedX (MODIFY, INC16);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeed + ONE_CYCLE;
+ CPU.Cycles += CPU.MemSpeed + ONE_CYCLE /* memory */ + ONE_CYCLE /* opcode */;
// if (ICPU.Registers.DL != 0)
// CPU.Cycles += TWO_CYCLES;
// else
@@ -1579,7 +1571,7 @@ static void OpEEM1 (void)
{
Absolute (MODIFY, INC8);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeedx2;
+ CPU.Cycles += CPU.MemSpeedx2 /* memory */ + ONE_CYCLE /* opcode */;
#endif
}
@@ -1587,7 +1579,7 @@ static void OpEEM0 (void)
{
Absolute (MODIFY, INC16);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeedx2;
+ CPU.Cycles += CPU.MemSpeedx2 /* memory */ + ONE_CYCLE /* opcode */;
#endif
}
@@ -1595,7 +1587,7 @@ static void OpFEM1 (void)
{
AbsoluteIndexedX (MODIFY, INC8);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeedx2;
+ CPU.Cycles += CPU.MemSpeedx2 /* memory */ + ONE_CYCLE /* opcode */;
#endif
}
@@ -1603,7 +1595,7 @@ static void OpFEM0 (void)
{
AbsoluteIndexedX (MODIFY, INC16);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeedx2;
+ CPU.Cycles += CPU.MemSpeedx2 /* memory */ + ONE_CYCLE /* opcode */;
#endif
}
@@ -2077,7 +2069,7 @@ static void Op46M1 (void)
{
Direct (MODIFY, LSR8);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeed;
+ CPU.Cycles += CPU.MemSpeed /* memory */ + ONE_CYCLE /* opcode */;
#endif
}
@@ -2085,7 +2077,7 @@ static void Op46M0 (void)
{
Direct (MODIFY, LSR16);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeed;
+ CPU.Cycles += CPU.MemSpeed /* memory */ + ONE_CYCLE /* opcode */;
#endif
}
@@ -2093,7 +2085,7 @@ static void Op56M1 (void)
{
DirectIndexedX (MODIFY, LSR8);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeed + ONE_CYCLE;
+ CPU.Cycles += CPU.MemSpeed + ONE_CYCLE /* memory */ + ONE_CYCLE /* opcode */;
// if (ICPU.Registers.DL != 0)
// CPU.Cycles += TWO_CYCLES;
// else
@@ -2105,7 +2097,7 @@ static void Op56M0 (void)
{
DirectIndexedX (MODIFY, LSR16);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeed + ONE_CYCLE;
+ CPU.Cycles += CPU.MemSpeed + ONE_CYCLE /* memory */ + ONE_CYCLE /* opcode */;
// if (ICPU.Registers.DL != 0)
// CPU.Cycles += TWO_CYCLES;
// else
@@ -2117,7 +2109,7 @@ static void Op4EM1 (void)
{
Absolute (MODIFY, LSR8);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeedx2;
+ CPU.Cycles += CPU.MemSpeedx2 /* memory */ + ONE_CYCLE /* opcode */;
#endif
}
@@ -2125,7 +2117,7 @@ static void Op4EM0 (void)
{
Absolute (MODIFY, LSR16);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeedx2;
+ CPU.Cycles += CPU.MemSpeedx2 /* memory */ + ONE_CYCLE /* opcode */;
#endif
}
@@ -2133,7 +2125,7 @@ static void Op5EM1 (void)
{
AbsoluteIndexedX (MODIFY, LSR8);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeedx2;
+ CPU.Cycles += CPU.MemSpeedx2 /* memory */ + ONE_CYCLE /* opcode */;
#endif
}
@@ -2141,7 +2133,7 @@ static void Op5EM0 (void)
{
AbsoluteIndexedX (MODIFY, LSR16);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeedx2;
+ CPU.Cycles += CPU.MemSpeedx2 /* memory */ + ONE_CYCLE /* opcode */;
#endif
}
@@ -2420,7 +2412,7 @@ static void Op26M1 (void)
{
Direct (MODIFY, ROL8);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeed;
+ CPU.Cycles += CPU.MemSpeed /* memory */ + ONE_CYCLE /* opcode */;
#endif
}
@@ -2428,7 +2420,7 @@ static void Op26M0 (void)
{
Direct (MODIFY, ROL16);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeed;
+ CPU.Cycles += CPU.MemSpeed /* memory */ + ONE_CYCLE /* opcode */;
#endif
}
@@ -2436,7 +2428,7 @@ static void Op36M1 (void)
{
DirectIndexedX (MODIFY, ROL8);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeed + ONE_CYCLE;
+ CPU.Cycles += CPU.MemSpeed + ONE_CYCLE /* memory */ + ONE_CYCLE /* opcode */;
// if (ICPU.Registers.DL != 0)
// CPU.Cycles += TWO_CYCLES;
// else
@@ -2448,7 +2440,7 @@ static void Op36M0 (void)
{
DirectIndexedX (MODIFY, ROL16);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeed + ONE_CYCLE;
+ CPU.Cycles += CPU.MemSpeed + ONE_CYCLE /* memory */ + ONE_CYCLE /* opcode */;
// if (ICPU.Registers.DL != 0)
// CPU.Cycles += TWO_CYCLES;
// else
@@ -2460,7 +2452,7 @@ static void Op2EM1 (void)
{
Absolute (MODIFY, ROL8);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeedx2;
+ CPU.Cycles += CPU.MemSpeedx2 /* memory */ + ONE_CYCLE /* opcode */;
#endif
}
@@ -2468,7 +2460,7 @@ static void Op2EM0 (void)
{
Absolute (MODIFY, ROL16);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeedx2;
+ CPU.Cycles += CPU.MemSpeedx2 /* memory */ + ONE_CYCLE /* opcode */;
#endif
}
@@ -2476,7 +2468,7 @@ static void Op3EM1 (void)
{
AbsoluteIndexedX (MODIFY, ROL8);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeedx2;
+ CPU.Cycles += CPU.MemSpeedx2 /* memory */ + ONE_CYCLE /* opcode */;
#endif
}
@@ -2484,7 +2476,7 @@ static void Op3EM0 (void)
{
AbsoluteIndexedX (MODIFY, ROL16);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeedx2;
+ CPU.Cycles += CPU.MemSpeedx2 /* memory */ + ONE_CYCLE /* opcode */;
#endif
}
/**********************************************************************************************/
@@ -2504,7 +2496,7 @@ static void Op66M1 (void)
{
Direct (MODIFY, ROR8);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeed;
+ CPU.Cycles += CPU.MemSpeed /* memory */ + ONE_CYCLE /* opcode */;
#endif
}
@@ -2512,7 +2504,7 @@ static void Op66M0 (void)
{
Direct (MODIFY, ROR16);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeed;
+ CPU.Cycles += CPU.MemSpeed /* memory */ + ONE_CYCLE /* opcode */;
#endif
}
@@ -2520,7 +2512,7 @@ static void Op76M1 (void)
{
DirectIndexedX (MODIFY, ROR8);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeed + ONE_CYCLE;
+ CPU.Cycles += CPU.MemSpeed + ONE_CYCLE /* memory */ + ONE_CYCLE /* opcode */;
// if (ICPU.Registers.DL != 0)
// CPU.Cycles += TWO_CYCLES;
// else
@@ -2532,7 +2524,7 @@ static void Op76M0 (void)
{
DirectIndexedX (MODIFY, ROR16);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeed + ONE_CYCLE;
+ CPU.Cycles += CPU.MemSpeed + ONE_CYCLE /* memory */ + ONE_CYCLE /* opcode */;
// if (ICPU.Registers.DL != 0)
// CPU.Cycles += TWO_CYCLES;
// else
@@ -2544,7 +2536,7 @@ static void Op6EM1 (void)
{
Absolute (MODIFY, ROR8);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeedx2;
+ CPU.Cycles += CPU.MemSpeedx2 /* memory */ + ONE_CYCLE /* opcode */;
#endif
}
@@ -2552,7 +2544,7 @@ static void Op6EM0 (void)
{
Absolute (MODIFY, ROR16);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeedx2;
+ CPU.Cycles += CPU.MemSpeedx2 /* memory */ + ONE_CYCLE /* opcode */;
#endif
}
@@ -2560,7 +2552,7 @@ static void Op7EM1 (void)
{
AbsoluteIndexedX (MODIFY, ROR8);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeedx2;
+ CPU.Cycles += CPU.MemSpeedx2 /* memory */ + ONE_CYCLE /* opcode */;
#endif
}
@@ -2568,7 +2560,7 @@ static void Op7EM0 (void)
{
AbsoluteIndexedX (MODIFY, ROR16);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeedx2;
+ CPU.Cycles += CPU.MemSpeedx2 /* memory */ + ONE_CYCLE /* opcode */;
#endif
}
/**********************************************************************************************/
@@ -3255,7 +3247,7 @@ static void Op14M1 (void)
{
Direct (MODIFY, TRB8);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeed;
+ CPU.Cycles += CPU.MemSpeed /* memory */ + ONE_CYCLE /* opcode */;
#endif
}
@@ -3263,7 +3255,7 @@ static void Op14M0 (void)
{
Direct (MODIFY, TRB16);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeed;
+ CPU.Cycles += CPU.MemSpeed /* memory */ + ONE_CYCLE /* opcode */;
#endif
}
@@ -3271,7 +3263,7 @@ static void Op1CM1 (void)
{
Absolute (MODIFY, TRB8);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeedx2;
+ CPU.Cycles += CPU.MemSpeedx2 /* memory */ + ONE_CYCLE /* opcode */;
#endif
}
@@ -3279,7 +3271,7 @@ static void Op1CM0 (void)
{
Absolute (MODIFY, TRB16);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeedx2;
+ CPU.Cycles += CPU.MemSpeedx2 /* memory */ + ONE_CYCLE /* opcode */;
#endif
}
/**********************************************************************************************/
@@ -3289,7 +3281,7 @@ static void Op04M1 (void)
{
Direct (MODIFY, TSB8);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeed;
+ CPU.Cycles += CPU.MemSpeed /* memory */ + ONE_CYCLE /* opcode */;
#endif
}
@@ -3297,7 +3289,7 @@ static void Op04M0 (void)
{
Direct (MODIFY, TSB16);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeed;
+ CPU.Cycles += CPU.MemSpeed /* memory */ + ONE_CYCLE /* opcode */;
#endif
}
@@ -3305,7 +3297,7 @@ static void Op0CM1 (void)
{
Absolute (MODIFY, TSB8);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeedx2;
+ CPU.Cycles += CPU.MemSpeedx2 /* memory */ + ONE_CYCLE /* opcode */;
#endif
}
@@ -3313,7 +3305,7 @@ static void Op0CM0 (void)
{
Absolute (MODIFY, TSB16);
#ifndef SA1_OPCODES
- CPU.Cycles += CPU.MemSpeedx2;
+ CPU.Cycles += CPU.MemSpeedx2 /* memory */ + ONE_CYCLE /* opcode */;
#endif
}
@@ -4514,8 +4506,6 @@ void S9xOpcode_IRQ (void)
(Memory.FillRAM [0x220f] << 8));
else
S9xSetPCBase (S9xGetWord (0xFFEE));
-#endif
-#ifndef SA1_OPCODES
CPU.Cycles += TWO_CYCLES;
#endif
}
@@ -4541,8 +4531,6 @@ void S9xOpcode_IRQ (void)
(Memory.FillRAM [0x220f] << 8));
else
S9xSetPCBase (S9xGetWord (0xFFFE));
-#endif
-#ifndef SA1_OPCODES
CPU.Cycles += ONE_CYCLE;
#endif
}
@@ -4580,8 +4568,6 @@ void S9xOpcode_NMI (void)
(Memory.FillRAM [0x220d] << 8));
else
S9xSetPCBase (S9xGetWord (0xFFEA));
-#endif
-#ifndef SA1_OPCODES
CPU.Cycles += TWO_CYCLES;
#endif
}
@@ -4607,8 +4593,6 @@ void S9xOpcode_NMI (void)
(Memory.FillRAM [0x220d] << 8));
else
S9xSetPCBase (S9xGetWord (0xFFFA));
-#endif
-#ifndef SA1_OPCODES
CPU.Cycles += ONE_CYCLE;
#endif
}
diff --git a/source/gfx.cpp b/source/gfx.cpp
index 59ff71a..47fd826 100644
--- a/source/gfx.cpp
+++ b/source/gfx.cpp
@@ -1302,6 +1302,7 @@ if(Settings.BGLayering) {
#endif
}
}
+#if 0
else if (!Settings.SupportHiRes)
{
if (PPU.BGMode == 5)
@@ -1365,6 +1366,7 @@ if(Settings.BGLayering) {
#endif
}
}
+#endif // 0
GFX.Z1 = D + 2;
for(uint32 Y=GFX.StartY, Offset=Y*GFX.PPL; Y<=GFX.EndY; Y++, Offset+=GFX.PPL){