mirror of
https://github.com/digarok/MiniMemoryTester.git
synced 2024-12-29 01:33:21 +00:00
BitPattern16TP working
This commit is contained in:
parent
2e49f8a299
commit
5783a05749
140
src/mmt.s
140
src/mmt.s
@ -165,7 +165,8 @@ TestMasterLoop clc
|
|||||||
|
|
||||||
jsr TestPrintIteration
|
jsr TestPrintIteration
|
||||||
jsr TestPrintErrors ;just to get it drawn
|
jsr TestPrintErrors ;just to get it drawn
|
||||||
:NextBank jsr TestSetState ;sets read/write/both
|
:NextBank
|
||||||
|
jsr TestSetState ;sets read/write/both
|
||||||
jsr TestForceUpdateStatus ;print last tested address before we advance banks
|
jsr TestForceUpdateStatus ;print last tested address before we advance banks
|
||||||
jsr TestGetNextBank ;sets initial bank when CurBank = 0
|
jsr TestGetNextBank ;sets initial bank when CurBank = 0
|
||||||
jsr TestPatchBanks ;patches code for whatever CurBank is set to
|
jsr TestPatchBanks ;patches code for whatever CurBank is set to
|
||||||
@ -175,6 +176,9 @@ TestMasterLoop clc
|
|||||||
jsr TestPrintState
|
jsr TestPrintState
|
||||||
jsr TestGetStartAddress
|
jsr TestGetStartAddress
|
||||||
|
|
||||||
|
jsr TestForceUpdateStatus ;print last tested address before we advance banks
|
||||||
|
stz _updateTick
|
||||||
|
stz _updateTick+1
|
||||||
|
|
||||||
|
|
||||||
:TestLoop ;THIS IS IT!
|
:TestLoop ;THIS IS IT!
|
||||||
@ -419,10 +423,8 @@ TestForceUpdateStatus PushAll
|
|||||||
stx _stash
|
stx _stash
|
||||||
bra :print
|
bra :print
|
||||||
TestUpdateStatus ldy _updateTick
|
TestUpdateStatus ldy _updateTick
|
||||||
iny
|
|
||||||
sty _updateTick
|
|
||||||
cpy #_updateInterval
|
cpy #_updateInterval
|
||||||
bne :noprint
|
bcc :noprint
|
||||||
|
|
||||||
PushAll
|
PushAll
|
||||||
stx _stash ; save real X
|
stx _stash ; save real X
|
||||||
@ -443,7 +445,10 @@ TestUpdateStatus ldy _updateTick
|
|||||||
xce
|
xce
|
||||||
rep #$10
|
rep #$10
|
||||||
PopAll
|
PopAll
|
||||||
:noprint rts
|
:noprint ldy _updateTick
|
||||||
|
iny
|
||||||
|
sty _updateTick
|
||||||
|
rts
|
||||||
|
|
||||||
_updateTick dw #0
|
_updateTick dw #0
|
||||||
_updateInterval = #$0200 ;327 works well
|
_updateInterval = #$0200 ;327 works well
|
||||||
@ -558,7 +563,6 @@ TestMemoryLocationTwoPass
|
|||||||
Test_16RandomTP
|
Test_16RandomTP
|
||||||
Test_16BitWalk1TP
|
Test_16BitWalk1TP
|
||||||
Test_16BitWalk0TP
|
Test_16BitWalk0TP
|
||||||
Test_16BitPatternTP
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
_walkState db 0 ;use to track in two pass mode
|
_walkState db 0 ;use to track in two pass mode
|
||||||
@ -606,45 +610,45 @@ Walk8B0_7 plx
|
|||||||
|
|
||||||
|
|
||||||
Test_8BitWalk1TP lda _walkState
|
Test_8BitWalk1TP lda _walkState
|
||||||
asl
|
asl
|
||||||
phx ;TRICKY! THEY ALL NEED TO PULL X WHEN THEY REACH THEIR JMP!
|
phx ;TRICKY! THEY ALL NEED TO PULL X WHEN THEY REACH THEIR JMP!
|
||||||
tax
|
tax
|
||||||
jmp (_walkTbl8B1,x)
|
jmp (_walkTbl8B1,x)
|
||||||
|
|
||||||
_walkTbl8B1 da Walk8B1_0,Walk8B1_1,Walk8B1_2,Walk8B1_3,Walk8B1_4,Walk8B1_5,Walk8B1_6,Walk8B1_7
|
_walkTbl8B1 da Walk8B1_0,Walk8B1_1,Walk8B1_2,Walk8B1_3,Walk8B1_4,Walk8B1_5,Walk8B1_6,Walk8B1_7
|
||||||
|
|
||||||
Walk8B1_0 plx
|
Walk8B1_0 plx
|
||||||
lda #%10000000
|
lda #%10000000
|
||||||
sta HexPattern
|
sta HexPattern
|
||||||
jmp Test_8BitPatternTP
|
jmp Test_8BitPatternTP
|
||||||
Walk8B1_1 plx
|
Walk8B1_1 plx
|
||||||
lda #%01000000
|
lda #%01000000
|
||||||
sta HexPattern
|
sta HexPattern
|
||||||
jmp Test_8BitPatternTP
|
jmp Test_8BitPatternTP
|
||||||
Walk8B1_2 plx
|
Walk8B1_2 plx
|
||||||
lda #%00100000
|
lda #%00100000
|
||||||
sta HexPattern
|
sta HexPattern
|
||||||
jmp Test_8BitPatternTP
|
jmp Test_8BitPatternTP
|
||||||
Walk8B1_3 plx
|
Walk8B1_3 plx
|
||||||
lda #%00010000
|
lda #%00010000
|
||||||
sta HexPattern
|
sta HexPattern
|
||||||
jmp Test_8BitPatternTP
|
jmp Test_8BitPatternTP
|
||||||
Walk8B1_4 plx
|
Walk8B1_4 plx
|
||||||
lda #%00001000
|
lda #%00001000
|
||||||
sta HexPattern
|
sta HexPattern
|
||||||
jmp Test_8BitPatternTP
|
jmp Test_8BitPatternTP
|
||||||
Walk8B1_5 plx
|
Walk8B1_5 plx
|
||||||
lda #%00000100
|
lda #%00000100
|
||||||
sta HexPattern
|
sta HexPattern
|
||||||
jmp Test_8BitPatternTP
|
jmp Test_8BitPatternTP
|
||||||
Walk8B1_6 plx
|
Walk8B1_6 plx
|
||||||
lda #%00000010
|
lda #%00000010
|
||||||
sta HexPattern
|
sta HexPattern
|
||||||
jmp Test_8BitPatternTP
|
jmp Test_8BitPatternTP
|
||||||
Walk8B1_7 plx
|
Walk8B1_7 plx
|
||||||
lda #%00000001
|
lda #%00000001
|
||||||
sta HexPattern
|
sta HexPattern
|
||||||
jmp Test_8BitPatternTP
|
jmp Test_8BitPatternTP
|
||||||
|
|
||||||
|
|
||||||
Test_8RandomTP jsr GetRandByte ;should match with seeds?
|
Test_8RandomTP jsr GetRandByte ;should match with seeds?
|
||||||
@ -684,6 +688,48 @@ BANKPATCH11 = *-1
|
|||||||
jsr TestPauseError
|
jsr TestPauseError
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
mx %00
|
||||||
|
* 16-bit two-pass tests
|
||||||
|
Test_16BitPatternTP
|
||||||
|
lda _testState
|
||||||
|
cmp #TESTSTATE_READ
|
||||||
|
beq :read16
|
||||||
|
:write16 ldy TestWriteRepeat
|
||||||
|
_writeloop3 lda HexPattern
|
||||||
|
stal $020000,x
|
||||||
|
BANKPATCH12 = *-1
|
||||||
|
dey
|
||||||
|
bne _writeloop3
|
||||||
|
|
||||||
|
PushAll
|
||||||
|
sep #$20
|
||||||
|
jsr CORRUPTOR
|
||||||
|
clc
|
||||||
|
xce
|
||||||
|
rep #$30
|
||||||
|
PopAll
|
||||||
|
|
||||||
|
sep #$20
|
||||||
|
rts
|
||||||
|
|
||||||
|
:read16
|
||||||
|
ldy TestReadRepeat
|
||||||
|
_readloop4 ldal $020000,x
|
||||||
|
BANKPATCH13 = *-1
|
||||||
|
cmp HexPattern
|
||||||
|
bne :readerror
|
||||||
|
dey
|
||||||
|
bne _readloop4
|
||||||
|
sep $20
|
||||||
|
rts
|
||||||
|
:readerror jsr TestLogError
|
||||||
|
jsr TestPrintErrors
|
||||||
|
jsr TestPauseError
|
||||||
|
rts
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -950,14 +996,12 @@ _readerror16 sep #$20
|
|||||||
rep #$30
|
rep #$30
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
mx %10
|
mx %10
|
||||||
|
|
||||||
|
TestAdvanceLocation lda TestDirection
|
||||||
TestAdvanceLocation
|
|
||||||
lda TestDirection
|
|
||||||
|
|
||||||
|
|
||||||
bne :dn
|
bne :dn
|
||||||
|
|
||||||
:up lda TestSize16Bit
|
:up lda TestSize16Bit
|
||||||
beq :up8
|
beq :up8
|
||||||
:up16 inx
|
:up16 inx
|
||||||
@ -967,6 +1011,7 @@ TestAdvanceLocation
|
|||||||
cpx EndAddr ;sets carry if we are past/done
|
cpx EndAddr ;sets carry if we are past/done
|
||||||
bcs :done
|
bcs :done
|
||||||
rts
|
rts
|
||||||
|
|
||||||
:dn lda TestSize16Bit
|
:dn lda TestSize16Bit
|
||||||
beq :dn8
|
beq :dn8
|
||||||
:dn16 cpx #0
|
:dn16 cpx #0
|
||||||
@ -1072,8 +1117,8 @@ TwoPassBankLogics
|
|||||||
cmp #TESTSTATE_READ ;don't change bank on read pass of two-pass. (we read during this pass)
|
cmp #TESTSTATE_READ ;don't change bank on read pass of two-pass. (we read during this pass)
|
||||||
bne :checkWrite
|
bne :checkWrite
|
||||||
lda TestType
|
lda TestType
|
||||||
:checkReadPattern cmp #TT_BITPATTERN
|
:checkReadPattern cmp #TT_BITPATTERN
|
||||||
bne :checkReadRandom
|
bne :checkReadRandom
|
||||||
clc
|
clc
|
||||||
rts
|
rts
|
||||||
:checkReadRandom cmp #TT_RANDOM
|
:checkReadRandom cmp #TT_RANDOM
|
||||||
@ -1093,8 +1138,8 @@ TwoPassBankLogics
|
|||||||
|
|
||||||
:checkWrite ;we're in write mode.
|
:checkWrite ;we're in write mode.
|
||||||
lda TestType
|
lda TestType
|
||||||
:checkWritePattern cmp #TT_BITPATTERN
|
:checkWritePattern cmp #TT_BITPATTERN
|
||||||
bne :checkWriteRandom
|
bne :checkWriteRandom
|
||||||
sec
|
sec
|
||||||
rts
|
rts
|
||||||
|
|
||||||
@ -1131,7 +1176,7 @@ TestUpdateWalkState
|
|||||||
clc
|
clc
|
||||||
rts
|
rts
|
||||||
|
|
||||||
:resetWalkState ;walkstate=0
|
:resetWalkState ;walkstate=0
|
||||||
stz _walkState
|
stz _walkState
|
||||||
sec
|
sec
|
||||||
rts
|
rts
|
||||||
@ -1153,6 +1198,9 @@ TestPatchBanks lda CurBank
|
|||||||
|
|
||||||
sta BANKPATCH10 ;two pass start here
|
sta BANKPATCH10 ;two pass start here
|
||||||
sta BANKPATCH11
|
sta BANKPATCH11
|
||||||
|
sta BANKPATCH12
|
||||||
|
sta BANKPATCH13
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
@ -1160,8 +1208,8 @@ CORRUPTOR lda $C000
|
|||||||
bpl _nokey
|
bpl _nokey
|
||||||
cmp #"c"
|
cmp #"c"
|
||||||
bne _nokey
|
bne _nokey
|
||||||
jsr GetRandTrash ;careful... this is 8-bit code. make sure M=1
|
jsr GetRandTrash ;careful... this is 8-bit code. make sure M=1
|
||||||
;lda #$55
|
;lda #$55
|
||||||
stal $020000,x
|
stal $020000,x
|
||||||
BANKPATCHXX = *-1
|
BANKPATCHXX = *-1
|
||||||
_nokey nop
|
_nokey nop
|
||||||
|
Loading…
Reference in New Issue
Block a user