aboutsummaryrefslogtreecommitdiffstats
path: root/data/mmuinit.pl
diff options
context:
space:
mode:
Diffstat (limited to 'data/mmuinit.pl')
-rwxr-xr-xdata/mmuinit.pl16
1 files changed, 13 insertions, 3 deletions
diff --git a/data/mmuinit.pl b/data/mmuinit.pl
index 389c89f..fb04118 100755
--- a/data/mmuinit.pl
+++ b/data/mmuinit.pl
@@ -20,7 +20,7 @@
# 1 - Flash ROM
# 2 - Video RAM
# 3 - Character generator RAM
-# 4 - Reserved
+# 4 - Block graphics RAM
# 5 - Reserved
# 6 - Reserved
# 7 - Hyperspace (reads bits[7:0], writes nowhere)
@@ -29,6 +29,7 @@
#
$testram = 0;
+$with_bgram = 1;
sub do_ram() {
if ( $testram ) {
@@ -60,9 +61,12 @@ $a = 0;
for ( $i = 0x00 ; $i < 0x40 ; $i++ ) { # BASIC
printf("%03X : %04X;\n", $a++, 0x9000|$i);
}
-for ( $i = 0x40 ; $i < 0x60 ; $i++ ) { # Free for expansion
+for ( $i = 0x40 ; $i < 0x48 ; $i++ ) { # Free for expansion
printf("%03X : %04X;\n", $a++, 0x70FF);
}
+for ( $i = 0x48 ; $i < 0x60 ; $i++ ) { # Free for expansion or bgram
+ printf("%03X : %04X;\n", $a++, $with_bgram ? 0x4000|($i-0x48) : 0x70FF);
+}
for ( $i = 0x60 ; $i < 0x74 ; $i++ ) { # DOS, IEC options
printf("%03X : %04X;\n", $a++, 0x1000|$i);
}
@@ -84,7 +88,13 @@ do_ram();
for ( $i = 0x00 ; $i < 0x40 ; $i++ ) { # BASIC (in RAM)
printf("%03X : %04X;\n", $a++, 0x8000|$i);
}
-for ( $i = 0x40 ; $i < 0x74 ; $i++ ) { # Various ROMs (in RAM)
+for ( $i = 0x40 ; $i < 0x48 ; $i++ ) { # Expansion (fill with RAM)
+ printf("%03X : %04X;\n", $a++, 0x0000|$i);
+}
+for ( $i = 0x48 ; $i < 0x60 ; $i++ ) { # RAM or bgram
+ printf("%03X : %04X;\n", $a++, $with_bgram ? 0x4000|($i-0x48) : 0x0000|$i);
+}
+for ( $i = 0x60 ; $i < 0x74 ; $i++ ) { # DOS and IEC (in RAM)
printf("%03X : %04X;\n", $a++, 0x0000|$i);
}
for ( $i = 0x74 ; $i < 0x78 ; $i++ ) { # Video RAM (for 80 col only)