feat: skip BIOS by default

This commit is contained in:
Muhammad Nauman Raza 2024-03-23 20:51:03 +00:00
parent c107fd1447
commit d8dd99c9e4
No known key found for this signature in database
GPG key ID: 31BC90D626D2DBBE
4 changed files with 3 additions and 21 deletions

View file

@ -28,9 +28,6 @@ args:
long: rtc long: rtc
help: Force cartridge to have RTC help: Force cartridge to have RTC
required: false required: false
- skip_bios:
long: skip-bios
help: Skip running bios and start from the ROM instead
- debug: - debug:
long: debug long: debug
help: Use the custom debugger help: Use the custom debugger
@ -49,4 +46,4 @@ args:
help: Text file with debugger commands to run help: Text file with debugger commands to run
required: false required: false
requires: requires:
debug debug

View file

@ -102,10 +102,8 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
// normal_panic(panic_info); // normal_panic(panic_info);
// })); // }));
if opts.skip_bios { // Skip the BIOS animation
println!("Skipping bios animation.."); gba.skip_bios();
gba.skip_bios();
}
if opts.gdbserver { if opts.gdbserver {
gba.start_gdbserver(opts.gdbserver_port); gba.start_gdbserver(opts.gdbserver_port);

View file

@ -21,10 +21,6 @@ pub struct Options {
#[structopt(long, parse(from_os_str), default_value = "gba_bios.bin")] #[structopt(long, parse(from_os_str), default_value = "gba_bios.bin")]
pub bios: PathBuf, 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 /// Do not output sound
#[structopt(long)] #[structopt(long)]
pub silent: bool, pub silent: bool,

View file

@ -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 /// 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 { pub fn read_pixel_index(&mut self, addr: u32, x: u32, y: u32, format: PixelFormat) -> usize {
match format { match format {