diff options
| author | Miquel Sabaté Solà <mssola@mssola.com> | 2026-10-16 23:32:36 +0200 |
|---|---|---|
| committer | Miquel Sabaté Solà <mssola@mssola.com> | 2026-10-16 23:32:36 +0200 |
| commit | 57a15f9385560308e5ac05aa057f3bcb1df22824 (patch) | |
| tree | b14933709f202f25acf86bef80b4fe5f2c76d4e3 /tests/runrom/mmc3/mmc3.cfg | |
| parent | 4fc97089734c713725295b76b23510a7b13f3c3d (diff) | |
| download | tools.nes-57a15f9385560308e5ac05aa057f3bcb1df22824.tar.gz tools.nes-57a15f9385560308e5ac05aa057f3bcb1df22824.zip | |
runrom: add support for the MMC3 chip
This adds support from the runrom frontend, but more importantly it
provides to vnf all the infrastructure to implement memory mapping, and
at least the MMC3 chip.
The vnf crate now translates addresses as a MMC would do, and it
implements all the relevant interfaces for the MMC3. Support for the
'brk' instruction on this chip has been left out on purpose, and it will
be covered on subsequent commits.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
Diffstat (limited to 'tests/runrom/mmc3/mmc3.cfg')
| -rw-r--r-- | tests/runrom/mmc3/mmc3.cfg | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/tests/runrom/mmc3/mmc3.cfg b/tests/runrom/mmc3/mmc3.cfg new file mode 100644 index 0000000..56f6314 --- /dev/null +++ b/tests/runrom/mmc3/mmc3.cfg @@ -0,0 +1,92 @@ +MEMORY { + # iNES header + HEADER: file = %O, start = $0000, size = $0010, fill = yes; + + # First 15 switchable banks at $8000. + PRG0_00: start = $8000, size = $2000, file = %O, fill = yes, fillval = $00; + PRG0_01: start = $8000, size = $2000, file = %O, fill = yes, fillval = $01; + PRG0_02: start = $8000, size = $2000, file = %O, fill = yes, fillval = $02; + PRG0_03: start = $8000, size = $2000, file = %O, fill = yes, fillval = $03; + PRG0_04: start = $8000, size = $2000, file = %O, fill = yes, fillval = $04; + PRG0_05: start = $8000, size = $2000, file = %O, fill = yes, fillval = $05; + PRG0_06: start = $8000, size = $2000, file = %O, fill = yes, fillval = $06; + PRG0_07: start = $8000, size = $2000, file = %O, fill = yes, fillval = $07; + PRG0_08: start = $8000, size = $2000, file = %O, fill = yes, fillval = $08; + PRG0_09: start = $8000, size = $2000, file = %O, fill = yes, fillval = $09; + PRG0_0A: start = $8000, size = $2000, file = %O, fill = yes, fillval = $0A; + PRG0_0B: start = $8000, size = $2000, file = %O, fill = yes, fillval = $0B; + PRG0_0C: start = $8000, size = $2000, file = %O, fill = yes, fillval = $0C; + PRG0_0D: start = $8000, size = $2000, file = %O, fill = yes, fillval = $0D; + PRG0_0E: start = $8000, size = $2000, file = %O, fill = yes, fillval = $0E; + + # Last 15 switchable banks at $A000. + PRG1_00: start = $A000, size = $2000, file = %O, fill = yes, fillval = $10; + PRG1_01: start = $A000, size = $2000, file = %O, fill = yes, fillval = $11; + PRG1_02: start = $A000, size = $2000, file = %O, fill = yes, fillval = $12; + PRG1_03: start = $A000, size = $2000, file = %O, fill = yes, fillval = $13; + PRG1_04: start = $A000, size = $2000, file = %O, fill = yes, fillval = $14; + PRG1_05: start = $A000, size = $2000, file = %O, fill = yes, fillval = $15; + PRG1_06: start = $A000, size = $2000, file = %O, fill = yes, fillval = $16; + PRG1_07: start = $A000, size = $2000, file = %O, fill = yes, fillval = $17; + PRG1_08: start = $A000, size = $2000, file = %O, fill = yes, fillval = $18; + PRG1_09: start = $A000, size = $2000, file = %O, fill = yes, fillval = $19; + PRG1_0A: start = $A000, size = $2000, file = %O, fill = yes, fillval = $1A; + PRG1_0B: start = $A000, size = $2000, file = %O, fill = yes, fillval = $1B; + PRG1_0C: start = $A000, size = $2000, file = %O, fill = yes, fillval = $1C; + PRG1_0D: start = $A000, size = $2000, file = %O, fill = yes, fillval = $1D; + PRG1_0E: start = $A000, size = $2000, file = %O, fill = yes, fillval = $1E; + + # Last two fixed banks + vectors. + FIXED: start = $C000, size = $2000, fill = yes, fillval = $FA, define = yes; + TAIL: start = $E000, size = $1FFA, fill = yes, fillval = $FB, define = yes; + ROMV: start = $FFFA, size = $0006, fill = yes, fillval = $FC, define = yes; + + # CHR ROM. + CHARS: start = $0000, size = $20000, file = %O, fill = no; +} + +SEGMENTS { + HEADER: load = HEADER, type = ro; + + # 15 first switchable banks. + PRG0_00: load = PRG0_00, type = ro; + PRG0_01: load = PRG0_01, type = ro; + PRG0_02: load = PRG0_02, type = ro; + PRG0_03: load = PRG0_03, type = ro; + PRG0_04: load = PRG0_04, type = ro; + PRG0_05: load = PRG0_05, type = ro; + PRG0_06: load = PRG0_06, type = ro; + PRG0_07: load = PRG0_07, type = ro; + PRG0_08: load = PRG0_08, type = ro; + PRG0_09: load = PRG0_09, type = ro; + PRG0_0A: load = PRG0_0A, type = ro; + PRG0_0B: load = PRG0_0B, type = ro; + PRG0_0C: load = PRG0_0C, type = ro; + PRG0_0D: load = PRG0_0D, type = ro; + PRG0_0E: load = PRG0_0E, type = ro; + + # 15 last switchable banks. + PRG1_00: load = PRG1_00, type = ro; + PRG1_01: load = PRG1_01, type = ro; + PRG1_02: load = PRG1_02, type = ro; + PRG1_03: load = PRG1_03, type = ro; + PRG1_04: load = PRG1_04, type = ro; + PRG1_05: load = PRG1_05, type = ro; + PRG1_06: load = PRG1_06, type = ro; + PRG1_07: load = PRG1_07, type = ro; + PRG1_08: load = PRG1_08, type = ro; + PRG1_09: load = PRG1_09, type = ro; + PRG1_0A: load = PRG1_0A, type = ro; + PRG1_0B: load = PRG1_0B, type = ro; + PRG1_0C: load = PRG1_0C, type = ro; + PRG1_0D: load = PRG1_0D, type = ro; + PRG1_0E: load = PRG1_0E, type = ro; + + # Last two fixed banks + vectors. + FIXED: load = FIXED, type = ro; + TAIL: load = TAIL, type = ro; + VECTORS: load = ROMV, type = ro; + + # CHR-ROM is groupped all together. + CHARS: load = CHARS, type = ro; +} |
