Author Topic: Debugging stuff for Prizm  (Read 5865 times)

0 Members and 1 Guest are viewing this topic.

Offline MPoupe

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 168
  • Rating: +30/-1
  • The coder of yesterday
    • View Profile
    • My web site about Casio calculator
Debugging stuff for Prizm
« 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 ;-)
« Last Edit: July 13, 2011, 03:28:53 am by MPoupe »

Offline MPoupe

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 168
  • Rating: +30/-1
  • The coder of yesterday
    • View Profile
    • My web site about Casio calculator
Re: Debugging stuff for Prizm
« Reply #1 on: July 14, 2011, 11:02:31 am »
No comment at all... :-(

Offline boot2490

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 607
  • Rating: +54/-36
    • View Profile
    • Boot2490's Stuff
Re: Debugging stuff for Prizm
« Reply #2 on: September 29, 2011, 01:34:07 pm »
Comment at all!
That looks good.
I'm not worried about SOPA creating censorship, that will not stand for long. I'm worried that they'll succeed in stopping piracy!

Spoiler For Signature, updated march 23, 11:28 PM EST:















An useful tool!

PM me if you need some help. I am glad to be of assistance and part of the TI Communnity.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Debugging stuff for Prizm
« Reply #3 on: October 07, 2011, 09:33:50 pm »
Hmm nice, I saw this before but didn't remember the thread. :)

Offline seana11

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 15
  • Rating: +4/-0
    • View Profile
Re: Debugging stuff for Prizm
« Reply #4 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?

Offline MPoupe

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 168
  • Rating: +30/-1
  • The coder of yesterday
    • View Profile
    • My web site about Casio calculator
Re: Debugging stuff for Prizm
« Reply #5 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.

Offline MPoupe

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 168
  • Rating: +30/-1
  • The coder of yesterday
    • View Profile
    • My web site about Casio calculator
Re: Debugging stuff for Prizm
« Reply #6 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 )