GUI Updates

Add DisplaySettings, replace ImGui style editor
Update Debugger interface with memory viewer
Decompose SNES initialization routines
Update DungeonObjectRenderer plan
Add DrawObjectRenderer UI mockup fofr DungeonEditor
This commit is contained in:
scawful
2023-11-21 11:07:04 -05:00
parent f7224c3716
commit 59e7dcc7f0
14 changed files with 712 additions and 94 deletions

View File

@@ -65,12 +65,22 @@ class SNES : public DMA {
auto Cpu() -> CPU& { return cpu; }
auto Ppu() -> PPU& { return ppu; }
auto Memory() -> MemoryImpl* { return &memory_; }
void SetCpuMode(int mode) { cpu_mode_ = mode; }
CPU::UpdateMode GetCpuMode() const {
return static_cast<CPU::UpdateMode>(cpu_mode_);
}
void SetupMemory(ROM& rom) {
// Setup observers for the memory space
memory_.AddObserver(&apu);
memory_.AddObserver(&ppu);
// Load the ROM into memory and set up the memory mapping
memory_.Initialize(rom.vector());
}
private:
void WriteToRegister(uint16_t address, uint8_t value) {
memory_.WriteByte(address, value);