From d8dd99c9e40518428ab7198ca0105025a5c6daa4 Mon Sep 17 00:00:00 2001 From: Muhammad Nauman Raza Date: Sat, 23 Mar 2024 20:51:03 +0000 Subject: [PATCH] feat: skip BIOS by default --- app/src/cli.yml | 5 +---- app/src/main.rs | 6 ++---- app/src/options.rs | 4 ---- core/src/gpu/mod.rs | 9 --------- 4 files changed, 3 insertions(+), 21 deletions(-) diff --git a/app/src/cli.yml b/app/src/cli.yml index dae9712..ffcb0ec 100644 --- a/app/src/cli.yml +++ b/app/src/cli.yml @@ -28,9 +28,6 @@ args: long: rtc help: Force cartridge to have RTC required: false - - skip_bios: - long: skip-bios - help: Skip running bios and start from the ROM instead - debug: long: debug help: Use the custom debugger @@ -49,4 +46,4 @@ args: help: Text file with debugger commands to run required: false requires: - debug \ No newline at end of file + debug diff --git a/app/src/main.rs b/app/src/main.rs index 71dba13..07ab52c 100644 --- a/app/src/main.rs +++ b/app/src/main.rs @@ -102,10 +102,8 @@ fn main() -> Result<(), Box> { // normal_panic(panic_info); // })); - if opts.skip_bios { - println!("Skipping bios animation.."); - gba.skip_bios(); - } + // Skip the BIOS animation + gba.skip_bios(); if opts.gdbserver { gba.start_gdbserver(opts.gdbserver_port); diff --git a/app/src/options.rs b/app/src/options.rs index 82339b7..a6bdfc6 100644 --- a/app/src/options.rs +++ b/app/src/options.rs @@ -21,10 +21,6 @@ pub struct Options { #[structopt(long, parse(from_os_str), default_value = "gba_bios.bin")] pub bios: PathBuf, - /// Skip running the bios boot animation and jump straight to the ROM - #[structopt(long)] - pub skip_bios: bool, - /// Do not output sound #[structopt(long)] pub silent: bool, diff --git a/core/src/gpu/mod.rs b/core/src/gpu/mod.rs index 58153d4..bf7ca77 100644 --- a/core/src/gpu/mod.rs +++ b/core/src/gpu/mod.rs @@ -198,15 +198,6 @@ impl Gpu { } } - pub fn skip_bios(&mut self) { - for i in 0..2 { - self.bg_aff[i].pa = 0x100; - self.bg_aff[i].pb = 0; - self.bg_aff[i].pc = 0; - self.bg_aff[i].pd = 0x100; - } - } - /// helper method that reads the palette index from a base address and x + y pub fn read_pixel_index(&mut self, addr: u32, x: u32, y: u32, format: PixelFormat) -> usize { match format {