aboutsummaryrefslogtreecommitdiff
path: root/lib/xixanta/src
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mikisabate@gmail.com>2025-01-23 16:16:11 +0100
committerMiquel Sabaté Solà <mikisabate@gmail.com>2025-01-23 16:16:11 +0100
commit121995bf3f21343848bd3b1d189529883e71044a (patch)
tree90a4cd586c5481f57e956b99c58084ccff9a8e05 /lib/xixanta/src
parent66ae61bd357f8b675be3ec9a965d50b1e39f3e8f (diff)
downloadtools.nes-121995bf3f21343848bd3b1d189529883e71044a.tar.gz
tools.nes-121995bf3f21343848bd3b1d189529883e71044a.zip
Add a configuration for MMC1
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
Diffstat (limited to 'lib/xixanta/src')
-rw-r--r--lib/xixanta/src/mapping.rs2
-rw-r--r--lib/xixanta/src/mappings/mmc1.cfg8
2 files changed, 10 insertions, 0 deletions
diff --git a/lib/xixanta/src/mapping.rs b/lib/xixanta/src/mapping.rs
index b3d22c7..6a439d3 100644
--- a/lib/xixanta/src/mapping.rs
+++ b/lib/xixanta/src/mapping.rs
@@ -2,6 +2,7 @@ use crate::cfg::{parse_cfg_file, parse_nasm_cfg_file};
use crate::object::Bundle;
const EMPTY_CONFIG: &str = include_str!("mappings/empty.cfg");
+const MMC1_CONFIG: &str = include_str!("mappings/mmc1.cfg");
const NROM_CONFIG: &str = include_str!("mappings/nrom.cfg");
const NROM65_CONFIG: &str = include_str!("mappings/nrom65.cfg");
const UXROM_CONFIG: &str = include_str!("mappings/unrom.cfg");
@@ -115,6 +116,7 @@ pub fn get_mapping_configuration(name: &str) -> Result<Vec<Mapping>, String> {
} else {
let text = match name.to_lowercase().as_str() {
"empty" => EMPTY_CONFIG,
+ "mmc1" => MMC1_CONFIG,
"nrom" => NROM_CONFIG,
"nrom65" => NROM65_CONFIG,
"uxrom" | "unrom" => UXROM_CONFIG,
diff --git a/lib/xixanta/src/mappings/mmc1.cfg b/lib/xixanta/src/mappings/mmc1.cfg
new file mode 100644
index 0000000..7409827
--- /dev/null
+++ b/lib/xixanta/src/mappings/mmc1.cfg
@@ -0,0 +1,8 @@
+#!nasmcfg
+
+HEADER: start = $0000, size = $0010, fillval = $00, segments = [HEADER];
+PRG0: start = $8000, size = $4000, fillval = $F8, segments = [BANK0];
+PRG1: start = $C000, size = $3FFA, fillval = $F9, segments = [BANK1];
+ROMV: start = $FFFA, size = $0006, fillval = $00, segments = [VECTORS];
+ROM2_0: start = $0000, size = $2000, fillval = $11, segments = [CHR0];
+ROM2_1: start = $2000, size = $2000, fillval = $22, segments = [CHR1];