Register

Need some newbie help please

Discuss issues related to the fx-9860G Software Development Kit
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: Need some newbie help please

Postby SimonLothar » Sun Jul 21, 2013 5:23 pm

I dropped the new sources here.
I know this is concentrated stuff of news, but lets try together to get you the things working.
I'll be back!

Member
User avatar
Posts: 44
Joined: Tue Jul 02, 2013 11:57 am
Location: London
Calculators: Casio fx-7400G, Casio fx-7400G PLUS, Casio fx-7400GII, Casio fx-9750G, Casio fx-9750G PLUS, Casio fx-9860GII

Re: Need some newbie help please

Postby MrMagoo » Mon Jul 22, 2013 12:20 pm

Simon,

Wow, you are awesome.
So I got it all running, and its working.

This is how i see it so far.

We create two arrays, and store data to them in multiples of 10 starting at 0.125 and 0.333

We then read from table 1, item 3,2 and from table 2, item 33,1.

Can you explain the difference between storage memory and main memory?
Are both retained on power off?


Also, in terms of space, can you tell me what the limits are? How large is the data I am wanting to store, compared to the space available?
I currently have a lot of bitmaps, are they going to be an issue?

Many thanks so far :-)
"The trouble with internet quotations, is that the majority are totally made up." - Abraham Lincoln 1863

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: Need some newbie help please

Postby SimonLothar » Mon Jul 22, 2013 3:54 pm

MrMagoo wrote:Can you explain the difference between storage memory and main memory? Are both retained on power off?
Data you wrote to storage memory are save in the moment you call Bfile_CloseFile(). These data have been written directly to the flash (according to the manufacturer: Cycling Endurance: 1 million cycles per sector typical; Data Retention: 20 years typical).
Data you wrote to main memory, which is RAM, are automatically saved to the flash by the system in the moment a regular power off takes place. On reset or crash, data saved to the main memory since the last regular power off are lost.

MrMagoo wrote:Also, in terms of space, can you tell me what the limits are? How large is the data I am wanting to store, compared to the space available?
If you go to the MAIN MENU, you see the MEMORY-icon. If you open the main memory, you will see the directory <@MRMAGOO> or whatever you named your G1A. It should occupy about 4856 bytes. In the bottom line of the main memory overview you will see the remaining space. If you open the storage memory you will find TEST.BIN (if you did not change the file name in the source). Again in the bottom line of the storage memory overview you will see the remaining space.
Initially the main memory has about 60 KiB free space. The storage memory comes with 1.5 MiB.

MrMagoo wrote:I currently have a lot of bitmaps, are they going to be an issue?
The bitmaps, if they are still const-blocks in your source code, are stored in the G1A, hence in the flash.
I'll be back!

Senior Member
Posts: 141
Joined: Wed May 16, 2012 2:50 pm
Location: Portugal
Calculators: Casio fx-CG20

Re: Need some newbie help please

Postby gbl08ma » Mon Jul 22, 2013 4:43 pm

SimonLothar wrote:[(according to the manufacturer: Cycling Endurance: 1 million cycles per sector typical; Data Retention: 20 years typical).


A interesting idea came to my mind. If the OS is stored in flash and if that model of flash can only retain data for typically 20 years, won't the OS start to become corrupted by itself after that long period of time?

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: Need some newbie help please

Postby SimonLothar » Mon Jul 22, 2013 5:04 pm

gbl08ma wrote:A interesting idea came to my mind. If the OS is stored in flash and if that model of flash can only retain data for typically 20 years, won't the OS start to become corrupted by itself after that long period of time?
Sure! But what I believe is, that you wouldn't become aware of it. There will be at least one electronic device in your calculator, which already will have failed after a far shorter period. In other words, one of the most important properties of electronic devices is, that they have a limited life time.
I'll be back!

Member
User avatar
Posts: 44
Joined: Tue Jul 02, 2013 11:57 am
Location: London
Calculators: Casio fx-7400G, Casio fx-7400G PLUS, Casio fx-7400GII, Casio fx-9750G, Casio fx-9750G PLUS, Casio fx-9860GII

Re: Need some newbie help please

Postby MrMagoo » Tue Jul 23, 2013 8:25 am

Hi Simon,

A few questions :-)

Code: Select all
// save the data to storage memory
   appmem.SaveToFile( (FONTCHARACTER*)filename );
   // load the data from storage memory
   appmem.LoadFromFile( (FONTCHARACTER*)filename );


I definately want to use the storage memory, but what data is it saving here?
I can see we created the test.bin file which I assume is the storage itself, and I think this line

Code: Select all
appmem.SetVar( 1, i, j, 0.125 + i * 10.0 + j );


is what sets the data in the bin. Can you tell me what the parameters are? i & j I assume are x:y of the array, the last bit is the data to save, but what is the 1? is it an area within the bin?
"The trouble with internet quotations, is that the majority are totally made up." - Abraham Lincoln 1863

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: Need some newbie help please

Postby SimonLothar » Tue Jul 23, 2013 10:42 am

MrMagoo wrote:is what sets the data in the bin. Can you tell me what the parameters are? i & j I assume are x:y of the array, the last bit is the data to save, but what is the 1? is it an area within the bin?

This is what you ordered a few days ago:
MrMagoo wrote:...8 sets of data that comprise
One alpha string, 8 characters max, and 5 doubles.

50 sets of data that comprise
One alpha string, 8 characters max, and 4 doubles.

If the 50 could be bigger, that would be good...

"appmem.SetVar( 1, i, j, 0.125 + i * 10.0 + j );":
applies to the first table (8 sets of data...), which I called Set1;
where i is the subset-index (0..7) and j is the value index (0..4).

"appmem.SetVar( 2, i, j, 0.125 + i * 10.0 + j );"
would apply to the second table (50 (or more) sets of data...), which I called Set2 and assigned a length of 100 to;
where i is the subset-index (0..49 (or more)) and j is the value index (0..3)

0.125 + i * 10.0 + j is some exemplary value, to have something distinct to verify, when reading the data back.

appmem.SetVar( ... ) sets one value in Set1 or Set2 (this does not touch the storage memory).
appmem.SaveToFile( ... ) saves Set1 and Set2 to the storage memory (writing TEST.BIN).
I'll be back!

Member
User avatar
Posts: 44
Joined: Tue Jul 02, 2013 11:57 am
Location: London
Calculators: Casio fx-7400G, Casio fx-7400G PLUS, Casio fx-7400GII, Casio fx-9750G, Casio fx-9750G PLUS, Casio fx-9860GII

Re: Need some newbie help please

Postby MrMagoo » Tue Jul 23, 2013 1:27 pm

Ok excellent.

So how would I define a 50x5 data set and a 8x5 data set, all with blank values for now.

Also how do I check if the datasets already exist, so I can avoid overwriting them.
"The trouble with internet quotations, is that the majority are totally made up." - Abraham Lincoln 1863

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: Need some newbie help please

Postby SimonLothar » Tue Jul 23, 2013 6:21 pm

MrMagoo wrote:So how would I define a 50x5 data set and a 8x5 data set.

Open memory.hpp

#define SET2COUNT 5

and

#define SET2LEN 50


---
Remaining answers tomorrow.
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: Need some newbie help please

Postby SimonLothar » Wed Jul 24, 2013 8:31 am

I updated this.

TAppMemory has three new methods (BlankOut, ExistsFile, ExistsMCU).
I decided to move the NaN functions from ipput.cpp to mymath.cpp.
I'll be back!

PreviousNext

Return to Casio fx-9860 SDK

Who is online

Users browsing this forum: No registered users and 25 guests