Register

Addin Restart routine

Discuss issues related to the fx-9860G Software Development Kit
Senior Member
User avatar
Posts: 66
Joined: Sun Apr 15, 2012 4:00 pm
Calculators: Casio fx-9860G

Re: Addin Restart routine

Postby aapman55 » Mon Mar 25, 2013 6:01 pm

it works fine for me.

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: Addin Restart routine

Postby SimonLothar » Mon Mar 25, 2013 6:34 pm

Casimo wrote:
flyingfisch wrote:Hmm... for some reason my calc freezes when I exit the game, and I have to restart it with the reset button.

(calculator: modded fx9750)
What's wrong with APP_EnableRestart()?
I use APP_EnableRestart() on any fx-9xx0G, -GII and -GII-2 calculator without problems yet. What game is it, which flyingfisch refers to? What system resources does the game use? Heap, interrupts (grayscale?)....
I'll be back!

Senior Member
User avatar
Posts: 113
Joined: Sun Dec 16, 2012 2:59 pm
Calculators: None

Re: Addin Restart routine

Postby Casimo » Tue Mar 26, 2013 3:08 pm

Mine.
(Don't berate, it was my first game I made some time ago, so the code is a bit dirty...)
Matris

It uses direct keyboard access, no interrupts ("smulates" interruptts only) and writes to the display (MonochromeLib).
Image

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: Addin Restart routine

Postby SimonLothar » Wed Mar 27, 2013 2:48 pm

Casimo wrote:Mine.
(Don't berate, it was my first game I made some time ago, so the code is a bit dirty...)
Matris

It uses direct keyboard access, no interrupts ("smulates" interruptts only) and writes to the display (MonochromeLib).

The heap you grab with
Code: Select all
pScreen = (char*)malloc(3072);
should be released on program exit.

If this loop
Code: Select all
while(!PRGM_GetKey(31) && mode != 3){...}
exits because of mode == 3, the timer 10 is not explicitly uninstalled. Normally the system takes care of this, but you never can tell.

BTW:
Code: Select all
drawbuffer(char *buffer)
seems to be time critical. If it would be based on integer movement, it could be nearly four times faster.
I'll be back!

Senior Member
User avatar
Posts: 113
Joined: Sun Dec 16, 2012 2:59 pm
Calculators: None

Re: Addin Restart routine

Postby Casimo » Thu Mar 28, 2013 11:46 am

Thanks for the tips, I already realized some of these bugs but I forgot to upload the new version :P
Does this really solve the problem? I mean, on my calculator, the restart works - that's a bit ugly...
Image

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: Addin Restart routine

Postby SimonLothar » Fri Mar 29, 2013 8:48 am

Casimo wrote:Does this really solve the problem? I mean, on my calculator, the restart works - that's a bit ugly...
I checked your game on a fx-GII-2. It worked.
I checked your game on a fx-GII. I could reproduce the freeze.
Then I recompiled your code with the finalization
Code: Select all
Timer_Uninstall(6);
Timer_Uninstall(7);
Timer_Uninstall(10);
free(pScreen);
Disconnect();
where
Timer_Uninstall(10);
fixed the problem.
I'll be back!

Senior Member
User avatar
Posts: 113
Joined: Sun Dec 16, 2012 2:59 pm
Calculators: None

Re: Addin Restart routine

Postby Casimo » Fri Mar 29, 2013 6:51 pm

Oh! Thanks. I uploaded the new version.
Image

Previous

Return to Casio fx-9860 SDK

Who is online

Users browsing this forum: No registered users and 23 guests