Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.
Kerm, could you explain the basics of using the GUI stack?

I know you use OpenGuiStack at the start of the program, PushGUIStack to put stuff on, RenderGUI to draw the screen and CloseGuiStack at the end....but I have no idea what the numbers to use for item time when loading PushGUIStack or how to use the other calls.
...I just noticed that for some reason PushGUIStack as defined as $41DF4

Im assuming it shouldn't be because 1) address should only be 4 hex characters long and 2) any line that uses PushGUIStack has an error.... about missing data in MS Byte of argument


[edit]

I messed around a little. the following code does this


Code:
.nolist
#include "dcs6.inc"
.list
   .org progstart
#IFDEF TI83P
   .db $BB,$6D
#ENDIF
INIT:
   xor d
#IFDEF TI83P
   .db $C9
#ENDIF

   jr Start
   .dw $0000
   .db $06,$00
   .dw Icon
   .dw $0000
   .dw Apstart         ;the routine to open files.  DCS will start you here instead of at $9D95
                  ;if a file is pending
   .db $31,$7F         ;argh, this be an APMain
   .db $01            ;number of accepted filetypes
   .db $00,$01,$00         ;filetype 1 [arbitary - but I need to standardize these]
Icon:            ;a 16x16 icon
 .db $3C,$09,$66,$3F,$C3,$7E,$C1,$10,$60,$00,$3C,$3E,$06,$63,$83,$41
 .db $C3,$40,$66,$40,$3C,$C1,$01,$63,$76,$3E,$FF,$81,$FF,$8E,$63,$1F
IconAP:            ;a 16x16 icon
 .db $FF,$F8,$E6,$34,$C3,$72,$C1,$1F,$E0,$01,$BC,$3F,$86,$63,$83,$41
 .db $C3,$41,$E6,$47,$BC,$C1,$81,$63,$F6,$3F,$FF,$81,$FF,$8F,$FF,$FE
START:
   bcall(_ClrLcdf)                             ;main routines
   call OpenGUIStack
   ld a,$00 ;null window
   call $41DF
   call RenderGUI
   call Pause
   ret
Apstart:
   ld hl,0
   ld (pencol),hl
   push ix
   pop hl
   bcall(_vputs)
   call Pause
   ret
txt:
   .db "no text.",0
txt2:
   .db "yay.",0
.end
END


however changing it to this:


Code:
.nolist
#include "dcs6.inc"
.list
   .org progstart
#IFDEF TI83P
   .db $BB,$6D
#ENDIF
INIT:
   xor d
#IFDEF TI83P
   .db $C9
#ENDIF

   jr Start
   .dw $0000
   .db $06,$00
   .dw Icon
   .dw $0000
   .dw Apstart         ;the routine to open files.  DCS will start you here instead of at $9D95
                  ;if a file is pending
   .db $31,$7F         ;argh, this be an APMain
   .db $01            ;number of accepted filetypes
   .db $00,$01,$00         ;filetype 1 [arbitary - but I need to standardize these]
Icon:            ;a 16x16 icon
 .db $3C,$09,$66,$3F,$C3,$7E,$C1,$10,$60,$00,$3C,$3E,$06,$63,$83,$41
 .db $C3,$40,$66,$40,$3C,$C1,$01,$63,$76,$3E,$FF,$81,$FF,$8E,$63,$1F
IconAP:            ;a 16x16 icon
 .db $FF,$F8,$E6,$34,$C3,$72,$C1,$1F,$E0,$01,$BC,$3F,$86,$63,$83,$41
 .db $C3,$41,$E6,$47,$BC,$C1,$81,$63,$F6,$3F,$FF,$81,$FF,$8F,$FF,$FE
START:
   bcall(_ClrLcdf)                             ;main routines
   call OpenGUIStack
   ld a,$00 ;null window
   call $41D4
   call RenderGUI
   call Pause
   ret
Apstart:
   ld hl,0
   ld (pencol),hl
   push ix
   pop hl
   bcall(_vputs)
   call Pause
   ret
txt:
   .db "no text.",0
txt2:
   .db "yay.",0
.end
END


does this:

new code, further research has shown that the AP does not work on the 84+ (it didn't with the old version either)

also, the main code crashes on either calc whether or I try calling PushGUIStack as $41D4 or $41DF. $41DF4 (what the include file says) doesn't even compile.


Code:
.nolist
#include "dcs6.inc"
.list
   .org progstart
#IFDEF TI83P
   .db $BB,$6D
#ENDIF
INIT:
   xor d
#IFDEF TI83P
   .db $C9
#ENDIF

   jr Start
   .dw $0000
   .db $06,$00
   .dw Icon
   .dw $0000
   .dw Apstart         ;the routine to open files.  DCS will start you here instead of at $9D95
                  ;if a file is pending
   .db $31,$7F         ;argh, this be an APMain
   .db $01            ;number of accepted filetypes
   .db $00,$01,$00         ;game saves, strategy games, strategic conquest
Icon:            ;a 16x16 icon
 .db $3C,$09,$66,$3F,$C3,$7E,$C1,$10,$60,$00,$3C,$3E,$06,$63,$83,$41
 .db $C3,$40,$66,$40,$3C,$C1,$01,$63,$76,$3E,$FF,$81,$FF,$8E,$63,$1F
IconAP:            ;a 16x16 icon
 .db $FF,$F8,$E6,$34,$C3,$72,$C1,$1F,$E0,$01,$BC,$3F,$86,$63,$83,$41
 .db $C3,$41,$E6,$47,$BC,$C1,$81,$63,$F6,$3F,$FF,$81,$FF,$8F,$FF,$FE
START:
   bcall(_ClrLcdf)                             ;main routines
   call OpenGUIStack
   ld hl,nullw
   ld de,$0001
   ld a,$00 ;null window
   call $41D4
   call RenderGUI
   call Pause
   ret
Apstart:
   ld hl,0
   ld (pencol),hl
   push ix
   pop hl
   bcall(_vputs)
   call Pause
   ret
txt:
   .db "no text.",0
txt2:
   .db "yay.",0
nullw:
   .db $FF;
.end
END
I think its supposed to be $41F4


Code:
OpenGUIStack = $41EE
CloseGUIStack = $41F1
PushGUIStack = $41DF4
PopGUIStack = $41F7
RenderGUI = $41FA


Because if you look at that, PushGUIStack is supposed to be between Close and Pop - which would be $41F4, which you haven't tried yet Smile
Kllrnohj wrote:
I think its supposed to be $41F4


Code:
OpenGUIStack = $41EE
CloseGUIStack = $41F1
PushGUIStack = $41DF4
PopGUIStack = $41F7
RenderGUI = $41FA


Because if you look at that, PushGUIStack is supposed to be between Close and Pop - which would be $41F4, which you haven't tried yet Smile


that just might solve my problem...which still doesn't explain why the AP stff doesn't work on an 84+....
elfprince13 wrote:
that just might solve my problem...which still doesn't explain why the AP stff doesn't work on an 84+....


Whats the AP stuff? And did you check the wiki?
Kllrnohj wrote:
elfprince13 wrote:
that just might solve my problem...which still doesn't explain why the AP stff doesn't work on an 84+....


Whats the AP stuff? And did you check the wiki?


Associated Program....and of course I checked the wiki, but Kerm has barely released any docs on this yet, so most of what I know is pieced together from the source, the wiki, and talking to him, but he hasn't been on all day....
Hey. Uh, yeah, that's a typo. It's $41F4, as Kllrnohj said. And I'm not sure why you're encountering errors with the AP code... I've tested it as working fine on the 84's. The integer values for each of the window types are 0=null, tthen it's increment one for each subsequent one (they're in ascending order in the GUI Tools page). For more GUI Stack practice, try:
http://www.cemetech.net/doorscs/docs/source/startmenu.inc
KermMartian wrote:
Hey. Uh, yeah, that's a typo. It's $41F4, as Kllrnohj said. And I'm not sure why you're encountering errors with the AP code... I've tested it as working fine on the 84's. The integer values for each of the window types are 0=null, tthen it's increment one for each subsequent one (they're in ascending order in the GUI Tools page). For more GUI Stack practice, try:
http://www.cemetech.net/doorscs/docs/source/startmenu.inc


okay, thanks


maybe its just TilEm, but the icon for my Strategic Conquest sample AP is scrambled even though it shows up fine on my emulated 83+
I'll try loading my sample AP onto my hardware 84 and see what happens.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are GMT - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement