Author Topic: TIOS Menu  (Read 5042 times)

0 Members and 1 Guest are viewing this topic.

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
TIOS Menu
« on: December 23, 2014, 01:21:37 pm »
Is there a bcall for the TIOS menu? Would it be possible to get it to use custom tokens?
Or do i have to re-write the menu like Omnicalc does it?

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline chickendude

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 817
  • Rating: +90/-1
  • Pro-Riot Squad
    • View Profile
Re: TIOS Menu
« Reply #1 on: December 24, 2014, 03:06:29 am »
What do you mean? You mean a bcall to draw a TIOS-style menu? Or are you trying to add an entry to an existing TI OS menu?

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: TIOS Menu
« Reply #2 on: December 24, 2014, 05:19:57 am »
A bcall to an TIOS-style menu. KermM pointed me to this now http://wikiti.brandonw.net/index.php?title=83Plus:OS:Dialog_context

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline chickendude

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 817
  • Rating: +90/-1
  • Pro-Riot Squad
    • View Profile
Re: TIOS Menu
« Reply #3 on: December 24, 2014, 09:47:28 am »
Ah ok, i was gonna point you to one of Kerm's threads over at Cemetech anyway (http://www.cemetech.net/forum/viewtopic.php?t=10701) :P In particular, BrandonW's ddemo.

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: TIOS Menu
« Reply #4 on: January 09, 2015, 09:22:50 am »
Um yeah I like can't get it working properly....
Code: [Select]
Menu:
res indicrun,(iy+indicflags)
res apptextsave,(iy+appflags)


ld hl,rawKeyHookPtr
ld de,appBackUpScreen
ld bc,4
ldir
ld a,(flags+34h)
ld (de),a


ld hl,cmdShadow
ld de,appBackUpScreen+5
ld bc,128
ldir


ld hl,structStart
ld de,ramCode
ld bc,structEnd-structStart
ldir
ld hl,dialogCallback
in a,(6)
bcall(_DialogInit)
bcall(_runIndicOff)
bcall(_StartDialog)

; bcall(_CursorOff)
; bcall(_ClrLCDFull)

res appCurWord,(iy+appFlags)

ld hl,appBackUpScreen+5
ld de,cmdShadow
ld bc,128
ldir

ld a,kQuit ; homescreen
ld (cxCurApp),a

ld hl,appBackUpScreen
ld de,rawKeyHookPtr
ld bc,4
ldir
ld a,(hl)
ld (flags+34h),a

xor a
bcall(_GetDialogNumOP1)
ld a,9
bcall(_DispOP1a)
xor a
ret
dialogCallback:
xor a
ret

structStart:
.db 1
.db 1
.db 1
.dw sOptions-structStart
.db 5
.db 1
.db 1
.dw sItem1-structStart
.db 5
.db 1
.db 2
.dw sItem2-structStart
.db 0
sOptions:
.db 7,"VECTORS"
sItem1:
.db 4,"abs("
sItem2:
.db 5,"norm("
structEnd:

When exiting it like exits back into the stat menu (where it was before it got called) but I want it to exit to the homescreen and I can't find any way of getting which option was pushed

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline chickendude

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 817
  • Rating: +90/-1
  • Pro-Riot Squad
    • View Profile
Re: TIOS Menu
« Reply #5 on: January 09, 2015, 11:45:44 pm »
Do you think you could share the code that loads the hook?

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: TIOS Menu
« Reply #6 on: January 10, 2015, 05:04:35 am »
is this enough?
Code: [Select]
_keyHook_statKey:
ld a,(menucurrent)
cp mStat
jr z,{+1@}
cp mPrgmStat
jp z,{+1@}

ld a,kStat
jp ReturnNZ
@:
call Menu
jp ReturnZ
T´hat gets called if the stat key is pressed, no changing of registers.

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline chickendude

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 817
  • Rating: +90/-1
  • Pro-Riot Squad
    • View Profile
Re: TIOS Menu
« Reply #7 on: January 10, 2015, 06:07:00 am »
What about changing the final "xor a"s to "ld a,kQuit"?
Code: [Select]
Menu:
res indicRun,(iy+indicFlags)
res appTextSave,(iy+appFlags)


ld hl,rawKeyHookPtr
ld de,appBackUpScreen
ld bc,4
ldir
ld a,(flags+34h)
ld (de),a


ld hl,cmdShadow
ld de,appBackUpScreen+5
ld bc,128
ldir


ld hl,structStart
ld de,ramCode
ld bc,structEnd-structStart
ldir
ld hl,dialogCallback
in a,(6)
bcall(_DialogInit)
bcall(_RunIndicOff)
bcall(_StartDialog)

; bcall(_CursorOff)
; bcall(_ClrLCDFull)

res appCurWord,(iy+appFlags)

ld hl,appBackUpScreen+5
ld de,cmdShadow
ld bc,128
ldir

ld hl,cmdShadow
ld de,textShadow
ld bc,128
ldir

ld a,kQuit ; homescreen
ld (cxCurApp),a

ld hl,appBackUpScreen
ld de,rawKeyHookPtr
ld bc,4
ldir
ld a,(hl)
ld (flags+34h),a

xor a
bcall(_GetDialogNumOP1)
ld a,9
bcall(_DispOP1A)
ld a,kQuit
ret
dialogCallback:
ld a,kQuit
ret