Closed robo9k closed 9 years ago
The first version in 96973f2 does not implement the chip8_ui intro
part.
Upon further investigation, I do not think the intro warrants its own command. It could either be distributed as a separate file (intro.ch8
) or if it should be built-in then it could be an addition, as in --with-intro
or such (which might require implementing chip8_vm::instructions::Sys(0x42)
or similar to return control).
Yeah this sounds good to me.
I'm okay not having the intro open by default, in that case we should just make the rom parameter required. I'd like to continue to distribute the intro in an examples directory so that someone can try the app without going hunting for roms.
Thanks for doing this!
Right now the
chip8_ui
executable only supports one positional argument as the path of a ROM file. If no arguments are given, the intro is run instead.I suggest using docopt/docopts.rs (Rust implementation of docopt) to implement more complex and self-documenting parsing of arguments:
This pattern is also expandable, e.g. one might add a
--config=pong2.toml
option and such lateron.