This is an overhaul of the existing crate into a new state utilizing the fun new features of Rust since the crate was last touched.
Mostly this means that all the external assembly is now naked functions and/or global assembly. It seems like the instruciton_set attribute and interworking behaves better with naked functions than global assembly, so they're preferred where possible. Some functions groups are too interconnected to easily break them apart without inflating the code size.
Subsystems of the GBA are now handled by one module per subsystem. Ideally, each module's docs would contain an explanation of how to utilize that subsystem, but right now there's no docs, so "go read GBATEK".
All MMIO mappings are stored in an mmio module, similarly the assembly stuff is in an assembly_runtime module. These are the most GBA specific parts of things. The data type definitions for use with MMIO could theoretically be reused by an emulator running on a PC or whatever.
There's some portions of the previous version that aren't yet included in this PR:
save data code
serial port code
In both cases, probably I just need to get the code from the 0.5 tag and put it into this 0.7 version with a few updates at the top of the file for the correct import paths and such.
Still, even with some old portions missing, it's complete enough to open the PR and accept feedback. And maybe people can mention the other parts that are still missing if I totally forgot some stuff.
This is an overhaul of the existing crate into a new state utilizing the fun new features of Rust since the crate was last touched.
instruciton_set
attribute and interworking behaves better with naked functions than global assembly, so they're preferred where possible. Some functions groups are too interconnected to easily break them apart without inflating the code size.voladdress
1.0 of course (Closes https://github.com/rust-console/gba/issues/155)mmio
module, similarly the assembly stuff is in anassembly_runtime
module. These are the most GBA specific parts of things. The data type definitions for use with MMIO could theoretically be reused by an emulator running on a PC or whatever.There's some portions of the previous version that aren't yet included in this PR:
In both cases, probably I just need to get the code from the 0.5 tag and put it into this 0.7 version with a few updates at the top of the file for the correct import paths and such.
Still, even with some old portions missing, it's complete enough to open the PR and accept feedback. And maybe people can mention the other parts that are still missing if I totally forgot some stuff.