From 35040860e7fc8f0cf399163c476f763a8ee19efc Mon Sep 17 00:00:00 2001 From: Byron Lathi Date: Thu, 7 Apr 2022 10:36:50 -0500 Subject: [PATCH] Identity map memory upon reset Upon reset the mapper is set to identity map and then enabled. --- sw/main.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sw/main.c b/sw/main.c index 1979789..ba39470 100644 --- a/sw/main.c +++ b/sw/main.c @@ -3,6 +3,7 @@ #include "board_io.h" #include "uart.h" +#include "mapper.h" int main() { int i; @@ -13,6 +14,14 @@ int main() { clrscr(); cprintf("Hello, world!\n"); + for (i = 0; i < 16; i++){ + cprintf("Mapping %1xxxx to %2xxxx\n", i, i); + mapper_write(i, i); + } + + cprintf("Enabling Mapper\n"); + mapper_enable(1); + while (1) { sw = sw_read();