moa/frontends/moa-minifb/src/bin/moa-genesis.rs

23 lines
545 B
Rust
Raw Normal View History

use clap::Arg;
use moa_minifb;
2021-12-06 03:41:23 +00:00
use moa::machines::genesis::{build_genesis, SegaGenesisOptions};
fn main() {
let matches = moa_minifb::new("Sega Genesis/Mega Drive Emulator")
.arg(Arg::new("ROM")
2022-09-13 23:57:56 +00:00
.about("ROM file to load (must be flat binary)"))
.get_matches();
2021-12-06 03:41:23 +00:00
let mut options = SegaGenesisOptions::new();
if let Some(filename) = matches.value_of("ROM") {
options.rom = filename.to_string();
}
moa_minifb::run(matches, |frontend| {
2021-12-06 03:41:23 +00:00
build_genesis(frontend, options)
});
}