mirror of
https://github.com/digarok/MiniMemoryTester.git
synced 2024-12-31 14:29:30 +00:00
BitPattern16TP working
This commit is contained in:
parent
2e49f8a299
commit
5783a05749
70
src/mmt.s
70
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
|
||||||
@ -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
|
||||||
@ -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
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user