fix log messages a bit
This commit is contained in:
parent
5bd1671d11
commit
6cd86251f6
|
@ -59,3 +59,15 @@ VTABZ equ $FC24 ; Sets the cursor vertical position (0)
|
||||||
VLINE equ $F828 ; Draws a vertical line of low-resolution blocks
|
VLINE equ $F828 ; Draws a vertical line of low-resolution blocks
|
||||||
|
|
||||||
GSROM equ $FB59 ; should be int number of rom rev on Apple IIgs
|
GSROM equ $FB59 ; should be int number of rom rev on Apple IIgs
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
* KEY EQUATES
|
||||||
|
KEY_UPARROW = $8B
|
||||||
|
KEY_DNARROW = $8A
|
||||||
|
KEY_RTARROW = $95
|
||||||
|
KEY_LTARROW = $88
|
||||||
|
KEY_ENTER = $8D
|
||||||
|
KEY_ESC = $9B
|
||||||
|
KEY_TAB = $89
|
||||||
|
KEY_DEL = $FF
|
||||||
|
|
|
@ -861,3 +861,4 @@ BINBCDVARDUMP
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
196
src/mmt.s
196
src/mmt.s
|
@ -28,11 +28,7 @@ Init sei ; disable inte
|
||||||
lda #MainMenuDefs
|
lda #MainMenuDefs
|
||||||
ldx #>MainMenuDefs
|
ldx #>MainMenuDefs
|
||||||
jsr Menu_InitMenu
|
jsr Menu_InitMenu
|
||||||
ldx #Number
|
|
||||||
ldy #>Number
|
|
||||||
jsr PrintInt
|
|
||||||
Me jmp Me
|
|
||||||
Number dw #1234
|
|
||||||
*
|
*
|
||||||
* Main Menu loop begin
|
* Main Menu loop begin
|
||||||
*
|
*
|
||||||
|
@ -41,6 +37,9 @@ Main
|
||||||
jsr DrawRomMessage
|
jsr DrawRomMessage
|
||||||
jsr DrawRamMessages
|
jsr DrawRamMessages
|
||||||
|
|
||||||
|
jsr LogWelcomeMessage
|
||||||
|
jsr LogRamMessages
|
||||||
|
|
||||||
:menuDrawOptionsLoop jsr MenuUpdateWordSize ;always update this before draw in case of change
|
:menuDrawOptionsLoop jsr MenuUpdateWordSize ;always update this before draw in case of change
|
||||||
lda #MainMenuDefs
|
lda #MainMenuDefs
|
||||||
ldy #>MainMenuDefs
|
ldy #>MainMenuDefs
|
||||||
|
@ -100,89 +99,31 @@ DrawRamMessages
|
||||||
bra :drawExpansionMessage
|
bra :drawExpansionMessage
|
||||||
:rom0or1 PRINTXY #55;#07;Mesg_InternalRam256
|
:rom0or1 PRINTXY #55;#07;Mesg_InternalRam256
|
||||||
:drawExpansionMessage PRINTXY #55;#08;Mesg_ExpansionRam
|
:drawExpansionMessage PRINTXY #55;#08;Mesg_ExpansionRam
|
||||||
lda BankExpansionRam ;number of banks
|
ldx #BankExpansionRamKB
|
||||||
clc
|
ldy #>BankExpansionRamKB
|
||||||
xce
|
jsr PrintInt
|
||||||
rep #$30
|
|
||||||
mx %00
|
|
||||||
and #$00FF ;clear artifacts? can't remember state of B
|
|
||||||
asl ;*2
|
|
||||||
asl ;*4
|
|
||||||
asl ;*8
|
|
||||||
asl ;*16
|
|
||||||
asl ;*32
|
|
||||||
asl ;*64
|
|
||||||
sta _stash
|
|
||||||
sep #$30
|
|
||||||
ldx _stash
|
|
||||||
ldy _stash+1
|
|
||||||
jsr BINtoBCD
|
|
||||||
phx
|
|
||||||
tya
|
|
||||||
jsr PRBYTE
|
|
||||||
pla
|
|
||||||
jsr PRBYTE
|
|
||||||
lda #"K"
|
lda #"K"
|
||||||
jsr COUT
|
jsr COUT
|
||||||
rts
|
rts
|
||||||
|
|
||||||
LOG MAC
|
LogWelcomeMessage jsr WinConsole
|
||||||
lda #]1
|
LOG Mesg_Welcome
|
||||||
ldy #>]1
|
|
||||||
jsr ConsoleLog
|
|
||||||
<<<
|
|
||||||
|
|
||||||
_consoleBottom = #23
|
|
||||||
* Write out to console window
|
|
||||||
ConsoleLog pha
|
|
||||||
phy
|
|
||||||
jsr WinConsole
|
|
||||||
lda #0 ;settings to bottom-left of window
|
|
||||||
sta $24
|
|
||||||
lda #_consoleBottom-1
|
|
||||||
sta $25
|
|
||||||
jsr VTAB
|
|
||||||
lda #$8D ;pre-fix CR
|
|
||||||
jsr COUT
|
|
||||||
ply
|
|
||||||
pla
|
|
||||||
jsr PrintString
|
|
||||||
jsr WinFull
|
jsr WinFull
|
||||||
rts
|
rts
|
||||||
|
|
||||||
* Set console windowing
|
LogRamMessages jsr WinConsole
|
||||||
WinConsole lda #3
|
LOG Mesg_DetectedBanks
|
||||||
sta $20 ;left edge
|
|
||||||
lda #75
|
lda BankExpansionLowest
|
||||||
sta $21 ;width
|
jsr PRBYTE
|
||||||
lda #17
|
lda #Mesg_ToBank
|
||||||
sta $22 ;top edge
|
ldy #>Mesg_ToBank
|
||||||
lda #_consoleBottom
|
jsr PrintString
|
||||||
sta $23 ;bottom edge
|
lda BankExpansionHighest
|
||||||
|
jsr PRBYTE
|
||||||
|
jsr WinFull
|
||||||
rts
|
rts
|
||||||
|
|
||||||
* Set info windowing
|
|
||||||
WinInfo lda #52
|
|
||||||
sta $20 ;left edge
|
|
||||||
lda #26
|
|
||||||
sta $21 ;width
|
|
||||||
lda #5
|
|
||||||
sta $22 ;top edge
|
|
||||||
lda #16
|
|
||||||
sta $23 ;bottom edge
|
|
||||||
rts
|
|
||||||
|
|
||||||
* Restore full screen windowing
|
|
||||||
WinFull stz $20
|
|
||||||
stz $22
|
|
||||||
lda #80
|
|
||||||
sta $21
|
|
||||||
lda #24
|
|
||||||
sta $23
|
|
||||||
rts
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -386,6 +327,7 @@ _testIteration ds 8
|
||||||
_errorCounter ds 8
|
_errorCounter ds 8
|
||||||
UpdateScanInterval equ #$1000
|
UpdateScanInterval equ #$1000
|
||||||
|
|
||||||
|
Mesg_Welcome asc "Welcome to Mini Memory Tester v0.3 by Dagen Brock",$8D,00
|
||||||
Mesg_InternalRam256 asc "Built-In RAM 256K",00
|
Mesg_InternalRam256 asc "Built-In RAM 256K",00
|
||||||
Mesg_InternalRam1024 asc "Built-In RAM 1024K",00
|
Mesg_InternalRam1024 asc "Built-In RAM 1024K",00
|
||||||
Mesg_ExpansionRam asc "Expansion RAM ",00
|
Mesg_ExpansionRam asc "Expansion RAM ",00
|
||||||
|
@ -399,36 +341,21 @@ Mesg_Reading asc "Reading: ",00
|
||||||
Mesg_Errors asc " Errors: ",$00
|
Mesg_Errors asc " Errors: ",$00
|
||||||
Mesg_TestPass asc " Pass: ",00
|
Mesg_TestPass asc " Pass: ",00
|
||||||
Mesg_Blank asc " ",00
|
Mesg_Blank asc " ",00
|
||||||
|
Mesg_DetectedBanks asc "Setting default start/end banks to detected memory expansion: $",00
|
||||||
|
Mesg_ToBank asc " to $",00
|
||||||
|
|
||||||
Mesg_ConsoleTop asc $1B,'ZLLLLLLLLLLLLLLL',$18,' Console Log ',$1B,'LLLLLLLLLLLLLLLLL_',$18,$8D,00
|
Mesg_ConsoleTop asc $1B,'ZLLLLLLLLLLLLLLL',$18,' Console Log ',$1B,'LLLLLLLLLLLLLLLLL_',$18,$8D,00
|
||||||
Mesg_ConsoleMid asc $1B,'Z'," ",'_',$18,$8D,00
|
Mesg_ConsoleMid asc $1B,'Z'," ",'_',$18,$8D,00
|
||||||
Mesg_ConsoleBot asc $1B,'Z',"_____________________________________________",'_',$18,$8D,00
|
Mesg_ConsoleBot asc $1B,'Z',"_____________________________________________",'_',$18,$8D,00
|
||||||
|
|
||||||
* x, y, a=height
|
* Error message strings
|
||||||
PrintConsole stx _prbox_x
|
Mesg_E1 asc "Bad Read - Pass ",00
|
||||||
sta _prbox_height
|
Mesg_E2 asc " Location: ",00
|
||||||
jsr GoXY
|
Mesg_E3 asc "Wrote: $",00
|
||||||
lda #Mesg_ConsoleTop
|
Mesg_E4 asc " ",$1B,'SU',$18," Read: $",00
|
||||||
ldy #>Mesg_ConsoleTop
|
Mesg_Arrow asc $1B,'SU',$18,00
|
||||||
jsr PrintString
|
|
||||||
:midloop ldx _prbox_x
|
|
||||||
stx $24
|
|
||||||
lda #Mesg_ConsoleMid
|
|
||||||
ldy #>Mesg_ConsoleMid
|
|
||||||
jsr PrintString
|
|
||||||
dec _prbox_height
|
|
||||||
bne :midloop
|
|
||||||
|
|
||||||
ldx _prbox_x
|
|
||||||
stx $24
|
|
||||||
lda #Mesg_ConsoleBot
|
|
||||||
ldy #>Mesg_ConsoleBot
|
|
||||||
jsr PrintString
|
|
||||||
rts
|
|
||||||
_prbox_x db 0
|
|
||||||
_prbox_height db 0
|
|
||||||
|
|
||||||
|
|
||||||
|
mx %10 ;i think?
|
||||||
* called with short M, long X
|
* called with short M, long X
|
||||||
PrintTestError
|
PrintTestError
|
||||||
|
|
||||||
|
@ -456,7 +383,6 @@ PrintTestError
|
||||||
jsr PRNTAX
|
jsr PRNTAX
|
||||||
lda #$8D
|
lda #$8D
|
||||||
jsr COUT
|
jsr COUT
|
||||||
jsr WinFull
|
|
||||||
LOG Mesg_E3
|
LOG Mesg_E3
|
||||||
lda _stash+1
|
lda _stash+1
|
||||||
jsr PRBYTE
|
jsr PRBYTE
|
||||||
|
@ -475,15 +401,11 @@ PrintTestError
|
||||||
jsr COUT
|
jsr COUT
|
||||||
lda _stash
|
lda _stash
|
||||||
jsr PRBIN
|
jsr PRBIN
|
||||||
|
jsr WinFull
|
||||||
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 "Error: Bad Read Pass 0000 Location: 00/1234"
|
||||||
*Mesg_Error0 asc "Wrote: $00 %12345678 Read: $00 %12345678"
|
*Mesg_Error0 asc "Wrote: $00 %12345678 Read: $00 %12345678"
|
||||||
|
@ -902,43 +824,43 @@ DetectRam
|
||||||
inx
|
inx
|
||||||
bra :highloop
|
bra :highloop
|
||||||
|
|
||||||
:done bra :findKB
|
:done bra :findKB
|
||||||
|
|
||||||
:notused lda #BankNoRAM
|
:notused lda #BankNoRAM
|
||||||
sta BankMap,x
|
sta BankMap,x
|
||||||
bra :continue
|
bra :continue
|
||||||
|
|
||||||
:findKB
|
:findKB
|
||||||
lda BankExpansionRam ;number of banks
|
lda BankExpansionRam ;number of banks
|
||||||
clc
|
clc
|
||||||
xce
|
xce
|
||||||
rep #$30
|
rep #$30
|
||||||
mx %00
|
mx %00
|
||||||
and #$00FF ;clear artifacts? can't remember state of B
|
and #$00FF ;clear artifacts? can't remember state of B
|
||||||
asl ;*2
|
asl ;*2
|
||||||
asl ;*4
|
asl ;*4
|
||||||
asl ;*8
|
asl ;*8
|
||||||
asl ;*16
|
asl ;*16
|
||||||
asl ;*32
|
asl ;*32
|
||||||
asl ;*64
|
asl ;*64
|
||||||
sta BankExpansionRamKB
|
sta BankExpansionRamKB
|
||||||
|
|
||||||
lda GSROM ;now check (hardcode really) build-in ram
|
lda GSROM ;now check (hardcode really) build-in ram
|
||||||
cmp #3
|
cmp #3
|
||||||
bne :notrom3
|
bne :notrom3
|
||||||
:rom3 lda #1024
|
:rom3 lda #1024
|
||||||
sta BankBuiltInRamKB
|
sta BankBuiltInRamKB
|
||||||
rts
|
rts
|
||||||
:notrom3 lda #256K
|
:notrom3 lda #256
|
||||||
sta BankBuiltInRamKB
|
sta BankBuiltInRamKB
|
||||||
sep #$30
|
sep #$30
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
BankExpansionRamKB ds 2
|
BankExpansionRamKB ds 2
|
||||||
BankBuiltInRamKB ds 2
|
BankBuiltInRamKB ds 2
|
||||||
BankExpansionRam ds 1
|
BankExpansionRam ds 1
|
||||||
BankExpansionLowest ds 1
|
BankExpansionLowest ds 1
|
||||||
BankExpansionHighest ds 1
|
BankExpansionHighest ds 1
|
||||||
|
@ -970,6 +892,9 @@ PrintInt
|
||||||
jsr PRBYTE
|
jsr PRBYTE
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
MLI equ $bf00
|
MLI equ $bf00
|
||||||
|
|
||||||
Quit jsr MLI ; first actual command, call ProDOS vector
|
Quit jsr MLI ; first actual command, call ProDOS vector
|
||||||
|
@ -990,3 +915,4 @@ Error brk $00 ; shouldn't be
|
||||||
put misc
|
put misc
|
||||||
put strings.s
|
put strings.s
|
||||||
put menu.s
|
put menu.s
|
||||||
|
|
||||||
|
|
93
src/mt.s
93
src/mt.s
|
@ -12,6 +12,7 @@
|
||||||
|
|
||||||
MLI equ $bf00
|
MLI equ $bf00
|
||||||
Init
|
Init
|
||||||
|
sei ; disable interrupts
|
||||||
LDA #$A0 ;USE A BLANK SPACE TO
|
LDA #$A0 ;USE A BLANK SPACE TO
|
||||||
JSR $C300 ;TURN ON THE VIDEO FIRMWARE
|
JSR $C300 ;TURN ON THE VIDEO FIRMWARE
|
||||||
|
|
||||||
|
@ -43,6 +44,63 @@ Main
|
||||||
:noKey bra :menuLoop
|
:noKey bra :menuLoop
|
||||||
* LOOOOOOOOOP ^^^^^^
|
* LOOOOOOOOOP ^^^^^^
|
||||||
|
|
||||||
|
ColorizeMenu
|
||||||
|
:loop
|
||||||
|
lda #$07
|
||||||
|
jsr WaitSCB
|
||||||
|
lda #$c0 ; green
|
||||||
|
sta $c022
|
||||||
|
|
||||||
|
lda #$09
|
||||||
|
jsr WaitSCB
|
||||||
|
lda #$d0 ; yello
|
||||||
|
sta $c022
|
||||||
|
|
||||||
|
lda #$0A
|
||||||
|
jsr WaitSCB
|
||||||
|
lda #$90 ; orange
|
||||||
|
sta $c022
|
||||||
|
|
||||||
|
|
||||||
|
lda #$0B
|
||||||
|
jsr WaitSCB
|
||||||
|
lda #$10 ; red
|
||||||
|
sta $c022
|
||||||
|
|
||||||
|
lda #$0C
|
||||||
|
jsr WaitSCB
|
||||||
|
lda #$30 ; purple
|
||||||
|
sta $c022
|
||||||
|
|
||||||
|
lda #$0D
|
||||||
|
jsr WaitSCB
|
||||||
|
lda #$60 ; bblue
|
||||||
|
sta $c022
|
||||||
|
|
||||||
|
lda #$0E
|
||||||
|
jsr WaitSCB
|
||||||
|
lda #$f0 ; white
|
||||||
|
sta $c022
|
||||||
|
bra :loop
|
||||||
|
rts
|
||||||
|
|
||||||
|
WaitSCB
|
||||||
|
sta :val+1
|
||||||
|
ldx #2 ; to check twice
|
||||||
|
:waitloop lda $c02f
|
||||||
|
asl
|
||||||
|
lda $c02e
|
||||||
|
rol
|
||||||
|
:val cmp #$00
|
||||||
|
bne :waitloop
|
||||||
|
dex
|
||||||
|
bne :waitloop
|
||||||
|
; the problem is we can get the LAST
|
||||||
|
; horizcnt even/odd right as it changes
|
||||||
|
; and start early or something?
|
||||||
|
|
||||||
|
rts
|
||||||
|
MAXSCB db 0
|
||||||
|
|
||||||
DrawMenuBackground jsr HOME
|
DrawMenuBackground jsr HOME
|
||||||
lda #MainMenuStrs
|
lda #MainMenuStrs
|
||||||
|
@ -542,19 +600,23 @@ MainMenuDefs
|
||||||
db MenuOption_Hex ; 1=hex input
|
db MenuOption_Hex ; 1=hex input
|
||||||
db 02 ; memory size (bytes)
|
db 02 ; memory size (bytes)
|
||||||
da EndAddr ; variable storage
|
da EndAddr ; variable storage
|
||||||
:TestType hex 13,0C ; x,y
|
:TestSize hex 13,0C ; x,y
|
||||||
|
db MenuOption_List ; 3=list input
|
||||||
|
db 08 ; max len size (bytes), 3=option list
|
||||||
|
da TestSize ; params definition & storage
|
||||||
|
:TestType hex 13,0D ; x,y
|
||||||
db MenuOption_List ; 3=list input
|
db MenuOption_List ; 3=list input
|
||||||
db 08 ; max len size (bytes), 3=option list
|
db 08 ; max len size (bytes), 3=option list
|
||||||
da TestType ; params definition & storage
|
da TestType ; params definition & storage
|
||||||
:TestValue hex 13,0D ; x,y
|
:TestValue hex 13,0E ; x,y
|
||||||
db MenuOption_Hex ; 1=hex input
|
db MenuOption_Hex ; 1=hex input
|
||||||
db 01 ; memory size (bytes)
|
db 01 ; memory size (bytes)
|
||||||
da TestValue ; variable storage
|
da TestValue ; variable storage
|
||||||
:TestDelay hex 13,0E ; x,y
|
:TestDelay hex 13,0F ; x,y
|
||||||
db MenuOption_Hex ; 1=hex input
|
db MenuOption_Hex ; 1=hex input
|
||||||
db 01 ; memory size (bytes)
|
db 01 ; memory size (bytes)
|
||||||
da TestDelay ; variable storage
|
da TestDelay ; variable storage
|
||||||
:BeginTest hex 0B,12 ; x,y
|
:BeginTest hex 0B,14 ; x,y
|
||||||
db MenuOption_Action ; 2=action
|
db MenuOption_Action ; 2=action
|
||||||
db MenuStr_BeginTestL ; menu string length
|
db MenuStr_BeginTestL ; menu string length
|
||||||
da MenuStr_BeginTest ; string storage
|
da MenuStr_BeginTest ; string storage
|
||||||
|
@ -577,23 +639,29 @@ _TestType_3 asc "RANDWORD",$00
|
||||||
_TestType_4 asc "CHECKERS",$00
|
_TestType_4 asc "CHECKERS",$00
|
||||||
_TestType_5 asc "BANK",$00
|
_TestType_5 asc "BANK",$00
|
||||||
|
|
||||||
|
TestSize db 00
|
||||||
|
db 02
|
||||||
|
da _TestSize_0,_TestSize_1
|
||||||
|
_TestSize_0 asc "BYTE",$00
|
||||||
|
_TestSize_1 asc "WORD",$00
|
||||||
|
|
||||||
MenuStr_JSR da BeginTest ; MUST PRECEDE MENU STRING! Yes, it's magicly inferred. (-2)
|
MenuStr_JSR da BeginTest ; MUST PRECEDE MENU STRING! Yes, it's magicly inferred. (-2)
|
||||||
MenuStr_BeginTest asc "BEGIN TEST"
|
MenuStr_BeginTest asc "BEGIN TEST"
|
||||||
MenuStr_BeginTestL equ #*-MenuStr_BeginTest
|
MenuStr_BeginTestL equ #*-MenuStr_BeginTest
|
||||||
MenuStr_BeginTestE db 00
|
MenuStr_BeginTestE db 00
|
||||||
MainMenuStrs
|
MainMenuStrs
|
||||||
asc " ____________________________________________________________________________",$8D,$00
|
asc " ______________________________________________________________________________",$8D,$00
|
||||||
asc " ",$1B,'ZGGGGGGGGGGGGGGGGGGGGGGGGGGG\'," Mini Memory Tester ",'\GGGGGGGGGGGGG\'," v0.1a ",'\GGGGG_',$18,$8D,$00
|
asc $1B,'ZG', " ",'@'," ",'GGGGGGGGGGGGGGGGGG\'," Mini Memory Tester v0.2 ",'\GGGGGGGGGGG\'," UltimateMicro ",'\G_',$18,$00
|
||||||
asc " ",$1B,'ZWVWVWVWVWVWVWVWVWVWVWVWVWVWVWVWVWVWVWVWVWVWVWVWVWVWVWVWVWVW'," ReactiveMicro ",'VW_',$18,$8D,00
|
asc $1B,'ZLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL_',$18,00
|
||||||
asc " ",$1B,'ZLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL_',$18,$8D,00
|
asc $1B,'Z',"",'Z \GGG_',"Test Settings",'ZGGG\ _'," ",'_',$18,00
|
||||||
asc " ",$1B,'Z'," ",'Z \GGG_',"Test Settings",'ZGGG\ _'," ",'_',$18,$8D,00
|
asc $1B,'Z'," ",'Z'," ",'_'," ",'_',$18,$8D,00
|
||||||
asc " ",$1B,'Z'," ",'Z'," ",'_'," ",'_',$18,$8D,00
|
|
||||||
asc " ",$1B,'Z'," ",'Z'," Start BANK: ",'_'," ",'_',$18,$8D,00
|
asc " ",$1B,'Z'," ",'Z'," Start BANK: ",'_'," ",'_',$18,$8D,00
|
||||||
asc " ",$1B,'Z'," ",'Z'," End BANK: ",'_'," ",'_',$18,$8D,00
|
asc " ",$1B,'Z'," ",'Z'," End BANK: ",'_'," ",'_',$18,$8D,00
|
||||||
asc " ",$1B,'Z'," ",'Z'," ",'_'," ",'_',$18,$8D,00
|
asc " ",$1B,'Z'," ",'Z'," ",'_'," ",'_',$18,$8D,00
|
||||||
asc " ",$1B,'Z'," ",'Z'," Start ADDR: ",'_'," ",'_',$18,$8D,00
|
asc " ",$1B,'Z'," ",'Z'," Start ADDR: ",'_'," ",'_',$18,$8D,00
|
||||||
asc " ",$1B,'Z'," ",'Z'," End ADDR: ",'_'," ",'_',$18,$8D,00
|
asc " ",$1B,'Z'," ",'Z'," End ADDR: ",'_'," ",'_',$18,$8D,00
|
||||||
asc " ",$1B,'Z'," ",'Z'," ",'_'," ",'_',$18,$8D,00
|
asc " ",$1B,'Z'," ",'Z'," ",'_'," ",'_',$18,$8D,00
|
||||||
|
asc " ",$1B,'Z'," ",'Z'," Test Size: ",'_'," ",'_',$18,$8D,00
|
||||||
asc " ",$1B,'Z'," ",'Z'," Test Type: ",'_'," ",'_',$18,$8D,00
|
asc " ",$1B,'Z'," ",'Z'," Test Type: ",'_'," ",'_',$18,$8D,00
|
||||||
asc " ",$1B,'Z'," ",'Z'," Test Byte: ",'_'," ",'_',$18,$8D,00
|
asc " ",$1B,'Z'," ",'Z'," Test Byte: ",'_'," ",'_',$18,$8D,00
|
||||||
asc " ",$1B,'Z'," ",'Z'," Test Delay: ",'_'," ",'_',$18,$8D,00
|
asc " ",$1B,'Z'," ",'Z'," Test Delay: ",'_'," ",'_',$18,$8D,00
|
||||||
|
@ -602,7 +670,6 @@ MainMenuStrs
|
||||||
asc " ",$1B,'Z'," ",'Z'," ",'_'," ",'_',$18,$8D,00
|
asc " ",$1B,'Z'," ",'Z'," ",'_'," ",'_',$18,$8D,00
|
||||||
asc " ",$1B,'Z'," ",'Z'," ",'_'," ",'_',$18,$8D,00
|
asc " ",$1B,'Z'," ",'Z'," ",'_'," ",'_',$18,$8D,00
|
||||||
asc " ",$1B,'Z'," ",'Z'," ",'_'," ",'_',$18,$8D,00
|
asc " ",$1B,'Z'," ",'Z'," ",'_'," ",'_',$18,$8D,00
|
||||||
asc " ",$1B,'Z'," ",'Z'," ",'_'," ",'_',$18,$8D,00
|
|
||||||
asc " ",$1B,'Z'," ",'Z',"_________________________",'_'," ",'_',$18,$8D,00
|
asc " ",$1B,'Z'," ",'Z',"_________________________",'_'," ",'_',$18,$8D,00
|
||||||
asc " ",$1B,'Z',"____________________________________________________________________________",'_',$18,$8D,00
|
asc " ",$1B,'Z',"____________________________________________________________________________",'_',$18,$8D,00
|
||||||
|
|
||||||
|
@ -615,7 +682,9 @@ MainMenuStrs
|
||||||
|
|
||||||
|
|
||||||
WaitKey
|
WaitKey
|
||||||
:kloop lda KEY
|
:kloop
|
||||||
|
;jsr ColorizeMenu
|
||||||
|
lda KEY
|
||||||
bpl :kloop
|
bpl :kloop
|
||||||
sta STROBE
|
sta STROBE
|
||||||
cmp #"b" ; REMOVE DEBUG
|
cmp #"b" ; REMOVE DEBUG
|
||||||
|
|
170
src/strings.s
170
src/strings.s
|
@ -6,76 +6,134 @@
|
||||||
* GoXY
|
* GoXY
|
||||||
* PrintStringsX
|
* PrintStringsX
|
||||||
* PrintString
|
* PrintString
|
||||||
|
|
||||||
PRINTSTRING MAC
|
|
||||||
lda #]1
|
|
||||||
ldy #>]1
|
|
||||||
jsr PrintString
|
|
||||||
<<<
|
|
||||||
|
|
||||||
GOXY MAC
|
PRINTSTRING MAC
|
||||||
ldx ]1
|
lda #]1
|
||||||
ldy ]2
|
ldy #>]1
|
||||||
stx $24
|
jsr PrintString
|
||||||
sty $25
|
<<<
|
||||||
jsr VTAB
|
|
||||||
<<<
|
|
||||||
|
|
||||||
PRINTXY MAC
|
GOXY MAC
|
||||||
ldx ]1
|
ldx ]1
|
||||||
ldy ]2
|
ldy ]2
|
||||||
stx $24
|
stx $24
|
||||||
sty $25
|
sty $25
|
||||||
jsr VTAB
|
jsr VTAB
|
||||||
lda #]3
|
<<<
|
||||||
ldy #>]3
|
|
||||||
jsr PrintString
|
|
||||||
<<<
|
|
||||||
|
|
||||||
GoXY stx $24
|
PRINTXY MAC
|
||||||
sty $25
|
ldx ]1
|
||||||
jsr VTAB
|
ldy ]2
|
||||||
rts
|
stx $24
|
||||||
|
sty $25
|
||||||
|
jsr VTAB
|
||||||
|
lda #]3
|
||||||
|
ldy #>]3
|
||||||
|
jsr PrintString
|
||||||
|
<<<
|
||||||
|
|
||||||
|
GoXY stx $24
|
||||||
|
sty $25
|
||||||
|
jsr VTAB
|
||||||
|
rts
|
||||||
|
|
||||||
* lda #MainMenuStrs
|
* lda #MainMenuStrs
|
||||||
* ldy #>MainMenuStrs
|
* ldy #>MainMenuStrs
|
||||||
* ldx #05 ; horiz pos
|
* ldx #05 ; horiz pos
|
||||||
PrintStringsX stx _printstringsx_horiz
|
PrintStringsX stx _printstringsx_horiz
|
||||||
|
|
||||||
sta $0
|
sta $0
|
||||||
sty $1
|
sty $1
|
||||||
:loop lda _printstringsx_horiz
|
:loop lda _printstringsx_horiz
|
||||||
sta $24
|
sta $24
|
||||||
lda $0 ; slower, but allows API reuse
|
lda $0 ; slower, but allows API reuse
|
||||||
ldy $1
|
ldy $1
|
||||||
jsr PrintString ; y is last val
|
jsr PrintString ; y is last val
|
||||||
iny
|
iny
|
||||||
lda ($0),y
|
lda ($0),y
|
||||||
beq :done
|
beq :done
|
||||||
tya ; not done so add strlen to source ptr
|
tya ; not done so add strlen to source ptr
|
||||||
clc
|
clc
|
||||||
adc $0
|
adc $0
|
||||||
sta $0
|
sta $0
|
||||||
bcc :nocarry
|
bcc :nocarry
|
||||||
inc $1
|
inc $1
|
||||||
:nocarry bra :loop
|
:nocarry bra :loop
|
||||||
|
|
||||||
|
|
||||||
:done rts
|
:done rts
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
_printstringsx_horiz db 00
|
_printstringsx_horiz db 00
|
||||||
|
|
||||||
* PrintString (A=Low Byte, Y=High Byte)
|
* PrintString (A=Low Byte, Y=High Byte)
|
||||||
PrintString sta :loop+1
|
PrintString sta :loop+1
|
||||||
sty :loop+2
|
sty :loop+2
|
||||||
|
|
||||||
ldy #0
|
ldy #0
|
||||||
:loop lda $FFFF,y ; dummy bytes
|
:loop lda $FFFF,y ; dummy bytes
|
||||||
beq :done
|
beq :done
|
||||||
jsr COUT
|
jsr COUT
|
||||||
iny
|
iny
|
||||||
bra :loop
|
bra :loop
|
||||||
:done rts
|
:done rts
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
LOG MAC
|
||||||
|
lda #]1
|
||||||
|
ldy #>]1
|
||||||
|
jsr ConsoleLog
|
||||||
|
<<<
|
||||||
|
|
||||||
|
_consoleBottom = #23
|
||||||
|
* Write out to console window
|
||||||
|
ConsoleLog pha
|
||||||
|
phy
|
||||||
|
lda #0 ;settings to bottom-left of window
|
||||||
|
sta $24
|
||||||
|
lda #_consoleBottom-1
|
||||||
|
sta $25
|
||||||
|
jsr VTAB
|
||||||
|
lda #$8D ;pre-fix CR
|
||||||
|
jsr COUT
|
||||||
|
ply
|
||||||
|
pla
|
||||||
|
jsr PrintString
|
||||||
|
rts
|
||||||
|
|
||||||
|
* Set console windowing
|
||||||
|
WinConsole lda #3
|
||||||
|
sta $20 ;left edge
|
||||||
|
lda #75
|
||||||
|
sta $21 ;width
|
||||||
|
lda #17
|
||||||
|
sta $22 ;top edge
|
||||||
|
lda #_consoleBottom
|
||||||
|
sta $23 ;bottom edge
|
||||||
|
rts
|
||||||
|
|
||||||
|
* Set info windowing
|
||||||
|
WinInfo lda #52
|
||||||
|
sta $20 ;left edge
|
||||||
|
lda #26
|
||||||
|
sta $21 ;width
|
||||||
|
lda #5
|
||||||
|
sta $22 ;top edge
|
||||||
|
lda #16
|
||||||
|
sta $23 ;bottom edge
|
||||||
|
rts
|
||||||
|
|
||||||
|
* Restore full screen windowing
|
||||||
|
WinFull stz $20
|
||||||
|
stz $22
|
||||||
|
lda #80
|
||||||
|
sta $21
|
||||||
|
lda #24
|
||||||
|
sta $23
|
||||||
|
rts
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue