feat: Enhance Emulator with State Management and Command-Line Options

- Added command-line flags for ROM loading, GUI toggling, state loading, and dumping, improving emulator flexibility.
- Implemented state management in the Snes class with loadState and saveState methods for saving and restoring emulator state.
- Updated the main emulator loop to handle frame counting and logging, providing better insights during execution.
- Refactored CMake configuration to streamline build options for the emulator application.
This commit is contained in:
scawful
2025-10-06 13:07:49 -04:00
parent ba40ddab2a
commit 84726dad98
4 changed files with 200 additions and 25 deletions

View File

@@ -59,6 +59,9 @@ class Snes {
void SetPixels(uint8_t* pixel_data);
void SetButtonState(int player, int button, bool pressed);
void loadState(const std::string& path);
void saveState(const std::string& path);
bool running() const { return running_; }
auto cpu() -> Cpu& { return cpu_; }
auto ppu() -> Ppu& { return ppu_; }