Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no_game wont run in NanoBoyAdvance #710

Closed
tolik518 opened this issue May 26, 2024 · 1 comment
Closed

no_game wont run in NanoBoyAdvance #710

tolik518 opened this issue May 26, 2024 · 1 comment

Comments

@tolik518
Copy link
Contributor

tolik518 commented May 26, 2024

When I was writing a demo for a small library I wrote (gba_env) I was trying to figure out why it wasn't running in NanoBoyAdvance 1.8.1, with Bios loaded, but skipped (Config -> System -> Skin BIOS), it wasn't working as intended.
It just shows the background-color and seems to be stuck.

Now I've figured out that it's not only my demo, but also the examples included here in the repo.

#[agb::entry]
fn main(mut gba: agb::Gba) -> ! {
    agb::no_game(gba);
}

It looks like even no_game() seems to do be missing something that usually is initialized in the BIOS, because if the BIOS isn't skipped, it works as intended.

In discord someone suggested to wait for the vblank interrupt as the first step in the main

 while (REG_VCOUNT != 160); while (REG_VCOUNT != 161);

which I tried to do the following way but it seems like this won't fix the issue just yet.

let vblank = agb::interrupt::VBlank::get();
agb::interrupt::VBlank::wait_for_vblank(&vblank);

Is there a known solution?

@corwinkuiper
Copy link
Collaborator

As it works on real hardware, this looks like an nba bug.

@corwinkuiper corwinkuiper closed this as not planned Won't fix, can't repro, duplicate, stale May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants