A no_std rust crate for detecting the environment/system in which the Game Boy Advance ROM is currently running ex. GBA/NDS/mGBA/VBA/gpSP.
https://github.com/tolik518/gba_env.git
A no_std rust crate for detecting the environment/system in which the Game Boy Advance ROM is currently running ex. GBA/NDS/mGBA/VBA/gpSP.
You can find the documentation for gbaenv here.
You would need to use the nightly rust version and add this to your Cargo.toml:
[dependencies]
gba_env = "1.0"
Then you can use the crate in your code:
use gba_env;
use gba_env::Environment;
fn main() {
let env = gba_env::get_env();
if env == Environment::GpSp {
println!("Sorry, but this ROM is not supported on gpSP.");
}
}