libsidplayfp 2.6.0
Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
libsidplayfp::MOS6510 Class Referenceabstract

#include <mos6510.h>

Inheritance diagram for libsidplayfp::MOS6510:
Inheritance graph
[legend]

Classes

class  haltInstruction
 

Public Member Functions

void reset ()
 
void debug (bool enable, FILE *out)
 
void setRDY (bool newRDY)
 
void triggerRST ()
 
void triggerNMI ()
 
void triggerIRQ ()
 
void clearIRQ ()
 

Static Public Member Functions

static const charcredits ()
 

Static Public Attributes

static const int SR_INTERRUPT = 2
 Status register interrupt bit.
 

Protected Member Functions

 MOS6510 (EventScheduler &scheduler)
 
virtual uint8_t cpuRead (uint_least16_t addr)=0
 
virtual void cpuWrite (uint_least16_t addr, uint8_t data)=0
 

Detailed Description

Cycle-exact 6502/6510 emulation core.

Code is based on work by Simon A. White sidpl.nosp@m.ay2@.nosp@m.yahoo.nosp@m..com. Original Java port by Ken Händel. Later on, it has been hacked to improve compatibility with Lorenz suite on VICE's test suite.

Author
alankila

Constructor & Destructor Documentation

◆ MOS6510()

libsidplayfp::MOS6510::MOS6510 ( EventScheduler & scheduler)
protected

Create new CPU emu.

Parameters
contextThe Event Context

Member Function Documentation

◆ clearIRQ()

void libsidplayfp::MOS6510::clearIRQ ( )

Inform CPU that IRQ is no longer pulled low.

◆ cpuRead()

virtual uint8_t libsidplayfp::MOS6510::cpuRead ( uint_least16_t addr)
protectedpure virtual

Get data from system environment.

Parameters
address
Returns
data byte CPU requested

Implemented in libsidplayfp::c64cpu.

◆ cpuWrite()

virtual void libsidplayfp::MOS6510::cpuWrite ( uint_least16_t addr,
uint8_t data )
protectedpure virtual

Write data to system environment.

Parameters
address
data

Implemented in libsidplayfp::c64cpu.

◆ credits()

const char * libsidplayfp::MOS6510::credits ( )
static

Module Credits.

◆ reset()

void libsidplayfp::MOS6510::reset ( )

Reset CPU Emulation.

◆ setRDY()

void libsidplayfp::MOS6510::setRDY ( bool newRDY)

Handle bus access signals. When RDY line is asserted, the CPU will pause when executing the next read operation.

Parameters
newRDYnew state for RDY signal

◆ triggerIRQ()

void libsidplayfp::MOS6510::triggerIRQ ( )

Pull IRQ line low on CPU.

◆ triggerNMI()

void libsidplayfp::MOS6510::triggerNMI ( )

Trigger NMI interrupt on the CPU. Calling this method flags that CPU must enter the NMI routine at earliest opportunity. There is no way to cancel NMI request once given.

◆ triggerRST()

void libsidplayfp::MOS6510::triggerRST ( )

This forces the CPU to abort whatever it is doing and immediately enter the RST interrupt handling sequence. The implementation is not compatible: instructions actually get aborted mid-execution. However, there is no possible way to trigger this signal from programs, so it's OK.


The documentation for this class was generated from the following files: