From 0fb99941313b8960ab86d0090f50ce239e964850 Mon Sep 17 00:00:00 2001 From: Lokathor Date: Sat, 12 Jan 2019 13:42:18 -0700 Subject: [PATCH] IWRAM fix --- src/lib.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 8d9f9c2..76448e5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -129,6 +129,15 @@ pub mod sram; pub mod mgba; +extern "C" { + /// This marks the end of the `.data` and `.bss` sections in IWRAM. + /// + /// Memory in IWRAM _before_ this location is not free to use, you'll trash + /// your globals and stuff. Memory here or after is freely available for use + /// (careful that you don't run into your own stack of course). + static __bss_end: u8; +} + newtype! { /// A color on the GBA is an RGB 5.5.5 within a `u16` #[derive(PartialOrd, Ord, Hash)]