Fix SRAM addressable range

This commit is contained in:
Simon Gellis 2025-08-07 21:09:16 -04:00
parent af2df78809
commit 6687b1f12f
1 changed files with 2 additions and 2 deletions

View File

@ -28,14 +28,14 @@ impl Cart {
let sram = if sram_file.metadata()?.len() == 0 {
// new SRAM file, randomize the contents
let mut sram = vec![0; 8 * 1024];
let mut sram = vec![0; 16 * 1024];
let mut rng = rand::rng();
for dst in sram.iter_mut().step_by(2) {
*dst = rng.random();
}
sram
} else {
let mut sram = Vec::with_capacity(8 * 1024);
let mut sram = Vec::with_capacity(16 * 1024);
sram_file.read_to_end(&mut sram)?;
sram
};