Jump to content



Photo
- - - - -

Place A Progam Directly In The Main Menu


  • Please log in to reply
8 replies to this topic

#1 ericlegomeer

ericlegomeer

    Newbie

  • Members
  • Pip
  • 7 posts
  • Gender:Male
  • Location:127.0.0.1 :P

  • Calculators:
    fx-82MS
    fx-82ES
    fx-9860G

Posted 31 August 2008 - 11:21 AM

Hi,

Yesterday I had a problem, but I solved it myself... So my little (well, it's large, but I need to replace some code with smaller codes) program is done.

I'm wondering how I can place that program directly in the main menu. I can copy it on the Storage Memory, but that will only make a .g1m file. Which will not be viewed in the main menu. So my question is if I can place it into the main menu and make an Icon for it (it can also be a standard icon, because I've got an Add-in which also can edit icons...).

Is this possible? Or do I need to learn how to program in SDK?


Eric

#2 kucalc

kucalc

    Casio Maniac

  • [Legends]
  • PipPipPipPipPipPipPipPip
  • 1422 posts
  • Gender:Male
  • Location:USA
  • Interests:Programming: C/C++, Fortran, LISP, COBOL 85 Standard, PHP, x86 and SH3 Assembly

    Computer graphics

  • Calculators:
    fx-9860G / fx-7400G Plus / Algebra FX 2.0+ / fx-9770G / CFX-9850G / CFX-9850GB+ / TI-89 / TI-nSpire

Posted 01 September 2008 - 09:59 PM

I'm sorry, but it's not possible.

BASIC progs are executed via fx-9860G's BASIC interpreter.

#3 ericlegomeer

ericlegomeer

    Newbie

  • Members
  • Pip
  • 7 posts
  • Gender:Male
  • Location:127.0.0.1 :P

  • Calculators:
    fx-82MS
    fx-82ES
    fx-9860G

Posted 02 September 2008 - 05:42 AM

Do you know if there is some software in which you can place your code from the normal program menu and that it then converts it to a program which can be used in the normal menu?

I think google has the answer ^_^ ... I'll search...


Eric

#4 Andreas B

Andreas B

    Casio Freak

  • Members
  • PipPipPipPip
  • 160 posts
  • Gender:Male
  • Location:Norway

  • Calculators:
    fx-9860G SD

Posted 02 September 2008 - 06:30 PM

There is currently no BASIC->C converter. SDK is the way to go for main menu icon applications.

#5 ericlegomeer

ericlegomeer

    Newbie

  • Members
  • Pip
  • 7 posts
  • Gender:Male
  • Location:127.0.0.1 :P

  • Calculators:
    fx-82MS
    fx-82ES
    fx-9860G

Posted 03 September 2008 - 05:35 AM

There is currently no BASIC->C converter. SDK is the way to go for main menu icon applications.



Okay, thank you...
Then I need to learn C I guess...


Eric

#6 SimLo

SimLo

    Casio Addict

  • Members
  • PipPipPip
  • 52 posts
  • Gender:Male
  • Location:Germany

  • Calculators:
    FX-9860G/FX-9860G SD

Posted 12 September 2008 - 06:49 PM

...So my question is if I can place it into the main menu and make an Icon for it (it can also be a standard icon, because I've got an Add-in which also can edit icons...).
...


Generally it is possible to call a BASIC program directly from the main menu, t. i. out of a G1A. F. i. the following C-code snippet calls the first BASIC program out of the BASIC-program-list.

#include "keybios.h"
   int SysCallCode[] = {0xD201422B,0x60F20000,0x80010070};
   int (*internalSysCall)( int R4, int R5, int R6, int R7, int FNo ) = (void*)&SysCallCode;
   
   void i_PutKey( unsigned int key ){ (*internalSysCall)( (int)key, 0, 0, 0, 0x0910 );}
   void i_StartBASIC( void ){ (*internalSysCall)( 0, 0, 0, 0, 0x09F5 );}
   
   //
   int AddIn_main(int isAppli, unsigned short OptionNum)
   {
   i_PutKey( KEY_CTRL_F1 );
	 i_StartBASIC();
   }


#7 ericlegomeer

ericlegomeer

    Newbie

  • Members
  • Pip
  • 7 posts
  • Gender:Male
  • Location:127.0.0.1 :P

  • Calculators:
    fx-82MS
    fx-82ES
    fx-9860G

Posted 13 September 2008 - 07:11 PM

How can I convert it so I can place it on my calculator??
And another question:

I can convert my program to a g1e file, by copying it to the storage memory. Is it possible to add the filename in this code so that it opens that file... Or is that too much of a problem??


Eric

#8 SimLo

SimLo

    Casio Addict

  • Members
  • PipPipPip
  • 52 posts
  • Gender:Male
  • Location:Germany

  • Calculators:
    FX-9860G/FX-9860G SD

Posted 14 September 2008 - 06:41 AM

How can I convert it so I can place it on my calculator??

It is a SDK C source. So you need the SDK to compile it, resulting in a G1A-file.
The G1A has to be copied into storage mem.
You do not need to learn C for that. But you need the SDK. Perhaps a way to start SDK.
The snippet is a complete program, which should be ready to compile (I skipped the standard addin-initialization, though. The SDK provides for that.).

I can convert my program to a g1e file, by copying it to the storage memory. Is it possible to add the filename in this code so that it opens that file... Or is that too much of a problem??

If you want to invoke any BASIC program by name, you can use the G1A as it is.
Define a BASIC program, with a name like "AAAA" to ensure, that it is the first program in the list.
Enter the single BASIC command

Prog "XYZ"

where XYZ is the name of the program you want to have invoked actually.

---
But how do you convert a BASIC program to G1E? G1E normally is the extension of an eActivity-file.
Do you want to have eActivity called with a specific filename, too?

#9 ericlegomeer

ericlegomeer

    Newbie

  • Members
  • Pip
  • 7 posts
  • Gender:Male
  • Location:127.0.0.1 :P

  • Calculators:
    fx-82MS
    fx-82ES
    fx-9860G

Posted 14 September 2008 - 07:55 AM

It is a SDK C source. So you need the SDK to compile it, resulting in a G1A-file.
The G1A has to be copied into storage mem.
You do not need to learn C for that. But you need the SDK. Perhaps a way to start SDK.
The snippet is a complete program, which should be ready to compile (I skipped the standard addin-initialization, though. The SDK provides for that.).

Okay, I'll try to download it and find a computer with XP, cause I think it doesn't work on Vista...

If you want to invoke any BASIC program by name, you can use the G1A as it is.
Define a BASIC program, with a name like "AAAA" to ensure, that it is the first program in the list.
Enter the single BASIC command

Prog "XYZ"

where XYZ is the name of the program you want to have invoked actually.

Okay, that's a good idea

---
But how do you convert a BASIC program to G1E? G1E normally is the extension of an eActivity-file.
Do you want to have eActivity called with a specific filename, too?

Sorry XD... I was just messing around with something and I got all confused :P I meant a G1M file :P


Eric




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users