From 57a15f9385560308e5ac05aa057f3bcb1df22824 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Fri, 16 Oct 2026 23:32:36 +0200 Subject: runrom: add support for the MMC3 chip MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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à --- scripts/test-e2e.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'scripts/test-e2e.sh') diff --git a/scripts/test-e2e.sh b/scripts/test-e2e.sh index 17766a4..99dc27d 100755 --- a/scripts/test-e2e.sh +++ b/scripts/test-e2e.sh @@ -370,6 +370,21 @@ exit_code=$((exit_code + $?)) diff tests/out/overflow-data-indexing.txt tests/expected/runrom/overflow-data-indexing.txt exit_code=$((exit_code + $?)) +echo "test: runrom => mmc3/basic.nes" +./target/debug/nasm -Werror --asan --write-info -c tests/runrom/mmc3/mmc3.cfg -o tests/out/mmc3.nes -w tests/runrom/mmc3/basic.s + +./target/debug/runrom --nasm .nasm/ --dump-memory --function --start basic --mmc "kind=mmc3; prg_rom_mode=0; prg_ram_enabled=1; prg_ram_writes_allowed=1; r6=0; r7=1" tests/out/mmc3.nes &> tests/out/mmc3-basic.txt +diff tests/out/mmc3-basic.txt tests/expected/runrom/mmc3-basic.txt +exit_code=$((exit_code + $?)) + +./target/debug/runrom --nasm .nasm/ --dump-memory --function --start no_writes_allowed --mmc "kind=mmc3; prg_rom_mode=0; prg_ram_enabled=1; prg_ram_writes_allowed=1; r6=0; r7=1" tests/out/mmc3.nes &> tests/out/mmc3-no-writes.txt +diff tests/out/mmc3-no-writes.txt tests/expected/runrom/mmc3-no-writes.txt +exit_code=$((exit_code + $?)) + +./target/debug/runrom --nasm .nasm/ --dump-memory --function --start no_wram --mmc "kind=mmc3; prg_rom_mode=0; prg_ram_enabled=1; prg_ram_writes_allowed=1; r6=0; r7=1" tests/out/mmc3.nes &> tests/out/mmc3-no-wram.txt +diff tests/out/mmc3-no-wram.txt tests/expected/runrom/mmc3-no-wram.txt +exit_code=$((exit_code + $?)) + ## # vnf-tests -- cgit v1.2.3