SuperH-based fx calculators
fx CG Setup

Most of the fx legacy Setup applies to the fx CG Setup, too. The CG Setup has space for 200 entries.
 

Syscalls

0x0031: char Setup_GetEntry(unsigned int index);

Returns the value at the given index. Only indexes in range 0..199 access valid entries, but no checking is done.

0x0032: char *Setup_SetEntry(unsigned int index, char setting);

Sets the entry at the given index to the provided setting. Only indexes in range 0..199 access valid entries, but no checking is done.
Will return a pointer to the base of the Setup table.

0x0033: char *Setup_GetEntryPtr(unsigned int index);

Returns a pointer to the actual data in the setup table (tableaddress+index).

 

0x161C: int Setup_GetInfo(unsigned char*P1, int P2, TSetupInfo*P3);

This call seems to be the single possibility to read the size of the setup-area.

P1 has to be the zero-terinated text "SETUP".

P2 has to be zero.

P3 is a pointer to a struct like:

typedef
struct {
        unsigned char Name1[13];    // will be set to "SETUP.g1m" on return
        unsigned char Name2[9];    // will be set to "$GLOBAL" on return
        unsigned char Name3[10];    // will be set to "SETUP" on return
        void*StartOfSetup
        unsigned int LengthOfSetup
        unsigned short unknown; // 0x8038
    } TSetupInfo;   
.

(06.10.2012 14:29:55)