Recording Controller / Auto-Playing Controller PR#32
Conversation
|
Let's try to rethink this approach. Our requirements are two modes: 1. Record all events that are passed to the controller, as a user presses them. Now, why does controller need to peek into debugger's ticks? The point of the tick is that is synchronized across all objects. Every time We come to the Recording feature. Since our 2. Playback events existing in memory, just as a user would. Apologies for that exceedingly verbose comment 😅, but I felt we could use some streamlining here. Let me know if you've got some opinions, and we can refine this a bit more. |
31283cb to
22caaeb
Compare
|
@anish0x2a Looks like the CI is failing now because it can't find the JSON header. Can you fix this? |
| * @param button Button to set | ||
| * @param value Value to set | ||
| */ | ||
| void set_button(Button button, bool value); |
There was a problem hiding this comment.
This can be made protected instead of public
| * Specifies all the Debug configurations that should go into GameBoy | ||
| */ | ||
| struct DebugOptions { | ||
| std::string rom_path; |
There was a problem hiding this comment.
rom_path is not a debug option, it needs to be passed regardless of Debugging.
Move this back out as a normal parameter.
| bool is_recording = false; | ||
| std::string recording_output_json_filename = "test.txt"; |
There was a problem hiding this comment.
Add docstring comments for struct members.
| * @param rom_path Path to ROM File | ||
| */ | ||
| Gameboy(std::string rom_path); | ||
| Gameboy(DebugOptions debug_options); |
There was a problem hiding this comment.
Like I mentioned above, the rom_path should still be an independent parameter.
This PR adds the ability to record and play automatic inputs. Still a work in progress.