Closed diogotito closed 2 months ago
can we apply this for fpt-egui too please?
Done.
The logic is a bit duplicated.
Maybe we could generalize fpt-cli's GameboyOptions
into a GameboyBuilder
in project fpt
, and derive some clap traits on it, but I don't know about adding the clap dependency on fpt.
btw fpt-egui is building with errors, but they should be fixed when overall work on #47 (which this PR complements) finishes.
I used the values found at https://gbdev.io/pandocs/Power_Up_Sequence.html#console-state-after-boot-rom-hand-off.
I also moved these values from the
LR35902
constructor to thefpt
library crate root module, in aGameboy
method, that is optionally called fromfpt-cli
by passing--fake-bootrom dmg0
as the first argument in the CLI (maybe this should be the default, instead of fully emulating the bootrom?)I'm open to other ways of modeling other bootrom values, or going with a simpler approach (maybe it's too early for a
struct GameboyConfig
infpt-cli
?).