mirror of
https://github.com/zellyn/a2audit.git
synced 2024-11-28 23:49:21 +00:00
audit: add langcard tests; fix error from split
This commit is contained in:
parent
3f0f77e57a
commit
3c5242beb5
@ -41,6 +41,8 @@ getch2 lda $FEED
|
|||||||
jmp getch2
|
jmp getch2
|
||||||
+ rts
|
+ rts
|
||||||
|
|
||||||
|
!src "technote2.asm"
|
||||||
|
|
||||||
; !if * != STRINGS {
|
; !if * != STRINGS {
|
||||||
; !error "Expected STRINGS to be ", *
|
; !error "Expected STRINGS to be ", *
|
||||||
; }
|
; }
|
||||||
@ -48,3 +50,4 @@ getch2 lda $FEED
|
|||||||
!if * > STRINGS {
|
!if * > STRINGS {
|
||||||
!error "End of compilation passed STRINGS:", *
|
!error "End of compilation passed STRINGS:", *
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BIN
audit/audit.dsk
BIN
audit/audit.dsk
Binary file not shown.
@ -91,5 +91,3 @@
|
|||||||
+printed
|
+printed
|
||||||
.done
|
.done
|
||||||
} ;detect
|
} ;detect
|
||||||
|
|
||||||
!src "technote2.asm"
|
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
+prerr $0004 ;; E0004: We tried to put the language card into read RAM, write RAM, but failed to write.
|
+prerr $0004 ;; E0004: We tried to put the language card into read RAM, write RAM, but failed to write.
|
||||||
!text "CANNOT WRITE TO LC RAM"
|
!text "CANNOT WRITE TO LC RAM"
|
||||||
+prerred
|
+prerred
|
||||||
beq .done
|
beq .done2
|
||||||
+ lda $C083 ; Read and write Second 4K bank
|
+ lda $C083 ; Read and write Second 4K bank
|
||||||
lda $C083
|
lda $C083
|
||||||
lda #$AA
|
lda #$AA
|
||||||
@ -36,29 +36,96 @@
|
|||||||
+prerr $0005 ;; E0005: We tried to put the language card into read bank 2, write bank 2, but failed to write.
|
+prerr $0005 ;; E0005: We tried to put the language card into read bank 2, write bank 2, but failed to write.
|
||||||
!text "CANNOT WRITE TO LC BANK 2 RAM"
|
!text "CANNOT WRITE TO LC BANK 2 RAM"
|
||||||
+prerred
|
+prerred
|
||||||
beq .done
|
beq .done2
|
||||||
|
|
||||||
|
;; Test that we're reading the right things
|
||||||
|
|
||||||
+ lda $C088 ; RAM read, bank 1
|
+ lda $C088 ; RAM read, bank 1
|
||||||
lda $D17B
|
lda $D17B
|
||||||
cmp #$55
|
cmp #$55
|
||||||
beq +++
|
beq ++
|
||||||
cmp #$AA
|
cmp #$AA
|
||||||
bne +
|
bne +
|
||||||
+prerr $0006 ;; E0006: Read $C088 (read bank 1), but the language card is still reading bank 2.
|
+prerr $0006 ;; E0006: Read $C088 (read bank 1), but the language card is still reading bank 2.
|
||||||
!text "$C088: BANK 1 ACTIVE"
|
!text "$C088: BANK 2 ACTIVE"
|
||||||
+prerred
|
+prerred
|
||||||
.done2 beq .done
|
.done2 beq .done3
|
||||||
+ cmp #$53
|
+ cmp #$53
|
||||||
bne +
|
bne +
|
||||||
+prerr $0007 ;; E0007: Read $C088 (read bank 1), but the language card is reading ROM.
|
+prerr $0007 ;; E0007: Read $C088 (read bank 1), but the language card is reading ROM.
|
||||||
!text "$C088: ROM ACTIVE"
|
!text "$C088: ROM ACTIVE"
|
||||||
+prerred
|
+prerred
|
||||||
beq .done
|
beq .done3
|
||||||
+ +prerr $0007 ;; E0007: Read $C088 (read bank 1), but the check byte ($D17B) is an unknown value.
|
+ +prerr $0007 ;; E0007: Read $C088 (read bank 1), but the check byte ($D17B) is an unknown value.
|
||||||
!text "$C088: UNKNOWN BYTE"
|
!text "$C088: UNKNOWN BYTE"
|
||||||
+prerred
|
+prerred
|
||||||
|
beq .done3
|
||||||
|
++ dec $D17B
|
||||||
|
eor $D17B
|
||||||
|
beq +
|
||||||
|
+prerr $0008 ;; E0008: Read $C088 (read bank 1, write-protected), but successfully wrote byte ($D17B).
|
||||||
|
!text "$C088: ALLOWED WRITE"
|
||||||
|
+prerred
|
||||||
|
beq .done3
|
||||||
|
|
||||||
|
+ lda $C080 ; RAM read, bank 2
|
||||||
|
lda $D17B
|
||||||
|
cmp #$AA
|
||||||
|
beq ++
|
||||||
|
cmp #$55
|
||||||
|
bne +
|
||||||
|
+prerr $0009 ;; E0009: Read $C080 (read bank 2), but the language card is still reading bank 1.
|
||||||
|
!text "$C080: BANK 1 ACTIVE"
|
||||||
|
+prerred
|
||||||
|
beq .done3
|
||||||
|
+ cmp #$53
|
||||||
|
bne +
|
||||||
|
+prerr $000A ;; E000A: Read $C080 (read bank 2), but the language card is reading ROM.
|
||||||
|
!text "$C080: ROM ACTIVE"
|
||||||
|
+prerred
|
||||||
|
beq .done3
|
||||||
|
+ +prerr $000B ;; E000B: Read $C080 (read bank 2), but the check byte ($D17B) is an unknown value.
|
||||||
|
!text "$C080: UNKNOWN BYTE"
|
||||||
|
+prerred
|
||||||
|
.done3 beq .done
|
||||||
|
++ dec $D17B
|
||||||
|
eor $D17B
|
||||||
|
beq +
|
||||||
|
+prerr $000C ;; E000C: Read $C080 (read bank 2, write-protected), but successfully wrote byte ($D17B).
|
||||||
|
!text "$C080: ALLOWED WRITE"
|
||||||
|
+prerred
|
||||||
beq .done
|
beq .done
|
||||||
+++
|
|
||||||
;; Test
|
+ lda $C081 ; ROM read
|
||||||
|
lda $D17B
|
||||||
|
cmp #$53
|
||||||
|
beq ++
|
||||||
|
cmp #$55
|
||||||
|
bne +
|
||||||
|
+prerr $000D ;; E000D: Read $C081 (read ROM), but the language card is still reading bank 1.
|
||||||
|
!text "$C081: BANK 1 ACTIVE"
|
||||||
|
+prerred
|
||||||
|
beq .done
|
||||||
|
+ cmp #$AA
|
||||||
|
bne +
|
||||||
|
+prerr $000E ;; E000E: Read $C081 (read ROM), but the language card is reading bank 2.
|
||||||
|
!text "$C081: BANK 1 ACTIVE"
|
||||||
|
+prerred
|
||||||
|
beq .done
|
||||||
|
+ +prerr $000F ;; E000F: Read $C081 (read ROM), but the check byte ($D17B) is an unknown value.
|
||||||
|
!text "$C081: UNKNOWN BYTE"
|
||||||
|
+prerred
|
||||||
|
beq .done
|
||||||
|
++ dec $D17B
|
||||||
|
eor $D17B
|
||||||
|
beq +
|
||||||
|
+prerr $0010 ;; E0010: Read $C081 (read ROM), but successfully modified byte ($D17B).
|
||||||
|
!text "$C081: ALLOWED WRITE"
|
||||||
|
+prerred
|
||||||
|
beq .done
|
||||||
|
|
||||||
|
+
|
||||||
|
|
||||||
;; Success
|
;; Success
|
||||||
+print
|
+print
|
||||||
!text "LANGUAGE CARD TESTS SUCCEEDED",$8D
|
!text "LANGUAGE CARD TESTS SUCCEEDED",$8D
|
||||||
|
Loading…
Reference in New Issue
Block a user