public class MOS6510 extends C64Environment
| Modifier and Type | Class and Description |
|---|---|
protected static interface |
MOS6510.IFunc
Resolve use of function pointer
|
protected static class |
MOS6510.Interrupts |
protected static class |
MOS6510.ProcessorCycle |
protected static class |
MOS6510.ProcessorOperations
Declare processor operations
|
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
aec
Address Controller, blocks reads
|
protected short |
Cycle_Data |
protected int |
Cycle_EffectiveAddress |
protected int |
Cycle_Pointer |
protected byte |
cycleCount |
protected short |
Debug_Data |
protected int |
Debug_EffectiveAddress |
protected short |
Debug_Opcode |
protected int |
Debug_Operand |
protected int |
Debug_ProgramCounter |
protected boolean |
dodump |
protected Event |
event
Resolve multiple inheritance
|
protected IEventContext |
eventContext |
protected MOS6510.ProcessorCycle |
fetchCycle |
static int |
iIRQ |
static int |
iIRQSMAX |
static int |
iNMI |
static int |
iNONE |
protected int |
Instr_Operand |
protected MOS6510.ProcessorOperations |
instrCurrent |
protected short |
instrOpcode |
protected int |
instrStartPC |
protected MOS6510.ProcessorOperations[] |
instrTable |
protected MOS6510.Interrupts |
interrupts |
protected MOS6510.ProcessorOperations[] |
interruptTable |
static int |
iRST |
protected byte |
lastAddrCycle |
protected boolean |
m_blocked |
protected long |
m_dbgClk |
protected Event.event_phase_t |
m_extPhase
Clock phase when external events appear
|
protected Event.event_phase_t |
m_phase
Clock phase in use by the processor
|
protected long |
m_stealingClk |
protected static Logger |
MOS6510 |
static String |
MOS6510_AUTHOR |
static String |
MOS6510_DATE |
static String |
MOS6510_EMAIL |
static int |
MOS6510_INTERRUPT_DELAY |
static String |
MOS6510_VERSION |
static int |
oIRQ |
static int |
oNMI |
static int |
oNONE |
static int |
oRST |
static boolean |
PC64_TESTSUITE |
protected MOS6510.ProcessorCycle[] |
procCycle |
protected short |
Register_Accumulator |
protected short |
Register_c_Flag |
protected short |
Register_n_Flag |
protected long |
Register_ProgramCounter |
protected int |
Register_StackPointer |
protected short |
Register_Status |
protected short |
Register_v_Flag |
protected short |
Register_X |
protected short |
Register_Y |
protected short |
Register_z_Flag |
static short |
SP_PAGE |
static int |
SR_BREAK |
static int |
SR_CARRY |
static int |
SR_DECIMAL |
static int |
SR_INTERRUPT |
static int |
SR_NEGATIVE |
static int |
SR_NOTUSED |
static int |
SR_OVERFLOW |
static int |
SR_ZERO |
| Constructor and Description |
|---|
MOS6510(IEventContext context)
Initialize and create CPU Chip
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
adc_instr() |
void |
aecSignal(boolean state)
Handle bus access signals
|
protected void |
alr_instr()
Undocumented - This opcode ANDs the contents of the A register with an
immediate value and then LSRs the result.
|
protected void |
anc_instr()
Undocumented - ANC ANDs the contents of the A register with an immediate
value and then moves bit 7 of A into the Carry flag.
|
protected void |
and_instr() |
protected void |
ane_instr() |
protected void |
arr_instr()
Undocumented - This opcode ANDs the contents of the A register with an
immediate value and then RORs the result (Implementation based on that of
Frodo C64 Emulator)
|
protected void |
asl_instr() |
protected void |
asla_instr() |
protected void |
aso_instr()
Undocumented - This opcode ASLs the contents of a memory location and
then ORs the result with the accumulator.
|
protected void |
axa_instr()
Undocumented - This opcode stores the result of A AND X AND the high byte
of the target address of the operand +1 in memory.
|
protected void |
axs_instr()
Undocumented - AXS ANDs the contents of the A and X registers (without
changing the contents of either register) and stores the result in
memory.
|
protected void |
bcc_instr() |
protected void |
bcs_instr() |
protected void |
beq_instr() |
protected void |
bit_instr() |
protected void |
bmi_instr() |
protected void |
bne_instr() |
protected void |
bpl_instr() |
protected void |
branch_instr(boolean condition) |
protected void |
branch2_instr() |
protected void |
brk_instr() |
protected void |
bvc_instr() |
protected void |
bvs_instr() |
protected void |
clc_instr() |
protected void |
cld_instr() |
void |
clearIRQ() |
protected void |
cli_instr() |
protected void |
clock()
Emulate One Complete Cycle
|
protected void |
clv_instr() |
protected void |
cmp_instr() |
protected void |
cpx_instr() |
protected void |
cpy_instr() |
void |
credits(StringBuffer sbuffer)
Module Credits
|
protected void |
dcm_instr()
Undocumented - This opcode DECs the contents of a memory location and
then CMPs the result with the A register.
|
void |
debug(boolean enable) |
protected void |
DebugCycle() |
protected void |
dec_instr() |
protected void |
dex_instr() |
protected void |
dey_instr() |
void |
DumpState() |
protected void |
eor_instr() |
protected void |
FetchDataByte()
Fetch value, increment PC
Addressing Modes: Immediate Relative |
protected void |
FetchEffAddrDataByte() |
protected void |
FetchHighAddr()
Fetch high address byte, increment PC (Absolute Addressing)
Low byte must have been obtained first! |
protected void |
FetchHighAddrX()
Fetch high byte of address, add index register X to low address byte,
increment PC Addressing Modes: Absolute Indexed |
protected void |
FetchHighAddrX2()
Same as above except dosen't worry about page crossing
|
protected void |
FetchHighAddrY()
Fetch high byte of address, add index register Y to low address byte,
increment PC Addressing Modes: Absolute Indexed |
protected void |
FetchHighAddrY2()
Same as above except dosen't worry about page crossing
|
protected void |
FetchHighEffAddr()
Fetch effective address high
Addressing Modes: Indirect Indexed Indirect (pre X) |
protected void |
FetchHighEffAddrY()
Fetch effective address high, add Y to low byte of effective address
Addressing Modes: Indirect indexed (post Y) |
protected void |
FetchHighEffAddrY2()
Same as above except dosen't worry about page crossing
|
protected void |
FetchHighPointer()
Fetch pointer address high, increment PC
Addressing Modes: Absolute Indirect |
protected void |
FetchLowAddr()
Fetch low address byte, increment PC
Addressing Modes: Stack Manipulation Absolute Zero Page Zero Page Indexed Absolute Indexed Absolute Indirect |
protected void |
FetchLowAddrX()
Read from address, add index register X to it
Addressing Modes: Zero Page Indexed |
protected void |
FetchLowAddrY()
Read from address, add index register Y to it
Addressing Modes: Zero Page Indexed |
protected void |
FetchLowEffAddr()
Fetch effective address low
Addressing Modes: Indirect Indexed Indirect (pre X) Indirect indexed (post Y) |
protected void |
FetchLowPointer()
Fetch pointer address low, increment PC
Addressing Modes: Absolute Indirect Indirect indexed (post Y) |
protected void |
FetchLowPointerX()
Read pointer from the address and add X to it
Addressing Modes: Indexed Indirect (pre X) |
protected void |
FetchOpcode()
Fetch opcode, increment PC
Addressing Modes: All |
protected void |
illegal_instr() |
protected void |
inc_instr() |
protected void |
Initialise()
Initialize CPU Emulation (Registers)
|
protected void |
ins_instr()
Undocumented - This opcode INCs the contents of a memory location and
then SBCs the result from the A register.
|
protected boolean |
interruptPending() |
protected void |
inx_instr() |
protected void |
iny_instr() |
protected void |
IRQ1Request() |
protected void |
IRQ2Request() |
protected void |
IRQRequest_sidplay_irq()
Overridden in the Sub-class SID6510 for Sidplay compatibility
|
protected void |
IRQRequest() |
protected void |
jmp_instr() |
protected void |
jsr_instr() |
protected void |
las_instr()
Undocumented - This opcode ANDs the contents of a memory location with
the contents of the stack pointer register and stores the result in the
accumulator, the X register, and the stack pointer.
|
protected void |
lax_instr()
Undocumented - This opcode loads both the accumulator and the X register
with the contents of a memory location.
|
protected void |
lda_instr() |
protected void |
ldx_instr() |
protected void |
ldy_instr() |
protected void |
lse_instr()
Undocumented - LSE LSRs the contents of a memory location and then EORs
the result with the accumulator.
|
protected void |
lsr_instr() |
protected void |
lsra_instr() |
protected void |
NextInstr() |
protected void |
NMI1Request() |
protected void |
NMIRequest() |
protected void |
oal_instr()
Undocumented - This opcode ORs the A register with #xx, ANDs the result
with an immediate value, and then stores the result in both A and X. xx
may be EE,EF,FE, OR FF, but most emulators seem to use EE
|
protected void |
ora_instr() |
protected void |
Perform_ADC() |
protected void |
Perform_SBC() |
protected void |
pha_instr() |
protected void |
pla_instr() |
protected void |
PopHighPC()
Increment stack and pull program counter high byte from stack,
|
protected void |
PopLowPC()
Increment stack and pull program counter low byte from stack,
|
protected void |
PopSR_sidplay_rti()
Overridden in the Sub-class SID6510 for Sidplay compatibility
|
protected void |
PopSR()
increment S, Pop P off stack
|
protected void |
PushHighPC_sidplay_brk()
Overridden in the Sub-class SID6510 for Sidplay compatibility
|
protected void |
PushHighPC()
Push Program Counter High Byte on stack, decrement S
|
protected void |
PushLowPC()
Push Program Counter Low Byte on stack, decrement S
|
protected void |
PushSR() |
protected void |
PushSR(boolean b_flag)
Push P on stack, decrement S
|
protected void |
PutEffAddrDataByte() |
void |
reset()
Reset CPU Emulation
|
protected void |
rla_instr()
Undocumented - RLA ROLs the contents of a memory location and then ANDs
the result with the accumulator.
|
protected void |
rol_instr() |
protected void |
rola_instr() |
protected void |
ror_instr() |
protected void |
rora_instr() |
protected void |
rra_instr()
Undocumented - RRA RORs the contents of a memory location and then ADCs
the result with the accumulator.
|
protected void |
RSTRequest() |
protected void |
rti_instr()
RTI does not delay the IRQ I flag change as it is set 3 cycles before the
end of the opcode, and thus the 6510 has enough time to call the
interrupt routine as soon as the opcode ends, if necessary.
|
protected void |
rts_instr() |
protected void |
say_instr()
Undocumented - This opcode ANDs the contents of the Y register with
<ab+1> and stores the result in memory.
|
protected void |
sbc_instr() |
protected void |
sbx_instr() |
protected void |
sec_instr() |
protected void |
sed_instr() |
protected void |
sei_instr() |
protected void |
shs_instr()
Generic Instruction Undocumented Opcodes See documented 6502-nmo.opc by
Adam Vardy for more details
|
protected void |
sta_instr() |
protected void |
stx_instr() |
protected void |
sty_instr() |
protected void |
tas_instr()
Undocumented - This opcode ANDs the contents of the A and X registers
(without changing the contents of either register) and transfers the
result to the stack pointer.
|
protected void |
tax_instr() |
protected void |
tay_instr() |
void |
triggerIRQ()
Level triggered interrupt
|
void |
triggerNMI() |
void |
triggerRST() |
protected void |
tsx_instr() |
protected void |
txa_instr() |
protected void |
txs_instr() |
protected void |
tya_instr() |
protected void |
WasteCycle() |
protected void |
xas_instr()
Undocumented - This opcode ANDs the contents of the X register with
<ab+1> and stores the result in memory.
|
envCheckBankJump, envClearIRQ, envLoadFile, envReadMemByte, envReadMemDataByte, envReset, envSleep, envTriggerIRQ, envTriggerNMI, envTriggerRST, envWriteMemByte, setEnvironmentpublic static final String MOS6510_VERSION
public static final String MOS6510_DATE
public static final String MOS6510_AUTHOR
public static final String MOS6510_EMAIL
public static final int MOS6510_INTERRUPT_DELAY
public static final int SR_NEGATIVE
public static final int SR_OVERFLOW
public static final int SR_NOTUSED
public static final int SR_BREAK
public static final int SR_DECIMAL
public static final int SR_INTERRUPT
public static final int SR_ZERO
public static final int SR_CARRY
public static final short SP_PAGE
public static final boolean PC64_TESTSUITE
protected boolean aec
protected boolean m_blocked
protected long m_stealingClk
protected long m_dbgClk
protected static final Logger MOS6510
protected boolean dodump
protected IEventContext eventContext
protected Event.event_phase_t m_phase
protected Event.event_phase_t m_extPhase
protected MOS6510.ProcessorCycle fetchCycle
protected MOS6510.ProcessorCycle[] procCycle
protected MOS6510.ProcessorOperations[] instrTable
protected MOS6510.ProcessorOperations[] interruptTable
protected MOS6510.ProcessorOperations instrCurrent
protected int instrStartPC
protected short instrOpcode
protected byte lastAddrCycle
protected byte cycleCount
protected int Cycle_EffectiveAddress
protected short Cycle_Data
protected int Cycle_Pointer
protected short Register_Accumulator
protected short Register_X
protected short Register_Y
protected long Register_ProgramCounter
protected short Register_Status
protected short Register_c_Flag
protected short Register_n_Flag
protected short Register_v_Flag
protected short Register_z_Flag
protected int Register_StackPointer
protected int Instr_Operand
protected MOS6510.Interrupts interrupts
protected short Debug_Data
protected int Debug_EffectiveAddress
protected short Debug_Opcode
protected int Debug_Operand
protected int Debug_ProgramCounter
protected Event event
public static final int iIRQSMAX
public static final int oNONE
public static final int oRST
public static final int oNMI
public static final int oIRQ
public static final int iNONE
public static final int iRST
public static final int iNMI
public static final int iIRQ
public MOS6510(IEventContext context)
context - protected void clock()
protected void Initialise()
protected void RSTRequest()
protected void NMIRequest()
protected void NMI1Request()
protected void IRQRequest()
protected void IRQ1Request()
protected void IRQ2Request()
protected boolean interruptPending()
protected void FetchOpcode()
protected void NextInstr()
protected void FetchDataByte()
protected void FetchLowAddr()
protected void FetchLowAddrX()
protected void FetchLowAddrY()
protected void FetchHighAddr()
protected void FetchHighAddrX()
protected void FetchHighAddrX2()
protected void FetchHighAddrY()
protected void FetchHighAddrY2()
protected void FetchLowEffAddr()
protected void FetchHighEffAddr()
protected void FetchHighEffAddrY()
protected void FetchHighEffAddrY2()
protected void FetchLowPointer()
protected void FetchLowPointerX()
protected void FetchHighPointer()
protected void FetchEffAddrDataByte()
protected void PutEffAddrDataByte()
protected void PushLowPC()
protected void PushHighPC()
protected void PushSR(boolean b_flag)
b_flag - protected void PushSR()
protected void PopLowPC()
protected void PopHighPC()
protected void PopSR()
protected void WasteCycle()
protected void DebugCycle()
protected void adc_instr()
protected void alr_instr()
protected void anc_instr()
protected void and_instr()
protected void ane_instr()
protected void arr_instr()
protected void asl_instr()
protected void asla_instr()
protected void aso_instr()
protected void axa_instr()
protected void axs_instr()
protected void bcc_instr()
protected void bcs_instr()
protected void beq_instr()
protected void bit_instr()
protected void bmi_instr()
protected void bne_instr()
protected void branch_instr(boolean condition)
protected void branch2_instr()
protected void bpl_instr()
protected void brk_instr()
protected void bvc_instr()
protected void bvs_instr()
protected void clc_instr()
protected void cld_instr()
protected void cli_instr()
protected void clv_instr()
protected void cmp_instr()
protected void cpx_instr()
protected void cpy_instr()
protected void dcm_instr()
protected void dec_instr()
protected void dex_instr()
protected void dey_instr()
protected void eor_instr()
protected void inc_instr()
protected void ins_instr()
protected void inx_instr()
protected void iny_instr()
protected void jmp_instr()
protected void jsr_instr()
protected void las_instr()
protected void lax_instr()
protected void lda_instr()
protected void ldx_instr()
protected void ldy_instr()
protected void lse_instr()
protected void lsr_instr()
protected void lsra_instr()
protected void oal_instr()
protected void ora_instr()
protected void pha_instr()
protected void pla_instr()
protected void rla_instr()
protected void rol_instr()
protected void rola_instr()
protected void ror_instr()
protected void rora_instr()
protected void rra_instr()
protected void rti_instr()
protected void rts_instr()
protected void sbx_instr()
protected void say_instr()
protected void sbc_instr()
protected void sec_instr()
protected void sed_instr()
protected void sei_instr()
protected void shs_instr()
protected void sta_instr()
protected void stx_instr()
protected void sty_instr()
protected void tas_instr()
protected void tax_instr()
protected void tay_instr()
protected void tsx_instr()
protected void txa_instr()
protected void txs_instr()
protected void tya_instr()
protected void xas_instr()
protected void illegal_instr()
protected void Perform_ADC()
protected void Perform_SBC()
protected void IRQRequest_sidplay_irq()
protected void PushHighPC_sidplay_brk()
protected void PopSR_sidplay_rti()
public void reset()
public void credits(StringBuffer sbuffer)
sbuffer - public void DumpState()
public void aecSignal(boolean state)
state - public void triggerRST()
public void triggerNMI()
public void triggerIRQ()
public void clearIRQ()
public void debug(boolean enable)
Copyright © 2014. All rights reserved.