Register

How to find and display the Prizm's built-in MENU-icons

Learn how to program. Code snippets for creating sprites etc. Submit your own or use those of others.
Senior Member
User avatar
Posts: 605
Joined: Sat Sep 15, 2012 6:59 am
Location: Krautland ****
Calculators: Casio fx-7400GII, Casio fx-7400GII (SH4), Casio fx-9750 G II, Casio fx-9750 G II (SH4), Casio fx-9860G, Casio fx-9860 G SD, Casio fx-9860G Slim, Casio fx-9860 GII SD, Casio fx-9860 GII SD Power Graphic 2, Casio Classpad 330 plus, Casio fx-CG 20, Casio Classpad fx-cp400, Casio fx-CG 50

Re: How to find and display the Prizm's built-in MENU-icons

Postby SimonLothar » Sat Jun 04, 2016 12:06 pm

AmazoNKA wrote:Do you know if it is possible to determine with certainty how many parameters distinct system calls for built in apps take? I mean does Stats app take 2 ints? And is it the same for graph/table app please but void input for dyna app please?
I looked for r4, r5 and r6. If r4 is destroyed on syscall-entry before it is saved somewhere, the syscall uses no parameter.
The 2-parameters-syscalls destroy r6, before it is saved. r4 and r5 are saved with these syscalls. The 1st parameter is interpreted as int. The 2nd one is interpreted as short.

sys1a03_APP_RUNMAT: 2 parameters
sys1ced_APP_STAT: 2 parameters
sys0a83_APP_EACT: no parameter
sys1b0f_APP_SHEET: 2 parameters
sys0fda_APP_GRAPH_TABLE: 2 parameters
sys0a10_APP_DYNA: 2 parameters
sys199d_APP_RECUR: 2 parameters
sys0834_APP_CONICS: 2 parameters
sys0beb_APP_EQUA: 2 parameters
sys1945_APP_PROG: 2 parameters
sys0c6b_APP_FINANCE: 2 parameters
sys0b02_APP_E_CON: 2 parameters
sys1381_APP_LINK: no parameter
sys1632_APP_MEMORY: no parameter
sys1e13_APP_SYSTEM: no parameter
I'll be back!

Senior Member
User avatar
Posts: 605
Joined: Sat Sep 15, 2012 6:59 am
Location: Krautland ****
Calculators: Casio fx-7400GII, Casio fx-7400GII (SH4), Casio fx-9750 G II, Casio fx-9750 G II (SH4), Casio fx-9860G, Casio fx-9860 G SD, Casio fx-9860G Slim, Casio fx-9860 GII SD, Casio fx-9860 GII SD Power Graphic 2, Casio Classpad 330 plus, Casio fx-CG 20, Casio Classpad fx-cp400, Casio fx-CG 50

Re: How to find and display the Prizm's built-in MENU-icons

Postby SimonLothar » Sat Jun 04, 2016 12:25 pm

The 2-parameters-app-syscalls are called with (1,0) when called from the main menu.
They are called with (0,0) when invoked out of an EACT-strip.
I'll be back!

Senior Member
Posts: 113
Joined: Mon Mar 02, 2015 10:53 am
Calculators: Casio fx-CG 20

Re: How to find and display the Prizm's built-in MENU-icons

Postby AmazoNKA » Sat Jun 04, 2016 4:13 pm

Thank you, Simon.

I will try different parameters again for the ones I struggle with but here are some of the notes I made before when playing with other ones which seem to do more tings based on second parameter (some consistent with econ strips available for them too, but some extra functions as well as Equation solve...):
Code: Select all
App_EQUA(1,0);//enters Equation app.
App_EQUA(0,2);//Solve//
App_EQUA(0,1);//Polynomial//
App_EQUA(0,0);//Simultaneous

App_E_CON(1,0);//E-CON2
App_E_CON(0,0);//Select Sensor /n F1: Casio
App_E_CON(0,1);//Advanced setup for Expert


I will soon try to retest all more consistently with what you described here. One of the first issues will be with what parameters to call sys0fda_APP_GRAPH_TABLE as main menu uses it for both table and graph app...

Thanks again for all your help

Senior Member
Posts: 113
Joined: Mon Mar 02, 2015 10:53 am
Calculators: Casio fx-CG 20

Re: How to find and display the Prizm's built-in MENU-icons

Postby AmazoNKA » Sun Jun 05, 2016 12:57 am

I was trying to figure out Graph and Table difference and could not make sys0fda_APP_GRAPH_TABLE work as a Table, so decided to see if eACT files can for table and graph strips differ and was surprised to see in hex editor they refer to @TABLE and @GRAPH respectively. Those may be main memory folder names but not necessary... For example, all various E-con strips all seem to refer to @ECON regardless which strip is added in eACT so it makes me believe there could be another distinct system call for Table app... Do you come to the same conclusion? Thanks in advance again

Senior Member
User avatar
Posts: 605
Joined: Sat Sep 15, 2012 6:59 am
Location: Krautland ****
Calculators: Casio fx-7400GII, Casio fx-7400GII (SH4), Casio fx-9750 G II, Casio fx-9750 G II (SH4), Casio fx-9860G, Casio fx-9860 G SD, Casio fx-9860G Slim, Casio fx-9860 GII SD, Casio fx-9860 GII SD Power Graphic 2, Casio Classpad 330 plus, Casio fx-CG 20, Casio Classpad fx-cp400, Casio fx-CG 50

Re: How to find and display the Prizm's built-in MENU-icons

Postby SimonLothar » Sun Jun 05, 2016 8:59 am

AmazoNKA wrote:My mind wonders all the time, sorry, and speaking about eact i did wonder in the past how to make our own add-ins to show with multiple functions like other built in apps do in eact strips. I started discussing it here https://www.cemetech.net/forum/viewtopic.php?t=11805 because g3a seems to support displaying of multiple strip names and icons fine but prizm sdk seems to be missing the main routine parameters which exist on 9860 series - maybe you can solve that mystery - many thanks again

You have to adjust the parameter declaration of the main entry procedure. I called it GXA_main in my SDK.
GXA_main( void ) -> GXA_main( int origin, short estripno ).
Now you can use the information "origin" and "estripno" in your add-in.
origin=1 (main menu), origin=0 (EACT strip).
if ( origin==0 ) estripno= 0, 1 or 2
else estripno= 0.
I'll be back!

Senior Member
Posts: 113
Joined: Mon Mar 02, 2015 10:53 am
Calculators: Casio fx-CG 20

Re: How to find and display the Prizm's built-in MENU-icons

Postby AmazoNKA » Sun Jun 05, 2016 10:40 am

That's great. It skipped my mind for what specific purpose i planned to use multiple strips but i can already imagine gbl08ma using this for his utilities add-in to perhaps give image/etc browsing strip, Picoc scripting strip and once finished text editor strips etc accessible from eACT directly, he did a nice job with single strip usage for image viewer stand-alone addin before, your tip will enable even better things for his utilities add-in
Last edited by AmazoNKA on Sun Jun 05, 2016 5:19 pm, edited 1 time in total.

Senior Member
User avatar
Posts: 605
Joined: Sat Sep 15, 2012 6:59 am
Location: Krautland ****
Calculators: Casio fx-7400GII, Casio fx-7400GII (SH4), Casio fx-9750 G II, Casio fx-9750 G II (SH4), Casio fx-9860G, Casio fx-9860 G SD, Casio fx-9860G Slim, Casio fx-9860 GII SD, Casio fx-9860 GII SD Power Graphic 2, Casio Classpad 330 plus, Casio fx-CG 20, Casio Classpad fx-cp400, Casio fx-CG 50

Re: How to find and display the Prizm's built-in MENU-icons

Postby SimonLothar » Sun Jun 05, 2016 12:24 pm

AmazoNKA wrote:I was trying to figure out Graph and Table difference and could not make sys0fda_APP_GRAPH_TABLE work as a Table, so decided to see if eACT files can for table and graph strips differ and was surprised to see in hex editor they refer to @TABLE and @GRAPH respectively. Those may be main memory folder names but not necessary... For example, all various E-con strips all seem to refer to @ECON regardless which strip is added in eACT so it makes me believe there could be another distinct system call for Table app... Do you come to the same conclusion? Thanks in advance again
No, it is sys0fda_APP_GRAPH_TABLE for TABLE and GRAPH. The problem is, that the app-syscalls use global variables. One of these is AppName, which can be set with unsigned char*SetAppName( unsigned char*name ); (0x1E9E).

This invokes TABLE:
SetAppName( "@TABLE" );
APP_GRAPH_TABLE( 1, 0 );

This invokes GRAPH:
SetAppName( "@GRAPH" );
APP_GRAPH_TABLE( 1, 0 );

It seems to be important to call SetAppName before calling the distinct app-syscalls at any rate.
I'll be back!

Senior Member
Posts: 113
Joined: Mon Mar 02, 2015 10:53 am
Calculators: Casio fx-CG 20

Re: How to find and display the Prizm's built-in MENU-icons

Postby AmazoNKA » Thu Jun 09, 2016 7:32 pm

This made things so much better at least on the emulator. Thank you so much.

Senior Member
Posts: 113
Joined: Mon Mar 02, 2015 10:53 am
Calculators: Casio fx-CG 20

Re: How to find and display the Prizm's built-in MENU-icons

Postby AmazoNKA » Wed Jun 15, 2016 5:10 pm

Hi Simon, I'm trying to solve a small bug (tested on emulator only so far) which only happens when the Menu key does not start anything from when in main menu) - so basically when the calculator is restarted and no other apps were run before...

So I'm keen to know if there is a system call or some flag or memoty file which can detect that currently running add in is the first one run on the calculator so far please.

That would help me so much. Thanks in advance

Senior Member
User avatar
Posts: 605
Joined: Sat Sep 15, 2012 6:59 am
Location: Krautland ****
Calculators: Casio fx-7400GII, Casio fx-7400GII (SH4), Casio fx-9750 G II, Casio fx-9750 G II (SH4), Casio fx-9860G, Casio fx-9860 G SD, Casio fx-9860G Slim, Casio fx-9860 GII SD, Casio fx-9860 GII SD Power Graphic 2, Casio Classpad 330 plus, Casio fx-CG 20, Casio Classpad fx-cp400, Casio fx-CG 50

Re: How to find and display the Prizm's built-in MENU-icons

Postby SimonLothar » Sat Jun 18, 2016 2:37 pm

AmazoNKA wrote:So I'm keen to know if there is a system call or some flag or memoty file which can detect that currently running add in is the first one run on the calculator so far please.
I did not find such a feature.

A little byproduct of my investigations:
The flag which controls the MENU-key behaviour can be read and changed using the following code.
Code: Select all
//
unsigned char APP_MenuKeyFlag( unsigned char value ){
unsigned int ea;
unsigned int j;
unsigned char*pMenuKeyFlag;
  if ( OSVersionAsInt() <= 0x02020000 ){
    ea = *(unsigned int*)0x8002007C; // get pointer to syscall table
    ea += 0x1e6e*4;  // // get pointer to syscall 1e6e
   
    ea = *(unsigned int*)( ea );
    j = *(unsigned char*)( ea + 1 );
    j *= 4;
    j = ( ea + j + 4 ) & 0xFFFFFFFC;
    pMenuKeyFlag = (unsigned char*)(*( unsigned int*)( j ) + 3 );
  }else{
    pMenuKeyFlag = 0;
  }
  j = 0;
  if ( pMenuKeyFlag ){
   j = *pMenuKeyFlag;
   *pMenuKeyFlag = value;
  }
  return j;
}


But beware. If you set the flag to 1, the calculator cannot leave your addin any more, unless restarted with the RESTART-button. So provide for some function to set the flag back to 0.
And the flag seems to control some other features, too, f. i. if you connect the calculator to some USB-port, the connection dialog does not pop up.
I'll be back!

PreviousNext

Return to Tutorials & Code Snippets

Who is online

Users browsing this forum: No registered users and 3 guests