From 352dc7dda788d90d4bcb044cba3cdab672dd2d6b Mon Sep 17 00:00:00 2001 From: copy Date: Fri, 8 Nov 2013 18:10:11 +0100 Subject: [PATCH] Map bios into high memory, fixes reboot via seabios and #1 --- src/cpu.macro.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/cpu.macro.js b/src/cpu.macro.js index 5bc82c5e..13e6fb81 100644 --- a/src/cpu.macro.js +++ b/src/cpu.macro.js @@ -539,6 +539,18 @@ function cpu_init(settings) } } + // seabios expects the bios to be mapped to 0xFFF00000 also + memory.mmap_register(0xFFF00000, 0x100000, false, + function(addr) + { + return memory.mem8[addr]; + }, + function(addr, value) + { + memory.mem8[addr] = value; + }); + + // ip initial value instruction_pointer = 0xFFFF0;