chip8emu
chip8emu copied to clipboard
Added optional command line argument to set cycle-rate of CPU-loop
Provided the cycleRate
attribute to the Machine class. An optional argument can be passed to the emulator in microseconds to control the CPU loop rate, which is otherwise set to 10 by default.
Example to set cycle rate to 5000 microseconds:
./bin/c8emu ./roms/games/Tetris\ \[Fran\ Dachille\,\ 1991\].ch8 5000
Closes #2
Yes
On Sun, Oct 25, 2020 at 2:50 PM Bhavya Chopra [email protected] wrote:
@BhavyaC16 commented on this pull request.
In include/Machine.hpp https://github.com/LakshyAAAgrawal/chip8emu/pull/32#discussion_r511570168 :
@@ -26,6 +26,7 @@ class Machine{ Keyboard kb; // presents Keyboard related functions uint16_t PC; // Program Counter std::chrono::steady_clock::time_point last_tick;
- uint16_t cycleRate; // Argument that can be added to set the cycle-rate of the emulator
Will cpu_sleep_period be a better variable name?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/LakshyAAAgrawal/chip8emu/pull/32#discussion_r511570168, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD2SKLMVXDGYUKHEHIZS6XTSMPUW7ANCNFSM4S6FIOYQ .
Hey, I have made the suggested changes!