From 881c4f82f7d08180d805bae71e9c494775b07a24 Mon Sep 17 00:00:00 2001 From: Ben Bridle Date: Mon, 22 Apr 2024 11:34:25 +1200 Subject: Fix memory device There was confusion between the role of the page_limit variable in the memory device, where it was being used to mean both the absolute upper limit of pages that are allowed to be allocated, but also to mean the number of pages that the program would like to be allocated when needed. To fix this, the program is now just told the full number of pages that it is allowed to use, without first requiring that the program request a particular number of pages. --- src/emulator.rs | 1 - 1 file changed, 1 deletion(-) (limited to 'src/emulator.rs') diff --git a/src/emulator.rs b/src/emulator.rs index 8649f26..e88e320 100644 --- a/src/emulator.rs +++ b/src/emulator.rs @@ -30,7 +30,6 @@ impl BedrockEmulator { let mut vm = Processor::new(StandardDevices::new()); vm.dev.screen.resize(ScreenDimensions::new(256, 192)); vm.dev.memory.page_limit = 256; - vm.dev.memory.expand_memory(); vm.load_program(bytecode); Self { -- cgit v1.2.3-70-g09d2