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

20 lines
508 B
Rust
Raw Normal View History

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")
2021-12-06 03:41:23 +00:00
.arg("<ROM> '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)
});
}