Casio Sdk -
// Required for SDK compatibility #pragma section _B_GRAPH int B_Graph_FF(); #pragma section Display (Monochrome – fx-9860G) #include "fxlib.h" void PrintXY(int x, int y, const char* text, int mode); void PrintRev(unsigned char* str, int x, int y, int unknown); void Bdisp_AllClr_DDVRAM(); // Clear screen void Bdisp_PutDisp_DD(); // Refresh display Display (Color – fx-CG) #include "fxcg.h" #include "fxcg/display.h" void PrintMini(int x, int y, const char* text, int alignment); void PrintXY(int x, int y, const char* text, int font, int alignment); void Bdisp_AllClr_VRAM(); void Bdisp_PutDispVRAM(); Keyboard Input unsigned short GetKey(unsigned short *key); // Wait for key unsigned short key; GetKey(&key); // key now contains keycode (e.g., KEY_CTRL_F1) Common keycodes: KEY_CTRL_EXE , KEY_CTRL_F1 - F6 , KEY_CTRL_UP / DOWN / LEFT / RIGHT , KEY_CTRL_MENU . File I/O (Storage Memory) Bfile_OpenFile(const char* filename, int mode, int* handle); Bfile_ReadFile(int handle, void* buf, int size, int readPos); Bfile_WriteFile(int handle, const void* buf, int size, int writePos); Bfile_CloseFile(int handle); System Calls Sleep(int milliseconds); // Pause execution unsigned int GetOSVersion(); // Returns OS version int GetBatteryLevel(); // 0–4 (CG series) 5. Memory & Hardware Constraints | Model | RAM | Flash/Storage | CPU | |-------------|----------|---------------|-----------| | fx-9860GII | 256 KB | 1.5 MB | SH3 @ 29MHz| | fx-9860GIII | 1 MB | 4 MB | SH4 @ 58MHz| | fx-CG50 | 256 KB | 16 MB | ARMv7 @ 118MHz|
Use makeaddin or fxconv to inject icon.
unsigned short key; while(1) GetKey(&key); if(key == KEY_CTRL_EXE) break; casio sdk
TARGET = HELLO TYPE = G1A SOURCES = hello.c include $(CASIO_SDK)/Makefile.common
Build:
int AddIn_main(...) while(1) GetKey(&key); if(key == KEY_CTRL_LEFT) x-=2; if(key == KEY_CTRL_RIGHT) x+=2; if(key == KEY_CTRL_EXE) break; draw(); Sleep(50);
#include "fxlib.h" static unsigned short key; static int x=64, y=32; // Required for SDK compatibility #pragma section _B_GRAPH
void draw() Bdisp_AllClr_DDVRAM(); PrintXY(x, y, "*", 0); Bdisp_PutDisp_DD();
#include "fxlib.h" int AddIn_main(int isAppli, unsigned short OptionNum) unsigned short key
