-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
This will be the v0.12 version #195
Conversation
…r the same operation.
…thing, we'll just use associated functions.
…t r0 before calling the assembly handler, which apparently exist.
@zesterer You're the closest i have to a reviewer. This needs work to be complete and to be consistent, but I hope most of the direction of this is clear and looks good. |
#[repr(transparent)] | ||
pub struct KeyInput(u16); | ||
pub struct KeyInput(pub u16); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd love a keys.changes_from(keys_old)
here, quite useful when trying to detect key presses, especially given than the BitAnd
impl seems to have gone.
Edit: Perhaps keys.presses_since(keys_old)
and keys.releases_since(keys_old)
actually?
/// This is used by the affine matrix entries. | ||
#[allow(non_camel_case_types)] | ||
pub type i16fx8 = Fixed<i16, 8>; | ||
//! Basic fixed point math module used as a fallback if the `fixed` crate isn't |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know I mentioned it before, but I'd like to see all of this track_caller
-ed to hell and back. Extra important given that the default GBA targets don't support unwinding so the only panic location you get is the one the compiler gives you at the panic site.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, bytemuck
integration would be lovely. num_traits
too, if at all possible. I've ended up writing my own fixed-point type because sadly these types don't fill these gaps.
//! The full standard library isn't available on the GBA, it's a [bare metal] | ||
//! environment, so we'll only have access to the [`core`] crate. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe mention alloc
+ give hints about where to go when looking to set it up? I don't use it myself, but I gather that it's common to place the heap in ewram. Something like linked_list_allocator
seems like a good choice.
Since asm_const is stabilized in nightly, and since const_mut_ref is on path to be stablilized "soon", I think there's less and less reason to have a big breaking change update, so I'm gonna close this. |
fixed
crate for fixed point, instead of reimplementing #185TODO:
mmio
module and just place controls and their data types into each peripheral's module (Video, Timers, etc).t32
anda32
versions of key BIOS calls so that they can always cleanly inline