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]),