From 9b7e52d73f14ffff4842cec2f8bac7198fe2cfea Mon Sep 17 00:00:00 2001 From: Alex Janka Date: Sun, 22 Oct 2023 13:04:19 +1100 Subject: [PATCH] wram in a box --- lib/src/processor/memory.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/src/processor/memory.rs b/lib/src/processor/memory.rs index d4dd1ee..5f42cea 100644 --- a/lib/src/processor/memory.rs +++ b/lib/src/processor/memory.rs @@ -26,8 +26,8 @@ pub(crate) mod rom; #[serde_with::serde_as] #[derive(Serialize, Deserialize, Clone)] pub struct Wram { - #[serde_as(as = "[_; 4096]")] - bank_0: [u8; 4096], + #[serde_as(as = "Box<[_; 4096]>")] + bank_0: Box<[u8; 4096]>, banks: WramBanks, } @@ -48,7 +48,7 @@ enum WramBanks { impl Wram { fn new(cgb: bool) -> Self { Self { - bank_0: [0; 4096], + bank_0: Box::new([0; 4096]), banks: if cgb { WramBanks::Cgb { banks: Box::new([[0; 4096]; 8]),