SH4 and Revolution-FX
2 posts
• Page 1 of 1
- natinusala
- Junior Member
- Posts: 1
- Joined: Sun Nov 17, 2013 8:08 pm
- Calculators: Casio fx-9750GII (SH4)
SH4 and Revolution-FX
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) :
Could you help me ? drawCookie is a Bdisp_WriteGraph_VRAM and is working on both emulator and calculator.
Thanks !
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 !
Re: SH4 and Revolution-FX
Replace SDK_VRAM by the system call 0x135.
add
after the #includes
create a pointer
and replace SDK_VRAM by vram
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
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 6 guests