From 3fe7aa4e6050fd055a8d794e1a53064a2e786e8e Mon Sep 17 00:00:00 2001 From: Zellyn Hunter Date: Wed, 18 Jan 2017 20:57:26 -0500 Subject: [PATCH] auxmem: make sure LC test didn't touch main mem LC --- audit/audit.asm | 2 +- audit/audit.dsk | Bin 143360 -> 143360 bytes audit/auxmem.asm | 61 +++++++++++++++++++++++++++++++++++++++++++---- v0/index.md | 8 +++++++ 4 files changed, 65 insertions(+), 6 deletions(-) diff --git a/audit/audit.asm b/audit/audit.asm index 5bfaa80..071f1f1 100644 --- a/audit/audit.asm +++ b/audit/audit.asm @@ -11,7 +11,7 @@ KSW = $38 LCRESULT = $10 - LCRESULT2 = $11 + LCRESULT1 = $11 AUXRESULT = $12 ;; AUXMOVE locations diff --git a/audit/audit.dsk b/audit/audit.dsk index 016356d5e1b2336790d29831b96a69e77dabd67e..e3c98ddd1ab42f51870ef0df7ba69b8a8461e75d 100644 GIT binary patch delta 1344 zcmZ8ePfXip6t@#%oF<{61Sx9*`4G~|x~f9k4jehqsfQf49kv~MKy&g9ap)rD(hX^_ zR@sn-w52dB?K+`)phKfKS}muLQ8o$umm)t)$GDm9BGJAwd-nUWQS=;8&v*+M~Zw;$&ZOsHT1C{dKI)fF7gWcOjrn-Ucx-&(R=BUad}per)v6`&D}&(X*&XE zIE}we+detghGgg_`XP;ePEVjeo&(j33P45M(q-Q};SFIzRD{-sV7gn1aO(N0bl3NK zz?GN~-HDbf0ZDh(Uv+U@vkMHcr6k}~rEH4K-*sHfO`tTpbq)<2^ z-&Ig3C386FL9vwW*GKPr&``>Dqu~_zBwg=%Gwi`S3&8g&=fZN25(p{79Ga6p?Ro=7 z{v>xz`g?PNrPVFnC=s>MBo(b9GAJiqi(Hv*3AKi9ounW`XeB8&G-6drxj?p5y)4pl z;i+m^WK%VEmdJc@>G9_Ou;rJqUA02yx3r}#TD3mEvhr)GYLR&cwFIXb=%B-T=(IYi zHwpz!D{4hY*C&xkHrngY36IDNQcfC(4!(LG5KafIL(_A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ix2Nr5e57&@m zqpEE=s&4r)x;E3o|Cy(#FQarX-;2)t@reG@bd+{;=doveY5A8;AETM*Ns;?LP!igf zx<)fm1A0xf9DRMq<4Ny~3|;8vt+!|h0aI-5%_P2I63jy;5%@d8fPVn1pJE;W diff --git a/audit/auxmem.asm b/audit/auxmem.asm index 1b9cd7f..b352b46 100644 --- a/audit/auxmem.asm +++ b/audit/auxmem.asm @@ -23,12 +23,12 @@ AUXMEMTESTS +print !text "LC FAILED BEFORE:SKIPPING AUXMEM LC",$8D +printed - beq .skiplc + beq .afterlc .auxlc ;; Run langcard tests in auxmem lda LCRESULT - sta LCRESULT2 + sta LCRESULT1 lda #0 sta LCRESULT @@ -37,11 +37,10 @@ AUXMEMTESTS lda $C08B lda #$44 sta $D17B ; $D17B is $53 in Apple II/plus/e/enhanced - lda #$55 sta $FE1F ; FE1F is $60 in Apple II/plus/e/enhanced lda $C083 ; Read and write bank 2 lda $C083 - lda #$66 + lda #$44 sta $D17B jsr .zptoaux @@ -51,8 +50,60 @@ AUXMEMTESTS sta ALTZP_OFF_W jsr .zpfromaux + + lda LCRESULT + bne + + + +prerr $0008 ;; E0008: We tried to run the langcard tests again with auxmem (ALTZP active), and they failed, so we're quitting the auxmem test. + !text "QUITTING AUXMEM TEST DUE TO LC FAIL",$8D + +prerred + sec + rts -.skiplc + ;; Check that the stuff we stashed in main RAM was unaffected. ++ + lda $C088 ; Read bank 1 + lda $D17B + cmp #$44 + beq + + pha + +print + !text "WANT BANK1 $D17B" + +printed + beq .lcerr + ++ lda $C080 ; Read bank 2 + lda $D17B + cmp #$44 + beq + + pha + +print + !text "WANT BANK2 $D17B" + +printed + beq .lcerr + ++ + lda $FE1F + cmp #$44 + beq .afterlc + pha + +print + !text "WANT RAM $FE1F" + +printed + +.lcerr + +print + !text "=$44;GOT $" + +printed + pla + jsr PRBYTE + +prerr $0009 ;; E0009: We wrote $44 to main RAM in the three test locations used by the LC test. They should have been unaffected by the LC test while it was using auxmem, but at least one of them was modified. + !text "" + +prerred + sec + rts + +.afterlc ;; Success +print diff --git a/v0/index.md b/v0/index.md index f40cd16..3866f3c 100644 --- a/v0/index.md +++ b/v0/index.md @@ -27,3 +27,11 @@ We tried to put the language card into read bank 2, write bank 2, but failed to ## E0007 This is a data-driven test of Language Card operation. We initialize $D17B in RAM bank 1 to $11, $D17B in RAM bank 2 to $22, and $FE1F in RAM to $33. Then, we perform a testdata-driven sequence of LDA and STA to the $C08X range. Finally we (try to) increment $D17B and $FE1F. Then we test (a) the current live value in $D17B, (b) the current live value in $FE1F, (c) the RAM bank 1 value of $D17B, (d) the RAM bank 2 value of $D17B, and (e) the RAM value of $FE1F, to see whether they match expected values. $D17B is usually $53 in ROM, and $FE1F is usally $60. For more information on the operation of the language card soft-switches, see Understanding the Apple IIe, by James Fielding Sather, Pg 5-24. + +## E0008 + +We tried to run the langcard tests again with auxmem (ALTZP active), and they failed, so we're quitting the auxmem test. + +## E0009 + +We wrote $44 to main RAM in the three test locations used by the LC test. They should have been unaffected by the LC test while it was using auxmem, but at least one of them was modified.