diff --git a/Cargo.toml b/Cargo.toml index 2757cd4..78cf39c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,6 @@ members = [ "arm7tdmi", "utils", "app", - "fps_bench" ] resolver = "1" default-members = ["platform/rustboyadvance-sdl2"] diff --git a/fps_bench/Cargo.toml b/fps_bench/Cargo.toml deleted file mode 100644 index 85aaaf1..0000000 --- a/fps_bench/Cargo.toml +++ /dev/null @@ -1,9 +0,0 @@ -[package] -name = "fps_bench" -version = "0.1.0" -authors = ["Michel Heily "] -edition = "2018" - -[dependencies] -rustboyadvance-core = {path = "../core/"} -rustboyadvance-utils = {path = "../utils/"} diff --git a/fps_bench/src/main.rs b/fps_bench/src/main.rs deleted file mode 100644 index 0b1bcc4..0000000 --- a/fps_bench/src/main.rs +++ /dev/null @@ -1,36 +0,0 @@ -use std::env; -use std::path::Path; - -use rustboyadvance_core::prelude::*; -use rustboyadvance_utils::FpsCounter; - -fn main() { - if env::args().count() < 3 { - eprintln!("usage: {} ", env::args().nth(0).unwrap()); - return; - } - - let bios_path = env::args().nth(1).expect("missing "); - let rom_path = env::args().nth(2).expect("missing "); - - let bios = read_bin_file(Path::new(&bios_path)).expect("failed to read bios file"); - let rom = read_bin_file(Path::new(&rom_path)).expect("failed to read rom file"); - - let gamepak = GamepakBuilder::new() - .take_buffer(rom.into_boxed_slice()) - .with_sram() - .without_backup_to_file() - .build() - .unwrap(); - - let mut gba = GameBoyAdvance::new(bios.into_boxed_slice(), gamepak, NullAudio::new()); - gba.skip_bios(); - - let mut fps_counter = FpsCounter::default(); - loop { - gba.frame(); - if let Some(fps) = fps_counter.tick() { - println!("FPS: {}", fps); - } - } -}