yaze 0.2.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::emu Namespace Reference

SNES Emulation and debugging tools. More...

Namespaces

namespace  anonymous_namespace{emulator.cc}
 
namespace  anonymous_namespace{snes.cc}
 

Classes

class  Apu
 The Apu class represents the Audio Processing Unit (APU) of a system. More...
 
struct  ApuCallbacks
 
class  AsmParser
 
class  AudioRam
 AudioRam is an interface for the Audio RAM used by the SPC700. More...
 
class  AudioRamImpl
 AudioRamImpl is an implementation of the AudioRam interface. More...
 
struct  BackgroundLayer
 
struct  BGHOFS
 
struct  BgLayer
 
struct  BGMODE
 
struct  BGNBA
 
struct  BGSC
 
struct  BGVOFS
 
struct  CGADD
 
struct  CGADSUB
 
struct  CGDATA
 
struct  CGDATAREAD
 
struct  CGWSEL
 
struct  CharacterLocation
 
struct  COLDATA
 
struct  Color
 
struct  CounterIrqNmiRegisters
 
class  Cpu
 
struct  CpuCallbacks
 
struct  DmaChannel
 
struct  DmaRegisters
 
class  Dsp
 
struct  DspChannel
 
class  Emulator
 A class for emulating and debugging SNES games. More...
 
struct  EmulatorKeybindings
 
struct  INIDISP
 
struct  Input
 
class  InstructionEntry
 
struct  JoypadRegisters
 
struct  Layer
 
struct  M7A
 
struct  M7B
 
struct  M7C
 
struct  M7D
 
struct  M7SEL
 
struct  M7X
 
struct  M7Y
 
struct  MainSubScreenDesignation
 
struct  MaskLogicSettings
 
class  Memory
 Memory interface. More...
 
class  MemoryImpl
 Implementation of the Memory interface for emulating memory in a SNES system. More...
 
struct  MnemonicMode
 
struct  MnemonicModeHash
 
class  MockMemory
 A mock implementation of the Memory class. More...
 
struct  Mosaic
 
struct  MPYH
 
struct  MPYL
 
struct  MPYM
 
struct  OAMADDH
 
struct  OAMADDL
 
struct  OAMAddress
 
struct  OAMDATA
 
struct  OAMDATAREAD
 
struct  OAMSize
 
struct  OBJSEL
 
struct  OPHCT
 
struct  OPVCT
 
class  Ppu
 
class  PpuInterface
 
struct  ScreenDisplay
 
struct  ScreenMode
 
struct  ScrollRegister
 
struct  SETINI
 
struct  SLHV
 
class  Snes
 
class  Spc700
 The Spc700 class represents the SPC700 processor. More...
 
struct  SpriteAttributes
 
struct  STAT77
 
struct  STAT78
 
struct  Tile
 
struct  Tilemap
 
struct  TilemapEntry
 
struct  TileMapLocation
 
struct  Timer
 
struct  TM
 
struct  TMW
 
struct  TS
 
struct  TSW
 
struct  VideoPortControl
 
struct  VMADDH
 
struct  VMADDL
 
struct  VMAIN
 
struct  VMDATA
 
struct  VMDATAHREAD
 
struct  VMDATALREAD
 
struct  W12SEL
 
struct  W34SEL
 
struct  WBGLOG
 
struct  WH0
 
struct  WH1
 
struct  WH2
 
struct  WH3
 
struct  WindowLayer
 
struct  WindowMaskSettings
 
struct  WindowMaskSettings2
 
struct  WindowPosition
 
struct  WOBJLOG
 
struct  WOBJSEL
 
struct  WramAccessRegisters
 

Typedefs

typedef struct yaze::emu::Timer Timer
 
typedef struct yaze::emu::DspChannel DspChannel
 
typedef struct yaze::emu::ApuCallbacks ApuCallbacks
 
typedef struct yaze::emu::DmaChannel DmaChannel
 
typedef struct yaze::emu::CpuCallbacks CpuCallbacks
 
typedef struct yaze::emu::Layer Layer
 
typedef struct yaze::emu::BgLayer BgLayer
 
typedef struct yaze::emu::WindowLayer WindowLayer
 

Enumerations

enum class  AddressingMode {
  kAbsolute , kAbsoluteLong , kAbsoluteIndexedIndirect , kAbsoluteIndexedX ,
  kAbsoluteIndexedY , kAbsoluteIndirect , kAbsoluteIndirectLong , kAbsoluteLongIndexedX ,
  kAccumulator , kBlockMove , kDirectPage , kDirectPageIndexedX ,
  kDirectPageIndexedY , kDirectPageIndirect , kDirectPageIndirectIndexedY , kDirectPageIndirectLong ,
  kDirectPageIndirectLongIndexedY , kDirectPageIndirectIndexedX , kDirectPageIndirectLongIndexedX , kImmediate ,
  kImplied , kProgramCounterRelative , kProgramCounterRelativeLong , kStackRelative ,
  kStackRelativeIndirectIndexedY , kStackRelativeIndirectIndexedYLong , kStack , kStackRelativeIndexedY
}
 
enum class  BackgroundMode {
  Mode0 , Mode1 , Mode2 , Mode3 ,
  Mode4 , Mode5 , Mode6 , Mode7
}
 
enum class  SpriteSize { Size8x8 , Size16x16 , Size32x32 , Size64x64 }
 

Functions

void ResetDma (MemoryImpl *memory)
 
uint8_t ReadDma (MemoryImpl *memory, uint16_t adr)
 
void WriteDma (MemoryImpl *memory, uint16_t adr, uint8_t val)
 
void DoDma (Snes *snes, MemoryImpl *memory, int cpuCycles)
 
void HandleDma (Snes *snes, MemoryImpl *memory, int cpu_cycles)
 
void WaitCycle (Snes *snes, MemoryImpl *memory)
 
void InitHdma (Snes *snes, MemoryImpl *memory, bool do_sync, int cpu_cycles)
 
void DoHdma (Snes *snes, MemoryImpl *memory, bool do_sync, int cycles)
 
void TransferByte (Snes *snes, MemoryImpl *memory, uint16_t aAdr, uint8_t aBank, uint8_t bAdr, bool fromB)
 
void StartDma (MemoryImpl *memory, uint8_t val, bool hdma)
 

Variables

constexpr uint32_t kROMStart = 0x008000
 
constexpr uint32_t kROMSize = 0x200000
 
constexpr uint32_t kRAMStart = 0x7E0000
 
constexpr uint32_t kRAMSize = 0x20000
 
constexpr uint16_t INIDISP = 0x2100
 
constexpr uint16_t OBJSEL = 0x2101
 
constexpr uint16_t OAMADDL = 0x2102
 
constexpr uint16_t OAMADDH = 0x2103
 
constexpr uint16_t OAMDATA = 0x2104
 
constexpr uint16_t BGMODE = 0x2105
 
constexpr uint16_t MOSAIC = 0x2106
 
constexpr uint16_t BG1SC = 0x2107
 
constexpr uint16_t BG2SC = 0x2108
 
constexpr uint16_t BG3SC = 0x2109
 
constexpr uint16_t BG4SC = 0x210A
 
constexpr uint16_t BG12NBA = 0x210B
 
constexpr uint16_t BG34NBA = 0x210C
 
constexpr uint16_t BG1HOFS = 0x210D
 
constexpr uint16_t BG1VOFS = 0x210E
 
constexpr uint16_t BG2HOFS = 0x210F
 
constexpr uint16_t BG2VOFS = 0x2110
 
constexpr uint16_t BG3HOFS = 0x2111
 
constexpr uint16_t BG3VOFS = 0x2112
 
constexpr uint16_t BG4HOFS = 0x2113
 
constexpr uint16_t BG4VOFS = 0x2114
 
constexpr uint16_t VMAIN = 0x2115
 
constexpr uint16_t VMADDL = 0x2116
 
constexpr uint16_t VMADDH = 0x2117
 
constexpr uint16_t VMDATAL = 0x2118
 
constexpr uint16_t VMDATAH = 0x2119
 
constexpr uint16_t M7SEL = 0x211A
 
constexpr uint16_t M7A = 0x211B
 
constexpr uint16_t M7B = 0x211C
 
constexpr uint16_t M7C = 0x211D
 
constexpr uint16_t M7D = 0x211E
 
constexpr uint16_t M7X = 0x211F
 
constexpr uint16_t M7Y = 0x2120
 
constexpr uint16_t CGADD = 0x2121
 
constexpr uint16_t CGDATA = 0x2122
 
constexpr uint16_t W12SEL = 0x2123
 
constexpr uint16_t W34SEL = 0x2124
 
constexpr uint16_t WOBJSEL = 0x2125
 
constexpr uint16_t WH0 = 0x2126
 
constexpr uint16_t WH1 = 0x2127
 
constexpr uint16_t WH2 = 0x2128
 
constexpr uint16_t WH3 = 0x2129
 
constexpr uint16_t WBGLOG = 0x212A
 
constexpr uint16_t WOBJLOG = 0x212B
 
constexpr uint16_t TM = 0x212C
 
constexpr uint16_t TS = 0x212D
 
constexpr uint16_t TMW = 0x212E
 
constexpr uint16_t TSW = 0x212F
 
constexpr uint16_t CGWSEL = 0x2130
 
constexpr uint16_t CGADSUB = 0x2131
 
constexpr uint16_t COLDATA = 0x2132
 
constexpr uint16_t SETINI = 0x2133
 
constexpr uint16_t MPYL = 0x2134
 
constexpr uint16_t MPYM = 0x2135
 
constexpr uint16_t MPYH = 0x2136
 
constexpr uint16_t SLHV = 0x2137
 
constexpr uint16_t OAMDATAREAD = 0x2138
 
constexpr uint16_t VMDATALREAD = 0x2139
 
constexpr uint16_t VMDATAHREAD = 0x213A
 
constexpr uint16_t CGDATAREAD = 0x213B
 
constexpr uint16_t OPHCT = 0x213C
 
constexpr uint16_t OPVCT = 0x213D
 
constexpr uint16_t STAT77 = 0x213E
 
constexpr uint16_t STAT78 = 0x213F
 

Detailed Description

SNES Emulation and debugging tools.

Typedef Documentation

◆ Timer

typedef struct yaze::emu::Timer yaze::emu::Timer

◆ DspChannel

typedef struct yaze::emu::DspChannel yaze::emu::DspChannel

◆ ApuCallbacks

typedef struct yaze::emu::ApuCallbacks yaze::emu::ApuCallbacks

◆ DmaChannel

typedef struct yaze::emu::DmaChannel yaze::emu::DmaChannel

◆ CpuCallbacks

typedef struct yaze::emu::CpuCallbacks yaze::emu::CpuCallbacks

◆ Layer

typedef struct yaze::emu::Layer yaze::emu::Layer

◆ BgLayer

typedef struct yaze::emu::BgLayer yaze::emu::BgLayer

◆ WindowLayer

typedef struct yaze::emu::WindowLayer yaze::emu::WindowLayer

Enumeration Type Documentation

◆ AddressingMode

enum class yaze::emu::AddressingMode
strong
Enumerator
kAbsolute 
kAbsoluteLong 
kAbsoluteIndexedIndirect 
kAbsoluteIndexedX 
kAbsoluteIndexedY 
kAbsoluteIndirect 
kAbsoluteIndirectLong 
kAbsoluteLongIndexedX 
kAccumulator 
kBlockMove 
kDirectPage 
kDirectPageIndexedX 
kDirectPageIndexedY 
kDirectPageIndirect 
kDirectPageIndirectIndexedY 
kDirectPageIndirectLong 
kDirectPageIndirectLongIndexedY 
kDirectPageIndirectIndexedX 
kDirectPageIndirectLongIndexedX 
kImmediate 
kImplied 
kProgramCounterRelative 
kProgramCounterRelativeLong 
kStackRelative 
kStackRelativeIndirectIndexedY 
kStackRelativeIndirectIndexedYLong 
kStack 
kStackRelativeIndexedY 

Definition at line 15 of file asm_parser.h.

◆ BackgroundMode

enum class yaze::emu::BackgroundMode
strong
Enumerator
Mode0 
Mode1 
Mode2 
Mode3 
Mode4 
Mode5 
Mode6 
Mode7 

Definition at line 25 of file ppu.h.

◆ SpriteSize

enum class yaze::emu::SpriteSize
strong
Enumerator
Size8x8 
Size16x16 
Size32x32 
Size64x64 

Definition at line 38 of file ppu.h.

Function Documentation

◆ ResetDma()

void yaze::emu::ResetDma ( MemoryImpl * memory)

◆ ReadDma()

uint8_t yaze::emu::ReadDma ( MemoryImpl * memory,
uint16_t adr )

Definition at line 39 of file dma.cc.

References yaze::emu::MemoryImpl::dma_channels(), and yaze::emu::MemoryImpl::open_bus().

Referenced by yaze::emu::Snes::Rread().

Here is the call graph for this function:

◆ WriteDma()

void yaze::emu::WriteDma ( MemoryImpl * memory,
uint16_t adr,
uint8_t val )

Definition at line 92 of file dma.cc.

References yaze::emu::MemoryImpl::dma_channels().

Referenced by yaze::emu::Snes::Write().

Here is the call graph for this function:

◆ DoDma()

void yaze::emu::DoDma ( Snes * snes,
MemoryImpl * memory,
int cpuCycles )

◆ HandleDma()

◆ WaitCycle()

void yaze::emu::WaitCycle ( Snes * snes,
MemoryImpl * memory )

◆ InitHdma()

void yaze::emu::InitHdma ( Snes * snes,
MemoryImpl * memory,
bool do_sync,
int cpu_cycles )

◆ DoHdma()

◆ TransferByte()

void yaze::emu::TransferByte ( Snes * snes,
MemoryImpl * memory,
uint16_t aAdr,
uint8_t aBank,
uint8_t bAdr,
bool fromB )

◆ StartDma()

void yaze::emu::StartDma ( MemoryImpl * memory,
uint8_t val,
bool hdma )

Definition at line 353 of file dma.cc.

References yaze::emu::MemoryImpl::dma_channels(), and yaze::emu::MemoryImpl::set_dma_state().

Referenced by yaze::emu::Snes::WriteReg().

Here is the call graph for this function:

Variable Documentation

◆ kROMStart

uint32_t yaze::emu::kROMStart = 0x008000
constexpr

Definition at line 56 of file memory.h.

◆ kROMSize

uint32_t yaze::emu::kROMSize = 0x200000
constexpr

Definition at line 57 of file memory.h.

◆ kRAMStart

uint32_t yaze::emu::kRAMStart = 0x7E0000
constexpr

Definition at line 58 of file memory.h.

◆ kRAMSize

uint32_t yaze::emu::kRAMSize = 0x20000
constexpr

Definition at line 59 of file memory.h.

◆ INIDISP

uint16_t yaze::emu::INIDISP = 0x2100
constexpr

Definition at line 9 of file ppu_registers.h.

◆ OBJSEL

uint16_t yaze::emu::OBJSEL = 0x2101
constexpr

Definition at line 13 of file ppu_registers.h.

◆ OAMADDL

uint16_t yaze::emu::OAMADDL = 0x2102
constexpr

Definition at line 16 of file ppu_registers.h.

◆ OAMADDH

uint16_t yaze::emu::OAMADDH = 0x2103
constexpr

Definition at line 17 of file ppu_registers.h.

◆ OAMDATA

uint16_t yaze::emu::OAMDATA = 0x2104
constexpr

Definition at line 21 of file ppu_registers.h.

◆ BGMODE

uint16_t yaze::emu::BGMODE = 0x2105
constexpr

Definition at line 29 of file ppu_registers.h.

◆ MOSAIC

uint16_t yaze::emu::MOSAIC = 0x2106
constexpr

Definition at line 33 of file ppu_registers.h.

◆ BG1SC

uint16_t yaze::emu::BG1SC = 0x2107
constexpr

Definition at line 37 of file ppu_registers.h.

◆ BG2SC

uint16_t yaze::emu::BG2SC = 0x2108
constexpr

Definition at line 38 of file ppu_registers.h.

◆ BG3SC

uint16_t yaze::emu::BG3SC = 0x2109
constexpr

Definition at line 39 of file ppu_registers.h.

◆ BG4SC

uint16_t yaze::emu::BG4SC = 0x210A
constexpr

Definition at line 40 of file ppu_registers.h.

◆ BG12NBA

uint16_t yaze::emu::BG12NBA = 0x210B
constexpr

Definition at line 44 of file ppu_registers.h.

◆ BG34NBA

uint16_t yaze::emu::BG34NBA = 0x210C
constexpr

Definition at line 45 of file ppu_registers.h.

◆ BG1HOFS

uint16_t yaze::emu::BG1HOFS = 0x210D
constexpr

Definition at line 49 of file ppu_registers.h.

◆ BG1VOFS

uint16_t yaze::emu::BG1VOFS = 0x210E
constexpr

Definition at line 50 of file ppu_registers.h.

◆ BG2HOFS

uint16_t yaze::emu::BG2HOFS = 0x210F
constexpr

Definition at line 51 of file ppu_registers.h.

◆ BG2VOFS

uint16_t yaze::emu::BG2VOFS = 0x2110
constexpr

Definition at line 52 of file ppu_registers.h.

◆ BG3HOFS

uint16_t yaze::emu::BG3HOFS = 0x2111
constexpr

Definition at line 53 of file ppu_registers.h.

◆ BG3VOFS

uint16_t yaze::emu::BG3VOFS = 0x2112
constexpr

Definition at line 54 of file ppu_registers.h.

◆ BG4HOFS

uint16_t yaze::emu::BG4HOFS = 0x2113
constexpr

Definition at line 55 of file ppu_registers.h.

◆ BG4VOFS

uint16_t yaze::emu::BG4VOFS = 0x2114
constexpr

Definition at line 56 of file ppu_registers.h.

◆ VMAIN

uint16_t yaze::emu::VMAIN = 0x2115
constexpr

Definition at line 60 of file ppu_registers.h.

◆ VMADDL

uint16_t yaze::emu::VMADDL = 0x2116
constexpr

Definition at line 64 of file ppu_registers.h.

◆ VMADDH

uint16_t yaze::emu::VMADDH = 0x2117
constexpr

Definition at line 65 of file ppu_registers.h.

◆ VMDATAL

uint16_t yaze::emu::VMDATAL = 0x2118
constexpr

Definition at line 67 of file ppu_registers.h.

◆ VMDATAH

uint16_t yaze::emu::VMDATAH = 0x2119
constexpr

Definition at line 68 of file ppu_registers.h.

◆ M7SEL

uint16_t yaze::emu::M7SEL = 0x211A
constexpr

Definition at line 69 of file ppu_registers.h.

◆ M7A

uint16_t yaze::emu::M7A = 0x211B
constexpr

Definition at line 70 of file ppu_registers.h.

◆ M7B

uint16_t yaze::emu::M7B = 0x211C
constexpr

Definition at line 71 of file ppu_registers.h.

◆ M7C

uint16_t yaze::emu::M7C = 0x211D
constexpr

Definition at line 72 of file ppu_registers.h.

◆ M7D

uint16_t yaze::emu::M7D = 0x211E
constexpr

Definition at line 73 of file ppu_registers.h.

◆ M7X

uint16_t yaze::emu::M7X = 0x211F
constexpr

Definition at line 74 of file ppu_registers.h.

◆ M7Y

uint16_t yaze::emu::M7Y = 0x2120
constexpr

Definition at line 75 of file ppu_registers.h.

◆ CGADD

uint16_t yaze::emu::CGADD = 0x2121
constexpr

Definition at line 76 of file ppu_registers.h.

◆ CGDATA

uint16_t yaze::emu::CGDATA = 0x2122
constexpr

Definition at line 77 of file ppu_registers.h.

◆ W12SEL

uint16_t yaze::emu::W12SEL = 0x2123
constexpr

Definition at line 78 of file ppu_registers.h.

◆ W34SEL

uint16_t yaze::emu::W34SEL = 0x2124
constexpr

Definition at line 79 of file ppu_registers.h.

◆ WOBJSEL

uint16_t yaze::emu::WOBJSEL = 0x2125
constexpr

Definition at line 80 of file ppu_registers.h.

◆ WH0

uint16_t yaze::emu::WH0 = 0x2126
constexpr

Definition at line 81 of file ppu_registers.h.

◆ WH1

uint16_t yaze::emu::WH1 = 0x2127
constexpr

Definition at line 82 of file ppu_registers.h.

◆ WH2

uint16_t yaze::emu::WH2 = 0x2128
constexpr

Definition at line 83 of file ppu_registers.h.

◆ WH3

uint16_t yaze::emu::WH3 = 0x2129
constexpr

Definition at line 84 of file ppu_registers.h.

◆ WBGLOG

uint16_t yaze::emu::WBGLOG = 0x212A
constexpr

Definition at line 85 of file ppu_registers.h.

◆ WOBJLOG

uint16_t yaze::emu::WOBJLOG = 0x212B
constexpr

Definition at line 86 of file ppu_registers.h.

◆ TM

uint16_t yaze::emu::TM = 0x212C
constexpr

Definition at line 87 of file ppu_registers.h.

◆ TS

uint16_t yaze::emu::TS = 0x212D
constexpr

Definition at line 88 of file ppu_registers.h.

◆ TMW

uint16_t yaze::emu::TMW = 0x212E
constexpr

Definition at line 89 of file ppu_registers.h.

◆ TSW

uint16_t yaze::emu::TSW = 0x212F
constexpr

Definition at line 90 of file ppu_registers.h.

◆ CGWSEL

uint16_t yaze::emu::CGWSEL = 0x2130
constexpr

Definition at line 91 of file ppu_registers.h.

◆ CGADSUB

uint16_t yaze::emu::CGADSUB = 0x2131
constexpr

Definition at line 92 of file ppu_registers.h.

◆ COLDATA

uint16_t yaze::emu::COLDATA = 0x2132
constexpr

Definition at line 93 of file ppu_registers.h.

◆ SETINI

uint16_t yaze::emu::SETINI = 0x2133
constexpr

Definition at line 94 of file ppu_registers.h.

◆ MPYL

uint16_t yaze::emu::MPYL = 0x2134
constexpr

Definition at line 95 of file ppu_registers.h.

◆ MPYM

uint16_t yaze::emu::MPYM = 0x2135
constexpr

Definition at line 96 of file ppu_registers.h.

◆ MPYH

uint16_t yaze::emu::MPYH = 0x2136
constexpr

Definition at line 97 of file ppu_registers.h.

◆ SLHV

uint16_t yaze::emu::SLHV = 0x2137
constexpr

Definition at line 98 of file ppu_registers.h.

◆ OAMDATAREAD

uint16_t yaze::emu::OAMDATAREAD = 0x2138
constexpr

Definition at line 99 of file ppu_registers.h.

◆ VMDATALREAD

uint16_t yaze::emu::VMDATALREAD = 0x2139
constexpr

Definition at line 100 of file ppu_registers.h.

◆ VMDATAHREAD

uint16_t yaze::emu::VMDATAHREAD = 0x213A
constexpr

Definition at line 101 of file ppu_registers.h.

◆ CGDATAREAD

uint16_t yaze::emu::CGDATAREAD = 0x213B
constexpr

Definition at line 102 of file ppu_registers.h.

◆ OPHCT

uint16_t yaze::emu::OPHCT = 0x213C
constexpr

Definition at line 103 of file ppu_registers.h.

◆ OPVCT

uint16_t yaze::emu::OPVCT = 0x213D
constexpr

Definition at line 104 of file ppu_registers.h.

◆ STAT77

uint16_t yaze::emu::STAT77 = 0x213E
constexpr

Definition at line 105 of file ppu_registers.h.

◆ STAT78

uint16_t yaze::emu::STAT78 = 0x213F
constexpr

Definition at line 106 of file ppu_registers.h.