The Spc700 class represents the SPC700 processor. More...
#include <spc700.h>

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 | SaveState (std::ostream &stream) |
| void | LoadState (std::istream &stream) |
| void | RunOpcode () |
| int | Step () |
| int | GetLastOpcodeCycles () const |
| 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 |
| int | extra_cycles_ = 0 |
| int | last_opcode_cycles_ = 0 |
| const uint8_t | ipl_rom_ [64] |
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.
AudioRam object for memory access.
|
inlineexplicit |
|
inline |
Definition at line 121 of file spc700.h.
References yaze::emu::Spc700::Flags::B, yaze::emu::Spc700::Flags::C, yaze::emu::Spc700::Flags::H, yaze::emu::Spc700::Flags::I, yaze::emu::Spc700::Flags::N, yaze::emu::Spc700::Flags::P, yaze::emu::Spc700::Flags::V, and yaze::emu::Spc700::Flags::Z.
Referenced by BRK(), and ExecuteInstructions().
|
inline |
Definition at line 126 of file spc700.h.
References yaze::emu::Spc700::Flags::B, yaze::emu::Spc700::Flags::C, yaze::emu::Spc700::Flags::H, yaze::emu::Spc700::Flags::I, yaze::emu::Spc700::Flags::N, yaze::emu::Spc700::Flags::P, yaze::emu::Spc700::Flags::V, and yaze::emu::Spc700::Flags::Z.
Referenced by ExecuteInstructions(), Reset(), and RETI().
| void yaze::emu::Spc700::Reset | ( | bool | hard = false | ) |
Definition at line 16 of file spc700.cc.
References A, ByteToFlags(), PSW, reset_wanted_, SP, step, stopped_, X, and Y.
Referenced by yaze::emu::Apu::Reset(), and yaze::test::EmulatorTestSuite::RunSpc700CycleAccuracyTest().

| void yaze::emu::Spc700::SaveState | ( | std::ostream & | stream | ) |
| void yaze::emu::Spc700::LoadState | ( | std::istream & | stream | ) |
| void yaze::emu::Spc700::RunOpcode | ( | ) |
Definition at line 75 of file spc700.cc.
References A, bstep, callbacks_, ExecuteInstructions(), yaze::emu::Spc700::Flags::I, yaze::emu::ApuCallbacks::idle, last_opcode_cycles_, LOG_DEBUG, opcode, PC, PSW, yaze::emu::ApuCallbacks::read, read(), read_word(), ReadOpcode(), reset_wanted_, SP, yaze::emu::spc700_cycles, step, stopped_, and Y.
Referenced by yaze::test::EmulatorTestSuite::RunSpc700CycleAccuracyTest().

| int yaze::emu::Spc700::Step | ( | ) |
Definition at line 32 of file spc700.cc.
References callbacks_, ExecuteInstructions(), extra_cycles_, yaze::emu::Spc700::Flags::I, yaze::emu::ApuCallbacks::idle, opcode, PC, PSW, read(), ReadOpcode(), reset_wanted_, SP, yaze::emu::spc700_cycles, and stopped_.
Referenced by yaze::emu::Apu::RunCycles().

|
inline |
Definition at line 151 of file spc700.h.
References last_opcode_cycles_.
Referenced by yaze::test::EmulatorTestSuite::RunSpc700CycleAccuracyTest().
| void yaze::emu::Spc700::ExecuteInstructions | ( | uint8_t | opcode | ) |
Definition at line 177 of file spc700.cc.
References A, abs(), abs_bit(), abs_x(), abs_y(), ADC(), ADCM(), adr, AND(), ANDM(), ASL(), yaze::emu::Spc700::Flags::B, bstep, ByteToFlags(), yaze::emu::Spc700::Flags::C, callbacks_, CMP(), CMPM(), CMPX(), CMPY(), DEC(), DoBranch(), dp(), dp_dp(), dp_imm(), dp_word(), dp_y(), dpx(), EOR(), EORM(), FlagsToByte(), yaze::emu::Spc700::Flags::H, yaze::emu::Spc700::Flags::I, i(), yaze::emu::ApuCallbacks::idle, idx(), idy(), imm(), INC(), ind(), ind_ind(), ind_p(), LOG_DEBUG, LSR(), MOV(), MOVS(), MOVSX(), MOVSY(), MOVX(), MOVY(), yaze::emu::Spc700::Flags::N, opcode, OR(), ORM(), yaze::emu::Spc700::Flags::P, PC, PSW, pull_byte(), pull_word(), push_byte(), push_word(), read(), read_word(), ReadOpcode(), ReadOpcodeWord(), ROL(), ROR(), SBC(), SBCM(), SP, stopped_, yaze::emu::Spc700::Flags::V, write(), X, Y, and yaze::emu::Spc700::Flags::Z.
Referenced by RunOpcode(), and Step().
| void yaze::emu::Spc700::LogInstruction | ( | uint16_t | initial_pc, |
| uint8_t | opcode ) |
Definition at line 1458 of file spc700.cc.
References A, yaze::util::LogManager::instance(), yaze::util::LogManager::log(), opcode, spc_opcode_map, X, Y, and yaze::util::YAZE_DEBUG.

|
inline |
Definition at line 157 of file spc700.h.
References callbacks_, and yaze::emu::ApuCallbacks::read.
Referenced by ADC(), ADCM(), addr_plus_i(), addr_plus_i_indexed(), AND(), ANDM(), ASL(), CMP(), CMPM(), CMPX(), CMPY(), DEC(), dp_dp(), dp_plus_x(), dp_plus_y(), EOR(), EORM(), ExecuteInstructions(), i(), i_postinc(), INC(), ind(), ind_ind(), ind_p(), LSR(), MOV(), MOV_ADDR(), MOVS(), MOVSX(), MOVSY(), MOVX(), MOVY(), OR(), ORM(), pull_byte(), rel(), ROL(), ROR(), RunOpcode(), SBC(), SBCM(), and Step().
|
inline |
Definition at line 159 of file spc700.h.
References callbacks_, and yaze::emu::ApuCallbacks::read.
Referenced by BRK(), dp_indirect_plus_y(), dp_plus_x_indirect(), ExecuteInstructions(), idx(), idy(), yaze::emu::Apu::Reset(), and RunOpcode().
|
inline |
Definition at line 166 of file spc700.h.
References callbacks_, opcode, PC, and yaze::emu::ApuCallbacks::read.
Referenced by dp(), dp_dp(), dp_imm(), dp_word(), dp_y(), dpx(), ExecuteInstructions(), idx(), idy(), ReadOpcodeWord(), RunOpcode(), and Step().
|
inline |
Definition at line 171 of file spc700.h.
References ReadOpcode().
Referenced by abs(), abs_bit(), abs_x(), abs_y(), and ExecuteInstructions().

|
inline |
Definition at line 177 of file spc700.h.
References callbacks_, extra_cycles_, yaze::emu::ApuCallbacks::idle, and PC.
Referenced by ExecuteInstructions().
|
inline |
Definition at line 189 of file spc700.h.
References callbacks_, and yaze::emu::ApuCallbacks::write.
Referenced by ADCM(), ANDM(), ASL(), DEC(), EORM(), ExecuteInstructions(), INC(), LSR(), MOV_ADDR(), MOVS(), MOVSX(), MOVSY(), ORM(), ROL(), ROR(), and SBCM().
|
inline |
Definition at line 193 of file spc700.h.
References callbacks_, SP, and yaze::emu::ApuCallbacks::write.
Referenced by BRK(), CALL(), ExecuteInstructions(), PCALL(), PUSH(), push_word(), and TCALL().
|
inline |
Definition at line 198 of file spc700.h.
References push_byte().
Referenced by BRK(), and ExecuteInstructions().

|
inline |
Definition at line 203 of file spc700.h.
Referenced by ExecuteInstructions(), POP(), pull_word(), and RETI().

|
inline |
Definition at line 208 of file spc700.h.
References pull_byte().
Referenced by ExecuteInstructions(), RET(), and RETI().

| uint16_t yaze::emu::Spc700::imm | ( | ) |
Definition at line 79 of file addressing.cc.
References PC.
Referenced by ExecuteInstructions(), and XCN().
| uint8_t yaze::emu::Spc700::dp | ( | ) |
Definition at line 84 of file addressing.cc.
References yaze::emu::Spc700::Flags::P, PSW, and ReadOpcode().
Referenced by ExecuteInstructions().

| uint16_t yaze::emu::Spc700::dpx | ( | ) |
Definition at line 19 of file addressing.cc.
References callbacks_, yaze::emu::ApuCallbacks::idle, yaze::emu::Spc700::Flags::P, PSW, ReadOpcode(), and X.
Referenced by ExecuteInstructions().

| uint8_t yaze::emu::Spc700::get_dp_addr | ( | ) |
| uint8_t yaze::emu::Spc700::abs_bit | ( | uint16_t * | adr | ) |
Definition at line 61 of file addressing.cc.
References adr, and ReadOpcodeWord().
Referenced by ExecuteInstructions().

| uint16_t yaze::emu::Spc700::dp_dp | ( | uint8_t * | src | ) |
Definition at line 116 of file addressing.cc.
References yaze::emu::Spc700::Flags::P, PSW, read(), and ReadOpcode().
Referenced by ExecuteInstructions().

| uint16_t yaze::emu::Spc700::ind | ( | ) |
Definition at line 8 of file addressing.cc.
References yaze::emu::Spc700::Flags::P, PC, PSW, read(), and X.
Referenced by ExecuteInstructions().

| uint16_t yaze::emu::Spc700::ind_ind | ( | uint8_t * | srcVal | ) |
Definition at line 55 of file addressing.cc.
References yaze::emu::Spc700::Flags::P, PC, PSW, read(), X, and Y.
Referenced by ExecuteInstructions().

| uint16_t yaze::emu::Spc700::dp_word | ( | uint16_t * | low | ) |
Definition at line 67 of file addressing.cc.
References adr, yaze::emu::Spc700::Flags::P, PSW, and ReadOpcode().
Referenced by ExecuteInstructions().

| uint16_t yaze::emu::Spc700::ind_p | ( | ) |
Definition at line 73 of file addressing.cc.
References yaze::emu::Spc700::Flags::P, PC, PSW, read(), and X.
Referenced by ExecuteInstructions().

| uint16_t yaze::emu::Spc700::abs_x | ( | ) |
Definition at line 31 of file addressing.cc.
References callbacks_, yaze::emu::ApuCallbacks::idle, ReadOpcodeWord(), and X.
Referenced by ExecuteInstructions().

| uint16_t yaze::emu::Spc700::abs_y | ( | ) |
Definition at line 37 of file addressing.cc.
References callbacks_, yaze::emu::ApuCallbacks::idle, ReadOpcodeWord(), and Y.
Referenced by ExecuteInstructions().

| uint16_t yaze::emu::Spc700::idx | ( | ) |
Definition at line 13 of file addressing.cc.
References callbacks_, yaze::emu::ApuCallbacks::idle, yaze::emu::Spc700::Flags::P, PSW, read_word(), ReadOpcode(), and X.
Referenced by ExecuteInstructions().

| uint16_t yaze::emu::Spc700::idy | ( | ) |
Definition at line 43 of file addressing.cc.
References adr, callbacks_, yaze::emu::ApuCallbacks::idle, yaze::emu::Spc700::Flags::P, PSW, read_word(), ReadOpcode(), and Y.
Referenced by ExecuteInstructions().

| uint16_t yaze::emu::Spc700::dp_y | ( | ) |
Definition at line 25 of file addressing.cc.
References callbacks_, yaze::emu::ApuCallbacks::idle, yaze::emu::Spc700::Flags::P, PSW, ReadOpcode(), and Y.
Referenced by ExecuteInstructions().

| uint16_t yaze::emu::Spc700::dp_imm | ( | uint8_t * | srcVal | ) |
Definition at line 50 of file addressing.cc.
References yaze::emu::Spc700::Flags::P, PSW, and ReadOpcode().
Referenced by ExecuteInstructions().

| uint16_t yaze::emu::Spc700::abs | ( | ) |
Definition at line 121 of file addressing.cc.
References ReadOpcodeWord().
Referenced by ExecuteInstructions().

| int8_t yaze::emu::Spc700::rel | ( | ) |
| uint8_t yaze::emu::Spc700::dp_plus_x | ( | ) |
Definition at line 89 of file addressing.cc.
References yaze::emu::Spc700::Flags::P, PC, PSW, read(), and X.

| uint8_t yaze::emu::Spc700::dp_plus_y | ( | ) |
Definition at line 96 of file addressing.cc.
References yaze::emu::Spc700::Flags::P, PC, PSW, read(), and Y.

| uint16_t yaze::emu::Spc700::dp_plus_x_indirect | ( | ) |
Definition at line 103 of file addressing.cc.
References PC, read_word(), and X.

| uint16_t yaze::emu::Spc700::dp_indirect_plus_y | ( | ) |
Definition at line 110 of file addressing.cc.
References PC, read_word(), and Y.

| uint8_t yaze::emu::Spc700::i | ( | ) |
Definition at line 130 of file addressing.cc.
References yaze::emu::Spc700::Flags::P, PSW, read(), and X.
Referenced by ExecuteInstructions().

| uint8_t yaze::emu::Spc700::i_postinc | ( | ) |
Definition at line 134 of file addressing.cc.
References yaze::emu::Spc700::Flags::P, PSW, read(), and X.

| uint16_t yaze::emu::Spc700::addr_plus_i | ( | ) |
| uint16_t yaze::emu::Spc700::addr_plus_i_indexed | ( | ) |
| void yaze::emu::Spc700::MOV | ( | uint16_t | adr | ) |
Definition at line 19 of file instructions.cc.
References A, adr, yaze::emu::Spc700::Flags::N, PSW, read(), and yaze::emu::Spc700::Flags::Z.
Referenced by ExecuteInstructions().

| void yaze::emu::Spc700::MOV_ADDR | ( | uint16_t | address, |
| uint8_t | operand ) |
Definition at line 63 of file instructions.cc.
References read(), and write().

| void yaze::emu::Spc700::MOVY | ( | uint16_t | adr | ) |
Definition at line 33 of file instructions.cc.
References adr, yaze::emu::Spc700::Flags::N, PSW, read(), Y, and yaze::emu::Spc700::Flags::Z.
Referenced by ExecuteInstructions().

| void yaze::emu::Spc700::MOVX | ( | uint16_t | adr | ) |
Definition at line 26 of file instructions.cc.
References adr, yaze::emu::Spc700::Flags::N, PSW, read(), X, and yaze::emu::Spc700::Flags::Z.
Referenced by ExecuteInstructions().

| void yaze::emu::Spc700::MOVS | ( | uint16_t | adr | ) |
Definition at line 45 of file instructions.cc.
References A, read(), and write().
Referenced by ExecuteInstructions().

| void yaze::emu::Spc700::MOVSX | ( | uint16_t | adr | ) |
Definition at line 51 of file instructions.cc.
References read(), write(), and X.
Referenced by ExecuteInstructions().

| void yaze::emu::Spc700::MOVSY | ( | uint16_t | adr | ) |
Definition at line 57 of file instructions.cc.
References read(), write(), and Y.
Referenced by ExecuteInstructions().

| void yaze::emu::Spc700::ADC | ( | uint16_t | adr | ) |
Definition at line 73 of file instructions.cc.
References A, adr, yaze::emu::Spc700::Flags::C, yaze::emu::Spc700::Flags::H, yaze::emu::Spc700::Flags::N, PSW, read(), yaze::emu::Spc700::Flags::V, and yaze::emu::Spc700::Flags::Z.
Referenced by ExecuteInstructions().

| void yaze::emu::Spc700::ADCM | ( | uint16_t & | dest, |
| uint8_t | operand ) |
Definition at line 85 of file instructions.cc.
References yaze::emu::Spc700::Flags::C, yaze::emu::Spc700::Flags::H, yaze::emu::Spc700::Flags::N, PSW, read(), yaze::emu::Spc700::Flags::V, write(), and yaze::emu::Spc700::Flags::Z.
Referenced by ExecuteInstructions().

| void yaze::emu::Spc700::SBC | ( | uint16_t | adr | ) |
Definition at line 98 of file instructions.cc.
References A, adr, yaze::emu::Spc700::Flags::C, yaze::emu::Spc700::Flags::H, yaze::emu::Spc700::Flags::N, PSW, read(), yaze::emu::Spc700::Flags::V, and yaze::emu::Spc700::Flags::Z.
Referenced by ExecuteInstructions().

| void yaze::emu::Spc700::SBCM | ( | uint16_t & | dest, |
| uint8_t | operand ) |
Definition at line 110 of file instructions.cc.
References yaze::emu::Spc700::Flags::C, yaze::emu::Spc700::Flags::H, yaze::emu::Spc700::Flags::N, PSW, read(), yaze::emu::Spc700::Flags::V, write(), and yaze::emu::Spc700::Flags::Z.
Referenced by ExecuteInstructions().

| void yaze::emu::Spc700::CMP | ( | uint16_t | adr | ) |
Definition at line 128 of file instructions.cc.
References A, adr, yaze::emu::Spc700::Flags::C, yaze::emu::Spc700::Flags::N, PSW, read(), and yaze::emu::Spc700::Flags::Z.
Referenced by ExecuteInstructions().

| void yaze::emu::Spc700::CMPX | ( | uint16_t | adr | ) |
Definition at line 137 of file instructions.cc.
References adr, yaze::emu::Spc700::Flags::C, yaze::emu::Spc700::Flags::N, PSW, read(), X, and yaze::emu::Spc700::Flags::Z.
Referenced by ExecuteInstructions().

| void yaze::emu::Spc700::CMPM | ( | uint16_t | dst, |
| uint8_t | value ) |
Definition at line 155 of file instructions.cc.
References yaze::emu::Spc700::Flags::C, callbacks_, yaze::emu::ApuCallbacks::idle, yaze::emu::Spc700::Flags::N, PSW, read(), and yaze::emu::Spc700::Flags::Z.
Referenced by ExecuteInstructions().

| void yaze::emu::Spc700::CMPY | ( | uint16_t | adr | ) |
Definition at line 146 of file instructions.cc.
References adr, yaze::emu::Spc700::Flags::C, yaze::emu::Spc700::Flags::N, PSW, read(), Y, and yaze::emu::Spc700::Flags::Z.
Referenced by ExecuteInstructions().

| void yaze::emu::Spc700::AND | ( | uint16_t | adr | ) |
Definition at line 169 of file instructions.cc.
References A, adr, yaze::emu::Spc700::Flags::N, PSW, read(), and yaze::emu::Spc700::Flags::Z.
Referenced by ExecuteInstructions().

| void yaze::emu::Spc700::ANDM | ( | uint16_t | dest, |
| uint8_t | operand ) |
Definition at line 176 of file instructions.cc.
References yaze::emu::Spc700::Flags::N, PSW, read(), write(), and yaze::emu::Spc700::Flags::Z.
Referenced by ExecuteInstructions().

| void yaze::emu::Spc700::OR | ( | uint16_t | adr | ) |
Definition at line 184 of file instructions.cc.
References A, adr, yaze::emu::Spc700::Flags::N, PSW, read(), and yaze::emu::Spc700::Flags::Z.
Referenced by ExecuteInstructions().

| void yaze::emu::Spc700::ORM | ( | uint16_t | dest, |
| uint8_t | operand ) |
Definition at line 191 of file instructions.cc.
References yaze::emu::Spc700::Flags::N, PSW, read(), write(), and yaze::emu::Spc700::Flags::Z.
Referenced by ExecuteInstructions().

| void yaze::emu::Spc700::EOR | ( | uint16_t | adr | ) |
Definition at line 199 of file instructions.cc.
References A, adr, yaze::emu::Spc700::Flags::N, PSW, read(), and yaze::emu::Spc700::Flags::Z.
Referenced by ExecuteInstructions().

| void yaze::emu::Spc700::EORM | ( | uint16_t | dest, |
| uint8_t | operand ) |
Definition at line 206 of file instructions.cc.
References yaze::emu::Spc700::Flags::N, PSW, read(), write(), and yaze::emu::Spc700::Flags::Z.
Referenced by ExecuteInstructions().

| void yaze::emu::Spc700::ASL | ( | uint16_t | operand | ) |
Definition at line 218 of file instructions.cc.
References adr, yaze::emu::Spc700::Flags::C, yaze::emu::Spc700::Flags::N, PSW, read(), write(), and yaze::emu::Spc700::Flags::Z.
Referenced by ExecuteInstructions().

| void yaze::emu::Spc700::LSR | ( | uint16_t | adr | ) |
Definition at line 229 of file instructions.cc.
References adr, yaze::emu::Spc700::Flags::C, yaze::emu::Spc700::Flags::N, PSW, read(), write(), and yaze::emu::Spc700::Flags::Z.
Referenced by ExecuteInstructions().

| void yaze::emu::Spc700::ROL | ( | uint16_t | operand | ) |
Definition at line 240 of file instructions.cc.
References adr, yaze::emu::Spc700::Flags::C, yaze::emu::Spc700::Flags::N, PSW, read(), write(), and yaze::emu::Spc700::Flags::Z.
Referenced by ExecuteInstructions().

| void yaze::emu::Spc700::ROR | ( | uint16_t | adr | ) |
Definition at line 252 of file instructions.cc.
References adr, yaze::emu::Spc700::Flags::C, yaze::emu::Spc700::Flags::N, PSW, read(), write(), and yaze::emu::Spc700::Flags::Z.
Referenced by ExecuteInstructions().

| void yaze::emu::Spc700::XCN | ( | uint8_t | operand, |
| bool | isImmediate = false ) |
Definition at line 288 of file instructions.cc.
References imm(), yaze::emu::Spc700::Flags::N, PSW, and yaze::emu::Spc700::Flags::Z.

| void yaze::emu::Spc700::INC | ( | uint16_t | adr | ) |
Definition at line 268 of file instructions.cc.
References adr, yaze::emu::Spc700::Flags::N, PSW, read(), write(), and yaze::emu::Spc700::Flags::Z.
Referenced by ExecuteInstructions().

| void yaze::emu::Spc700::DEC | ( | uint16_t | operand | ) |
Definition at line 278 of file instructions.cc.
References adr, yaze::emu::Spc700::Flags::N, PSW, read(), write(), and yaze::emu::Spc700::Flags::Z.
Referenced by ExecuteInstructions().

| void yaze::emu::Spc700::MOVW | ( | uint16_t & | dest, |
| uint16_t | operand ) |
Definition at line 300 of file instructions.cc.
References yaze::emu::Spc700::Flags::N, PSW, and yaze::emu::Spc700::Flags::Z.
| void yaze::emu::Spc700::INCW | ( | uint16_t & | operand | ) |
Definition at line 307 of file instructions.cc.
References yaze::emu::Spc700::Flags::N, PSW, and yaze::emu::Spc700::Flags::Z.
| void yaze::emu::Spc700::DECW | ( | uint16_t & | operand | ) |
Definition at line 314 of file instructions.cc.
References yaze::emu::Spc700::Flags::N, PSW, and yaze::emu::Spc700::Flags::Z.
| void yaze::emu::Spc700::ADDW | ( | uint16_t & | dest, |
| uint16_t | operand ) |
Definition at line 321 of file instructions.cc.
References yaze::emu::Spc700::Flags::C, yaze::emu::Spc700::Flags::H, yaze::emu::Spc700::Flags::N, PSW, yaze::emu::Spc700::Flags::V, and yaze::emu::Spc700::Flags::Z.
| void yaze::emu::Spc700::SUBW | ( | uint16_t & | dest, |
| uint16_t | operand ) |
Definition at line 332 of file instructions.cc.
References yaze::emu::Spc700::Flags::C, yaze::emu::Spc700::Flags::H, yaze::emu::Spc700::Flags::N, PSW, yaze::emu::Spc700::Flags::V, and yaze::emu::Spc700::Flags::Z.
| void yaze::emu::Spc700::CMPW | ( | uint16_t | operand | ) |
Definition at line 343 of file instructions.cc.
References yaze::emu::Spc700::Flags::C, yaze::emu::Spc700::Flags::N, PSW, YA, and yaze::emu::Spc700::Flags::Z.
| void yaze::emu::Spc700::MUL | ( | uint8_t | operand | ) |
Definition at line 355 of file instructions.cc.
References A, yaze::emu::Spc700::Flags::N, PSW, YA, and yaze::emu::Spc700::Flags::Z.
| void yaze::emu::Spc700::DIV | ( | uint8_t | operand | ) |
Definition at line 363 of file instructions.cc.
References A, yaze::emu::Spc700::Flags::N, PSW, Y, and yaze::emu::Spc700::Flags::Z.
| void yaze::emu::Spc700::BRA | ( | int8_t | offset | ) |
Definition at line 385 of file instructions.cc.
References PC.
| void yaze::emu::Spc700::BEQ | ( | int8_t | offset | ) |
Definition at line 388 of file instructions.cc.
References PC, PSW, and yaze::emu::Spc700::Flags::Z.
| void yaze::emu::Spc700::BNE | ( | int8_t | offset | ) |
Definition at line 392 of file instructions.cc.
References PC, PSW, and yaze::emu::Spc700::Flags::Z.
| void yaze::emu::Spc700::BCS | ( | int8_t | offset | ) |
Definition at line 396 of file instructions.cc.
References yaze::emu::Spc700::Flags::C, PC, and PSW.
| void yaze::emu::Spc700::BCC | ( | int8_t | offset | ) |
Definition at line 400 of file instructions.cc.
References yaze::emu::Spc700::Flags::C, PC, and PSW.
| void yaze::emu::Spc700::BVS | ( | int8_t | offset | ) |
Definition at line 404 of file instructions.cc.
References PC, PSW, and yaze::emu::Spc700::Flags::V.
| void yaze::emu::Spc700::BVC | ( | int8_t | offset | ) |
Definition at line 408 of file instructions.cc.
References PC, PSW, and yaze::emu::Spc700::Flags::V.
| void yaze::emu::Spc700::BMI | ( | int8_t | offset | ) |
Definition at line 412 of file instructions.cc.
References yaze::emu::Spc700::Flags::N, PC, and PSW.
| void yaze::emu::Spc700::BPL | ( | int8_t | offset | ) |
Definition at line 416 of file instructions.cc.
References yaze::emu::Spc700::Flags::N, PC, and PSW.
| void yaze::emu::Spc700::BBS | ( | uint8_t | bit, |
| uint8_t | operand ) |
| void yaze::emu::Spc700::BBC | ( | uint8_t | bit, |
| uint8_t | operand ) |
| void yaze::emu::Spc700::JMP | ( | uint16_t | address | ) |
Definition at line 435 of file instructions.cc.
References PC.
| void yaze::emu::Spc700::CALL | ( | uint16_t | address | ) |
Definition at line 439 of file instructions.cc.
References PC, and push_byte().

| void yaze::emu::Spc700::PCALL | ( | uint8_t | offset | ) |
Definition at line 446 of file instructions.cc.
References PC, and push_byte().

| void yaze::emu::Spc700::TCALL | ( | uint8_t | offset | ) |
Definition at line 453 of file instructions.cc.
References PC, and push_byte().

| void yaze::emu::Spc700::BRK | ( | ) |
Definition at line 460 of file instructions.cc.
References yaze::emu::Spc700::Flags::B, FlagsToByte(), yaze::emu::Spc700::Flags::I, PC, PSW, push_byte(), push_word(), and read_word().

| void yaze::emu::Spc700::RET | ( | ) |
Definition at line 468 of file instructions.cc.
References PC, and pull_word().

| void yaze::emu::Spc700::RETI | ( | ) |
Definition at line 472 of file instructions.cc.
References ByteToFlags(), PC, PSW, pull_byte(), and pull_word().

| void yaze::emu::Spc700::PUSH | ( | uint8_t | operand | ) |
Definition at line 481 of file instructions.cc.
References push_byte().

| void yaze::emu::Spc700::POP | ( | uint8_t & | operand | ) |
Definition at line 485 of file instructions.cc.
References pull_byte().

| void yaze::emu::Spc700::SET1 | ( | uint8_t | bit, |
| uint8_t & | operand ) |
Definition at line 493 of file instructions.cc.
| void yaze::emu::Spc700::CLR1 | ( | uint8_t | bit, |
| uint8_t & | operand ) |
Definition at line 497 of file instructions.cc.
| void yaze::emu::Spc700::TSET1 | ( | uint8_t | bit, |
| uint8_t & | operand ) |
Definition at line 501 of file instructions.cc.
References yaze::emu::Spc700::Flags::C, and PSW.
| void yaze::emu::Spc700::TCLR1 | ( | uint8_t | bit, |
| uint8_t & | operand ) |
Definition at line 506 of file instructions.cc.
References yaze::emu::Spc700::Flags::C, and PSW.
| void yaze::emu::Spc700::AND1 | ( | uint8_t | bit, |
| uint8_t & | operand ) |
Definition at line 511 of file instructions.cc.
References yaze::emu::Spc700::Flags::N, PSW, and yaze::emu::Spc700::Flags::Z.
| void yaze::emu::Spc700::OR1 | ( | uint8_t | bit, |
| uint8_t & | operand ) |
Definition at line 517 of file instructions.cc.
References yaze::emu::Spc700::Flags::N, PSW, and yaze::emu::Spc700::Flags::Z.
| void yaze::emu::Spc700::EOR1 | ( | uint8_t | bit, |
| uint8_t & | operand ) |
Definition at line 523 of file instructions.cc.
References yaze::emu::Spc700::Flags::N, PSW, and yaze::emu::Spc700::Flags::Z.
| void yaze::emu::Spc700::NOT1 | ( | uint8_t | bit, |
| uint8_t & | operand ) |
Definition at line 529 of file instructions.cc.
References yaze::emu::Spc700::Flags::N, PSW, and yaze::emu::Spc700::Flags::Z.
| void yaze::emu::Spc700::MOV1 | ( | uint8_t | bit, |
| uint8_t & | operand ) |
Definition at line 535 of file instructions.cc.
References yaze::emu::Spc700::Flags::C, and PSW.
| void yaze::emu::Spc700::CLRC | ( | ) |
Definition at line 544 of file instructions.cc.
References yaze::emu::Spc700::Flags::C, and PSW.
| void yaze::emu::Spc700::SETC | ( | ) |
Definition at line 547 of file instructions.cc.
References yaze::emu::Spc700::Flags::C, and PSW.
| void yaze::emu::Spc700::NOTC | ( | ) |
Definition at line 550 of file instructions.cc.
References yaze::emu::Spc700::Flags::C, and PSW.
| void yaze::emu::Spc700::CLRV | ( | ) |
Definition at line 553 of file instructions.cc.
References yaze::emu::Spc700::Flags::H, PSW, and yaze::emu::Spc700::Flags::V.
| void yaze::emu::Spc700::CLRP | ( | ) |
Definition at line 557 of file instructions.cc.
References yaze::emu::Spc700::Flags::P, and PSW.
| void yaze::emu::Spc700::SETP | ( | ) |
Definition at line 560 of file instructions.cc.
References yaze::emu::Spc700::Flags::P, and PSW.
| void yaze::emu::Spc700::EI | ( | ) |
Definition at line 563 of file instructions.cc.
References yaze::emu::Spc700::Flags::I, and PSW.
| void yaze::emu::Spc700::DI | ( | ) |
Definition at line 566 of file instructions.cc.
References yaze::emu::Spc700::Flags::I, and PSW.
| void yaze::emu::Spc700::NOP | ( | ) |
Definition at line 574 of file instructions.cc.
| void yaze::emu::Spc700::SLEEP | ( | ) |
Definition at line 578 of file instructions.cc.
| void yaze::emu::Spc700::STOP | ( | ) |
Definition at line 582 of file instructions.cc.
|
private |
Definition at line 71 of file spc700.h.
Referenced by abs_x(), abs_y(), CMPM(), DoBranch(), dp_y(), dpx(), ExecuteInstructions(), idx(), idy(), push_byte(), read(), read_word(), ReadOpcode(), RunOpcode(), Step(), and write().
|
private |
Definition at line 74 of file spc700.h.
Referenced by ExecuteInstructions(), LoadState(), Reset(), RunOpcode(), SaveState(), and Step().
|
private |
Definition at line 75 of file spc700.h.
Referenced by LoadState(), Reset(), RunOpcode(), SaveState(), and Step().
|
private |
Definition at line 77 of file spc700.h.
Referenced by ExecuteInstructions(), LoadState(), LogInstruction(), ReadOpcode(), RunOpcode(), SaveState(), and Step().
|
private |
Definition at line 78 of file spc700.h.
Referenced by LoadState(), Reset(), RunOpcode(), and SaveState().
|
private |
Definition at line 79 of file spc700.h.
Referenced by ExecuteInstructions(), LoadState(), RunOpcode(), and SaveState().
|
private |
|
private |
Definition at line 81 of file spc700.h.
Referenced by LoadState(), and SaveState().
|
private |
Definition at line 82 of file spc700.h.
Referenced by LoadState(), and SaveState().
|
private |
Definition at line 83 of file spc700.h.
Referenced by LoadState(), and SaveState().
|
private |
Definition at line 84 of file spc700.h.
Referenced by LoadState(), and SaveState().
|
private |
Definition at line 85 of file spc700.h.
Referenced by DoBranch(), LoadState(), SaveState(), and Step().
|
private |
Definition at line 88 of file spc700.h.
Referenced by GetLastOpcodeCycles(), LoadState(), RunOpcode(), and SaveState().
|
private |
| uint8_t yaze::emu::Spc700::A = 0x00 |
Definition at line 102 of file spc700.h.
Referenced by ADC(), AND(), yaze::emu::Apu::BootstrapDirect(), CMP(), DIV(), EOR(), ExecuteInstructions(), LoadState(), LogInstruction(), MOV(), MOVS(), MUL(), OR(), Reset(), RunOpcode(), SaveState(), and SBC().
| uint8_t yaze::emu::Spc700::X = 0x00 |
Definition at line 103 of file spc700.h.
Referenced by abs_x(), addr_plus_i(), addr_plus_i_indexed(), yaze::emu::Apu::BootstrapDirect(), CMPX(), dp_plus_x(), dp_plus_x_indirect(), dpx(), ExecuteInstructions(), i(), i_postinc(), idx(), ind(), ind_ind(), ind_p(), LoadState(), LogInstruction(), MOVSX(), MOVX(), Reset(), and SaveState().
| uint8_t yaze::emu::Spc700::Y = 0x00 |
Definition at line 104 of file spc700.h.
Referenced by abs_y(), yaze::emu::Apu::BootstrapDirect(), CMPY(), DIV(), dp_indirect_plus_y(), dp_plus_y(), dp_y(), ExecuteInstructions(), idy(), ind_ind(), LoadState(), LogInstruction(), MOVSY(), MOVY(), Reset(), yaze::emu::Apu::RunCycles(), RunOpcode(), and SaveState().
| uint16_t yaze::emu::Spc700::YA = 0x00 |
Definition at line 105 of file spc700.h.
Referenced by CMPW(), LoadState(), MUL(), and SaveState().
| uint16_t yaze::emu::Spc700::PC = 0xFFC0 |
Definition at line 106 of file spc700.h.
Referenced by addr_plus_i(), addr_plus_i_indexed(), BBC(), BBS(), BCC(), BCS(), BEQ(), BMI(), BNE(), yaze::emu::Apu::BootstrapDirect(), BPL(), BRA(), BRK(), BVC(), BVS(), CALL(), DoBranch(), dp_indirect_plus_y(), dp_plus_x(), dp_plus_x_indirect(), dp_plus_y(), ExecuteInstructions(), imm(), ind(), ind_ind(), ind_p(), JMP(), LoadState(), PCALL(), ReadOpcode(), rel(), RET(), RETI(), yaze::emu::Apu::RunCycles(), RunOpcode(), yaze::test::EmulatorTestSuite::RunSpc700CycleAccuracyTest(), SaveState(), Step(), TCALL(), and yaze::emu::Apu::Write().
| uint8_t yaze::emu::Spc700::SP = 0x00 |
Definition at line 107 of file spc700.h.
Referenced by yaze::emu::Apu::BootstrapDirect(), ExecuteInstructions(), LoadState(), pull_byte(), push_byte(), Reset(), RunOpcode(), SaveState(), and Step().
| Flags yaze::emu::Spc700::PSW |
Definition at line 119 of file spc700.h.
Referenced by ADC(), ADCM(), ADDW(), AND(), AND1(), ANDM(), ASL(), BCC(), BCS(), BEQ(), BMI(), BNE(), yaze::emu::Apu::BootstrapDirect(), BPL(), BRK(), BVC(), BVS(), CLRC(), CLRP(), CLRV(), CMP(), CMPM(), CMPW(), CMPX(), CMPY(), DEC(), DECW(), DI(), DIV(), dp(), dp_dp(), dp_imm(), dp_plus_x(), dp_plus_y(), dp_word(), dp_y(), dpx(), EI(), EOR(), EOR1(), EORM(), ExecuteInstructions(), i(), i_postinc(), idx(), idy(), INC(), INCW(), ind(), ind_ind(), ind_p(), LoadState(), LSR(), MOV(), MOV1(), MOVW(), MOVX(), MOVY(), MUL(), NOT1(), NOTC(), OR(), OR1(), ORM(), Reset(), RETI(), ROL(), ROR(), RunOpcode(), SaveState(), SBC(), SBCM(), SETC(), SETP(), Step(), SUBW(), TCLR1(), TSET1(), and XCN().