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:
@@ -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_; }
|
||||
|
||||
Reference in New Issue
Block a user