aboutsummaryrefslogtreecommitdiff
path: root/config/mmc1.cfg
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mikisabate@gmail.com>2025-01-23 13:57:45 +0100
committerMiquel Sabaté Solà <mikisabate@gmail.com>2025-02-04 22:00:02 +0100
commit0aefffacb5cb08202f7ba53b6e3b9a7303b1d66e (patch)
tree5eecba9e8b955ee31827208eeb9e8541700b241d /config/mmc1.cfg
parent7d8da8b4fb9826ce21dbe821596509823f7ec16f (diff)
downloadcode.nes-0aefffacb5cb08202f7ba53b6e3b9a7303b1d66e.tar.gz
code.nes-0aefffacb5cb08202f7ba53b6e3b9a7303b1d66e.zip
Use custom configurations everywhere
Moreover, I have introduced a linker configuration for MMC1 as well, so to properly implement the `basics/persist.s` example. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
Diffstat (limited to 'config/mmc1.cfg')
-rw-r--r--config/mmc1.cfg26
1 files changed, 26 insertions, 0 deletions
diff --git a/config/mmc1.cfg b/config/mmc1.cfg
new file mode 100644
index 0000000..5544c1f
--- /dev/null
+++ b/config/mmc1.cfg
@@ -0,0 +1,26 @@
+MEMORY {
+ # iNES header.
+ HEADER: start = $0, size = $10, fill = yes;
+
+ # Banked PRG ROM.
+ PRG0: start = $8000, size = $4000, fill = yes, fillval = $f8, define = yes;
+ PRG1: start = $C000, size = $3FFA, fill = yes, fillval = $f9, define = yes;
+
+ # Hardware Vectors.
+ ROMV: start = $FFFA, size = $0006, fill = yes;
+
+ # Banked CHR banks.
+ ROM2_0: start = $0000, size = $2000, fill = yes, fillval = $11;
+ ROM2_1: start = $2000, size = $2000, fill = yes, fillval = $22;
+}
+
+SEGMENTS {
+ HEADER: load = HEADER, type = ro;
+
+ BANK0: load = PRG0, type = ro;
+ BANK1: load = PRG1, type = ro;
+ VECTORS: load = ROMV, type = ro;
+
+ CHR0: load = ROM2_0, type = ro;
+ CHR1: load = ROM2_1, type = ro;
+}