NDS-Emulator icon indicating copy to clipboard operation
NDS-Emulator copied to clipboard

Have better error messages on missing bios and firmware files

Open liberodark opened this issue 3 years ago • 4 comments

Have build your project on linux.

But not running game is pokemon diamond

./nds-emulator test.nds 
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/main.rs:134:34
stack backtrace:
   0: rust_begin_unwind
             at /build/rust/src/rustc-1.52.1-src/library/std/src/panicking.rs:493:5
   1: core::panicking::panic_fmt
             at /build/rust/src/rustc-1.52.1-src/library/core/src/panicking.rs:92:14
   2: core::option::expect_none_failed
             at /build/rust/src/rustc-1.52.1-src/library/core/src/option.rs:1329:5
   3: core::result::Result<T,E>::unwrap
             at /build/rust/src/rustc-1.52.1-src/library/core/src/result.rs:1037:23
   4: nds_emulator::main::load_rom
             at /home/pc/Bureau/NDS-Emulator-master/src/main.rs:134:13
   5: nds_emulator::main
             at /home/pc/Bureau/NDS-Emulator-master/src/main.rs:76:19
   6: core::ops::function::FnOnce::call_once
             at /build/rust/src/rustc-1.52.1-src/library/core/src/ops/function.rs:227:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

liberodark avatar May 20 '21 22:05 liberodark

You need to need to have the bios and firmware files named bios7.bin, bios9.bin, and firmware.bin.

I'll still keep this issue up since the error message should be nicer.

Ace314159 avatar May 29 '21 21:05 Ace314159

Have test with bios in same folder :

./nds-emulator ./test.nds 
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/main.rs:136:34
stack backtrace:
   0: rust_begin_unwind
             at /build/rust/src/rustc-1.52.1-src/library/std/src/panicking.rs:493:5
   1: core::panicking::panic_fmt
             at /build/rust/src/rustc-1.52.1-src/library/core/src/panicking.rs:92:14
   2: core::option::expect_none_failed
             at /build/rust/src/rustc-1.52.1-src/library/core/src/option.rs:1329:5
   3: core::result::Result<T,E>::unwrap
             at /build/rust/src/rustc-1.52.1-src/library/core/src/result.rs:1037:23
   4: nds_emulator::main::load_rom
             at /home/pc/Bureau/NDS-Emulator-master/src/main.rs:136:13
   5: nds_emulator::main
             at /home/pc/Bureau/NDS-Emulator-master/src/main.rs:73:19
   6: core::ops::function::FnOnce::call_once
             at /build/rust/src/rustc-1.52.1-src/library/core/src/ops/function.rs:227:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

liberodark avatar May 31 '21 05:05 liberodark

Currently, by default it expects those 3 files inside a ROMs subfolder.

Ace314159 avatar May 31 '21 07:05 Ace314159

I also had this problem, I fixed it by doing cargo build --release

r/lateresponses tho 💀

SpeckyYT avatar Jan 03 '22 20:01 SpeckyYT