Example #1
0
        protected int Jmp(int opcode)
        {
            IOperand op = cpu.ResolveSrcEA((opcode >> 3) & 0x07, (opcode & 0x07), Size.SizeLong);

            cpu.SetPC(op.GetComputedAddress());
            return(TIMING[op.Index()]);
        }
Example #2
0
        protected int Lea(int opcode)
        {
            IOperand src = cpu.ResolveSrcEA((opcode >> 3) & 0x07, opcode & 0x07, Size.SizeLong);

            cpu.SetAddrRegisterLong((opcode >> 9) & 0x07, src.GetComputedAddress());
            return(TIMING[src.Index()]);
        }
Example #3
0
        protected int Pea(int opcode)
        {
            IOperand src = cpu.ResolveSrcEA((opcode >> 3) & 0x07, opcode & 0x07, Size.SizeLong);

            cpu.PushLong(src.GetComputedAddress());
            return(TIMING[src.Index()]);
        }
Example #4
0
        protected int MovemWordR2m(int opcode)
        {
            int      reglist = cpu.FetchPCWord();
            IOperand dst     = cpu.ResolveDstEA((opcode >> 3) & 0x07, opcode & 0x07, Size.Word);
            int      address = dst.GetComputedAddress();
            int      count;

            if (((opcode >> 3) & 0x07) == 4)
            {
                count = PutMultipleWordPreDec(opcode & 0x07, reglist, address);
            }
            else
            {
                count = PutMultipleWord(reglist, address);
            }

            return(R2M_Timing[dst.Index()] + (count << 2));
        }
Example #5
0
        protected int MovemWordM2r(int opcode)
        {
            int      reglist = cpu.FetchPCWord();
            IOperand src     = cpu.ResolveSrcEA((opcode >> 3) & 0x07, opcode & 0x07, Size.Word);
            int      address = src.GetComputedAddress();
            int      count;

            if (((opcode >> 3) & 0x07) == 3)
            {
                count = GetMultipleWordPostInc(opcode & 0x07, reglist, address);
            }
            else
            {
                count = GetMultipleWord(reglist, address);
            }

            return(M2R_Timing[src.Index()] + (count << 2));
        }
Example #6
0
        protected int Jsr(int opcode)
        {
            int      mode = (opcode >> 3) & 0x07;
            int      reg  = (opcode & 0x07);
            IOperand op   = cpu.ResolveSrcEA(mode, reg, Size.SizeLong);

            cpu.PushLong(cpu.GetPC());
            cpu.SetPC(op.GetComputedAddress());
            int idx;

            if (mode == 7)
            {
                idx = mode + reg;
            }
            else
            {
                idx = mode;
            }
            return(TIMING[idx]);
        }