BitPattern16TP working

This commit is contained in:
Dagen Brock 2015-10-15 17:02:42 -05:00
parent 2e49f8a299
commit 5783a05749
1 changed files with 94 additions and 46 deletions

View File

@ -165,7 +165,8 @@ TestMasterLoop clc
jsr TestPrintIteration
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 TestGetNextBank ;sets initial bank when CurBank = 0
jsr TestPatchBanks ;patches code for whatever CurBank is set to
@ -175,6 +176,9 @@ TestMasterLoop clc
jsr TestPrintState
jsr TestGetStartAddress
jsr TestForceUpdateStatus ;print last tested address before we advance banks
stz _updateTick
stz _updateTick+1
:TestLoop ;THIS IS IT!
@ -419,10 +423,8 @@ TestForceUpdateStatus PushAll
stx _stash
bra :print
TestUpdateStatus ldy _updateTick
iny
sty _updateTick
cpy #_updateInterval
bne :noprint
bcc :noprint
PushAll
stx _stash ; save real X
@ -443,7 +445,10 @@ TestUpdateStatus ldy _updateTick
xce
rep #$10
PopAll
:noprint rts
:noprint ldy _updateTick
iny
sty _updateTick
rts
_updateTick dw #0
_updateInterval = #$0200 ;327 works well
@ -558,7 +563,6 @@ TestMemoryLocationTwoPass
Test_16RandomTP
Test_16BitWalk1TP
Test_16BitWalk0TP
Test_16BitPatternTP
rts
_walkState db 0 ;use to track in two pass mode
@ -684,6 +688,48 @@ BANKPATCH11 = *-1
jsr TestPauseError
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
rts
mx %10
TestAdvanceLocation
lda TestDirection
TestAdvanceLocation lda TestDirection
bne :dn
:up lda TestSize16Bit
beq :up8
:up16 inx
@ -967,6 +1011,7 @@ TestAdvanceLocation
cpx EndAddr ;sets carry if we are past/done
bcs :done
rts
:dn lda TestSize16Bit
beq :dn8
:dn16 cpx #0
@ -1153,6 +1198,9 @@ TestPatchBanks lda CurBank
sta BANKPATCH10 ;two pass start here
sta BANKPATCH11
sta BANKPATCH12
sta BANKPATCH13
rts