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

@@ -108,22 +108,15 @@ ROMInfo SNES::ReadRomHeader(uint32_t offset) {
}
void SNES::Init(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());
// Read the ROM header
auto header_offset = GetHeaderOffset(memory_);
rom_info_ = ReadRomHeader(header_offset);
// Perform a long jump into a FastROM bank (if the ROM speed is FastROM)
// Disable the emulation flag (switch to 65816 native mode)
// Initialize CPU
cpu.Init();
// Read the ROM header
auto header_offset = GetHeaderOffset(memory_);
rom_info_ = ReadRomHeader(header_offset);
cpu.PC = rom_info_.resetVector;
// Initialize PPU