Random16TP working

This commit is contained in:
Dagen Brock 2015-10-15 20:36:18 -05:00
parent 5783a05749
commit 27e5a6efb3

View File

@ -154,6 +154,7 @@ TestInit
stz _testIteration+1 stz _testIteration+1
stz _testState stz _testState
stz _walkState stz _walkState
jsr TestTwoPassMakeSeed
TestMasterLoop clc TestMasterLoop clc
xce xce
@ -177,8 +178,8 @@ TestMasterLoop clc
jsr TestGetStartAddress jsr TestGetStartAddress
jsr TestForceUpdateStatus ;print last tested address before we advance banks jsr TestForceUpdateStatus ;print last tested address before we advance banks
stz _updateTick stz _updateTick
stz _updateTick+1 stz _updateTick+1
:TestLoop ;THIS IS IT! :TestLoop ;THIS IS IT!
@ -445,10 +446,10 @@ TestUpdateStatus ldy _updateTick
xce xce
rep #$10 rep #$10
PopAll PopAll
:noprint ldy _updateTick :noprint ldy _updateTick
iny iny
sty _updateTick sty _updateTick
rts rts
_updateTick dw #0 _updateTick dw #0
_updateInterval = #$0200 ;327 works well _updateInterval = #$0200 ;327 works well
@ -560,7 +561,6 @@ TestMemoryLocationTwoPass
* TWO PASS TESTS * TWO PASS TESTS
mx %10 mx %10
Test_16RandomTP
Test_16BitWalk1TP Test_16BitWalk1TP
Test_16BitWalk0TP Test_16BitWalk0TP
rts rts
@ -688,13 +688,33 @@ BANKPATCH11 = *-1
jsr TestPauseError jsr TestPauseError
rts rts
mx %00 mx %00
mx %00
* 16-bit two-pass tests * 16-bit two-pass tests
Test_16RandomTP jsr GetRandByte16
sta HexPattern
jsr Test_16BitPatternTP
sep #$20
rts
mx %00
*Test_16BitPatternWR jsr Test_16Bit
sep #$20
rts
mx %00
Test_16BitPatternTP Test_16BitPatternTP
lda _testState lda _testState
cmp #TESTSTATE_READ cmp #TESTSTATE_READ
beq :read16 beq :read16
:write16 ldy TestWriteRepeat :write16 ldy TestWriteRepeat
_writeloop3 lda HexPattern _writeloop3 lda HexPattern
stal $020000,x stal $020000,x
BANKPATCH12 = *-1 BANKPATCH12 = *-1
@ -702,16 +722,16 @@ BANKPATCH12 = *-1
bne _writeloop3 bne _writeloop3
PushAll PushAll
sep #$20 sep #$20
jsr CORRUPTOR jsr CORRUPTOR
clc clc
xce xce
rep #$30 rep #$30
PopAll PopAll
sep #$20 sep #$20
rts rts
mx %00
:read16 :read16
ldy TestReadRepeat ldy TestReadRepeat
_readloop4 ldal $020000,x _readloop4 ldal $020000,x
@ -720,9 +740,10 @@ BANKPATCH13 = *-1
bne :readerror bne :readerror
dey dey
bne _readloop4 bne _readloop4
sep $20 sep $20
rts rts
:readerror jsr TestLogError :readerror sep $20
jsr TestLogError
jsr TestPrintErrors jsr TestPrintErrors
jsr TestPauseError jsr TestPauseError
rts rts
@ -965,6 +986,8 @@ BANKPATCH07 = *-1
_noAdjacentWrite16 dey _noAdjacentWrite16 dey
bne _writeloop16 bne _writeloop16
sep #$20 ;????????????????? sep #$20 ;?????????????????
jsr CORRUPTOR jsr CORRUPTOR
clc clc
@ -1065,15 +1088,14 @@ TestTwoPassRestoreSeed
rts rts
TestTwoPassMakeSeed ;jsr GetRandByte ;update our two-pass seed (even if we aren't in random mode. too lazy to check.) TestTwoPassMakeSeed jsr GetRandByte ;update our two-pass seed (even if we aren't in random mode. too lazy to check.)
sta TwoPassSeed ; sta TwoPassSeed ;
sta _seed16b sta _seed16b
sta _seed sta _seed
;jsr GetRandByte ; jsr GetRandByte ;
sta TwoPassSeed+1 ; sta TwoPassSeed+1 ;
sta _seed16a sta _seed16a
rts rts
@ -1124,14 +1146,15 @@ TwoPassBankLogics
:checkReadRandom cmp #TT_RANDOM :checkReadRandom cmp #TT_RANDOM
bne :checkReadBitwalk0 bne :checkReadBitwalk0
jsr TestTwoPassRestoreSeed ;for RANDOM, restore our write seed jsr TestTwoPassRestoreSeed ;for RANDOM, restore our write seed
:checkReadBitwalk0 cmp #TT_BITWALK0
bne :checkReadBitwalk1
; jmp TestUpdateWalkState ;for BITWALK0, update walkpass and SEC when loops
clc clc
rts rts
:checkReadBitwalk0 cmp #TT_BITWALK0
bne :checkReadBitwalk1
clc
rts
:checkReadBitwalk1 cmp #TT_BITWALK1 :checkReadBitwalk1 cmp #TT_BITWALK1
bne :unknown bne :unknown
; jmp TestUpdateWalkState ;for BITWALK1, update walkpass and SEC when loops
clc clc
rts rts
@ -1146,6 +1169,8 @@ TwoPassBankLogics
:checkWriteRandom cmp #TT_RANDOM :checkWriteRandom cmp #TT_RANDOM
bne :checkWriteBitwalk0 bne :checkWriteBitwalk0
jsr TestTwoPassMakeSeed ;for RANDOM, make a write seed jsr TestTwoPassMakeSeed ;for RANDOM, make a write seed
sec
rts
:checkWriteBitwalk0 cmp #TT_BITWALK0 :checkWriteBitwalk0 cmp #TT_BITWALK0
bne :checkWriteBitwalk1 bne :checkWriteBitwalk1
jmp TestUpdateWalkState ;for BITWALK0, update walkpass and SEC when loops jmp TestUpdateWalkState ;for BITWALK0, update walkpass and SEC when loops
@ -1198,8 +1223,8 @@ TestPatchBanks lda CurBank
sta BANKPATCH10 ;two pass start here sta BANKPATCH10 ;two pass start here
sta BANKPATCH11 sta BANKPATCH11
sta BANKPATCH12 sta BANKPATCH12
sta BANKPATCH13 sta BANKPATCH13
rts rts
@ -1862,3 +1887,4 @@ BankExpansionHighest ds 1
BankMap ds 256 ;page-align maps just to make them easier to see BankMap ds 256 ;page-align maps just to make them easier to see
_stash ds 256 _stash ds 256
ds \ ds \