yaze 0.2.0
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::app::emu::audio::Spc700 Class Reference

The Spc700 class represents the SPC700 processor. More...

#include <spc700.h>

Collaboration diagram for yaze::app::emu::audio::Spc700:

Classes

struct  Flags
 

Public Member Functions

 Spc700 (ApuCallbacks &callbacks)
 
uint8_t FlagsToByte (Flags flags)
 
Flags ByteToFlags (uint8_t byte)
 
void Reset (bool hard=false)
 
void RunOpcode ()
 
void ExecuteInstructions (uint8_t opcode)
 
void LogInstruction (uint16_t initial_pc, uint8_t opcode)
 
uint8_t read (uint16_t address)
 
uint16_t read_word (uint16_t address)
 
uint8_t ReadOpcode ()
 
uint16_t ReadOpcodeWord ()
 
void DoBranch (uint8_t value, bool check)
 
void write (uint16_t address, uint8_t value)
 
void push_byte (uint8_t value)
 
void push_word (uint16_t value)
 
uint8_t pull_byte ()
 
uint16_t pull_word ()
 
uint16_t imm ()
 
uint8_t dp ()
 
uint16_t dpx ()
 
uint8_t get_dp_addr ()
 
uint8_t abs_bit (uint16_t *adr)
 
uint16_t dp_dp (uint8_t *src)
 
uint16_t ind ()
 
uint16_t ind_ind (uint8_t *srcVal)
 
uint16_t dp_word (uint16_t *low)
 
uint16_t ind_p ()
 
uint16_t abs_x ()
 
uint16_t abs_y ()
 
uint16_t idx ()
 
uint16_t idy ()
 
uint16_t dp_y ()
 
uint16_t dp_imm (uint8_t *srcVal)
 
uint16_t abs ()
 
int8_t rel ()
 
uint8_t dp_plus_x ()
 
uint8_t dp_plus_y ()
 
uint16_t dp_plus_x_indirect ()
 
uint16_t dp_indirect_plus_y ()
 
uint8_t i ()
 
uint8_t i_postinc ()
 
uint16_t addr_plus_i ()
 
uint16_t addr_plus_i_indexed ()
 
void MOV (uint16_t adr)
 
void MOV_ADDR (uint16_t address, uint8_t operand)
 
void MOVY (uint16_t adr)
 
void MOVX (uint16_t adr)
 
void MOVS (uint16_t adr)
 
void MOVSX (uint16_t adr)
 
void MOVSY (uint16_t adr)
 
void ADC (uint16_t adr)
 
void ADCM (uint16_t &dest, uint8_t operand)
 
void SBC (uint16_t adr)
 
void SBCM (uint16_t &dest, uint8_t operand)
 
void CMP (uint16_t adr)
 
void CMPX (uint16_t adr)
 
void CMPM (uint16_t dst, uint8_t value)
 
void CMPY (uint16_t adr)
 
void AND (uint16_t adr)
 
void ANDM (uint16_t dest, uint8_t operand)
 
void OR (uint16_t adr)
 
void ORM (uint16_t dest, uint8_t operand)
 
void EOR (uint16_t adr)
 
void EORM (uint16_t dest, uint8_t operand)
 
void ASL (uint16_t operand)
 
void LSR (uint16_t adr)
 
void ROL (uint16_t operand)
 
void ROR (uint16_t adr)
 
void XCN (uint8_t operand, bool isImmediate=false)
 
void INC (uint16_t adr)
 
void DEC (uint16_t operand)
 
void MOVW (uint16_t &dest, uint16_t operand)
 
void INCW (uint16_t &operand)
 
void DECW (uint16_t &operand)
 
void ADDW (uint16_t &dest, uint16_t operand)
 
void SUBW (uint16_t &dest, uint16_t operand)
 
void CMPW (uint16_t operand)
 
void MUL (uint8_t operand)
 
void DIV (uint8_t operand)
 
void BRA (int8_t offset)
 
void BEQ (int8_t offset)
 
void BNE (int8_t offset)
 
void BCS (int8_t offset)
 
void BCC (int8_t offset)
 
void BVS (int8_t offset)
 
void BVC (int8_t offset)
 
void BMI (int8_t offset)
 
void BPL (int8_t offset)
 
void BBS (uint8_t bit, uint8_t operand)
 
void BBC (uint8_t bit, uint8_t operand)
 
void JMP (uint16_t address)
 
void CALL (uint16_t address)
 
void PCALL (uint8_t offset)
 
void TCALL (uint8_t offset)
 
void BRK ()
 
void RET ()
 
void RETI ()
 
void PUSH (uint8_t operand)
 
void POP (uint8_t &operand)
 
void SET1 (uint8_t bit, uint8_t &operand)
 
void CLR1 (uint8_t bit, uint8_t &operand)
 
void TSET1 (uint8_t bit, uint8_t &operand)
 
void TCLR1 (uint8_t bit, uint8_t &operand)
 
void AND1 (uint8_t bit, uint8_t &operand)
 
void OR1 (uint8_t bit, uint8_t &operand)
 
void EOR1 (uint8_t bit, uint8_t &operand)
 
void NOT1 (uint8_t bit, uint8_t &operand)
 
void MOV1 (uint8_t bit, uint8_t &operand)
 
void CLRC ()
 
void SETC ()
 
void NOTC ()
 
void CLRV ()
 
void CLRP ()
 
void SETP ()
 
void EI ()
 
void DI ()
 
void NOP ()
 
void SLEEP ()
 
void STOP ()
 

Public Attributes

uint8_t A = 0x00
 
uint8_t X = 0x00
 
uint8_t Y = 0x00
 
uint16_t YA = 0x00
 
uint16_t PC = 0xFFC0
 
uint8_t SP = 0x00
 
Flags PSW
 

Private Attributes

ApuCallbacks callbacks_
 
std::vector< std::string > log_
 
bool stopped_
 
bool reset_wanted_
 
uint8_t opcode
 
uint32_t step = 0
 
uint32_t bstep
 
uint16_t adr
 
uint16_t adr1
 
uint8_t dat
 
uint16_t dat16
 
uint8_t param
 
const uint8_t ipl_rom_ [64]
 

Detailed Description

The Spc700 class represents the SPC700 processor.

The Spc700 class provides the functionality to execute instructions, read and write memory, and handle various addressing modes. It also contains registers and flags specific to the SPC700.

Note
This class assumes the existence of an AudioRam object for memory access.

Definition at line 72 of file spc700.h.

Constructor & Destructor Documentation

◆ Spc700()

yaze::app::emu::audio::Spc700::Spc700 ( ApuCallbacks & callbacks)
inlineexplicit

Definition at line 98 of file spc700.h.

Member Function Documentation

◆ FlagsToByte()

◆ ByteToFlags()

◆ Reset()

void yaze::app::emu::audio::Spc700::Reset ( bool hard = false)

Definition at line 16 of file spc700.cc.

References A, ByteToFlags(), PC, PSW, reset_wanted_, SP, step, stopped_, X, and Y.

Referenced by yaze::app::emu::audio::Apu::Reset().

Here is the call graph for this function:

◆ RunOpcode()

void yaze::app::emu::audio::Spc700::RunOpcode ( )

◆ ExecuteInstructions()

◆ LogInstruction()

void yaze::app::emu::audio::Spc700::LogInstruction ( uint16_t initial_pc,
uint8_t opcode )

Definition at line 1299 of file spc700.cc.

References A, opcode, spc_opcode_map, X, and Y.

◆ read()

◆ read_word()

uint16_t yaze::app::emu::audio::Spc700::read_word ( uint16_t address)
inline

◆ ReadOpcode()

uint8_t yaze::app::emu::audio::Spc700::ReadOpcode ( )
inline

◆ ReadOpcodeWord()

uint16_t yaze::app::emu::audio::Spc700::ReadOpcodeWord ( )
inline

Definition at line 160 of file spc700.h.

References ReadOpcode().

Referenced by abs(), abs_bit(), abs_x(), abs_y(), and ExecuteInstructions().

Here is the call graph for this function:

◆ DoBranch()

void yaze::app::emu::audio::Spc700::DoBranch ( uint8_t value,
bool check )
inline

Definition at line 166 of file spc700.h.

References callbacks_, yaze::app::emu::audio::ApuCallbacks::idle, and PC.

Referenced by ExecuteInstructions().

◆ write()

void yaze::app::emu::audio::Spc700::write ( uint16_t address,
uint8_t value )
inline

◆ push_byte()

void yaze::app::emu::audio::Spc700::push_byte ( uint8_t value)
inline

Definition at line 180 of file spc700.h.

References callbacks_, SP, and yaze::app::emu::audio::ApuCallbacks::write.

Referenced by ExecuteInstructions(), and push_word().

◆ push_word()

void yaze::app::emu::audio::Spc700::push_word ( uint16_t value)
inline

Definition at line 185 of file spc700.h.

References push_byte().

Referenced by ExecuteInstructions().

Here is the call graph for this function:

◆ pull_byte()

uint8_t yaze::app::emu::audio::Spc700::pull_byte ( )
inline

Definition at line 190 of file spc700.h.

References read(), and SP.

Referenced by ExecuteInstructions(), and pull_word().

Here is the call graph for this function:

◆ pull_word()

uint16_t yaze::app::emu::audio::Spc700::pull_word ( )
inline

Definition at line 195 of file spc700.h.

References pull_byte().

Referenced by ExecuteInstructions().

Here is the call graph for this function:

◆ imm()

uint16_t yaze::app::emu::audio::Spc700::imm ( )

Definition at line 81 of file addressing.cc.

References PC.

Referenced by ExecuteInstructions(), and XCN().

◆ dp()

uint8_t yaze::app::emu::audio::Spc700::dp ( )

Definition at line 84 of file addressing.cc.

References yaze::app::emu::audio::Spc700::Flags::P, PSW, and ReadOpcode().

Referenced by ExecuteInstructions().

Here is the call graph for this function:

◆ dpx()

uint16_t yaze::app::emu::audio::Spc700::dpx ( )

Definition at line 21 of file addressing.cc.

References callbacks_, yaze::app::emu::audio::ApuCallbacks::idle, yaze::app::emu::audio::Spc700::Flags::P, PSW, ReadOpcode(), and X.

Referenced by ExecuteInstructions().

Here is the call graph for this function:

◆ get_dp_addr()

uint8_t yaze::app::emu::audio::Spc700::get_dp_addr ( )

◆ abs_bit()

uint8_t yaze::app::emu::audio::Spc700::abs_bit ( uint16_t * adr)

Definition at line 63 of file addressing.cc.

References adr, and ReadOpcodeWord().

Referenced by ExecuteInstructions().

Here is the call graph for this function:

◆ dp_dp()

uint16_t yaze::app::emu::audio::Spc700::dp_dp ( uint8_t * src)

Definition at line 116 of file addressing.cc.

References yaze::app::emu::audio::Spc700::Flags::P, PSW, read(), and ReadOpcode().

Referenced by ExecuteInstructions().

Here is the call graph for this function:

◆ ind()

uint16_t yaze::app::emu::audio::Spc700::ind ( )

Definition at line 10 of file addressing.cc.

References yaze::app::emu::audio::Spc700::Flags::P, PC, PSW, read(), and X.

Referenced by ExecuteInstructions().

Here is the call graph for this function:

◆ ind_ind()

uint16_t yaze::app::emu::audio::Spc700::ind_ind ( uint8_t * srcVal)

Definition at line 57 of file addressing.cc.

References yaze::app::emu::audio::Spc700::Flags::P, PC, PSW, read(), X, and Y.

Referenced by ExecuteInstructions().

Here is the call graph for this function:

◆ dp_word()

uint16_t yaze::app::emu::audio::Spc700::dp_word ( uint16_t * low)

Definition at line 69 of file addressing.cc.

References adr, yaze::app::emu::audio::Spc700::Flags::P, PSW, and ReadOpcode().

Referenced by ExecuteInstructions().

Here is the call graph for this function:

◆ ind_p()

uint16_t yaze::app::emu::audio::Spc700::ind_p ( )

Definition at line 75 of file addressing.cc.

References yaze::app::emu::audio::Spc700::Flags::P, PC, PSW, read(), and X.

Referenced by ExecuteInstructions().

Here is the call graph for this function:

◆ abs_x()

uint16_t yaze::app::emu::audio::Spc700::abs_x ( )

Definition at line 33 of file addressing.cc.

References callbacks_, yaze::app::emu::audio::ApuCallbacks::idle, ReadOpcodeWord(), and X.

Referenced by ExecuteInstructions().

Here is the call graph for this function:

◆ abs_y()

uint16_t yaze::app::emu::audio::Spc700::abs_y ( )

Definition at line 39 of file addressing.cc.

References callbacks_, yaze::app::emu::audio::ApuCallbacks::idle, ReadOpcodeWord(), and Y.

Referenced by ExecuteInstructions().

Here is the call graph for this function:

◆ idx()

uint16_t yaze::app::emu::audio::Spc700::idx ( )

Definition at line 15 of file addressing.cc.

References callbacks_, yaze::app::emu::audio::ApuCallbacks::idle, yaze::app::emu::audio::Spc700::Flags::P, PSW, read_word(), ReadOpcode(), and X.

Referenced by ExecuteInstructions().

Here is the call graph for this function:

◆ idy()

uint16_t yaze::app::emu::audio::Spc700::idy ( )

Definition at line 45 of file addressing.cc.

References adr, callbacks_, yaze::app::emu::audio::ApuCallbacks::idle, yaze::app::emu::audio::Spc700::Flags::P, PSW, read_word(), ReadOpcode(), and Y.

Referenced by ExecuteInstructions().

Here is the call graph for this function:

◆ dp_y()

uint16_t yaze::app::emu::audio::Spc700::dp_y ( )

Definition at line 27 of file addressing.cc.

References callbacks_, yaze::app::emu::audio::ApuCallbacks::idle, yaze::app::emu::audio::Spc700::Flags::P, PSW, ReadOpcode(), and Y.

Referenced by ExecuteInstructions().

Here is the call graph for this function:

◆ dp_imm()

uint16_t yaze::app::emu::audio::Spc700::dp_imm ( uint8_t * srcVal)

Definition at line 52 of file addressing.cc.

References yaze::app::emu::audio::Spc700::Flags::P, PSW, and ReadOpcode().

Referenced by ExecuteInstructions().

Here is the call graph for this function:

◆ abs()

uint16_t yaze::app::emu::audio::Spc700::abs ( )

Definition at line 121 of file addressing.cc.

References ReadOpcodeWord().

Referenced by ExecuteInstructions().

Here is the call graph for this function:

◆ rel()

int8_t yaze::app::emu::audio::Spc700::rel ( )

Definition at line 123 of file addressing.cc.

References PC, and read().

Referenced by BBC(), and BBS().

Here is the call graph for this function:

◆ dp_plus_x()

uint8_t yaze::app::emu::audio::Spc700::dp_plus_x ( )

Definition at line 89 of file addressing.cc.

References yaze::app::emu::audio::Spc700::Flags::P, PC, PSW, read(), and X.

Here is the call graph for this function:

◆ dp_plus_y()

uint8_t yaze::app::emu::audio::Spc700::dp_plus_y ( )

Definition at line 96 of file addressing.cc.

References yaze::app::emu::audio::Spc700::Flags::P, PC, PSW, read(), and Y.

Here is the call graph for this function:

◆ dp_plus_x_indirect()

uint16_t yaze::app::emu::audio::Spc700::dp_plus_x_indirect ( )

Definition at line 103 of file addressing.cc.

References PC, read_word(), and X.

Here is the call graph for this function:

◆ dp_indirect_plus_y()

uint16_t yaze::app::emu::audio::Spc700::dp_indirect_plus_y ( )

Definition at line 110 of file addressing.cc.

References PC, read_word(), and Y.

Here is the call graph for this function:

◆ i()

uint8_t yaze::app::emu::audio::Spc700::i ( )

Definition at line 128 of file addressing.cc.

References yaze::app::emu::audio::Spc700::Flags::P, PSW, read(), and X.

Referenced by ExecuteInstructions().

Here is the call graph for this function:

◆ i_postinc()

uint8_t yaze::app::emu::audio::Spc700::i_postinc ( )

Definition at line 130 of file addressing.cc.

References yaze::app::emu::audio::Spc700::Flags::P, PSW, read(), and X.

Here is the call graph for this function:

◆ addr_plus_i()

uint16_t yaze::app::emu::audio::Spc700::addr_plus_i ( )

Definition at line 136 of file addressing.cc.

References PC, read(), and X.

Here is the call graph for this function:

◆ addr_plus_i_indexed()

uint16_t yaze::app::emu::audio::Spc700::addr_plus_i_indexed ( )

Definition at line 142 of file addressing.cc.

References PC, read(), and X.

Here is the call graph for this function:

◆ MOV()

void yaze::app::emu::audio::Spc700::MOV ( uint16_t adr)

Definition at line 43 of file instructions.cc.

References A, adr, yaze::app::emu::audio::Spc700::Flags::N, PSW, read(), and yaze::app::emu::audio::Spc700::Flags::Z.

Referenced by ExecuteInstructions().

Here is the call graph for this function:

◆ MOV_ADDR()

void yaze::app::emu::audio::Spc700::MOV_ADDR ( uint16_t address,
uint8_t operand )

Definition at line 49 of file instructions.cc.

References yaze::app::emu::audio::Spc700::Flags::N, PSW, write(), and yaze::app::emu::audio::Spc700::Flags::Z.

Here is the call graph for this function:

◆ MOVY()

void yaze::app::emu::audio::Spc700::MOVY ( uint16_t adr)

Definition at line 16 of file instructions.cc.

References adr, yaze::app::emu::audio::Spc700::Flags::N, PSW, read(), Y, and yaze::app::emu::audio::Spc700::Flags::Z.

Referenced by ExecuteInstructions().

Here is the call graph for this function:

◆ MOVX()

void yaze::app::emu::audio::Spc700::MOVX ( uint16_t adr)

Definition at line 10 of file instructions.cc.

References adr, yaze::app::emu::audio::Spc700::Flags::N, PSW, read(), X, and yaze::app::emu::audio::Spc700::Flags::Z.

Referenced by ExecuteInstructions().

Here is the call graph for this function:

◆ MOVS()

void yaze::app::emu::audio::Spc700::MOVS ( uint16_t adr)

Definition at line 22 of file instructions.cc.

References A, adr, bstep, read(), and write().

Referenced by ExecuteInstructions().

Here is the call graph for this function:

◆ MOVSX()

void yaze::app::emu::audio::Spc700::MOVSX ( uint16_t adr)

Definition at line 29 of file instructions.cc.

References adr, bstep, read(), write(), and X.

Referenced by ExecuteInstructions().

Here is the call graph for this function:

◆ MOVSY()

void yaze::app::emu::audio::Spc700::MOVSY ( uint16_t adr)

Definition at line 36 of file instructions.cc.

References adr, bstep, read(), write(), and Y.

Referenced by ExecuteInstructions().

Here is the call graph for this function:

◆ ADC()

void yaze::app::emu::audio::Spc700::ADC ( uint16_t adr)

◆ ADCM()

void yaze::app::emu::audio::Spc700::ADCM ( uint16_t & dest,
uint8_t operand )

◆ SBC()

void yaze::app::emu::audio::Spc700::SBC ( uint16_t adr)

◆ SBCM()

void yaze::app::emu::audio::Spc700::SBCM ( uint16_t & dest,
uint8_t operand )

◆ CMP()

void yaze::app::emu::audio::Spc700::CMP ( uint16_t adr)

Definition at line 127 of file instructions.cc.

References A, adr, yaze::app::emu::audio::Spc700::Flags::C, yaze::app::emu::audio::Spc700::Flags::N, PSW, read(), and yaze::app::emu::audio::Spc700::Flags::Z.

Referenced by ExecuteInstructions().

Here is the call graph for this function:

◆ CMPX()

void yaze::app::emu::audio::Spc700::CMPX ( uint16_t adr)

Definition at line 102 of file instructions.cc.

References adr, yaze::app::emu::audio::Spc700::Flags::C, yaze::app::emu::audio::Spc700::Flags::N, PSW, read(), X, and yaze::app::emu::audio::Spc700::Flags::Z.

Referenced by ExecuteInstructions().

Here is the call graph for this function:

◆ CMPM()

void yaze::app::emu::audio::Spc700::CMPM ( uint16_t dst,
uint8_t value )

◆ CMPY()

void yaze::app::emu::audio::Spc700::CMPY ( uint16_t adr)

Definition at line 110 of file instructions.cc.

References adr, yaze::app::emu::audio::Spc700::Flags::C, yaze::app::emu::audio::Spc700::Flags::N, PSW, read(), Y, and yaze::app::emu::audio::Spc700::Flags::Z.

Referenced by ExecuteInstructions().

Here is the call graph for this function:

◆ AND()

void yaze::app::emu::audio::Spc700::AND ( uint16_t adr)

Definition at line 135 of file instructions.cc.

References A, adr, yaze::app::emu::audio::Spc700::Flags::N, PSW, read(), and yaze::app::emu::audio::Spc700::Flags::Z.

Referenced by ExecuteInstructions().

Here is the call graph for this function:

◆ ANDM()

void yaze::app::emu::audio::Spc700::ANDM ( uint16_t dest,
uint8_t operand )

Definition at line 141 of file instructions.cc.

References yaze::app::emu::audio::Spc700::Flags::N, PSW, read(), write(), and yaze::app::emu::audio::Spc700::Flags::Z.

Referenced by ExecuteInstructions().

Here is the call graph for this function:

◆ OR()

void yaze::app::emu::audio::Spc700::OR ( uint16_t adr)

Definition at line 148 of file instructions.cc.

References A, adr, yaze::app::emu::audio::Spc700::Flags::N, PSW, read(), and yaze::app::emu::audio::Spc700::Flags::Z.

Referenced by ExecuteInstructions().

Here is the call graph for this function:

◆ ORM()

void yaze::app::emu::audio::Spc700::ORM ( uint16_t dest,
uint8_t operand )

Definition at line 154 of file instructions.cc.

References yaze::app::emu::audio::Spc700::Flags::N, PSW, read(), write(), and yaze::app::emu::audio::Spc700::Flags::Z.

Referenced by ExecuteInstructions().

Here is the call graph for this function:

◆ EOR()

void yaze::app::emu::audio::Spc700::EOR ( uint16_t adr)

Definition at line 161 of file instructions.cc.

References A, adr, yaze::app::emu::audio::Spc700::Flags::N, PSW, read(), and yaze::app::emu::audio::Spc700::Flags::Z.

Referenced by ExecuteInstructions().

Here is the call graph for this function:

◆ EORM()

void yaze::app::emu::audio::Spc700::EORM ( uint16_t dest,
uint8_t operand )

Definition at line 167 of file instructions.cc.

References yaze::app::emu::audio::Spc700::Flags::N, PSW, read(), write(), and yaze::app::emu::audio::Spc700::Flags::Z.

Referenced by ExecuteInstructions().

Here is the call graph for this function:

◆ ASL()

void yaze::app::emu::audio::Spc700::ASL ( uint16_t operand)

Definition at line 174 of file instructions.cc.

References yaze::app::emu::audio::Spc700::Flags::C, yaze::app::emu::audio::Spc700::Flags::N, PSW, read(), write(), and yaze::app::emu::audio::Spc700::Flags::Z.

Referenced by ExecuteInstructions().

Here is the call graph for this function:

◆ LSR()

void yaze::app::emu::audio::Spc700::LSR ( uint16_t adr)

Definition at line 183 of file instructions.cc.

References adr, yaze::app::emu::audio::Spc700::Flags::C, yaze::app::emu::audio::Spc700::Flags::N, PSW, read(), write(), and yaze::app::emu::audio::Spc700::Flags::Z.

Referenced by ExecuteInstructions().

Here is the call graph for this function:

◆ ROL()

void yaze::app::emu::audio::Spc700::ROL ( uint16_t operand)

Definition at line 202 of file instructions.cc.

References adr, yaze::app::emu::audio::Spc700::Flags::C, yaze::app::emu::audio::Spc700::Flags::N, PSW, read(), write(), and yaze::app::emu::audio::Spc700::Flags::Z.

Referenced by ExecuteInstructions().

Here is the call graph for this function:

◆ ROR()

void yaze::app::emu::audio::Spc700::ROR ( uint16_t adr)

Definition at line 192 of file instructions.cc.

References adr, yaze::app::emu::audio::Spc700::Flags::C, yaze::app::emu::audio::Spc700::Flags::N, PSW, read(), write(), and yaze::app::emu::audio::Spc700::Flags::Z.

Referenced by ExecuteInstructions().

Here is the call graph for this function:

◆ XCN()

void yaze::app::emu::audio::Spc700::XCN ( uint8_t operand,
bool isImmediate = false )

Definition at line 213 of file instructions.cc.

References imm(), yaze::app::emu::audio::Spc700::Flags::N, PSW, and yaze::app::emu::audio::Spc700::Flags::Z.

Here is the call graph for this function:

◆ INC()

void yaze::app::emu::audio::Spc700::INC ( uint16_t adr)

Definition at line 221 of file instructions.cc.

References adr, yaze::app::emu::audio::Spc700::Flags::N, PSW, read(), write(), and yaze::app::emu::audio::Spc700::Flags::Z.

Referenced by ExecuteInstructions().

Here is the call graph for this function:

◆ DEC()

void yaze::app::emu::audio::Spc700::DEC ( uint16_t operand)

Definition at line 228 of file instructions.cc.

References yaze::app::emu::audio::Spc700::Flags::N, PSW, read(), write(), and yaze::app::emu::audio::Spc700::Flags::Z.

Referenced by ExecuteInstructions().

Here is the call graph for this function:

◆ MOVW()

void yaze::app::emu::audio::Spc700::MOVW ( uint16_t & dest,
uint16_t operand )

◆ INCW()

void yaze::app::emu::audio::Spc700::INCW ( uint16_t & operand)

◆ DECW()

void yaze::app::emu::audio::Spc700::DECW ( uint16_t & operand)

◆ ADDW()

void yaze::app::emu::audio::Spc700::ADDW ( uint16_t & dest,
uint16_t operand )

◆ SUBW()

void yaze::app::emu::audio::Spc700::SUBW ( uint16_t & dest,
uint16_t operand )

◆ CMPW()

void yaze::app::emu::audio::Spc700::CMPW ( uint16_t operand)

◆ MUL()

void yaze::app::emu::audio::Spc700::MUL ( uint8_t operand)

◆ DIV()

void yaze::app::emu::audio::Spc700::DIV ( uint8_t operand)

◆ BRA()

void yaze::app::emu::audio::Spc700::BRA ( int8_t offset)

Definition at line 298 of file instructions.cc.

References PC.

◆ BEQ()

void yaze::app::emu::audio::Spc700::BEQ ( int8_t offset)

Definition at line 300 of file instructions.cc.

References PC, PSW, and yaze::app::emu::audio::Spc700::Flags::Z.

◆ BNE()

void yaze::app::emu::audio::Spc700::BNE ( int8_t offset)

Definition at line 306 of file instructions.cc.

References PC, PSW, and yaze::app::emu::audio::Spc700::Flags::Z.

◆ BCS()

void yaze::app::emu::audio::Spc700::BCS ( int8_t offset)

Definition at line 312 of file instructions.cc.

References yaze::app::emu::audio::Spc700::Flags::C, PC, and PSW.

◆ BCC()

void yaze::app::emu::audio::Spc700::BCC ( int8_t offset)

Definition at line 318 of file instructions.cc.

References yaze::app::emu::audio::Spc700::Flags::C, PC, and PSW.

◆ BVS()

void yaze::app::emu::audio::Spc700::BVS ( int8_t offset)

Definition at line 324 of file instructions.cc.

References PC, PSW, and yaze::app::emu::audio::Spc700::Flags::V.

◆ BVC()

void yaze::app::emu::audio::Spc700::BVC ( int8_t offset)

Definition at line 330 of file instructions.cc.

References PC, PSW, and yaze::app::emu::audio::Spc700::Flags::V.

◆ BMI()

void yaze::app::emu::audio::Spc700::BMI ( int8_t offset)

Definition at line 336 of file instructions.cc.

References yaze::app::emu::audio::Spc700::Flags::N, PC, and PSW.

◆ BPL()

void yaze::app::emu::audio::Spc700::BPL ( int8_t offset)

Definition at line 342 of file instructions.cc.

References yaze::app::emu::audio::Spc700::Flags::N, PC, and PSW.

◆ BBS()

void yaze::app::emu::audio::Spc700::BBS ( uint8_t bit,
uint8_t operand )

Definition at line 348 of file instructions.cc.

References PC, and rel().

Here is the call graph for this function:

◆ BBC()

void yaze::app::emu::audio::Spc700::BBC ( uint8_t bit,
uint8_t operand )

Definition at line 354 of file instructions.cc.

References PC, and rel().

Here is the call graph for this function:

◆ JMP()

void yaze::app::emu::audio::Spc700::JMP ( uint16_t address)

Definition at line 362 of file instructions.cc.

References PC.

◆ CALL()

void yaze::app::emu::audio::Spc700::CALL ( uint16_t address)

Definition at line 364 of file instructions.cc.

References PC, SP, and write().

Here is the call graph for this function:

◆ PCALL()

void yaze::app::emu::audio::Spc700::PCALL ( uint8_t offset)

Definition at line 372 of file instructions.cc.

References PC, SP, and write().

Here is the call graph for this function:

◆ TCALL()

void yaze::app::emu::audio::Spc700::TCALL ( uint8_t offset)

Definition at line 380 of file instructions.cc.

References PC, SP, and write().

Here is the call graph for this function:

◆ BRK()

void yaze::app::emu::audio::Spc700::BRK ( )

Definition at line 388 of file instructions.cc.

References PC, SP, and write().

Here is the call graph for this function:

◆ RET()

void yaze::app::emu::audio::Spc700::RET ( )

Definition at line 396 of file instructions.cc.

References PC, read(), and SP.

Here is the call graph for this function:

◆ RETI()

void yaze::app::emu::audio::Spc700::RETI ( )

Definition at line 402 of file instructions.cc.

References yaze::app::emu::audio::Spc700::Flags::I, PC, PSW, read(), and SP.

Here is the call graph for this function:

◆ PUSH()

void yaze::app::emu::audio::Spc700::PUSH ( uint8_t operand)

Definition at line 409 of file instructions.cc.

References SP, and write().

Here is the call graph for this function:

◆ POP()

void yaze::app::emu::audio::Spc700::POP ( uint8_t & operand)

Definition at line 414 of file instructions.cc.

References read(), and SP.

Here is the call graph for this function:

◆ SET1()

void yaze::app::emu::audio::Spc700::SET1 ( uint8_t bit,
uint8_t & operand )

Definition at line 419 of file instructions.cc.

◆ CLR1()

void yaze::app::emu::audio::Spc700::CLR1 ( uint8_t bit,
uint8_t & operand )

Definition at line 421 of file instructions.cc.

◆ TSET1()

void yaze::app::emu::audio::Spc700::TSET1 ( uint8_t bit,
uint8_t & operand )

Definition at line 423 of file instructions.cc.

References yaze::app::emu::audio::Spc700::Flags::C, and PSW.

◆ TCLR1()

void yaze::app::emu::audio::Spc700::TCLR1 ( uint8_t bit,
uint8_t & operand )

Definition at line 428 of file instructions.cc.

References yaze::app::emu::audio::Spc700::Flags::C, and PSW.

◆ AND1()

void yaze::app::emu::audio::Spc700::AND1 ( uint8_t bit,
uint8_t & operand )

◆ OR1()

void yaze::app::emu::audio::Spc700::OR1 ( uint8_t bit,
uint8_t & operand )

◆ EOR1()

void yaze::app::emu::audio::Spc700::EOR1 ( uint8_t bit,
uint8_t & operand )

◆ NOT1()

void yaze::app::emu::audio::Spc700::NOT1 ( uint8_t bit,
uint8_t & operand )

◆ MOV1()

void yaze::app::emu::audio::Spc700::MOV1 ( uint8_t bit,
uint8_t & operand )

Definition at line 457 of file instructions.cc.

References yaze::app::emu::audio::Spc700::Flags::C, and PSW.

◆ CLRC()

void yaze::app::emu::audio::Spc700::CLRC ( )

Definition at line 462 of file instructions.cc.

References yaze::app::emu::audio::Spc700::Flags::C, and PSW.

◆ SETC()

void yaze::app::emu::audio::Spc700::SETC ( )

Definition at line 464 of file instructions.cc.

References yaze::app::emu::audio::Spc700::Flags::C, and PSW.

◆ NOTC()

void yaze::app::emu::audio::Spc700::NOTC ( )

Definition at line 466 of file instructions.cc.

References yaze::app::emu::audio::Spc700::Flags::C, and PSW.

◆ CLRV()

void yaze::app::emu::audio::Spc700::CLRV ( )

Definition at line 468 of file instructions.cc.

References PSW, and yaze::app::emu::audio::Spc700::Flags::V.

◆ CLRP()

void yaze::app::emu::audio::Spc700::CLRP ( )

Definition at line 470 of file instructions.cc.

References yaze::app::emu::audio::Spc700::Flags::P, and PSW.

◆ SETP()

void yaze::app::emu::audio::Spc700::SETP ( )

Definition at line 472 of file instructions.cc.

References yaze::app::emu::audio::Spc700::Flags::P, and PSW.

◆ EI()

void yaze::app::emu::audio::Spc700::EI ( )

Definition at line 474 of file instructions.cc.

References yaze::app::emu::audio::Spc700::Flags::I, and PSW.

◆ DI()

void yaze::app::emu::audio::Spc700::DI ( )

Definition at line 476 of file instructions.cc.

References yaze::app::emu::audio::Spc700::Flags::I, and PSW.

◆ NOP()

void yaze::app::emu::audio::Spc700::NOP ( )

Definition at line 478 of file instructions.cc.

References PC.

◆ SLEEP()

void yaze::app::emu::audio::Spc700::SLEEP ( )

Definition at line 480 of file instructions.cc.

◆ STOP()

void yaze::app::emu::audio::Spc700::STOP ( )

Definition at line 482 of file instructions.cc.

Member Data Documentation

◆ callbacks_

ApuCallbacks yaze::app::emu::audio::Spc700::callbacks_
private

◆ log_

std::vector<std::string> yaze::app::emu::audio::Spc700::log_
private

Definition at line 75 of file spc700.h.

◆ stopped_

bool yaze::app::emu::audio::Spc700::stopped_
private

Definition at line 77 of file spc700.h.

Referenced by ExecuteInstructions(), Reset(), and RunOpcode().

◆ reset_wanted_

bool yaze::app::emu::audio::Spc700::reset_wanted_
private

Definition at line 78 of file spc700.h.

Referenced by Reset(), and RunOpcode().

◆ opcode

uint8_t yaze::app::emu::audio::Spc700::opcode
private

Definition at line 80 of file spc700.h.

Referenced by ExecuteInstructions(), LogInstruction(), ReadOpcode(), and RunOpcode().

◆ step

uint32_t yaze::app::emu::audio::Spc700::step = 0
private

Definition at line 81 of file spc700.h.

Referenced by ExecuteInstructions(), Reset(), and RunOpcode().

◆ bstep

uint32_t yaze::app::emu::audio::Spc700::bstep
private

Definition at line 82 of file spc700.h.

Referenced by MOVS(), MOVSX(), MOVSY(), and RunOpcode().

◆ adr

uint16_t yaze::app::emu::audio::Spc700::adr
private

◆ adr1

uint16_t yaze::app::emu::audio::Spc700::adr1
private

Definition at line 84 of file spc700.h.

◆ dat

uint8_t yaze::app::emu::audio::Spc700::dat
private

Definition at line 85 of file spc700.h.

Referenced by ExecuteInstructions().

◆ dat16

uint16_t yaze::app::emu::audio::Spc700::dat16
private

Definition at line 86 of file spc700.h.

◆ param

uint8_t yaze::app::emu::audio::Spc700::param
private

Definition at line 87 of file spc700.h.

◆ ipl_rom_

const uint8_t yaze::app::emu::audio::Spc700::ipl_rom_[64]
private
Initial value:
{
0xCD, 0xEF, 0xBD, 0xE8, 0x00, 0xC6, 0x1D, 0xD0, 0xFC, 0x8F, 0xAA,
0xF4, 0x8F, 0xBB, 0xF5, 0x78, 0xCC, 0xF4, 0xD0, 0xFB, 0x2F, 0x19,
0xEB, 0xF4, 0xD0, 0xFC, 0x7E, 0xF4, 0xD0, 0x0B, 0xE4, 0xF5, 0xCB,
0xF4, 0xD7, 0x00, 0xFC, 0xD0, 0xF3, 0xAB, 0x01, 0x10, 0xEF, 0x7E,
0xF4, 0x10, 0xEB, 0xBA, 0xF6, 0xDA, 0x00, 0xBA, 0xF4, 0xC4, 0xF4,
0xDD, 0x5D, 0xD0, 0xDB, 0x1F, 0x00, 0x00, 0xC0, 0xFF}

Definition at line 89 of file spc700.h.

◆ A

uint8_t yaze::app::emu::audio::Spc700::A = 0x00

Definition at line 101 of file spc700.h.

Referenced by ADC(), AND(), CMP(), DIV(), EOR(), ExecuteInstructions(), LogInstruction(), MOV(), MOVS(), MUL(), OR(), Reset(), SBC(), and SBCM().

◆ X

uint8_t yaze::app::emu::audio::Spc700::X = 0x00

◆ Y

uint8_t yaze::app::emu::audio::Spc700::Y = 0x00

◆ YA

uint16_t yaze::app::emu::audio::Spc700::YA = 0x00

Definition at line 104 of file spc700.h.

Referenced by CMPW(), and MUL().

◆ PC

◆ SP

uint8_t yaze::app::emu::audio::Spc700::SP = 0x00

◆ PSW


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