fixed more of two-pass 8-bit
This commit is contained in:
parent
686b5c240b
commit
2e49f8a299
122
src/mmt.s
122
src/mmt.s
|
@ -228,8 +228,6 @@ TestKeyHandler sta $C010
|
||||||
* This should just flip-flop, no matter what, on TwoPass mode... otherwise W/R (BOTH in one pass)
|
* This should just flip-flop, no matter what, on TwoPass mode... otherwise W/R (BOTH in one pass)
|
||||||
mx %10
|
mx %10
|
||||||
TestSetState lda TestTwoPass ;read pass then write pass?
|
TestSetState lda TestTwoPass ;read pass then write pass?
|
||||||
stal $020010
|
|
||||||
stal $030234
|
|
||||||
bne :twopass
|
bne :twopass
|
||||||
lda #TESTSTATE_BOTH ;r&w
|
lda #TESTSTATE_BOTH ;r&w
|
||||||
sta _testState
|
sta _testState
|
||||||
|
@ -557,7 +555,6 @@ TestMemoryLocationTwoPass
|
||||||
* TWO PASS TESTS
|
* TWO PASS TESTS
|
||||||
mx %10
|
mx %10
|
||||||
|
|
||||||
Test_8BitWalk1TP
|
|
||||||
Test_16RandomTP
|
Test_16RandomTP
|
||||||
Test_16BitWalk1TP
|
Test_16BitWalk1TP
|
||||||
Test_16BitWalk0TP
|
Test_16BitWalk0TP
|
||||||
|
@ -607,6 +604,49 @@ Walk8B0_7 plx
|
||||||
jmp Test_8BitPatternTP
|
jmp Test_8BitPatternTP
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Test_8BitWalk1TP lda _walkState
|
||||||
|
asl
|
||||||
|
phx ;TRICKY! THEY ALL NEED TO PULL X WHEN THEY REACH THEIR JMP!
|
||||||
|
tax
|
||||||
|
jmp (_walkTbl8B1,x)
|
||||||
|
|
||||||
|
_walkTbl8B1 da Walk8B1_0,Walk8B1_1,Walk8B1_2,Walk8B1_3,Walk8B1_4,Walk8B1_5,Walk8B1_6,Walk8B1_7
|
||||||
|
|
||||||
|
Walk8B1_0 plx
|
||||||
|
lda #%10000000
|
||||||
|
sta HexPattern
|
||||||
|
jmp Test_8BitPatternTP
|
||||||
|
Walk8B1_1 plx
|
||||||
|
lda #%01000000
|
||||||
|
sta HexPattern
|
||||||
|
jmp Test_8BitPatternTP
|
||||||
|
Walk8B1_2 plx
|
||||||
|
lda #%00100000
|
||||||
|
sta HexPattern
|
||||||
|
jmp Test_8BitPatternTP
|
||||||
|
Walk8B1_3 plx
|
||||||
|
lda #%00010000
|
||||||
|
sta HexPattern
|
||||||
|
jmp Test_8BitPatternTP
|
||||||
|
Walk8B1_4 plx
|
||||||
|
lda #%00001000
|
||||||
|
sta HexPattern
|
||||||
|
jmp Test_8BitPatternTP
|
||||||
|
Walk8B1_5 plx
|
||||||
|
lda #%00000100
|
||||||
|
sta HexPattern
|
||||||
|
jmp Test_8BitPatternTP
|
||||||
|
Walk8B1_6 plx
|
||||||
|
lda #%00000010
|
||||||
|
sta HexPattern
|
||||||
|
jmp Test_8BitPatternTP
|
||||||
|
Walk8B1_7 plx
|
||||||
|
lda #%00000001
|
||||||
|
sta HexPattern
|
||||||
|
jmp Test_8BitPatternTP
|
||||||
|
|
||||||
|
|
||||||
Test_8RandomTP jsr GetRandByte ;should match with seeds?
|
Test_8RandomTP jsr GetRandByte ;should match with seeds?
|
||||||
sta HexPattern
|
sta HexPattern
|
||||||
jmp Test_8BitPatternTP
|
jmp Test_8BitPatternTP
|
||||||
|
@ -1032,6 +1072,10 @@ 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
|
||||||
|
bne :checkReadRandom
|
||||||
|
clc
|
||||||
|
rts
|
||||||
: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
|
||||||
|
@ -1049,13 +1093,16 @@ TwoPassBankLogics
|
||||||
|
|
||||||
:checkWrite ;we're in write mode.
|
:checkWrite ;we're in write mode.
|
||||||
lda TestType
|
lda TestType
|
||||||
|
:checkWritePattern cmp #TT_BITPATTERN
|
||||||
|
bne :checkWriteRandom
|
||||||
|
sec
|
||||||
|
rts
|
||||||
|
|
||||||
: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
|
||||||
: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
|
||||||
|
|
||||||
:checkWriteBitwalk1 cmp #TT_BITWALK1
|
:checkWriteBitwalk1 cmp #TT_BITWALK1
|
||||||
|
@ -1113,7 +1160,8 @@ CORRUPTOR lda $C000
|
||||||
bpl _nokey
|
bpl _nokey
|
||||||
cmp #"c"
|
cmp #"c"
|
||||||
bne _nokey
|
bne _nokey
|
||||||
lda #$55
|
jsr GetRandTrash ;careful... this is 8-bit code. make sure M=1
|
||||||
|
;lda #$55
|
||||||
stal $020000,x
|
stal $020000,x
|
||||||
BANKPATCHXX = *-1
|
BANKPATCHXX = *-1
|
||||||
_nokey nop
|
_nokey nop
|
||||||
|
@ -1226,70 +1274,6 @@ PrintTestError
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
mx %01
|
|
||||||
PrintTestCurrent pha
|
|
||||||
phy
|
|
||||||
stx _stash ; save real X
|
|
||||||
sep #$30 ;in case? there was a sec xce combo here
|
|
||||||
GOXY #65;#12
|
|
||||||
lda CurBank
|
|
||||||
sta :corruptme+3
|
|
||||||
jsr PRBYTE
|
|
||||||
lda #"/"
|
|
||||||
jsr COUT
|
|
||||||
lda _stash+1
|
|
||||||
sta :corruptme+2
|
|
||||||
jsr PRBYTE
|
|
||||||
lda _stash
|
|
||||||
sta :corruptme+1
|
|
||||||
jsr PRBYTE
|
|
||||||
* CORRUPTOR!
|
|
||||||
:kloop lda KEY
|
|
||||||
cmp #"c" ; REMOVE DEBUG
|
|
||||||
beq :corruptor
|
|
||||||
cmp #"C"
|
|
||||||
beq :corruptor
|
|
||||||
bra :nocorrupt
|
|
||||||
:corruptor jsr GetRandTrash
|
|
||||||
:corruptme stal $060000 ; addr gets overwritten
|
|
||||||
inc $c034
|
|
||||||
sta STROBE ; we only clear if 'c' is hit
|
|
||||||
inc _stash ; \
|
|
||||||
beq :noroll ; |- INX
|
|
||||||
inc _stash+1 ; /
|
|
||||||
:nocorrupt cmp #"p" ; check lower p
|
|
||||||
* @TODO make tolower for the comparisons
|
|
||||||
beq :pause
|
|
||||||
cmp #"P"
|
|
||||||
beq :pause
|
|
||||||
bra :nopause
|
|
||||||
:pause sta STROBE
|
|
||||||
jsr WaitKey
|
|
||||||
:nopause
|
|
||||||
cmp #$9B
|
|
||||||
bne :noquit
|
|
||||||
clc
|
|
||||||
xce
|
|
||||||
rep $10
|
|
||||||
ldx _stash
|
|
||||||
ply
|
|
||||||
pla
|
|
||||||
sec
|
|
||||||
rts
|
|
||||||
:noquit
|
|
||||||
:noroll
|
|
||||||
clc
|
|
||||||
xce
|
|
||||||
rep $10
|
|
||||||
ldx _stash
|
|
||||||
ply
|
|
||||||
pla
|
|
||||||
clc
|
|
||||||
rts
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
mx %11
|
mx %11
|
||||||
PRBIN pha
|
PRBIN pha
|
||||||
phx
|
phx
|
||||||
|
|
Loading…
Reference in New Issue