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-9750GII, Casio fx-9750GII (SH4), Casio fx-9860G, Casio fx-9860G SD, Casio fx-9860G Slim, Casio fx-9860GII SD, Casio fx-9860GII SD Power Graphic 2, Casio Classpad 330 plus, Casio fx-CG20, Casio fx-CG50, Casio Classpad fx-CP400

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

Postby SimonLothar » Thu May 05, 2016 10:38 pm

syscall 0D08 is the call to display a string.
Bdisp_MMPrint(int*x, int*y, unsigned char*, int mode, int xmax, int, int, int color, int, int, int );

Examples:
x = 0x30;
y = 0x50;
Bdisp_MMPrint( &x, &y, "ABCDEFGHIJK", 2, 0x50, 0, 0, 0, 0, 1, 0 ); // black
x = 0x30;
y = 0x60;
Bdisp_MMPrint( &x, &y, "DEFGHI", 2, 100, 0, 0, 0xF800, 0, 1, 0 ); // red
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-9750GII, Casio fx-9750GII (SH4), Casio fx-9860G, Casio fx-9860G SD, Casio fx-9860G Slim, Casio fx-9860GII SD, Casio fx-9860GII SD Power Graphic 2, Casio Classpad 330 plus, Casio fx-CG20, Casio fx-CG50, Casio Classpad fx-CP400

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

Postby SimonLothar » Fri May 06, 2016 8:19 pm

syscall 0D09 is the call to display a string, too, but x and y are passed by value, not by reference.
Bdisp_MMPrint(int x, int y, unsigned char*, int mode, int xmax, int, int, int color, int backcolor, int, int );
I'll be back!

Senior Member
Posts: 116
Joined: Mon Mar 02, 2015 10:53 am
Calculators: Casio fx-CG20

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

Postby AmazoNKA » Sun May 08, 2016 10:14 pm

Thank you so much, your already detailed documentation will have even more routines now. I will try and test them when I come back to my Lock add-in - I have not updated it for almost a year and am normally slow releasing updates but this should help me to replace normal font for the application to be launched with your new font to make it look nicer here:
Image
It will also be a good opportunity to test your Icons routine - I used my own routine to search for them originally and it still works on newer OS but will probably be less reliable than yours with the future OS releases: I basically started with address 0x805A1A36 and searched for 42 08 9C F3 sequence to point me to area with all the main menu icons - if your routine points to the same place I suspect the bitmaps should be both for selected and unselected icons - at least that what I find using my method - is this what you mean by unknown bitmaps same size as icons?

I also have never used the bitmap drawing routine but for things which are in memory already I was able to draw each row of the icon at once using memcpy with 184 bytes length but will be keen to try your way as well.

One thing I was mindful originally when developing my lock add-in was trying to not exceed the conversion add-in cheksum so that I could replace that add-in with mine and still retain conversion functionality - so hopefully I can still achieve that with all the things you introduced here. Thank you again

Another off-topic question I was always puzzled about - is there a way to auto launch my add-in at calculator resets somehow - and how risky is the procedure if you know one please?

Thanks for everything

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-9750GII, Casio fx-9750GII (SH4), Casio fx-9860G, Casio fx-9860G SD, Casio fx-9860G Slim, Casio fx-9860GII SD, Casio fx-9860GII SD Power Graphic 2, Casio Classpad 330 plus, Casio fx-CG20, Casio fx-CG50, Casio Classpad fx-CP400

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

Postby SimonLothar » Fri May 13, 2016 6:47 am

AmazoNKA wrote:Another off-topic question I was always puzzled about - is there a way to auto launch my add-in at calculator resets somehow - and how risky is the procedure if you know one please?
I never found some AUTOEXEC-equivalent in the CASIO fx OSes. Hence, I only see an OS enhancement. But that is a cumbersome job. To be precise, that are two cumbersome jobs. First you would have to develop a code, that has to be injected into the OS (this involves some cumbersome subjobs as: find some unused space, find a proper entry point, code the code). After developing the code, you have to build a standard OS updater containing your enhanced OS (again this involves some cumbersome subjobs: you have to know 8088 (and the successor's) assembler language, how to extract and inject ressources out of and into an exe-file, how to use the correct deflate/inflate tools).
The process would be OS-dependent. You cannot publish such an OS-enhancement. So it would be for personal fun, only.
To be honest, I cannot imagine any OS-enhancement, which is worth this effort.

Sry, but I do not have better news.

BTW: I strongly recommend NOT to write the flash of a Prizm from out of a G3A directly, t. i. using the low level flash writing routines! (This concerns at least early hardware versions of the Prizm, which seem to contain some weak part. I'd say, the risk of bricking the Prizm in this process is about 20%. Whether this has been mended meanwhile, I cannot tell. I will never check it out.)
I'll be back!

Senior Member
Posts: 116
Joined: Mon Mar 02, 2015 10:53 am
Calculators: Casio fx-CG20

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

Postby AmazoNKA » Sat May 14, 2016 12:45 am

Thank your very much for all of this.

Senior Member
Posts: 116
Joined: Mon Mar 02, 2015 10:53 am
Calculators: Casio fx-CG20

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

Postby AmazoNKA » Sun May 29, 2016 11:02 am

Dear Simon,

I'm very hopeful to launch Statistics app (sys1ced_APP_STAT_) but compared to all other apps it behaves very oddly - launches without the start bar and some times without the functions keys (especially when launched after Run-Mat) - could you share more insight into this please. I launch it with two parameters and the best results I could get was with first parameter 1 and second one does not seem to matter but still have problems with status bar (unlike in other apps) and the functions keys:
Code: Select all
App_STAT(1,0);//why no status bar?

I declared it as syscall, which returns void and requires two int inputs. Maybe you know if that needs to be changed, I know you mentioned number of arguments may differ, I also tried declaring as syscalls, which return void and require no input, as well as taking three ints but not getting better result.

And with functions keys disappearing if run-mat was run before from the same add-in (making it a major problem compared to status bar even) - I tried the following based on gbl08ma's examples but it does not restore functions keys for Stats app unfortunately - so am very hopeful for more help please:
Code: Select all
      Cursor_SetFlashOff();
      Bkey_ClrAllFlags();
      static const unsigned int default_fkeys[] = {0x0000FFFF,0,0x0000FFFF,0,0x0000FFFF,0,0x0000FFFF,0,0x0000FFFF,0,0x0000FFFF,0 };
      FKey_mapping1(0,(unsigned int*)default_fkeys);
      FKey_mapping2(0);


Some other app calls I'm interested in are App_DYNA() and App_GRAPH_TABLE(1,0) - I can show them but with the title (row under status bar) completely missing and I completely fail to show the table view regardless of how many parameters and values I tried with App_GRAPH_TABLE - I would be so grateful if you could tell me how to do this correctly please.

Kind regards, A~nka

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-9750GII, Casio fx-9750GII (SH4), Casio fx-9860G, Casio fx-9860G SD, Casio fx-9860G Slim, Casio fx-9860GII SD, Casio fx-9860GII SD Power Graphic 2, Casio Classpad 330 plus, Casio fx-CG20, Casio fx-CG50, Casio Classpad fx-CP400

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

Postby SimonLothar » Sun May 29, 2016 1:22 pm

There is a syscall 0x1E5B, void App_Start( int zero1, int zero2, int AppNo, int zero3 ), which is superordinate to the distinct App-calls.
This call does some housekeeping, which seems to be essential.
Pass zeros to zero1, zero2 and zero3 and pass the application-number (RunMat=0, Statistics=1 a. s. o) to AppNo.
I'll be back!

Senior Member
Posts: 116
Joined: Mon Mar 02, 2015 10:53 am
Calculators: Casio fx-CG20

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

Postby AmazoNKA » Mon May 30, 2016 10:38 am

Thank you very much - this is a very nice system call but unfortunately terminates the execution of the currently running add-in which in the case of the apps I struggle with is not what I'm hoping to achieve. I hope you can still help me with those too. Many 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-9750GII, Casio fx-9750GII (SH4), Casio fx-9860G, Casio fx-9860G SD, Casio fx-9860G Slim, Casio fx-9860GII SD, Casio fx-9860GII SD Power Graphic 2, Casio Classpad 330 plus, Casio fx-CG20, Casio fx-CG50, Casio Classpad fx-CP400

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

Postby SimonLothar » Sat Jun 04, 2016 8:49 am

AmazoNKA wrote:...but unfortunately terminates the execution of the currently running add-in which in the case of the apps I struggle with is not what I'm hoping to achieve. I hope you can still help me with those too.
I am at a loss there. I had a look at the code, which controls the call of apps out of EACT, which - theoretically - could serve as a template. But it is very complicated and embedded in the central processing mechanism. I cannot see a way to solve this riddle. Sry.
I'll be back!

Senior Member
Posts: 116
Joined: Mon Mar 02, 2015 10:53 am
Calculators: Casio fx-CG20

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

Postby AmazoNKA » Sat Jun 04, 2016 10:57 am

Thank you very much for trying.

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 don't know how to find out with certainty unfortunately, hopefully you can please. I will continue experimenting with it on the emulator.

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

PreviousNext

Return to Tutorials & Code Snippets

Who is online

Users browsing this forum: No registered users and 23 guests