v0.1a second alpha release version

This commit is contained in:
Dagen Brock 2015-03-11 13:28:45 -05:00
parent 96e61e4601
commit 0e567fa158
2 changed files with 87 additions and 46 deletions

127
src/mt.s
View File

@ -142,6 +142,7 @@ Error brk $00 ; shouldn't be here either
BeginTest LOG Mesg_Starting BeginTest LOG Mesg_Starting
stz _errorCounter
stz _testIteration stz _testIteration
stz _testIteration+1 stz _testIteration+1
ldx #36 ldx #36
@ -177,7 +178,9 @@ BeginTestPass PRINTXY #38;#05;Mesg_TestPass
cpy #UpdateScanInterval cpy #UpdateScanInterval
bcc :bankstore bcc :bankstore
jsr PrintTestCurrent jsr PrintTestCurrent
ldy #0 bcc :noquit1
jmp :escpressed
:noquit1 ldy #0
bra :bankstore bra :bankstore
:donebank :donebank
ldy #0 ; because i'm anal.. this makes counter align ldy #0 ; because i'm anal.. this makes counter align
@ -187,7 +190,9 @@ BeginTestPass PRINTXY #38;#05;Mesg_TestPass
bcs :bankloop bcs :bankloop
dec CurBank ; so many bad hacks dec CurBank ; so many bad hacks
jsr PrintTestCurrent ; print final score ;) jsr PrintTestCurrent ; print final score ;)
sep $10 bcc :noquit2
jmp :escpressed
:noquit2 sep $10
sec sec
xce ; WRITE END xce ; WRITE END
@ -240,20 +245,21 @@ BeginTestPass PRINTXY #38;#05;Mesg_TestPass
lda BorderColor lda BorderColor
sta $C034 sta $C034
jmp BeginTestPass jmp BeginTestPass
:escpressed sep $10
sec
xce
rts rts
_testIteration ds 8 _testIteration ds 8
UpdateScanInterval equ #$3000 _errorCounter ds 8
UpdateScanInterval equ #$1000
Mesg_Rom asc "Apple IIgs ROM ",00 Mesg_Rom asc "Apple IIgs ROM ",00
Mesg_UserManual asc "USE ARROW KEYS TO MOVE - USE ENTER TO SELECT/EDIT",00 Mesg_UserManual asc "USE ARROW KEYS TO MOVE - USE ENTER TO SELECT/EDIT",00
Mesg_Starting asc $8D,"Starting Test",$8D,00 Mesg_Starting asc $8D,"Starting Test",$8D,"Press P to pause, ESC to stop.",$8D,$8D,00
Mesg_Waiting asc "Waiting: ",00 Mesg_Waiting asc "Waiting: ",00
Mesg_Writing asc "Writing: ",00 Mesg_Writing asc "Writing: ",00
Mesg_Reading asc "Reading: ",00 Mesg_Reading asc "Reading: ",00
Mesg_Error1 asc " Error at: $",00 Mesg_Errors asc " Errors: ",$00
Mesg_Error2 asc " Expected: $ %",$00
Mesg_Error3 asc " Read: $ %",$00
Mesg_TestPass asc " Pass: ",00 Mesg_TestPass asc " Pass: ",00
Mesg_Blank asc " ",00 Mesg_Blank asc " ",00
Mesg_BoxTop30 asc $1B,'ZLLLLLLLLLLLLLLLLLLLLLLLLLLLL_',$18,$8D,00 Mesg_BoxTop30 asc $1B,'ZLLLLLLLLLLLLLLLLLLLLLLLLLLLL_',$18,$8D,00
@ -312,31 +318,23 @@ _prbox_height db 0
* called with short M, long X * called with short M, long X
PrintTestError PrintTestError
rts
sec sec
xce xce
sep $30 sep $30
inc _errorCounter
bne :noRoll
inc _errorCounter+1
:noRoll PRINTXY #38;#6;Mesg_Errors
ldx _errorCounter
lda _errorCounter+1
jsr PRNTAX
jsr WinConsole jsr WinConsole
lda #Mesg_Error1 LOG Mesg_E1
ldy #>Mesg_Error1 ldx _testIteration
jsr PrintString lda _testIteration+1
jsr WinFull jsr PRNTAX
clc PRINTSTRING Mesg_E2
xce
rep $10
rts
;<---- CUT
sec
xce
ldx #42
ldy #13
lda #4
jsr PrintBox30
PRINTXY #45;#14;#Mesg_Error1
PRINTXY #45;#16;#Mesg_Error2
PRINTXY #45;#17;#Mesg_Error3
GOXY #57;#14
lda CurBank lda CurBank
jsr PRBYTE jsr PRBYTE
lda #"/" lda #"/"
@ -344,25 +342,44 @@ PrintTestError
lda _stash+3 lda _stash+3
ldx _stash+2 ldx _stash+2
jsr PRNTAX jsr PRNTAX
GOXY #57;#16 lda #$8D
jsr COUT
jsr WinFull
LOG Mesg_E3
lda _stash+1 lda _stash+1
jsr PRBYTE jsr PRBYTE
GOXY #61;#16 lda #" "
jsr COUT
lda #"%"
jsr COUT
lda _stash+1 lda _stash+1
jsr PRBIN jsr PRBIN
GOXY #57;#17 PRINTSTRING Mesg_E4
lda _stash lda _stash
jsr PRBYTE jsr PRBYTE
GOXY #61;#17 lda #" "
jsr COUT
lda #"%"
jsr COUT
lda _stash lda _stash
jsr PRBIN jsr PRBIN
GOXY #66;#14
jsr RDKEY
clc clc
xce xce
rep $10 rep $10
rts rts
Mesg_E1 asc "Bad Read - Pass ",00
Mesg_E2 asc " Location: ",00
Mesg_E3 asc "Wrote: $",00
Mesg_E4 asc " ",$1B,'SU',$18," Read: $",00
Mesg_Arrow asc $1B,'SU',$18,00
*Mesg_Error0 asc "Error: Bad Read Pass 0000 Location: 00/1234"
*Mesg_Error0 asc "Wrote: $00 %12345678 Read: $00 %12345678"
mx %01 mx %01
PrintTestCurrent pha PrintTestCurrent pha
phy phy
@ -384,9 +401,12 @@ PrintTestCurrent pha
* CORRUPTOR! * CORRUPTOR!
:kloop lda KEY :kloop lda KEY
cmp #"c" ; REMOVE DEBUG cmp #"c" ; REMOVE DEBUG
bne :nocorrupt beq :corruptor
jsr GetRandTrash cmp #"C"
:corruptme stal $060000 beq :corruptor
bra :nocorrupt
:corruptor jsr GetRandTrash
:corruptme stal $060000 ; addr gets overwritten
inc $c034 inc $c034
sta STROBE ; we only clear if 'c' is hit sta STROBE ; we only clear if 'c' is hit
inc _stash ; \ inc _stash ; \
@ -394,12 +414,24 @@ PrintTestCurrent pha
inc _stash+1 ; / inc _stash+1 ; /
:nocorrupt cmp #"p" ; check lower p :nocorrupt cmp #"p" ; check lower p
* @TODO make tolower for the comparisons * @TODO make tolower for the comparisons
bne :nopause beq :pause
sta STROBE cmp #"P"
:nope lda KEY beq :pause
bpl :nope bra :nopause
sta STROBE :pause sta STROBE
jsr WaitKey
:nopause :nopause
cmp #$9B
bne :noquit
clc
xce
rep $10
ldx _stash
ply
pla
sec
rts
:noquit
:noroll :noroll
clc clc
xce xce
@ -407,7 +439,11 @@ PrintTestCurrent pha
ldx _stash ldx _stash
ply ply
pla pla
clc
rts rts
mx %11 mx %11
PRBIN pha PRBIN pha
phx phx
@ -431,7 +467,7 @@ Pauser
PRINTXY #38;#8;Mesg_Waiting PRINTXY #38;#8;Mesg_Waiting
ldy #60 ldy #60
ldx TestDelay ldx TestDelay
beq :nopauseforyou beq :donepause
jsr PrintTimerVal ; inaugural print before waiting 1 sec jsr PrintTimerVal ; inaugural print before waiting 1 sec
:secondloop :secondloop
:wait ldal $e1c019 :wait ldal $e1c019
@ -447,7 +483,6 @@ Pauser
bra :secondloop bra :secondloop
:donepause :donepause
PRINTXY #38;#8;Mesg_Blank PRINTXY #38;#8;Mesg_Blank
:nopauseforyou
rts rts
PrintTimerVal PrintTimerVal
phx phx
@ -480,7 +515,7 @@ CurBank db #0
StartAddr dw #$0000 StartAddr dw #$0000
EndAddr dw #$FFFF EndAddr dw #$FFFF
TestValue dw #$00 TestValue dw #$00
TestDelay dw #$03 TestDelay dw #$01

View File

@ -1,11 +1,17 @@
**** MACROS **** MACROS
* GOXY #x;#y * GOXY #x;#y
* PRINTXY #x;#y;StringAddrWord * PRINTXY #x;#y;StringAddrWord
* PRINTSTRING #addr
**** FUNCTIONS **** FUNCTIONS
* GoXY * GoXY
* PrintStringsX * PrintStringsX
* PrintString * PrintString
PRINTSTRING MAC
lda #]1
ldy #>]1
jsr PrintString
<<<
GOXY MAC GOXY MAC
ldx ]1 ldx ]1