mirror of
https://github.com/blondie7575/WeeGUI.git
synced 2025-02-10 06:31:09 +00:00
- Library is now designed to be BRUNed from AppleSoft, instead of trying to make an init call
- Fixed a bug in the AppleSoft command matcher with prefixes - Removed useless &weegui command - Added &select, &focus, &act, &focusn, and &focusp commands for AppleSoft
This commit is contained in:
parent
72bab2ba8f
commit
0995f6675d
BIN
V2Make.scpt
BIN
V2Make.scpt
Binary file not shown.
93
applesoft.s
93
applesoft.s
@ -92,7 +92,7 @@ WGAmpersand_matchStart:
|
||||
|
||||
WGAmpersand_matchLoop:
|
||||
lda WGAmpersandCommandBuffer,y
|
||||
beq WGAmpersand_matchFound ; Got one!
|
||||
beq WGAmpersand_matchPossible
|
||||
cmp WGAmpersandCommandTable,x
|
||||
bne WGAmpersand_matchNext ; Not this one
|
||||
|
||||
@ -100,6 +100,10 @@ WGAmpersand_matchLoop:
|
||||
inx
|
||||
bra WGAmpersand_matchLoop
|
||||
|
||||
WGAmpersand_matchPossible:
|
||||
lda WGAmpersandCommandTable,x
|
||||
beq WGAmpersand_matchFound ; Got one!
|
||||
|
||||
WGAmpersand_matchNext:
|
||||
pla ; Advance index to next commmand in table
|
||||
inc
|
||||
@ -342,17 +346,6 @@ WGAmpersandStrArguments_done:
|
||||
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; WGAmpersand_WEEGUI
|
||||
; Initializes WeeGUI
|
||||
; &WEEGUI
|
||||
WGAmpersand_WEEGUI:
|
||||
jsr WGInit
|
||||
jsr WG80
|
||||
|
||||
rts
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; WGAmpersand_HOME
|
||||
; Clears the screen
|
||||
@ -423,6 +416,62 @@ WGAmpersand_BUTTN:
|
||||
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; WGAmpersand_SELECT
|
||||
; Select a view
|
||||
; &SELECT(id)
|
||||
WGAmpersand_SELECT:
|
||||
jsr WGAmpersandIntArguments
|
||||
lda PARAM0
|
||||
jsr WGSelectView
|
||||
rts
|
||||
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; WGAmpersand_FOCUS
|
||||
; Focuses selected view
|
||||
; &FOCUS
|
||||
WGAmpersand_FOCUS:
|
||||
jsr WGViewFocus
|
||||
jsr WGBottomCursor
|
||||
rts
|
||||
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; WGAmpersand_FOCUSN
|
||||
; Focuses next view
|
||||
; &FOCUSN
|
||||
WGAmpersand_FOCUSN:
|
||||
jsr WGViewFocusNext
|
||||
jsr WGBottomCursor
|
||||
rts
|
||||
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; WGAmpersand_FOCUSP
|
||||
; Focuses previous view
|
||||
; &FOCUSN
|
||||
WGAmpersand_FOCUSP:
|
||||
jsr WGViewFocusPrev
|
||||
jsr WGBottomCursor
|
||||
rts
|
||||
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; WGAmpersand_ACT
|
||||
; Takes action on focused view
|
||||
; &ACT
|
||||
WGAmpersand_ACT:
|
||||
jsr WGViewFocusAction
|
||||
jsr WGBottomCursor
|
||||
rts
|
||||
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; WGBottomCursor
|
||||
; Leave the cursor state in a place that Applesoft is happy with
|
||||
@ -467,9 +516,6 @@ WGAmpersandCommandBufferEnd:
|
||||
;
|
||||
WGAmpersandCommandTable:
|
||||
|
||||
.byte "WEEGUI",0,0,0,0,0,0,0,0
|
||||
.addr WGAmpersand_WEEGUI
|
||||
|
||||
.byte $97,0,0,0,0,0,0,0,0,0,0,0,0,0 ; HOME
|
||||
.addr WGAmpersand_HOME
|
||||
|
||||
@ -482,9 +528,24 @@ WGAmpersandCommandTable:
|
||||
.byte "CHKBOX",0,0,0,0,0,0,0,0
|
||||
.addr WGAmpersand_CHKBOX
|
||||
|
||||
.byte "BUTTN",0,0,0,0,0,0,0,0,0 ; BUTTON
|
||||
.byte "BUTTN",0,0,0,0,0,0,0,0,0
|
||||
.addr WGAmpersand_BUTTN
|
||||
|
||||
.byte "SELECT",0,0,0,0,0,0,0,0
|
||||
.addr WGAmpersand_SELECT
|
||||
|
||||
.byte "FOCUS",0,0,0,0,0,0,0,0,0
|
||||
.addr WGAmpersand_FOCUS
|
||||
|
||||
.byte "FOCUSN",0,0,0,0,0,0,0,0
|
||||
.addr WGAmpersand_FOCUSN
|
||||
|
||||
.byte "FOCUSP",0,0,0,0,0,0,0,0
|
||||
.addr WGAmpersand_FOCUSP
|
||||
|
||||
.byte "ACT",0,0,0,0,0,0,0,0,0,0,0
|
||||
.addr WGAmpersand_ACT
|
||||
|
||||
|
||||
WGAmpersandCommandTableEnd:
|
||||
|
||||
|
10
gui.s
10
gui.s
@ -20,7 +20,7 @@
|
||||
|
||||
main:
|
||||
jsr WGInit
|
||||
;jsr WG80
|
||||
jsr WG80
|
||||
|
||||
; lda #0
|
||||
; lda #<testTitle1
|
||||
@ -247,12 +247,20 @@ WGInit_clearMemLoop:
|
||||
; WG80
|
||||
; Enables 80 column mode (and enhanced video firmware)
|
||||
WG80:
|
||||
pha
|
||||
|
||||
; lda #3
|
||||
; jsr $fe95
|
||||
|
||||
lda #$a0
|
||||
jsr $c300
|
||||
|
||||
SETSWITCH TEXTON
|
||||
SETSWITCH PAGE2OFF
|
||||
SETSWITCH COL80ON
|
||||
SETSWITCH STORE80ON
|
||||
|
||||
pla
|
||||
rts
|
||||
|
||||
|
||||
|
BIN
guidemo.dsk
BIN
guidemo.dsk
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user