Register

SH4 and Revolution-FX

Discuss issues related to the fx-9860G Software Development Kit
Junior Member
Posts: 1
Joined: Sun Nov 17, 2013 8:08 pm
Calculators: Casio fx-9750GII (SH4)

SH4 and Revolution-FX

Postby natinusala » Sun Nov 17, 2013 8:40 pm

Hello,

I own a Casio fx-9750 G II (SH4) with the OS from the Graph 75/95 so I can install add-ins on it. I created a simple add-in to test the SDK, with Revolution-FX.

But I have a problem : with CoolText (and everything using DrawSprite in general), the drawn stuff appears in the SDK emulator's screen but not on my calculator.

I heard it's a problem with VRAM address and all this stuff, how am I supposed to fix this ?

Here is a code snippet, the CoolText is not working on SH4 calculator (but fine in emulator) :

Code: Select all
void draw()
{
        //Construction du String des cookies
        char cookiesStr[15];
        sprintf(cookiesStr, "%d", cookiesOwned);
       
        //Calcul de la position du cookie
        cookiesX = 29-(2*integerLength(cookiesOwned));
       
        //Dessin de tout ça
        drawCookie(0, 0, 1);
        CoolText(cookiesX, 22, FONT_FIVE, cookiesStr, SDK_VRAM);
       
        Bdisp_PutDisp_DD();
}


Could you help me ? drawCookie is a Bdisp_WriteGraph_VRAM and is working on both emulator and calculator.

Thanks !

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

Re: SH4 and Revolution-FX

Postby Casimo » Mon Nov 18, 2013 3:56 pm

Replace SDK_VRAM by the system call 0x135.

add
Code: Select all
typedef char*(*sc_cpv)(void);
const unsigned int sc0135[] = { 0xD201D002, 0x422B0009, 0x80010070, 0x0135 };
#define GetVRAMAddress (*(sc_cpv)sc0135)

after the #includes
create a pointer
Code: Select all
char * vram = GetVRAMAddress();

and replace SDK_VRAM by vram
Image

Return to Casio fx-9860 SDK

Who is online

Users browsing this forum: No registered users and 28 guests