From afebe4d56f0184d163a20b02f7b8d6719f31c734 Mon Sep 17 00:00:00 2001 From: Badvision Date: Thu, 15 Aug 2024 08:58:38 -0500 Subject: [PATCH] Add Aux LC test --- src/test/java/jace/core/MemoryTest.java | 15 +++++++++++++-- src/test/resources/jace/memory_test_commons.asm | 13 ++++++++----- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/src/test/java/jace/core/MemoryTest.java b/src/test/java/jace/core/MemoryTest.java index 21b7671..b62a155 100644 --- a/src/test/java/jace/core/MemoryTest.java +++ b/src/test/java/jace/core/MemoryTest.java @@ -194,7 +194,7 @@ public class MemoryTest { * @throws ProgramException */ @Test - public void machineIdentificationTEst() throws ProgramException { + public void machineIdentificationTest() throws ProgramException { TestProgram memoryDetectTestProgram = new TestProgram(MEMORY_TEST_COMMONS); memoryDetectTestProgram.add(MACHINE_IDENTIFICATION); // Assert this is an Apple //e @@ -500,6 +500,17 @@ public class MemoryTest { !byte $23, $34, $11, $23, $34 !byte 0 """) - .runForTicks(10000000); + // .runForTicks(10000000); + .run(); + } + + @Test + public void auxLanguageCardTest() throws ProgramException { + // This is a repeat of the LC test but with AUX enabled + SoftSwitches.AUXZP.getSwitch().setState(true); + SoftSwitches.RAMRD.getSwitch().setState(true); + SoftSwitches.RAMWRT.getSwitch().setState(true); + SoftSwitches._80STORE.getSwitch().setState(true); + languageCardBankswitchTest(); } } diff --git a/src/test/resources/jace/memory_test_commons.asm b/src/test/resources/jace/memory_test_commons.asm index 9d0b3bc..a855d58 100644 --- a/src/test/resources/jace/memory_test_commons.asm +++ b/src/test/resources/jace/memory_test_commons.asm @@ -188,15 +188,18 @@ RESETALL sta CSW lda #>COUT1 sta CSW+1 - sta RESET_RAMRD - sta RESET_RAMWRT + ; Zelly's original test resets flags, but we might want to test with flags set. + ; So only reset softswitches that don't affect memory state. + ; Anyway, our @before setup function does this part already. + ;sta RESET_RAMRD + ;sta RESET_RAMWRT ;; Save return address in X and A, in case we switch zero-page memory. - sta RESET_80STORE + ;sta RESET_80STORE sta RESET_INTCXROM - sta RESET_ALTZP + ;sta RESET_ALTZP sta RESET_SLOTC3ROM sta RESET_INTC8ROM - sta RESET_80COL + ;sta RESET_80COL sta RESET_ALTCHRSET sta SET_TEXT sta RESET_MIXED