mylib v0.45
36 posts
• Page 1 of 4 • 1, 2, 3, 4
- hayzel
- Member
- Posts: 43
- Joined: Thu May 31, 2012 5:45 pm
- Location: Greece
- Calculators: Casio fx-9860G SD
mylib v0.45
I am working on a new project (concrete sections analysis) for casio 9860 and made an update to the helper library I made for 9860sdk.
the download link is : http://www.casiopeia.net/forum/downloads.php?view=detail&df_id=86.
Most of the code is easy to use for any medium c programmer, though there are some usefull comments inside mylib.h
The new mylib, brings:
- some new functions (dynamic Strings,dynamic Dialogs, dynamic StringLists)
- a redesigned dialog system (supports refreshCallbacks for more dynamic dialogs)
- good placing of miniTexts with exact pixel width counting of texts.
- a menu system supporting second level pop up menus.
- some cleanup of the code.
Some things I like to add:
- a new cellEditor replacing the old and obsolete matrixEditor/matrixDisplay.
- some new controls . like for example spin button.
- a simple layout system. so you will not have to count all the time px dimensions for the DialogItems.
The mylib is a work in process. So I will update the link from time to time. I decided to upload it now, so anyone using it, or wants to use it, can give me feedback about bugs, suggestions or ideas.
mylib runs on casio 9860 sdk, and uses only one documented (thanks simon) direct syscall (0x0137) for counting the px width of mini glyphs.
I would like to know if it runs fine on all versions of 9860s.
Any comments are welcomed in this thread.
the download link is : http://www.casiopeia.net/forum/downloads.php?view=detail&df_id=86.
Most of the code is easy to use for any medium c programmer, though there are some usefull comments inside mylib.h
The new mylib, brings:
- some new functions (dynamic Strings,dynamic Dialogs, dynamic StringLists)
- a redesigned dialog system (supports refreshCallbacks for more dynamic dialogs)
- good placing of miniTexts with exact pixel width counting of texts.
- a menu system supporting second level pop up menus.
- some cleanup of the code.
Some things I like to add:
- a new cellEditor replacing the old and obsolete matrixEditor/matrixDisplay.
- some new controls . like for example spin button.
- a simple layout system. so you will not have to count all the time px dimensions for the DialogItems.
The mylib is a work in process. So I will update the link from time to time. I decided to upload it now, so anyone using it, or wants to use it, can give me feedback about bugs, suggestions or ideas.
mylib runs on casio 9860 sdk, and uses only one documented (thanks simon) direct syscall (0x0137) for counting the px width of mini glyphs.
I would like to know if it runs fine on all versions of 9860s.
Any comments are welcomed in this thread.
Last edited by hayzel on Fri May 17, 2013 2:23 pm, edited 1 time in total.
- helder7
- Senior Member
- Posts: 369
- Joined: Tue Jan 03, 2012 11:24 pm
- Calculators: Casio Afx 1.0, Casio fx-9860GII SD, Casio Classpad 330, Casio fx-CG20, Casio Classpad fx-CP400
Re: mylib v0.4
Nice to see an update!
I took a quick look at the lib and new string manipulating functions are nice.
Someone with Power Graphic 2 model can test it?
I took a quick look at the lib and new string manipulating functions are nice.
hayzel wrote:I would like to know if it runs fine on all versions of 9860s.
Someone with Power Graphic 2 model can test it?
SiO2 + CaCO3 ----------> CaSiO3 + CO2
Re: mylib v0.4
The old version worked and if you don't use IsKey... everything should be ok. I'll test it.
- hayzel
- Member
- Posts: 43
- Joined: Thu May 31, 2012 5:45 pm
- Location: Greece
- Calculators: Casio fx-9860G SD
Re: mylib v0.4
New file uploaded mylib v.0.41
changes:
- Cleanup/fix some things in dynamic Strings
- Try no to use buf[] of chars in code, so to minimize unsafe operations. Uses now String (maybe more slow, but I don't care).
- Put more ASSERTs on code for boundary checking of bufs[]
- fixed DEBUGNUM macro (didn't display floats)
- drawLine,drawRect, now can use line patterns
- new and revisited view* functions:
. draw Lines,Rects,Points, FillAreas in real coordinates.
. convert between real and screen coordinates
. scale view around an origin.
. draw arrows
. line patterns work here too.
. viewPrintMini can ALIGN text Left,Right,Center and Vertical, on given point.
changes:
- Cleanup/fix some things in dynamic Strings
- Try no to use buf[] of chars in code, so to minimize unsafe operations. Uses now String (maybe more slow, but I don't care).
- Put more ASSERTs on code for boundary checking of bufs[]
- fixed DEBUGNUM macro (didn't display floats)
- drawLine,drawRect, now can use line patterns
- new and revisited view* functions:
. draw Lines,Rects,Points, FillAreas in real coordinates.
. convert between real and screen coordinates
. scale view around an origin.
. draw arrows
. line patterns work here too.
. viewPrintMini can ALIGN text Left,Right,Center and Vertical, on given point.
- hayzel
- Member
- Posts: 43
- Joined: Thu May 31, 2012 5:45 pm
- Location: Greece
- Calculators: Casio fx-9860G SD
Re: mylib v0.4
I made the GetFreeMemory() function in mylib, thinking that it returned the free malloc memory in the calculator.
Noticed thought that the implementation I have:
Bfile_GetMediaFree(DEVICE_MAIN_MEMORY,&i);
only I think it returns the available user memory for basic programs and other data, not the free malloc memory.
The GetFreeMemory is being used by me to maybe catch some memory leak problems, by comparing its value to the start and to the end of a program.
So the question is, what is the correct procedure to get the free available memory for malloc calls?
Noticed thought that the implementation I have:
Bfile_GetMediaFree(DEVICE_MAIN_MEMORY,&i);
only I think it returns the available user memory for basic programs and other data, not the free malloc memory.
The GetFreeMemory is being used by me to maybe catch some memory leak problems, by comparing its value to the start and to the end of a program.
So the question is, what is the correct procedure to get the free available memory for malloc calls?
- SimonLothar
- Senior Member
-
- 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: mylib v0.4
Inspect the index of fx_calculators_SuperH_based.chm for "Heap_SetTopChunk (0x0499)".hayzel wrote:So the question is, what is the correct procedure to get the free available memory for malloc calls?
You will find a snippet:
int HeapMaxContiguousPiece( int*freespace );
Perhaps this fits your needs.
I'll be back!
- hayzel
- Member
- Posts: 43
- Joined: Thu May 31, 2012 5:45 pm
- Location: Greece
- Calculators: Casio fx-9860G SD
Re: mylib v0.4
SimonLothar wrote:Inspect the index of fx_calculators_SuperH_based.chm for "Heap_SetTopChunk (0x0499)".hayzel wrote:So the question is, what is the correct procedure to get the free available memory for malloc calls?
You will find a snippet:
int HeapMaxContiguousPiece( int*freespace );
Perhaps this fits your needs.
Thanks, looking at the code, this is it!
- hayzel
- Member
- Posts: 43
- Joined: Thu May 31, 2012 5:45 pm
- Location: Greece
- Calculators: Casio fx-9860G SD
Re: mylib v0.4
syscall 0x0499 is compatible with all casio 9860 models (gii for example) ?
- hayzel
- Member
- Posts: 43
- Joined: Thu May 31, 2012 5:45 pm
- Location: Greece
- Calculators: Casio fx-9860G SD
Re: mylib v0.4
hayzel wrote:SimonLothar wrote:Inspect the index of fx_calculators_SuperH_based.chm for "Heap_SetTopChunk (0x0499)".hayzel wrote:So the question is, what is the correct procedure to get the free available memory for malloc calls?
You will find a snippet:
int HeapMaxContiguousPiece( int*freespace );
Perhaps this fits your needs.
Thanks, looking at the code, this is it!
Looking at the code and reading that page , I cannot figure out what the linkliststart pointer value is.
Is it always 0x88024000 as line 5 says, or it is version depended as lines 2-3 say?
If it is version depended I may need a getOSVersion function.
36 posts
• Page 1 of 4 • 1, 2, 3, 4
Who is online
Users browsing this forum: No registered users and 40 guests