From e57c6cd375665cb84743f4930abda439fc740fae Mon Sep 17 00:00:00 2001 From: Zellyn Hunter Date: Tue, 20 Dec 2016 21:26:49 -0500 Subject: [PATCH] langcard: use different test constants: 11, 22, 33 --- audit/audit.dsk | Bin 143360 -> 143360 bytes audit/build | 2 ++ audit/langcard.asm | 72 ++++++++++++++++++++++++--------------------- v0/index.md | 2 +- 4 files changed, 41 insertions(+), 35 deletions(-) diff --git a/audit/audit.dsk b/audit/audit.dsk index 70ce92aa56f4fccbc0d77ee9cd5ed6cacff73adb..ffcb84a3d5da21ee99c4653f5057ba64f5ecca68 100644 GIT binary patch delta 2109 zcmZ`(e@s(X6uyr_DYRCqAf-TiDNga%D8Vc&@eh}%(O9P>hAg_JHEG}(fi4kMj z3>!wDV|j_0f9=g+vbXsbs%9#Q$tzIdMcO`~tZK5zvLA6Qlsk1>hy!-sYmpywNpstK z&i9@Bo$s8qZQRf{Zr}~&$Rwu}vl*F0WQZb@qO0qstZcT#W=Zb*oW=0-AtkzjQ3^zq zh;C#QgNW`%H!-A6?2tq>9<5@CUTl-x`@JGkfeSYkzHrk>IzU#5o0)dKxP{xBw_g9m zBe>j8xMO*{f{(p75ju}9Joa`dkK7b8@EdPF_Fh1!L;1U@Tj&16D{OZ^@wgv(gcO@2 zu{w!G261vm=)sdSP5Ax{J~tzNBsH;4PZL||NjW`=E>-CfCufNs5bhEWrar*iryC5% zKsQ^(fL?Y3oC$U#oWZ;7CPw^Ff{%b$2g73KlAhhnT*_s)Fv8RJ+>7Yeiwq=gRjaub z4u+IHd@)UM|dM2GbxrA3tKhstOjcFcC_++!Zm!Q{08&-&ER>w+NbWX`Q+&aPvs zo?c$ZNLk&~;91N_K}yLN*E33v5CjB}Tvj=U6v}#1AZIH&ce_{CDetRpd4x8$0u-y> zD^@XtqOHTkF18Nu#_!R%x+R2EGwNGZPXtzNy^$US;{oWH1)yVA1HO|19!&$+&Lcxe zo+Br$pLdg9;a_?y5(M3Bx)}JU&lu-4z}&>d1b)!sPS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F_N%FmzOx6sbJM208zLp z2&LK?145E z%`G!74-po&LR)SvkcXcR5r58(tRVC8OCj(T{(V7fe(=?>(t?8_@YR?~0X`hkeYN7R zL!?wQ#?(D|j`C7PCY<2SRZCQYZ**7i4tH5`f<7aRr87c5f>fis{>j_`Jrzp|{a51A zE0?wWD%8YxxvQbdaW^hX&@rKZWKiSFZVbVn-CHRWUtaBib5k|0TA(3)ad=3WNhMP0 zt0`f4HWTL%Hu0_1E~kmnvgd|`sdQ3^jbxM`jNBL1^)DMt$gN{0=>E~@g<&C+7Dm#k zOiW4X`d9S<;J>ODc&f(981D@Z39*TZ^ws#NaCJ&C{tW(A*JFBlSQEM4GF);c2(Nsn$He0g;HkXTa8aTv?a%1hiwQmU{dwd2Jlx$dc4j6O8wMs!PZ^D;GRl=%4adLYalEivb!=LL z3Mtsl=^0f`Pi5kxdO1ZI(aNv99@j3yH}TYXEHx4z6}3v=dOWbl>V&o!D>$9IauL*t VnQ1L@@UG|cyB_MoU5}}}{9i{+C!7EP diff --git a/audit/build b/audit/build index 01653c1..f4506e1 100755 --- a/audit/build +++ b/audit/build @@ -32,3 +32,5 @@ grep -h '+prerra\? .*;;' *.asm | awk -F' ;; ' '{print $2}' | sort | sed 's|\(E.. [[ "${1-}" == '2p-d' ]] && mame -rompath $ROMPATH apple2p -flop1 ./audit.dsk -skip_gameinfo -debug [[ "${1-}" == '2-d' ]] && mame -rompath $ROMPATH apple2 -flop1 ./audit.dsk -skip_gameinfo -debug +true # Signal success (since we had a bunch of conditionals that can return false status). + diff --git a/audit/langcard.asm b/audit/langcard.asm index 10bd701..35982ba 100644 --- a/audit/langcard.asm +++ b/audit/langcard.asm @@ -13,7 +13,7 @@ ;; Setup - store differing values in bank first and second banked areas. + lda $C08B ; Read and write bank 1 lda $C08B - lda #$55 + lda #$11 sta $D17B ; $D17B is $53 in Apple II/plus/e/enhanced cmp $D17B beq + @@ -21,6 +21,7 @@ !text "CANNOT WRITE TO LC BANK 1 RAM" +prerred beq .done2 + lda #$33 + sta $FE1F ; FE1F is $60 in Apple II/plus/e/enhanced cmp $FE1F beq + @@ -30,7 +31,7 @@ beq .done2 + lda $C083 ; Read and write bank 2 lda $C083 - lda #$AA + lda #$22 sta $D17B cmp $D17B beq + @@ -43,9 +44,9 @@ + lda $C088 ; RAM read, bank 1, write disabled lda $D17B - cmp #$55 + cmp #$11 beq ++ - cmp #$AA + cmp #$22 bne + +prerr $0006 ;; E0006: Read $C088 (read bank 1), but the language card is still reading bank 2. !text "$C088: BANK 2 ACTIVE" @@ -60,20 +61,20 @@ + +prerra $0008 ;; E0008: Read $C088 (read bank 1), but the check byte ($D17B) is an unknown value. !text "$C088: UNKNOWN BYTE" +prerred - beq .done2 +.done2 beq .done3 ++ inc $D17B eor $D17B beq + +prerr $0009 ;; E0009: Read $C088 (read bank 1, write-protected), but successfully wrote byte ($D17B). !text "$C088: ALLOWED WRITE" +prerred -.done2 beq .done3 + beq .done3 + lda $C080 ; RAM read, bank 2, write disabled lda $D17B - cmp #$AA + cmp #$22 beq ++ - cmp #$55 + cmp #$11 bne + +prerr $000A ;; E000A: Read $C080 (read bank 2), but the language card is still reading bank 1. !text "$C080: BANK 1 ACTIVE" @@ -101,13 +102,13 @@ lda $D17B cmp #$53 beq ++ - cmp #$55 + cmp #$11 bne + +prerr $000E ;; E000E: Read $C081 (read ROM), but the language card is still reading bank 1. !text "$C081: BANK 1 ACTIVE" +prerred beq .done3 -+ cmp #$AA ++ cmp #$22 bne + +prerr $000F ;; E000F: Read $C081 (read ROM), but the language card is reading bank 2. !text "$C081: BANK 1 ACTIVE" @@ -116,26 +117,26 @@ + +prerra $0010 ;; E0010: Read $C081 (read ROM), but the check byte ($D17B) is an unknown value. !text "$C081: UNKNOWN BYTE" +prerred - beq .done3 +.done3 beq .done4 ++ dec $D17B eor $D17B beq + +prerr $0011 ;; E0011: Read $C081 (read ROM), but successfully modified byte ($D17B). !text "$C081: ALLOWED WRITE" +prerred -.done3 beq .done4 + beq .done4 + lda $C089 ; ROM read, bank 1 write lda $D17B cmp #$53 beq ++ - cmp #$55 + cmp #$11 bne + +prerr $0012 ;; E0012: Read $C089 (read ROM), but the language card is still reading bank 1. !text "$C089: BANK 1 ACTIVE" +prerred beq .done4 -+ cmp #$AA ++ cmp #$22 bne + +prerr $0013 ;; E0013: Read $C089 (read ROM), but the language card is reading bank 2. !text "$C089: BANK 1 ACTIVE" @@ -145,7 +146,7 @@ !text "$C089: UNKNOWN BYTE" +prerred beq .done4 -++ inc $D17B ; bank 1 now holds $54 instead of $55 +++ inc $D17B ; bank 1 now holds $54 instead of $11 eor $D17B beq + +prerr $0015 ;; E0015: Read $C089 (read ROM), but successfully modified byte ($D17B). @@ -157,7 +158,7 @@ lda $D17B cmp #$54 beq ++ - cmp #$AA + cmp #$22 bne + +prerr $0016 ;; E0016: Read $C08B (read bank 1), but the language card is still reading bank 2. !text "$C08B: BANK 2 ACTIVE" @@ -169,21 +170,21 @@ !text "$C08B: ROM ACTIVE" +prerred beq .done4 -+ cmp #$55 ++ cmp #$11 bne + +prerr $0018 ;; E0018: Read $C08B (read bank 1); byte should have been previously incremented from ROM ($53) to $54 because of lda $C089 after previous lda $C081. !text "$C08B: PREVIOUS WRITE FAILED" +prerred - beq .done4 +.done4 beq .done5 + +prerra $0019 ;; E0019: Read $C08B (read bank 1), but the check byte ($D17B) is an unknown value. !text "$C08B: UNKNOWN BYTE" +prerred -.done4 beq .done5 + beq .done5 ++ + lda $C083 ; RAM read, bank 2 lda $D17B - cmp #$AA + cmp #$22 beq ++ cmp #$54 bne + @@ -216,17 +217,18 @@ sta 1 .outer ;; Initialize to known state: - ;; - $55 in $D17B bank 1 (ROM: $53) - ;; - $AA in $D17B bank 2 (ROM: $53) - ;; - $55 in $FE1F (ROM: $60) + ;; - $11 in $D17B bank 1 (ROM: $53) + ;; - $22 in $D17B bank 2 (ROM: $53) + ;; - $33 in $FE1F (ROM: $60) lda $C08B ; Read and write bank 1 lda $C08B - lda #$55 + lda #$11 sta $D17B + lda #$33 sta $FE1F lda $C083 ; Read and write bank 2 lda $C083 - lda #$AA + lda #$22 sta $D17B lda $C080 @@ -383,7 +385,7 @@ + jmp .outer .datatesturl - +prerr $001E ;; E001E: We initialized $D17B in RAM bank 1 to $55, $D17B in RAM bank 2 to $AA, and $FE1F in RAM to $55. 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. + +prerr $001E ;; E001E: We initialized $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. !text "DATA-DRIVEN TEST FAILED" +prerred beq .done @@ -431,14 +433,16 @@ ;; - $ff-terminated list of C0XX addresses (0-F to read C08X, 80-8F to write C0XX). ;; - quint: expected current $d17b and fe1f, then d17b in bank1, d17b in bank 2, and fe1f ;; (All sequences start with lda $C080, just to reset things to a known state.) - !byte $8, $ff ; Read $C088 (RAM read, write protected) - !byte $55, $55, $55, $AA, $55 ; - !byte $1, $1, $ff ; Read $C081, $C081 (read ROM, write RAM bank 2) - !byte $53, $60, $55, $54, $61 ; - !byte $b, $b, $ff ; Read $C08B, $C08B (read/write RAM bank 1) - !byte $56, $56, $56, $AA, $56 ; - !byte $b, $8b, $b, $ff ; Read $C08B, write $C08B, read $C08B (read RAM bank 1, no write) - !byte $55, $55, $55, $AA, $55 ; + !byte $08, $ff ; Read $C088 (RAM read, write protected) + !byte $11, $33, $11, $22, $33 ; + !byte $01, $01, $ff ; Read $C081, $C081 (read ROM, write RAM bank 2) + !byte $53, $60, $11, $54, $61 ; + !byte $0b, $0b, $ff ; Read $C08B, $C08B (read/write RAM bank 1) + !byte $12, $34, $12, $22, $34 ; + !byte $07, $0D, $ff ; Read $C087, read $C08D (read ROM, write bank 1) + !byte $53, $60, $54, $22, $61 ; + !byte $0b, $8b, $0b, $ff ; Read $C08B, write $C08B, read $C08B (read RAM bank 1, no write) + !byte $11, $33, $11, $22, $33 ; (this one is tricky: reset WRTCOUNT by writing halfway) !byte $ff nop ; Provide clean break after data when viewing disassembly diff --git a/v0/index.md b/v0/index.md index c4a13eb..8399439 100644 --- a/v0/index.md +++ b/v0/index.md @@ -118,4 +118,4 @@ Read $C083 (read bank 2), but the check byte ($D17B) is an unknown value. ## E001E -We initialized $D17B in RAM bank 1 to $55, $D17B in RAM bank 2 to $AA, and $FE1F in RAM to $55. 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. +We initialized $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.