Main Page | Class Hierarchy | Compound List | File List | Compound Members | File Members | Related Pages

CPU_emulline.i File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Defines

#define read_byte_imm()   (*pc++)
#define read_adr_zero()   ((uint16)read_byte_imm())
#define read_adr_zero_x()   ((read_byte_imm() + x) & 0xff)
#define read_adr_zero_y()   ((read_byte_imm() + y) & 0xff)
#define read_adr_abs()   (adr = ((*(pc+1)) << 8) | *pc, pc+=2, adr)
#define read_adr_abs_x()   (read_adr_abs() + x)
#define read_adr_abs_y()   (read_adr_abs() + y)
#define read_adr_ind_x()   (read_zp_word(read_byte_imm() + x))
#define read_adr_ind_y()   (read_zp_word(read_byte_imm()) + y)
#define read_byte_zero()   read_zp(read_adr_zero())
#define read_byte_zero_x()   read_zp(read_adr_zero_x())
#define read_byte_zero_y()   read_zp(read_adr_zero_y())
#define read_byte_abs()   read_byte(read_adr_abs())
#define read_byte_abs_x()   read_byte(read_adr_abs_x())
#define read_byte_abs_y()   read_byte(read_adr_abs_y())
#define read_byte_ind_y()   read_byte(read_adr_ind_y())
#define read_byte_ind_x()   read_byte(read_adr_ind_x())
#define set_nz(x)   (z_flag = n_flag = (uint8)(x))
#define ENDOP(cyc)   last_cycles = cyc; break;
#define Branch(flag)
#define ShiftLeftOr
#define RoLeftAnd
#define ShiftRightEor
#define RoRightAdc
#define DecCompare
#define read_byte_imm()   read_byte(pc++)
#define read_adr_zero()   ((uint16)read_byte_imm())
#define read_adr_zero_x()   ((read_byte_imm() + x) & 0xff)
#define read_adr_zero_y()   ((read_byte_imm() + y) & 0xff)
#define read_adr_abs()   (adr = read_word(pc), pc+=2, adr)
#define read_adr_abs_x()   (read_adr_abs() + x)
#define read_adr_abs_y()   (read_adr_abs() + y)
#define read_adr_ind_x()   (read_zp_word(read_byte_imm() + x))
#define read_adr_ind_y()   (read_zp_word(read_byte_imm()) + y)
#define read_byte_zero()   read_zp(read_adr_zero())
#define read_byte_zero_x()   read_zp(read_adr_zero_x())
#define read_byte_zero_y()   read_zp(read_adr_zero_y())
#define read_byte_abs()   read_byte(read_adr_abs())
#define read_byte_abs_x()   read_byte(read_adr_abs_x())
#define read_byte_abs_y()   read_byte(read_adr_abs_y())
#define read_byte_ind_y()   read_byte(read_adr_ind_y())
#define read_byte_ind_x()   read_byte(read_adr_ind_x())
#define set_nz(x)   (z_flag = n_flag = (uint8)(x))
#define ENDOP(cyc)   last_cycles = cyc; break;
#define Branch(flag)
#define ShiftLeftOr
#define RoLeftAnd
#define ShiftRightEor
#define RoRightAdc
#define DecCompare
#define read_byte_imm()   (*pc++)
#define read_adr_zero()   ((uint16)read_byte_imm())
#define read_adr_zero_x()   ((read_byte_imm() + x) & 0xff)
#define read_adr_zero_y()   ((read_byte_imm() + y) & 0xff)
#define read_adr_abs()   (adr = ((*(pc+1)) << 8) | *pc, pc+=2, adr)
#define read_adr_abs_x()   (read_adr_abs() + x)
#define read_adr_abs_y()   (read_adr_abs() + y)
#define read_adr_ind_x()   (read_zp_word(read_byte_imm() + x))
#define read_adr_ind_y()   (read_zp_word(read_byte_imm()) + y)
#define read_byte_zero()   read_zp(read_adr_zero())
#define read_byte_zero_x()   read_zp(read_adr_zero_x())
#define read_byte_zero_y()   read_zp(read_adr_zero_y())
#define read_byte_abs()   read_byte(read_adr_abs())
#define read_byte_abs_x()   read_byte(read_adr_abs_x())
#define read_byte_abs_y()   read_byte(read_adr_abs_y())
#define read_byte_ind_y()   read_byte(read_adr_ind_y())
#define read_byte_ind_x()   read_byte(read_adr_ind_x())
#define set_nz(x)   (z_flag = n_flag = (uint8)(x))
#define ENDOP(cyc)   last_cycles = cyc; break;
#define Branch(flag)
#define ShiftLeftOr
#define RoLeftAnd
#define ShiftRightEor
#define RoRightAdc
#define DecCompare

Functions

 while ((cycles_left-=last_cycles) >=0)


Define Documentation

#define Branch flag   ) 
 

Value:

if (flag) { \
                pc += (int8)*pc + 1; \
                ENDOP(3); \
        } else { \
                pc++; \
                ENDOP(2); \
        }

#define Branch flag   ) 
 

Value:

if (flag) { \
                uint16 old_pc = pc; \
                pc += (int8)read_byte(pc) + 1; \
                if ((pc ^ old_pc) & 0xff00) { \
                        ENDOP(4); \
                } else { \
                        ENDOP(3); \
                } \
        } else { \
                pc++; \
                ENDOP(2); \
        }

#define Branch flag   ) 
 

Value:

if (flag) { \
                pc += (int8)*pc + 1; \
                ENDOP(3); \
        } else { \
                pc++; \
                ENDOP(2); \
        }

#define DecCompare
 

Value:

set_nz(adr = a - tmp); \
        c_flag = adr < 0x100;

#define DecCompare
 

Value:

set_nz(adr = a - tmp); \
        c_flag = adr < 0x100;

#define DecCompare
 

Value:

set_nz(adr = a - tmp); \
        c_flag = adr < 0x100;

#define ENDOP cyc   )     last_cycles = cyc; break;
 

Definition at line 106 of file CPU_emulline.i.

#define ENDOP cyc   )     last_cycles = cyc; break;
 

Definition at line 106 of file CPU_emulline.i.

#define ENDOP cyc   )     last_cycles = cyc; break;
 

Definition at line 106 of file CPU_emulline.i.

Referenced by while().

 
#define read_adr_abs  )     (adr = ((*(pc+1)) << 8) | *pc, pc+=2, adr)
 

Definition at line 38 of file CPU_emulline.i.

 
#define read_adr_abs  )     (adr = read_word(pc), pc+=2, adr)
 

Definition at line 38 of file CPU_emulline.i.

 
#define read_adr_abs  )     (adr = ((*(pc+1)) << 8) | *pc, pc+=2, adr)
 

Definition at line 38 of file CPU_emulline.i.

Referenced by while().

 
#define read_adr_abs_x  )     (read_adr_abs() + x)
 

Definition at line 42 of file CPU_emulline.i.

 
#define read_adr_abs_x  )     (read_adr_abs() + x)
 

Definition at line 42 of file CPU_emulline.i.

 
#define read_adr_abs_x  )     (read_adr_abs() + x)
 

Definition at line 42 of file CPU_emulline.i.

Referenced by while().

 
#define read_adr_abs_y  )     (read_adr_abs() + y)
 

Definition at line 45 of file CPU_emulline.i.

 
#define read_adr_abs_y  )     (read_adr_abs() + y)
 

Definition at line 45 of file CPU_emulline.i.

 
#define read_adr_abs_y  )     (read_adr_abs() + y)
 

Definition at line 45 of file CPU_emulline.i.

Referenced by while().

 
#define read_adr_ind_x  )     (read_zp_word(read_byte_imm() + x))
 

Definition at line 48 of file CPU_emulline.i.

 
#define read_adr_ind_x  )     (read_zp_word(read_byte_imm() + x))
 

Definition at line 48 of file CPU_emulline.i.

 
#define read_adr_ind_x  )     (read_zp_word(read_byte_imm() + x))
 

Definition at line 48 of file CPU_emulline.i.

Referenced by while().

 
#define read_adr_ind_y  )     (read_zp_word(read_byte_imm()) + y)
 

Definition at line 51 of file CPU_emulline.i.

 
#define read_adr_ind_y  )     (read_zp_word(read_byte_imm()) + y)
 

Definition at line 51 of file CPU_emulline.i.

 
#define read_adr_ind_y  )     (read_zp_word(read_byte_imm()) + y)
 

Definition at line 51 of file CPU_emulline.i.

Referenced by while().

 
#define read_adr_zero  )     ((uint16)read_byte_imm())
 

Definition at line 22 of file CPU_emulline.i.

 
#define read_adr_zero  )     ((uint16)read_byte_imm())
 

Definition at line 22 of file CPU_emulline.i.

 
#define read_adr_zero  )     ((uint16)read_byte_imm())
 

Definition at line 22 of file CPU_emulline.i.

Referenced by while().

 
#define read_adr_zero_x  )     ((read_byte_imm() + x) & 0xff)
 

Definition at line 25 of file CPU_emulline.i.

 
#define read_adr_zero_x  )     ((read_byte_imm() + x) & 0xff)
 

Definition at line 25 of file CPU_emulline.i.

 
#define read_adr_zero_x  )     ((read_byte_imm() + x) & 0xff)
 

Definition at line 25 of file CPU_emulline.i.

Referenced by while().

 
#define read_adr_zero_y  )     ((read_byte_imm() + y) & 0xff)
 

Definition at line 28 of file CPU_emulline.i.

 
#define read_adr_zero_y  )     ((read_byte_imm() + y) & 0xff)
 

Definition at line 28 of file CPU_emulline.i.

 
#define read_adr_zero_y  )     ((read_byte_imm() + y) & 0xff)
 

Definition at line 28 of file CPU_emulline.i.

Referenced by while().

 
#define read_byte_abs  )     read_byte(read_adr_abs())
 

Definition at line 63 of file CPU_emulline.i.

 
#define read_byte_abs  )     read_byte(read_adr_abs())
 

Definition at line 63 of file CPU_emulline.i.

 
#define read_byte_abs  )     read_byte(read_adr_abs())
 

Definition at line 63 of file CPU_emulline.i.

Referenced by while().

 
#define read_byte_abs_x  )     read_byte(read_adr_abs_x())
 

Definition at line 82 of file CPU_emulline.i.

 
#define read_byte_abs_x  )     read_byte(read_adr_abs_x())
 

Definition at line 82 of file CPU_emulline.i.

 
#define read_byte_abs_x  )     read_byte(read_adr_abs_x())
 

Definition at line 82 of file CPU_emulline.i.

Referenced by while().

 
#define read_byte_abs_y  )     read_byte(read_adr_abs_y())
 

Definition at line 85 of file CPU_emulline.i.

 
#define read_byte_abs_y  )     read_byte(read_adr_abs_y())
 

Definition at line 85 of file CPU_emulline.i.

 
#define read_byte_abs_y  )     read_byte(read_adr_abs_y())
 

Definition at line 85 of file CPU_emulline.i.

Referenced by while().

 
#define read_byte_imm  )     (*pc++)
 

Definition at line 18 of file CPU_emulline.i.

 
#define read_byte_imm  )     read_byte(pc++)
 

Definition at line 18 of file CPU_emulline.i.

 
#define read_byte_imm  )     (*pc++)
 

Definition at line 18 of file CPU_emulline.i.

Referenced by MOS6510::EmulateLine(), MOS6502_1541::EmulateLine(), and while().

 
#define read_byte_ind_x  )     read_byte(read_adr_ind_x())
 

Definition at line 92 of file CPU_emulline.i.

 
#define read_byte_ind_x  )     read_byte(read_adr_ind_x())
 

Definition at line 92 of file CPU_emulline.i.

 
#define read_byte_ind_x  )     read_byte(read_adr_ind_x())
 

Definition at line 92 of file CPU_emulline.i.

Referenced by while().

 
#define read_byte_ind_y  )     read_byte(read_adr_ind_y())
 

Definition at line 88 of file CPU_emulline.i.

 
#define read_byte_ind_y  )     read_byte(read_adr_ind_y())
 

Definition at line 88 of file CPU_emulline.i.

 
#define read_byte_ind_y  )     read_byte(read_adr_ind_y())
 

Definition at line 88 of file CPU_emulline.i.

Referenced by while().

 
#define read_byte_zero  )     read_zp(read_adr_zero())
 

Definition at line 54 of file CPU_emulline.i.

 
#define read_byte_zero  )     read_zp(read_adr_zero())
 

Definition at line 54 of file CPU_emulline.i.

 
#define read_byte_zero  )     read_zp(read_adr_zero())
 

Definition at line 54 of file CPU_emulline.i.

Referenced by while().

 
#define read_byte_zero_x  )     read_zp(read_adr_zero_x())
 

Definition at line 57 of file CPU_emulline.i.

 
#define read_byte_zero_x  )     read_zp(read_adr_zero_x())
 

Definition at line 57 of file CPU_emulline.i.

 
#define read_byte_zero_x  )     read_zp(read_adr_zero_x())
 

Definition at line 57 of file CPU_emulline.i.

Referenced by while().

 
#define read_byte_zero_y  )     read_zp(read_adr_zero_y())
 

Definition at line 60 of file CPU_emulline.i.

 
#define read_byte_zero_y  )     read_zp(read_adr_zero_y())
 

Definition at line 60 of file CPU_emulline.i.

 
#define read_byte_zero_y  )     read_zp(read_adr_zero_y())
 

Definition at line 60 of file CPU_emulline.i.

Referenced by while().

#define RoLeftAnd
 

Value:

tmpb = BOOL_BIT(tmp, 0x80); \
        tmp = c_flag ? (tmp << 1) | 0x01 : tmp << 1; \
        set_nz(a &= tmp); \
        c_flag = tmpb;

#define RoLeftAnd
 

Value:

tmpb = BOOL_BIT(tmp, 0x80); \
        tmp = c_flag ? (tmp << 1) | 0x01 : tmp << 1; \
        set_nz(a &= tmp); \
        c_flag = tmpb;

#define RoLeftAnd
 

Value:

tmpb = BOOL_BIT(tmp, 0x80); \
        tmp = c_flag ? (tmp << 1) | 0x01 : tmp << 1; \
        set_nz(a &= tmp); \
        c_flag = tmpb;

#define RoRightAdc
 

Value:

tmpb = BOOL_BIT(tmp, 0x01); \
        tmp = c_flag ? (tmp >> 1) | 0x80 : tmp >> 1; \
        c_flag = tmpb; \
        do_adc(tmp);

#define RoRightAdc
 

Value:

tmpb = BOOL_BIT(tmp, 0x01); \
        tmp = c_flag ? (tmp >> 1) | 0x80 : tmp >> 1; \
        c_flag = tmpb; \
        do_adc(tmp);

#define RoRightAdc
 

Value:

tmpb = BOOL_BIT(tmp, 0x01); \
        tmp = c_flag ? (tmp >> 1) | 0x80 : tmp >> 1; \
        c_flag = tmpb; \
        do_adc(tmp);

#define set_nz  )     (z_flag = n_flag = (uint8)(x))
 

Definition at line 99 of file CPU_emulline.i.

#define set_nz  )     (z_flag = n_flag = (uint8)(x))
 

Definition at line 99 of file CPU_emulline.i.

#define set_nz  )     (z_flag = n_flag = (uint8)(x))
 

Definition at line 99 of file CPU_emulline.i.

Referenced by MOS6510::EmulateLine(), switch(), and while().

#define ShiftLeftOr
 

Value:

c_flag = BOOL_BIT(tmp, 0x80); \
        tmp <<= 1; \
        set_nz(a |= tmp);

#define ShiftLeftOr
 

Value:

c_flag = BOOL_BIT(tmp, 0x80); \
        tmp <<= 1; \
        set_nz(a |= tmp);

#define ShiftLeftOr
 

Value:

c_flag = BOOL_BIT(tmp, 0x80); \
        tmp <<= 1; \
        set_nz(a |= tmp);

#define ShiftRightEor
 

Value:

c_flag = tmp & 0x01; \
        tmp >>= 1; \
        set_nz(a ^= tmp);

#define ShiftRightEor
 

Value:

c_flag = tmp & 0x01; \
        tmp >>= 1; \
        set_nz(a ^= tmp);

#define ShiftRightEor
 

Value:

c_flag = tmp & 0x01; \
        tmp >>= 1; \
        set_nz(a ^= tmp);


Function Documentation

while (cycles_left-=last_cycles) >=  0  ) 
 

Definition at line 128 of file CPU_emulline.i.

References BOOL_BIT, ENDOP, pop_byte, pop_flags, push_byte, push_flags, read_adr_abs, read_adr_abs_x, read_adr_abs_y, read_adr_ind_x, read_adr_ind_y, read_adr_zero, read_adr_zero_x, read_adr_zero_y, read_byte_abs, read_byte_abs_x, read_byte_abs_y, read_byte_imm, read_byte_ind_x, read_byte_ind_y, read_byte_zero, read_byte_zero_x, read_byte_zero_y, set_nz, and uint8.


Generated on Tue Feb 8 04:09:24 2005 for E32frodo by doxygen 1.3.3