-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: enhance logging and parse cli arguments #10
Conversation
As of now, I implemented a nicer way to log debug messages. This is part of the debugging experience, but has not really much to do with a debug window. I would suggest to merge this (anyway should you want to) without having implemented the actual window, such that that task can be done cleanly in a new PR. @benzammour Title and description can be changed accordingly. |
I think that |
I think that maybe the |
As far as I'm aware,
If frequency and path to ROM shall be parsed by getopts, we would have to introduce flags for those arguments, making them optional. This, however, would only make sense for the frequency, but not for the path to ROM, as this emulator is quite useless without a ROM loaded. |
I see 🤔 Making frequency an option sounds like a good idea while keeping the ROM path, as you suggested, an argument |
This commit changes the cli init function to return a pointer to the structure to avoid heavy copying. The config struct is freed after the main window is closed.
Co-authored-by: Marc Luqué <[email protected]>
5be5d35
to
93b6ad7
Compare
93b6ad7
to
131dcc2
Compare
In this pull request, a rudimentary version of a debug window will be implemented. This resolves (part of) #3.This pull request adds a nicer way to log to the console as well as the ability to take command line arguments via flags and optional parameters. Using this, flags for setting the debug level
as well as setting the frequency of the emulated CPU
which previously was a mandatory argument, were introduced. New usage is thus:
Logging levels are: