Esempio n. 1
0
#define ALUW(op) SMP_OP_ALUW_DECL(op)

#define CMP(read1, read2) SMP_OP_ALU_CMP_DECL(read1, read2)

#define RMW(type, op) SMP_OP_RMW_##type##_DECL(op)
#define RMWW(op) SMP_OP_RMWW_DP_DECL(op)

#define MOVE(dst, src) SMP_OP_MOVE_##dst##_DECL(src)
#define MOVE_(dst, src) SMP_OP_MOVE_DECL(dst, src)

#define BRANCH(flag) SMP_OP_BRANCH_FLAG_DECL(flag)
#define BRANCH_N(flag) SMP_OP_BRANCH_N_FLAG_DECL(flag)

smp_op_t ssnes_smp_optable[256] = {
   NOP,                    // 0x00
   TCALL(0),               // 0x01
   SET1(0),                // 0x02
   BBS(0),                 // 0x03
   ALU(DP, or),            // 0x04
   ALU(ADDR, or),          // 0x05
   ALU(DPX, or),           // 0x06
   ALU(IDPX, or),          // 0x07
   ALU(IMM, or),           // 0x08
   ALU(DP_DP, or),         // 0x09
   ALU(BIT, or1),          // 0x0a
   RMW(DP, asl),           // 0x0b
   RMW(ADDR, asl),         // 0x0c
   smp_op_push_p,          // 0x0d
   smp_op_rmw_tset,        // 0x0e
   smp_op_brk,             // 0x0f
Esempio n. 2
0
#define IndirectIndexedY()\
    IAPU.Address = *(IAPU.DirectPage + OP1) + \
        (*(IAPU.DirectPage + OP1 + 1) << 8) + \
        IAPU.Registers.YA.B.Y;
#endif

void Apu00()
{
   // NOP
   IAPU.PC++;
}

void Apu01()
{
   TCALL(0)
}

void Apu11()
{
   TCALL(1)
}

void Apu21()
{
   TCALL(2)
}

void Apu31()
{
   TCALL(3)