I just uploaded a new version, the link is the same as on the first post.
This one implements settings (press OPTN on the landing screen to access the settings screen), which are saved in the main memory (like Minesweeper2). Use F1-F3 to change each setting.
I implemented three settings: automatically turning off after locking (comes disabled by default), showing the Casio logo when turning off (this is more to prove that it's possible not to show it; comes enabled by default), and
opening Run-Matrix after locking.
This last one is very interesting and needs more explanation. I implemented it by calling, using assembly, the syscall 0x1A03 (APP_RUNMAT). And it really works! If the setting is on, after you unlock the calc, it will immediately jump to Run-Matrix. But not the usual Run-Matrix!
This is a "special" Run-Matrix. Explained shortly, it's as if it was running inside CGlocker. When at this Run-Matrix you press Menu, you won't find the first item selected, but the CGlocker icon. And if you press Menu again, or press EXE for selecting CGlocker, instead of the "press EXE to lock(...)" you'll get on the "special Run-Matrix"!
I say it is "special" not only because of this, but because the Setup menu doesn't work (try pressing Shift+Menu and see for yourself). Conversion (OPTN-F6-F1) works right too, although it is an add-in.
I'm using the following code to call Run-Matrix from CGlocker:
Code:
__asm__(
"mov.l syscall_APP_RUNMAT, r0\n\t"
"mov.l syscall_table_branch, r2\n\t"
"jmp @r2\n\t"
"mov #1, r4\n\t"
"syscall_table_branch: .long 0x80020070\n\t"
"syscall_APP_RUNMAT: .long 0x1A03"
);
There are also syscalls for opening other menu items contained in the OS (not add-ins). I found them in the miniSDK CHM help file...