Skip to content

Conversation

@nullstalgia
Copy link
Contributor

Howdy!

I was messing around with compiling Rust for GBA while creating binaries to test my recent USB Multiboot project (and it's speed test binary), and the pre-defined VolatileAddresss and their bespoke types (like IrqBits) are super handy to use outside of using gba as a game engine.

However, since it assumes it's the only global ASM crate, I can't use it for Multiboot projects due to a cartridge-assuming runtime, and the space supplied for the header not having enough room. Additionally, I can't use its predefined addresses and types in a project that is properly set up, for the same reason (the global ASM runtime).

So I chose to make it entirely optional while working on my aforementioned speed test binary, using my own runtime while still using gba's types.

I still had to make my own consts GBA_BIOS_IRQ_HANDLER @ 0x03007FFC and GBA_BIOS_IF @ 0x03007DF8 bindings, but it worked well!

If you'd like assistance in making gba Multiboot-compatible, I'd be very willing to lend a hand!

@Lokathor
Copy link
Member

I'd like as much assistance as you can provide, because I don't know anything about multiboot. If you think we should add it in this PR we can, or I can merge this now and multiboot can be improved later.

@nullstalgia
Copy link
Contributor Author

I think it would be fine to merge this and work on proper Multiboot compatibility in it's own PR, since this would let us plug different runtime impls in and out during testing without breaking anything major (as far as I can tell).

@Lokathor Lokathor merged commit 28401c8 into rust-console:main Dec 31, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants