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

MOS6510 Class Reference

#include <CPUC64.h>

Collaboration diagram for MOS6510:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MOS6510 (C64 *c64, uint8 *Ram, uint8 *Basic, uint8 *Kernal, uint8 *Char, uint8 *Color)
 ~MOS6510 ()
int EmulateLine (int cycles_left)
void Reset (void)
void AsyncReset (void)
void AsyncNMI (void)
void GetState (MOS6510State *s)
void SetState (MOS6510State *s)
uint8 ExtReadByte (uint16 adr)
void ExtWriteByte (uint16 adr, uint8 byte)
uint8 REUReadByte (uint16 adr)
void REUWriteByte (uint16 adr, uint8 byte)
void TriggerVICIRQ (void)
void ClearVICIRQ (void)
void TriggerCIAIRQ (void)
void ClearCIAIRQ (void)
void TriggerNMI (void)
void ClearNMI (void)

Public Attributes

int ExtConfig
MOS6569TheVIC
MOS6581TheSID
MOS6526_1TheCIA1
MOS6526_2TheCIA2
REUTheREU
IECTheIEC

Private Member Functions

uint8 read_byte (uint16 adr)
uint8 read_byte_io (uint16 adr)
uint16 read_word (uint16 adr)
void write_byte (uint16 adr, uint8 byte)
void write_byte_io (uint16 adr, uint8 byte)
uint8 read_zp (uint16 adr)
uint16 read_zp_word (uint16 adr)
void write_zp (uint16 adr, uint8 byte)
void new_config (void)
void jump (uint16 adr)
void illegal_op (uint8 op, uint16 at)
void illegal_jump (uint16 at, uint16 to)
void do_adc (uint8 byte)
void do_sbc (uint8 byte)
uint8 read_emulator_id (uint16 adr)

Private Attributes

C64the_c64
uint8ram
uint8basic_rom
uint8kernal_rom
uint8char_rom
uint8color_ram
union {
   uint8   intr [4]
   unsigned long   intr_any
interrupt
bool nmi_state
uint8 n_flag
uint8 z_flag
bool v_flag
bool d_flag
bool i_flag
bool c_flag
uint8 a
uint8 x
uint8 y
uint8 sp
uint8pc
uint8pc_base
int borrowed_cycles
bool basic_in
bool kernal_in
bool char_in
bool io_in
uint8 dfff_byte

Constructor & Destructor Documentation

MOS6510::MOS6510 C64 c64,
uint8 Ram,
uint8 Basic,
uint8 Kernal,
uint8 Char,
uint8 Color
 

Definition at line 91 of file CPUC64.cpp.

References __CHECK_NULL, a, borrowed_cycles, c_flag, CTOR, d_flag, dfff_byte, i_flag, n_flag, sp, v_flag, x, y, and z_flag.

MOS6510::~MOS6510  ) 
 

Definition at line 112 of file CPUC64.cpp.

References DTOR.


Member Function Documentation

void MOS6510::AsyncNMI void   ) 
 

Definition at line 132 of file CPUC64.cpp.

References INT_NMI, interrupt, and nmi_state.

Referenced by C64::NMI().

void MOS6510::AsyncReset void   ) 
 

Definition at line 122 of file CPUC64.cpp.

References INT_RESET, and interrupt.

Referenced by C64::Reset().

void MOS6510::ClearCIAIRQ void   )  [inline]
 

Definition at line 208 of file CPUC64.h.

References INT_CIAIRQ, and interrupt.

Referenced by MOS6526_1::ReadRegister().

void MOS6510::ClearNMI void   )  [inline]
 

Definition at line 213 of file CPUC64.h.

References nmi_state.

Referenced by MOS6526_2::ReadRegister().

void MOS6510::ClearVICIRQ void   )  [inline]
 

Definition at line 203 of file CPUC64.h.

References INT_VICIRQ, and interrupt.

Referenced by MOS6569::WriteRegister().

void MOS6510::do_adc uint8  byte  )  [inline, private]
 

Definition at line 543 of file CPUC64.cpp.

References a, c_flag, d_flag, n_flag, uint16, uint8, v_flag, and z_flag.

void MOS6510::do_sbc uint8  byte  )  [inline, private]
 

Definition at line 580 of file CPUC64.cpp.

References a, c_flag, d_flag, n_flag, uint16, uint8, v_flag, and z_flag.

int MOS6510::EmulateLine int  cycles_left  ) 
 

Definition at line 797 of file CPUC64.cpp.

References a, BOOL_BIT, c_flag, i_flag, illegal_op(), IEC::In(), INT_CIAIRQ, INT_NMI, INT_RESET, INT_VICIRQ, interrupt, jump(), IEC::Out(), IEC::OutATN(), IEC::OutSec(), pc, pc_base, push_byte, push_flags, ram, read_byte_imm, read_word(), IEC::RelATN(), IEC::Release(), Reset(), set_nz, IEC::SetATN(), TheIEC, IEC::Turnaround(), uint16, and uint8.

Referenced by C64::thread_func().

uint8 MOS6510::ExtReadByte uint16  adr  ) 
 

Definition at line 416 of file CPUC64.cpp.

References basic_in, BOOL_BIT, char_in, ExtConfig, io_in, kernal_in, read_byte(), and uint8.

Referenced by SAMReadByte().

void MOS6510::ExtWriteByte uint16  adr,
uint8  byte
 

Definition at line 442 of file CPUC64.cpp.

References basic_in, BOOL_BIT, char_in, ExtConfig, io_in, kernal_in, and write_byte().

Referenced by SAMWriteByte().

void MOS6510::GetState MOS6510State s  ) 
 

Definition at line 618 of file CPUC64.cpp.

References a, MOS6510State::a, c_flag, d_flag, MOS6510State::ddr, dfff_byte, MOS6510State::dfff_byte, i_flag, MOS6510State::instruction_complete, INT_CIAIRQ, INT_NMI, INT_RESET, INT_VICIRQ, interrupt, MOS6510State::intr, n_flag, nmi_state, MOS6510State::nmi_state, MOS6510State::p, pc, MOS6510State::pc, pc_base, MOS6510State::pr, ram, sp, MOS6510State::sp, v_flag, x, MOS6510State::x, y, MOS6510State::y, and z_flag.

Referenced by SAM(), and C64::SaveCPUState().

void MOS6510::illegal_jump uint16  at,
uint16  to
[private]
 

Definition at line 739 of file CPUC64.cpp.

References Reset(), C64::Reset(), ShowRequester(), sprintf, and the_c64.

Referenced by jump().

void MOS6510::illegal_op uint8  op,
uint16  at
[private]
 

Definition at line 724 of file CPUC64.cpp.

References Reset(), C64::Reset(), ShowRequester(), sprintf, and the_c64.

Referenced by EmulateLine().

void MOS6510::jump uint16  adr  )  [private]
 

Definition at line 487 of file CPUC64.cpp.

References basic_in, basic_rom, char_in, char_rom, illegal_jump(), io_in, kernal_in, kernal_rom, pc, pc_base, and ram.

Referenced by EmulateLine(), Reset(), and SetState().

void MOS6510::new_config void   )  [private]
 

Definition at line 143 of file CPUC64.cpp.

References basic_in, BOOL_BIT, char_in, io_in, kernal_in, ram, and uint8.

Referenced by Reset(), SetState(), write_byte(), and write_zp().

uint8 MOS6510::read_byte uint16  adr  )  [private]
 

Definition at line 221 of file CPUC64.cpp.

References ram, read_byte_io(), and uint8.

Referenced by ExtReadByte(), read_word(), and REUReadByte().

uint8 MOS6510::read_byte_io uint16  adr  )  [inline, private]
 

Definition at line 159 of file CPUC64.cpp.

References basic_in, basic_rom, char_in, char_rom, color_ram, io_in, kernal_in, kernal_rom, ram, rand, read_emulator_id(), REU::ReadRegister(), MOS6526_2::ReadRegister(), MOS6526_1::ReadRegister(), MOS6581::ReadRegister(), MOS6569::ReadRegister(), TheCIA1, TheCIA2, TheREU, TheSID, TheVIC, and uint8.

Referenced by read_byte().

uint8 MOS6510::read_emulator_id uint16  adr  )  [private]
 

Definition at line 236 of file CPUC64.cpp.

References dfff_byte, frodo_id, FRODO_REVISION, FRODO_VERSION, and uint8.

Referenced by read_byte_io().

uint16 MOS6510::read_word uint16  adr  )  [inline, private]
 

Definition at line 303 of file CPUC64.cpp.

References read_byte(), and uint16.

Referenced by EmulateLine(), and Reset().

uint8 MOS6510::read_zp uint16  adr  )  [inline, private]
 

Definition at line 377 of file CPUC64.cpp.

References ram, and uint8.

uint16 MOS6510::read_zp_word uint16  adr  )  [inline, private]
 

Definition at line 387 of file CPUC64.cpp.

References ram, and uint16.

void MOS6510::Reset void   ) 
 

Definition at line 698 of file CPUC64.cpp.

References ELOG1, interrupt, jump(), new_config(), nmi_state, ram, and read_word().

Referenced by EmulateLine(), illegal_jump(), illegal_op(), and C64::Run().

uint8 MOS6510::REUReadByte uint16  adr  ) 
 

Definition at line 466 of file CPUC64.cpp.

References read_byte(), and uint8.

Referenced by REU::execute_dma().

void MOS6510::REUWriteByte uint16  adr,
uint8  byte
 

Definition at line 476 of file CPUC64.cpp.

References write_byte().

Referenced by REU::execute_dma().

void MOS6510::SetState MOS6510State s  ) 
 

Definition at line 655 of file CPUC64.cpp.

References MOS6510State::a, a, BOOL_BIT, c_flag, d_flag, MOS6510State::ddr, MOS6510State::dfff_byte, dfff_byte, i_flag, INT_CIAIRQ, INT_NMI, INT_RESET, INT_VICIRQ, interrupt, MOS6510State::intr, jump(), n_flag, new_config(), MOS6510State::nmi_state, nmi_state, MOS6510State::p, MOS6510State::pc, MOS6510State::pr, ram, MOS6510State::sp, sp, v_flag, MOS6510State::x, x, MOS6510State::y, y, and z_flag.

Referenced by C64::LoadCPUState(), and SAM().

void MOS6510::TriggerCIAIRQ void   )  [inline]
 

Definition at line 190 of file CPUC64.h.

References INT_CIAIRQ, and interrupt.

Referenced by MOS6526_1::TriggerInterrupt(), and MOS6526_1::WriteRegister().

void MOS6510::TriggerNMI void   )  [inline]
 

Definition at line 195 of file CPUC64.h.

References INT_NMI, interrupt, and nmi_state.

Referenced by MOS6526_2::TriggerInterrupt(), and MOS6526_2::WriteRegister().

void MOS6510::TriggerVICIRQ void   )  [inline]
 

Definition at line 185 of file CPUC64.h.

References INT_VICIRQ, and interrupt.

Referenced by MOS6569::el_sprites(), MOS6569::raster_irq(), MOS6569::TriggerLightpen(), and MOS6569::WriteRegister().

void MOS6510::write_byte uint16  adr,
uint8  byte
[inline, private]
 

Definition at line 362 of file CPUC64.cpp.

References new_config(), ram, and write_byte_io().

Referenced by ExtWriteByte(), and REUWriteByte().

void MOS6510::write_byte_io uint16  adr,
uint8  byte
[inline, private]
 

Definition at line 315 of file CPUC64.cpp.

References color_ram, REU::FF00Trigger(), io_in, ram, TheCIA1, TheCIA2, TheREU, TheSID, TheVIC, REU::WriteRegister(), MOS6526_2::WriteRegister(), MOS6526_1::WriteRegister(), MOS6581::WriteRegister(), and MOS6569::WriteRegister().

Referenced by write_byte().

void MOS6510::write_zp uint16  adr,
uint8  byte
[inline, private]
 

Definition at line 402 of file CPUC64.cpp.

References new_config(), and ram.


Member Data Documentation

uint8 MOS6510::a [private]
 

Definition at line 124 of file CPUC64.h.

Referenced by do_adc(), do_sbc(), EmulateLine(), GetState(), MOS6510(), and SetState().

bool MOS6510::basic_in [private]
 

Definition at line 143 of file CPUC64.h.

Referenced by ExtReadByte(), ExtWriteByte(), jump(), new_config(), and read_byte_io().

uint8* MOS6510::basic_rom [private]
 

Definition at line 114 of file CPUC64.h.

Referenced by jump(), and read_byte_io().

int MOS6510::borrowed_cycles [private]
 

Definition at line 140 of file CPUC64.h.

Referenced by MOS6510().

bool MOS6510::c_flag [private]
 

Definition at line 123 of file CPUC64.h.

Referenced by do_adc(), do_sbc(), EmulateLine(), GetState(), MOS6510(), and SetState().

bool MOS6510::char_in [private]
 

Definition at line 143 of file CPUC64.h.

Referenced by ExtReadByte(), ExtWriteByte(), jump(), new_config(), and read_byte_io().

uint8 * MOS6510::char_rom [private]
 

Definition at line 114 of file CPUC64.h.

Referenced by jump(), and read_byte_io().

uint8 * MOS6510::color_ram [private]
 

Definition at line 114 of file CPUC64.h.

Referenced by read_byte_io(), and write_byte_io().

bool MOS6510::d_flag [private]
 

Definition at line 123 of file CPUC64.h.

Referenced by do_adc(), do_sbc(), GetState(), MOS6510(), and SetState().

uint8 MOS6510::dfff_byte [private]
 

Definition at line 144 of file CPUC64.h.

Referenced by GetState(), MOS6510(), read_emulator_id(), and SetState().

int MOS6510::ExtConfig
 

Definition at line 77 of file CPUC64.h.

Referenced by ExtReadByte(), ExtWriteByte(), int_vectors(), mem_config(), and SAM().

bool MOS6510::i_flag [private]
 

Definition at line 123 of file CPUC64.h.

Referenced by EmulateLine(), GetState(), MOS6510(), and SetState().

union { ... } MOS6510::interrupt [private]
 

Referenced by AsyncNMI(), AsyncReset(), ClearCIAIRQ(), ClearVICIRQ(), EmulateLine(), GetState(), Reset(), SetState(), TriggerCIAIRQ(), TriggerNMI(), and TriggerVICIRQ().

uint8 MOS6510::intr[4] [private]
 

Definition at line 117 of file CPUC64.h.

unsigned long MOS6510::intr_any [private]
 

Definition at line 118 of file CPUC64.h.

bool MOS6510::io_in [private]
 

Definition at line 143 of file CPUC64.h.

Referenced by ExtReadByte(), ExtWriteByte(), jump(), new_config(), read_byte_io(), and write_byte_io().

bool MOS6510::kernal_in [private]
 

Definition at line 143 of file CPUC64.h.

Referenced by ExtReadByte(), ExtWriteByte(), jump(), new_config(), and read_byte_io().

uint8 * MOS6510::kernal_rom [private]
 

Definition at line 114 of file CPUC64.h.

Referenced by jump(), and read_byte_io().

uint8 MOS6510::n_flag [private]
 

Definition at line 122 of file CPUC64.h.

Referenced by do_adc(), do_sbc(), GetState(), MOS6510(), and SetState().

bool MOS6510::nmi_state [private]
 

Definition at line 120 of file CPUC64.h.

Referenced by AsyncNMI(), ClearNMI(), GetState(), Reset(), SetState(), and TriggerNMI().

uint8* MOS6510::pc [private]
 

Definition at line 127 of file CPUC64.h.

Referenced by EmulateLine(), GetState(), and jump().

uint8 * MOS6510::pc_base [private]
 

Definition at line 127 of file CPUC64.h.

Referenced by EmulateLine(), GetState(), and jump().

uint8* MOS6510::ram [private]
 

Definition at line 113 of file CPUC64.h.

Referenced by EmulateLine(), GetState(), jump(), new_config(), read_byte(), read_byte_io(), read_zp(), read_zp_word(), Reset(), SetState(), write_byte(), write_byte_io(), and write_zp().

uint8 MOS6510::sp [private]
 

Definition at line 124 of file CPUC64.h.

Referenced by GetState(), MOS6510(), and SetState().

C64* MOS6510::the_c64 [private]
 

Definition at line 111 of file CPUC64.h.

Referenced by illegal_jump(), and illegal_op().

MOS6526_1* MOS6510::TheCIA1
 

Definition at line 81 of file CPUC64.h.

Referenced by C64::C64(), read_byte_io(), and write_byte_io().

MOS6526_2* MOS6510::TheCIA2
 

Definition at line 82 of file CPUC64.h.

Referenced by C64::C64(), read_byte_io(), and write_byte_io().

IEC* MOS6510::TheIEC
 

Definition at line 84 of file CPUC64.h.

Referenced by C64::C64(), and EmulateLine().

REU* MOS6510::TheREU
 

Definition at line 83 of file CPUC64.h.

Referenced by C64::C64(), read_byte_io(), and write_byte_io().

MOS6581* MOS6510::TheSID
 

Definition at line 80 of file CPUC64.h.

Referenced by C64::C64(), read_byte_io(), and write_byte_io().

MOS6569* MOS6510::TheVIC
 

Definition at line 79 of file CPUC64.h.

Referenced by C64::C64(), read_byte_io(), and write_byte_io().

bool MOS6510::v_flag [private]
 

Definition at line 123 of file CPUC64.h.

Referenced by do_adc(), do_sbc(), GetState(), MOS6510(), and SetState().

uint8 MOS6510::x [private]
 

Definition at line 124 of file CPUC64.h.

Referenced by GetState(), MOS6510(), and SetState().

uint8 MOS6510::y [private]
 

Definition at line 124 of file CPUC64.h.

Referenced by GetState(), MOS6510(), and SetState().

uint8 MOS6510::z_flag [private]
 

Definition at line 122 of file CPUC64.h.

Referenced by do_adc(), do_sbc(), GetState(), MOS6510(), and SetState().


The documentation for this class was generated from the following files:
Generated on Tue Feb 8 04:12:19 2005 for E32frodo by doxygen 1.3.3