mirror of
https://github.com/blondie7575/WeeGUI.git
synced 2025-02-10 06:31:09 +00:00
Bug fixes
- Added Exit routine for cleaning up text state and memory allocation - Quitting no longer leaves BASIC in inverse sometimes - Quitting now cleans up ProDOS memory properly - Added Applesoft API for Exit
This commit is contained in:
parent
7efb0613e6
commit
639ba927fc
@ -796,6 +796,24 @@ Not available
|
||||
&GET(A$)
|
||||
</pre></td></tr></table>
|
||||
|
||||
|
||||
<br>
|
||||
|
||||
Miscellaneous Routines
|
||||
----------------------
|
||||
|
||||
Other stuff you might need.
|
||||
|
||||
####WGExit
|
||||
Cleans up and shuts down WeeGUI. If you want your application to return cleanly to Applesoft when its down, you must call this. Otherwise you may get ProDOS complaining it is out of buffers, or other strange behaviour.
|
||||
|
||||
<table width=100%><tr><th>Assembly</th><th>Applesoft</th></tr><tr><td><pre>
|
||||
X: WGExit
|
||||
</td><td><pre>
|
||||
&EXIT
|
||||
</pre></td></tr></table>
|
||||
|
||||
|
||||
<br><br>
|
||||
<hr>
|
||||
<br>
|
||||
|
@ -8,10 +8,6 @@ Known issues
|
||||
To Do:
|
||||
------
|
||||
|
||||
- Repainting a view while the mouse cursor is on it will cause artifacts when mouse moves
|
||||
- Quitting sometimes leaves BASIC in inverted text mode
|
||||
- Quitting with button highlighted leaves us in inverted text mode
|
||||
- After initial run of basic demo, additional run fails with no buffers available
|
||||
- Make WGFillRect support 1 height and 1 width
|
||||
- If called in inverse mode, clear screen clears inverse
|
||||
- Fix unclosed PRE tags in documentation
|
||||
|
@ -63,3 +63,5 @@ WGScrollY = 58
|
||||
WGScrollYBy = 60
|
||||
WGEnableMouse = 62
|
||||
WGDisableMouse = 64
|
||||
WGExit = 66
|
||||
|
||||
|
13
applesoft.s
13
applesoft.s
@ -901,6 +901,16 @@ WGAmpersand_GETstore:
|
||||
rts
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; WGAmpersand_EXIT
|
||||
; Shuts down WeeGUI
|
||||
; &EXIT
|
||||
WGAmpersand_EXIT:
|
||||
jsr WGExit
|
||||
jsr WGBottomCursor
|
||||
rts
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; WGBottomCursor
|
||||
; Leave the cursor state in a place that Applesoft is happy with
|
||||
@ -1078,6 +1088,9 @@ WGAmpersandCommandTable:
|
||||
.byte TOKEN_GET,0,0,0,0,0
|
||||
.addr WGAmpersand_GET
|
||||
|
||||
.byte "EXIT",0,0
|
||||
.addr WGAmpersand_EXIT
|
||||
|
||||
;.byte TOKEN_GOSUB,0,0,0,0,0,0,0,0,0,0,0,0,0 ; For internal testing of the procedural gosub
|
||||
;.addr WGAmpersand_GOSUB
|
||||
|
||||
|
@ -159,6 +159,9 @@ keyLoop_focusOkay:
|
||||
keyLoop_quit:
|
||||
ldx #WGDisableMouse
|
||||
jsr WeeGUI
|
||||
ldx #WGExit
|
||||
jsr WeeGUI
|
||||
|
||||
rts
|
||||
|
||||
testPaintContentsClick:
|
||||
|
BIN
weegui.dsk
BIN
weegui.dsk
Binary file not shown.
24
weegui.s
24
weegui.s
@ -71,7 +71,7 @@ WGEntryPointTable:
|
||||
.addr WGScrollYBy
|
||||
.addr WGEnableMouse
|
||||
.addr WGDisableMouse
|
||||
|
||||
.addr WGExit
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; WGInit
|
||||
@ -129,6 +129,28 @@ WGInit_clearMemLoop:
|
||||
rts
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; WGInit
|
||||
; Cleanup Should be called once at app shutdown
|
||||
WGExit:
|
||||
pha
|
||||
|
||||
lda #CHAR_NORMAL
|
||||
sta INVERSE
|
||||
|
||||
; Remove ourselves from ProDOS memory map
|
||||
lda #%00000011
|
||||
trb MEMBITMAP + $0f
|
||||
lda #$ff
|
||||
trb MEMBITMAP + $10
|
||||
trb MEMBITMAP + $11
|
||||
lda #%11111100
|
||||
trb MEMBITMAP + $12
|
||||
|
||||
pla
|
||||
rts
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; WG80
|
||||
; Enables 80 column mode (and enhanced video firmware)
|
||||
|
Loading…
x
Reference in New Issue
Block a user