Omnimaga

Calculator Community => Casio Calculators => Topic started by: MPoupe on July 11, 2011, 07:48:20 am

Title: Debugging stuff for Prizm
Post by: MPoupe on July 11, 2011, 07:48:20 am
Hello,
you already know, that it is very hard to debug an application for Casio cg 10/20 (Prizm).
We have 3 SDKs, but no debugger :-(
I would like to introduce you simple, but usable idea - workaround. One can write calculator's simulator - not the complete emulator, but just reimplementation of important syscalls to another platform, where debugger is available. I did a try and this is a result.
I created a tiny enviroment, with console window (for debug messages), display window and a keyboard window. This environment should simulate calculator's behavior. Now I have display (draw to VRAM and then call Bdisp_PutDisp_DD()), keyboard (only PRGM_GetKey() yet) and few another syscalls.

Please extract the attachment,try the puzzle.exe and puzzle.g3a (simple game) and tell me, what do you think about this. I can boast - I needed only 1 rebuild for Prizm platform, all bugs (except the last :-) )were debugged on this environment.

Few notes to the game - it is a simple puzzle, one has to move numbers to get them in the correct order. Numbers on correct position are green, red otherwise. Use arrows to move number box to the wished direction. The game will not quit after success, it is in very early stage.

Few notes to the simulator - to press key, click on it on the keyboard window. Computer keyboard is ignored (in this version). The display doesn't refresh when the display window is hidden and then restored. Right-click on it twice will workaround it. Image of the keyboard (tastatur.bmp) must be in the same folder as the simulator.
BTW: right click on the display switches zoom of the display between 1x and 2x

Sorry, but I did not attach the source code, it is really mess now. Needs some time yet ;-)
Title: Re: Debugging stuff for Prizm
Post by: MPoupe on July 14, 2011, 11:02:31 am
No comment at all... :-(
Title: Re: Debugging stuff for Prizm
Post by: boot2490 on September 29, 2011, 01:34:07 pm
Comment at all!
That looks good.
Title: Re: Debugging stuff for Prizm
Post by: DJ Omnimaga on October 07, 2011, 09:33:50 pm
Hmm nice, I saw this before but didn't remember the thread. :)
Title: Re: Debugging stuff for Prizm
Post by: seana11 on July 22, 2012, 07:12:40 pm
That's really cool; do you have a list of all syscalls that are implemented?  Will there be a linux port?
Title: Re: Debugging stuff for Prizm
Post by: MPoupe on July 23, 2012, 09:38:26 am
That's really cool; do you have a list of all syscalls that are implemented?  Will there be a linux port?
Look in the header for the syscall list.
Currently I debug in Visual Studio, it is much comfortable than in gdb. I tried Eclipse, but it seems Eclipse is not compatible with me :-)
So currently I do not plan to port it to Linux, but is should be easy.
Title: Re: Debugging stuff for Prizm
Post by: MPoupe on July 23, 2012, 12:42:11 pm
Quick note:
I released the simulator sources with cgplayer (at http://martin.poupe.org/casio/cgplayer/index.html )