A class for emulating and debugging SNES games. More...
#include <emulator.h>
Classes | |
struct | Bookmark |
Public Member Functions | |
Emulator () | |
void | Run () |
auto | snes () -> SNES & |
auto | running () const -> bool |
void | set_audio_buffer (int16_t *audio_buffer) |
auto | set_audio_device_id (SDL_AudioDeviceID audio_device) |
auto | wanted_samples () const -> int |
Public Member Functions inherited from yaze::app::SharedRom | |
SharedRom ()=default | |
virtual | ~SharedRom ()=default |
std::shared_ptr< Rom > | shared_rom () |
auto | rom () |
Private Member Functions | |
void | RenderNavBar () |
void | HandleEvents () |
void | RenderSnesPpu () |
void | RenderBreakpointList () |
void | RenderMemoryViewer () |
void | RenderCpuInstructionLog (const std::vector< InstructionEntry > &instructionLog) |
Private Attributes | |
std::vector< Bookmark > | bookmarks |
bool | step_ = true |
bool | power_ = false |
bool | loading_ = false |
bool | running_ = false |
bool | turbo_mode_ = false |
float | wanted_frames_ |
int | wanted_samples_ |
uint8_t | manual_pb_ = 0 |
uint16_t | manual_pc_ = 0 |
uint64_t | count_frequency |
uint64_t | last_count |
float | time_adder = 0.0 |
int16_t * | audio_buffer_ |
SDL_AudioDeviceID | audio_device_ |
SNES | snes_ |
SDL_Texture * | ppu_texture_ |
std::vector< uint8_t > | rom_data_ |
EmulatorKeybindings | keybindings_ |
gui::zeml::Node | emulator_node_ |
Additional Inherited Members | |
Static Public Attributes inherited from yaze::app::SharedRom | |
static std::shared_ptr< Rom > | shared_rom_ = nullptr |
A class for emulating and debugging SNES games.
Definition at line 65 of file emulator.h.
|
inline |
Definition at line 67 of file emulator.h.
References yaze::app::emu::SNES::apu(), yaze::app::emu::SNES::cpu(), emulator_node_, yaze::app::gui::zeml::Node::GetNode(), yaze::app::emu::SNES::Memory(), yaze::app::emu::SNES::mutable_cycles(), yaze::app::gui::zeml::Parse(), and snes_.
void yaze::app::emu::Emulator::Run | ( | ) |
Definition at line 52 of file emulator.cc.
References audio_buffer_, audio_device_, count_frequency, emulator_node_, yaze::app::core::Renderer::GetInstance(), HandleEvents(), yaze::app::emu::SNES::Init(), last_count, yaze::app::emu::SNES::Memory(), ppu_texture_, yaze::app::gui::zeml::Render(), RenderNavBar(), yaze::app::SharedRom::rom(), rom_data_, yaze::app::emu::SNES::RunFrame(), yaze::app::emu::SNES::running(), running_, yaze::app::emu::SNES::SetPixels(), yaze::app::emu::SNES::SetSamples(), snes_, time_adder, turbo_mode_, wanted_frames_, and wanted_samples_.
Referenced by yaze::app::editor::EditorManager::DrawYazeMenuBar().
|
inline |
Definition at line 137 of file emulator.h.
References snes_.
|
inline |
Definition at line 138 of file emulator.h.
References running_.
|
inline |
Definition at line 139 of file emulator.h.
References audio_buffer_.
|
inline |
Definition at line 140 of file emulator.h.
References audio_device_.
|
inline |
Definition at line 143 of file emulator.h.
References wanted_samples_.
|
private |
Definition at line 137 of file emulator.cc.
References yaze::app::emu::SNES::cpu(), ICON_MD_INFO, ICON_MD_MEMORY, ICON_MD_PAUSE, ICON_MD_PLAY_ARROW, ICON_MD_REFRESH, ICON_MD_SAVE, ICON_MD_SETTINGS, ICON_MD_SKIP_NEXT, ICON_MD_STOP, ICON_MD_SYSTEM_UPDATE_ALT, yaze::app::emu::SNES::Init(), yaze::app::gui::zeml::Parse(), yaze::app::gui::zeml::Render(), RenderMemoryViewer(), yaze::app::emu::SNES::Reset(), rom_data_, running_, yaze::app::core::FileDialogWrapper::ShowOpenFileDialog(), snes_, and turbo_mode_.
Referenced by Run().
|
private |
Definition at line 262 of file emulator.cc.
References yaze::app::emu::EmulatorKeybindings::a_button, yaze::app::emu::EmulatorKeybindings::b_button, yaze::app::emu::EmulatorKeybindings::down_button, keybindings_, yaze::app::emu::EmulatorKeybindings::l_button, yaze::app::emu::EmulatorKeybindings::left_button, yaze::app::emu::EmulatorKeybindings::r_button, yaze::app::emu::EmulatorKeybindings::right_button, yaze::app::emu::EmulatorKeybindings::select_button, yaze::app::emu::SNES::SetButtonState(), snes_, yaze::app::emu::EmulatorKeybindings::start_button, yaze::app::emu::EmulatorKeybindings::up_button, yaze::app::emu::EmulatorKeybindings::x_button, and yaze::app::emu::EmulatorKeybindings::y_button.
Referenced by Run().
|
private |
Definition at line 114 of file emulator.cc.
References ppu_texture_, yaze::app::emu::SNES::running(), and snes_.
|
private |
Definition at line 361 of file emulator.cc.
References yaze::app::emu::SNES::apu(), yaze::app::emu::SNES::cpu(), yaze::app::gui::InputHexByte(), yaze::app::gui::InputHexWord(), manual_pb_, manual_pc_, and snes_.
|
private |
Definition at line 423 of file emulator.cc.
References yaze::app::emu::SNES::apu(), bookmarks, yaze::app::emu::SNES::get_ram(), ICON_MD_STAR, yaze::app::gui::InputHex(), yaze::app::emu::SNES::Memory(), and snes_.
Referenced by RenderNavBar().
|
private |
Definition at line 506 of file emulator.cc.
References opcode_to_mnemonic.
|
private |
Definition at line 157 of file emulator.h.
Referenced by RenderMemoryViewer().
|
private |
Definition at line 162 of file emulator.h.
|
private |
Definition at line 163 of file emulator.h.
|
private |
Definition at line 164 of file emulator.h.
|
private |
Definition at line 165 of file emulator.h.
Referenced by RenderNavBar(), Run(), and running().
|
private |
Definition at line 166 of file emulator.h.
Referenced by RenderNavBar(), and Run().
|
private |
Definition at line 168 of file emulator.h.
Referenced by Run().
|
private |
Definition at line 169 of file emulator.h.
Referenced by Run(), and wanted_samples().
|
private |
Definition at line 171 of file emulator.h.
Referenced by RenderBreakpointList().
|
private |
Definition at line 172 of file emulator.h.
Referenced by RenderBreakpointList().
|
private |
Definition at line 175 of file emulator.h.
Referenced by Run().
|
private |
Definition at line 176 of file emulator.h.
Referenced by Run().
|
private |
Definition at line 177 of file emulator.h.
Referenced by Run().
|
private |
Definition at line 179 of file emulator.h.
Referenced by Run(), and set_audio_buffer().
|
private |
Definition at line 180 of file emulator.h.
Referenced by Run(), and set_audio_device_id().
|
private |
Definition at line 182 of file emulator.h.
Referenced by Emulator(), HandleEvents(), RenderBreakpointList(), RenderMemoryViewer(), RenderNavBar(), RenderSnesPpu(), Run(), and snes().
|
private |
Definition at line 183 of file emulator.h.
Referenced by RenderSnesPpu(), and Run().
|
private |
Definition at line 185 of file emulator.h.
Referenced by RenderNavBar(), and Run().
|
private |
Definition at line 187 of file emulator.h.
Referenced by HandleEvents().
|
private |
Definition at line 189 of file emulator.h.
Referenced by Emulator(), and Run().