- Adjusted the assembly runtime code to resolve a bug that occurred on real hardware but not in emulation. The change was to use the System mode stack instead of the IRQ mode stack when calling the user code's assembly handler. Exactly why this previously caused a problem with actual hardware is unknown, but it did, and now we've got a fix.
- Breaking: Removes all
#[naked]
functions from the crate (because this is a Nightly feature with no clear timeline to stabilization). - The crate's assembly runtime, which is what is used before calling into
main
, and what handles the interrupt calls from the BIOS, had been replaced withglobal_asm!
. - The AEABI memory copy and set functions have been removed. In their place there are functions that are more custom tailored to the three primary actual uses of the memory functions on the GBA: reading/writing SRAM, copying ROM into VRAM, and clearing VRAM.
- The AEABI division functions have been removed.
- The
compiler-builtins
crate still provides the general memory operation and division functions, so those tasks can still be performed when necessary. However, if you're using memory ops or division ops so often that they're a program bottleneck, usually you want to look carefully at your implementation of those functions and try to design them to serve your own common case as best as possible. - Safe abstractions have been added on top of the new memory functions so that
all the
example/
files can do their thing without using anyunsafe
. This includes adding new types forVideo3Bitmap
andVideo4Indexmap
, so that static image data can be included into your program in a well-checked way.
- Adds an optional dependency on the fixed crate.
- The
i16fx8
,i16fx14
, andi32fx8
type aliases will alias either thegba
crate's internal fixed point type (feature off) or they will alias the appropriate type from thefixed
(feature on). The two type are bit compatible, though the version in thefixed
crate is more complete in the methods provided. - Breaking: The
gba
crate's internal fixed type had some conversion methods renamed so that they would match the appropriate methods for the same operation in thefixed
crate.
-
0.11.6:
on_gba
feature (default: enabled) that signals if the crate is running on a GBA. Limited portions of the crate can be used even when not on the GBA (such as in a build script).track_caller
added for fixed point math operations
-
0.11.5:
-
0.11.3:
- Soundness: Fixed the definition of
VIDEO3_VRAM
, now it's the correct type and it will correctly stay in bounds.
- Soundness: Fixed the definition of
-
0.11.1:
- Fixed incorrect timer 1/2/3 addresses (classic copy-paste error).
- Fixed missing argument ordering swap in memset between the libc version and aeabi version.
- Fixed incorrect handling of unaligned pointers in memset.
- Added
.shstrtab
entry to the linker script so that it works with the newrust-lld
used in Nightly 2023-01-01 (See rust-lang/rust#109721) - Marked the linker script file (
mono_boot.ld
) as simply being CC0. The reason being that it's the one file that often needs to be manually copied out of this repo and into the repo of a project using the crate (since libraries can't provide the linker script to binaries, petition thecargo
folks if you want this). Accordingly, I'm giving it the most permissive license that I know of, to make things as simple as possible for everyone. The rest of the content in this repository still falls under thelicense
entry specified inCargo.toml
.
-
0.11.0:
- Breaking: Once again the video memory interface has been updated. It
should be simpler to follow now, because video memory consistently uses
VolGrid2dStrided
, rather than using special types for every screenblock style.
- Breaking: Once again the video memory interface has been updated. It
should be simpler to follow now, because video memory consistently uses
-
0.10.0:
- Breaking: Cleaned up the screenblock interface. Because they're in VRAM,
they can't use
u8
access like they were defined to use before. Now the types useu8x2
, similar to the Mode 4 bitmap. - Fixed the MMIO definition for the OBJ palette, so the OBJ palette should work now.
- Breaking: Cleaned up the screenblock interface. Because they're in VRAM,
they can't use
-
0.9.3:
- Added
as_u32_slice
andas_u16_slice
toAlign4
. - Removed the requirement for inputs to
include_aligned_bytes!
to be a multiple of 4 bytes. - Added
as_usize
to all the screeblock address types.
- Added
-
0.9.2:
- Adds support for more BIOS functions, though not all functions are as clearly documented as I'd like.
- Made much more of the
Fixed
type const friendly. Most ops now have an inherent method that isconst fn
as well as implementing thecore::ops
trait (the trait fn just calls the inherent fn). This means that you can't dox + y
in a const context, but you can dox.add(y)
. This is not the best system, but until const trait impls are stable this is the best middle ground.
-
0.9.1:
- Adds some randomization support directly into the crate.
- Added more methods to the
Fixed
type. - Adds an
include_aligned_bytes!
macro to pull in compile time data that's aligned to 4.
-
0.9.0:
- MSRV: The crate now requires
compiler_builtins-0.1.81
to build. You will need a Nightly from 2022-10-15 or later. - Break: Quite a bit of the video interface has been replaced, but it should be much easier to use now.
- Break: The timer interface has been updated so that fields more closely match the mGBA names, for ease of debugging.
- MSRV: The crate now requires
-
0.8.0:
- Break: Removed the macros for
GbaCell
access in favor of just methods. I had at first thought that they'd assign registers and then inline, but it turns out that the inline phase happens way before the register assignment phase, so the macros were unnecessary (and clunky). - Break: The
IrqFn
type is changed to pass the function anIrqBits
instead of a bareu16
. - Adds functions to pick a screenblock location (one for each screenblock type).
- Add
BitUnPack
BIOS function. - Add the
CGA_8X8_THICK
art data. - Greatly improved documentation.
- Break: Removed the macros for
-
0.7.4: Adds mGBA logging support.
-
0.7.3: Fixes "multiple definition" errors with the AEABI division functions. Filed a PR to fix this soon: rust-lang/compiler-builtins#495
-
0.7.2: First version that configures docs.rs properly!