Print written value for XX faults

This commit is contained in:
s3lph 2022-02-07 22:46:16 +01:00
parent 691f0dc7cb
commit 8311242f70
2 changed files with 34 additions and 2 deletions

View file

@ -60,7 +60,7 @@ After starting up, most of the screen will be empty.
* Each faulty memory access looks like this: `DEAD>BEEF`. * Each faulty memory access looks like this: `DEAD>BEEF`.
* The part left of the `>` sign is the memory address at which the fault occured. * The part left of the `>` sign is the memory address at which the fault occured.
* The part right of the `>` sign is two bytes: First the byte that was written to this address, then the byte that was returned when reading from the same address. * The part right of the `>` sign is two bytes: First the byte that was written to this address, then the byte that was returned when reading from the same address.
* If the written byte reads `XX` instead of a hex byte, the byte that was actually written is the XOR of the high and low bytes of the address, i.e. `(DE xor AD)`. If you only see `XX` faults, there may be a fault in the address lines, rather than individual memory cells or output lines. * If the delimiter is `X` instead of `>`, the byte that was written is the XOR of the high and low bytes of the address, i.e. `(DE xor AD)`. If you only see `X` faults, there may be a fault in the address lines, rather than individual memory cells or output lines.
* In the bottom right you can see 3 quickly alternating characters. The first two chars are the textual (PETSCII characters, not hexdumped) representation of the memory address currently being tested. The third char is the character written to said memory address in the current pass. * In the bottom right you can see 3 quickly alternating characters. The first two chars are the textual (PETSCII characters, not hexdumped) representation of the memory address currently being tested. The third char is the character written to said memory address in the current pass.
* When all memtest passes have completed, there will be an additional `=` character left of these chars. * When all memtest passes have completed, there will be an additional `=` character left of these chars.
* When the memtest routine was interrupted by an NMI, there will be a `!` instead. * When the memtest routine was interrupted by an NMI, there will be a `!` instead.

View file

@ -307,8 +307,13 @@ nowrap5a:
sty <scroff sty <scroff
stx >scroff stx >scroff
;; space ;; address/value delimiter
lda #">" lda #">"
ldy pbyte
cpy #$42
bne normaldelimiter
lda #"X"
normaldelimiter:
ldy #$00 ldy #$00
sta (<scroff),Y sta (<scroff),Y
;; increment ;; increment
@ -330,10 +335,25 @@ nowrap6a:
stx >scroff stx >scroff
;; upper nibble of pass char ;; upper nibble of pass char
lda pbyte
cmp #$42
bne normalupper
special42upper:
lda aoff
eor >addr
lsr
lsr
lsr
lsr
tay
lda hexchars,Y
jmp upperendif
normalupper:
lda ipass lda ipass
asl asl
tay tay
lda passchars,Y lda passchars,Y
upperendif:
ldy #$00 ldy #$00
sta (<scroff),Y sta (<scroff),Y
;; increment ;; increment
@ -355,11 +375,23 @@ nowrap7a:
stx >scroff stx >scroff
;; lower nibble of pass char ;; lower nibble of pass char
lda pbyte
cmp #$42
bne normallower
special42lower:
lda aoff
eor >addr
and #$0f
tay
lda hexchars,Y
jmp lowerendif
normallower:
lda ipass lda ipass
asl asl
tay tay
iny iny
lda passchars,Y lda passchars,Y
lowerendif:
ldy #$00 ldy #$00
sta (<scroff),Y sta (<scroff),Y
;; increment ;; increment