Author Topic: Casio Prizm documentation  (Read 235572 times)

0 Members and 3 Guests are viewing this topic.

Offline JosJuice

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1344
  • Rating: +66/-14
    • View Profile
Re: Casio Prizm documentation
« Reply #555 on: June 08, 2011, 09:01:24 am »
So it doesn't just return to the OS? That's great. I wonder if the SD Card messages were just left over from the older calcs or if the Prizm will support it O.O
And what's up with 35?

EDIT: What number does this syscall have?
« Last Edit: June 08, 2011, 09:12:08 am by JosJuice »

Offline z80man

  • Casio Traitor
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 977
  • Rating: +85/-3
    • View Profile
Re: Casio Prizm documentation
« Reply #556 on: June 08, 2011, 12:36:28 pm »
Nice find there. Those could be handy for exception handling if anyone ever uses that in programs. Good thing that they return to the program after you press exit.


Edit: BTW has anyone found which version of the MMU does the Prizm use. I've tries several different Renesas procs, but one match up in Insight.
« Last Edit: June 08, 2011, 12:47:07 pm by z80man »

List of stuff I need to do before September:
1. Finish the Emulator of the Casio Prizm (in active development)
2. Finish the the SH3 asm IDE/assembler/linker program (in active development)
3. Create a partial Java virtual machine  for the Prizm (not started)
4. Create Axe for the Prizm with an Axe legacy mode (in planning phase)
5. Develop a large set of C and asm libraries for the Prizm (some progress)
6. Create an emulator of the 83+ for the Prizm (not started)
7. Create a well polished game that showcases the ability of the Casio Prizm (not started)

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Casio Prizm documentation
« Reply #557 on: June 08, 2011, 07:58:09 pm »
C/ASM files can be a maximum of 1 MB of code and data, excluding the .g3a header.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline z80man

  • Casio Traitor
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 977
  • Rating: +85/-3
    • View Profile
Re: Casio Prizm documentation
« Reply #558 on: June 09, 2011, 10:57:09 am »
Just to mention we are making some progress with MMU. It doesn't appear to be exactly the TBL I've been looking for, but at 0x8804CF0C there is an array of physical addresses for the currently running app which in my case was Insight. The reason why this is not the real TBL is that the virtual page number and the page flags are missing. Also as a note these pages are each 64 kb. This would suggest that the Prizm maps as many 64 kb pages as needed to run an app up to 1 Mb. 

List of stuff I need to do before September:
1. Finish the Emulator of the Casio Prizm (in active development)
2. Finish the the SH3 asm IDE/assembler/linker program (in active development)
3. Create a partial Java virtual machine  for the Prizm (not started)
4. Create Axe for the Prizm with an Axe legacy mode (in planning phase)
5. Develop a large set of C and asm libraries for the Prizm (some progress)
6. Create an emulator of the 83+ for the Prizm (not started)
7. Create a well polished game that showcases the ability of the Casio Prizm (not started)

Offline SimonLothar

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 129
  • Rating: +35/-1
    • View Profile
Re: Casio Prizm documentation
« Reply #559 on: June 10, 2011, 01:05:45 pm »
BTW has anyone found which version of the MMU does the Prizm use.
As far as I saw, the Prizm's MMU register structure matches the one of the 7730.
I'll be back.

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: Casio Prizm documentation
« Reply #560 on: June 11, 2011, 03:31:55 am »
C/ASM files can be a maximum of 1 MB of code and data, excluding the .g3a header.
I'm glad it's not 8 KB like on 8xp files on the 83+

Offline SimonLothar

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 129
  • Rating: +35/-1
    • View Profile
Re: Casio Prizm documentation
« Reply #561 on: July 22, 2011, 07:10:21 am »
The following syscall may be interesting:

syscall 0x184D : unsigned char*OpCodeStrPtr( int hcode, int lcode );
Returns the pointer to an OpCode's literal ASCII-representation.
hcode 0: single-byte OpCode
hcode 1: 0x7F-two-byte OpCode
hcode 2: 0xF7-two-byte OpCode
hcode 3: 0xF9-two-byte OpCode
hcode 4: 0xE5-two-byte OpCode
hcode 5: 0xE6-two-byte OpCode
hcode 6: 0xE7-two-byte OpCode

lcode is the minor OpCode-ID

Example: OpCodeStrPtr( 0, 0x81 ) returns a pointer to "sin ".

I attached a textfile, which contains a list.
I'll be back.

Offline fxdev

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 177
  • Rating: +34/-6
    • View Profile
Re: Casio Prizm documentation
« Reply #562 on: August 02, 2011, 02:09:41 pm »
If you're using the file "keybios.h" from the fx-9860G SDK, you will notice that a few keys are missing. Well, no longer...
Code: [Select]
#define KEY_CHAR_0                  0x0030
#define KEY_CHAR_1                  0x0031
#define KEY_CHAR_2                  0x0032
#define KEY_CHAR_3                  0x0033
#define KEY_CHAR_4                  0x0034
#define KEY_CHAR_5                  0x0035
#define KEY_CHAR_6                  0x0036
#define KEY_CHAR_7                  0x0037
#define KEY_CHAR_8                  0x0038
#define KEY_CHAR_9                  0x0039
#define KEY_CHAR_DP                 0x002E
#define KEY_CHAR_EXP                0x000F
#define KEY_CHAR_PMINUS             0x0087
#define KEY_CHAR_PLUS               0x0089
#define KEY_CHAR_MINUS              0x0099
#define KEY_CHAR_MULT               0x00A9
#define KEY_CHAR_DIV                0x00B9
#define KEY_CHAR_FRAC               0x00BB
#define KEY_CHAR_LPAR               0x0028
#define KEY_CHAR_RPAR               0x0029
#define KEY_CHAR_COMMA              0x002C
#define KEY_CHAR_STORE              0x000E
#define KEY_CHAR_LOG                0x0095
#define KEY_CHAR_LN                 0x0085
#define KEY_CHAR_SIN                0x0081
#define KEY_CHAR_COS                0x0082
#define KEY_CHAR_TAN                0x0083
#define KEY_CHAR_SQUARE             0x008B
#define KEY_CHAR_POW                0x00A8
#define KEY_CHAR_IMGNRY             0x7F50
#define KEY_CHAR_LIST               0x7F51
#define KEY_CHAR_MAT                0x7F40
#define KEY_CHAR_EQUAL              0x003D
#define KEY_CHAR_PI                 0x00D0
#define KEY_CHAR_ANS                0x00C0
#define KEY_CHAR_LBRCKT             0x005B
#define KEY_CHAR_RBRCKT             0x005D
#define KEY_CHAR_LBRACE             0x007B
#define KEY_CHAR_RBRACE             0x007D
#define KEY_CHAR_CR                 0x000D
#define KEY_CHAR_CUBEROOT           0x0096
#define KEY_CHAR_RECIP              0x009B
#define KEY_CHAR_ANGLE              0x7F54
#define KEY_CHAR_EXPN10             0x00B5
#define KEY_CHAR_EXPN               0x00A5
#define KEY_CHAR_ASIN               0x0091
#define KEY_CHAR_ACOS               0x0092
#define KEY_CHAR_ATAN               0x0093
#define KEY_CHAR_ROOT               0x0086
#define KEY_CHAR_POWROOT            0x00B8
#define KEY_CHAR_SPACE              0x0020
#define KEY_CHAR_DQUOTE             0x0022
#define KEY_CHAR_VALR               0x00CD
#define KEY_CHAR_THETA              0x00CE
#define KEY_CHAR_A                  0x0041
#define KEY_CHAR_B                  0x0042
#define KEY_CHAR_C                  0x0043
#define KEY_CHAR_D                  0x0044
#define KEY_CHAR_E                  0x0045
#define KEY_CHAR_F                  0x0046
#define KEY_CHAR_G                  0x0047
#define KEY_CHAR_H                  0x0048
#define KEY_CHAR_I                  0x0049
#define KEY_CHAR_J                  0x004A
#define KEY_CHAR_K                  0x004B
#define KEY_CHAR_L                  0x004C
#define KEY_CHAR_M                  0x004D
#define KEY_CHAR_N                  0x004E
#define KEY_CHAR_O                  0x004F
#define KEY_CHAR_P                  0x0050
#define KEY_CHAR_Q                  0x0051
#define KEY_CHAR_R                  0x0052
#define KEY_CHAR_S                  0x0053
#define KEY_CHAR_T                  0x0054
#define KEY_CHAR_U                  0x0055
#define KEY_CHAR_V                  0x0056
#define KEY_CHAR_W                  0x0057
#define KEY_CHAR_X                  0x0058
#define KEY_CHAR_Y                  0x0059
#define KEY_CHAR_Z                  0x005A

#define KEY_CTRL_NOP                0x0000
#define KEY_CTRL_EXE                0x7534
#define KEY_CTRL_DEL                0x7549
#define KEY_CTRL_AC                 0x753F
#define KEY_CTRL_FD                 0x755E
#define KEY_CTRL_XTT                0x7531
#define KEY_CTRL_EXIT               0x7532
#define KEY_CTRL_SHIFT              0x7536
#define KEY_CTRL_ALPHA              0x7537
#define KEY_CTRL_OPTN               0x7538
#define KEY_CTRL_VARS               0x7540
#define KEY_CTRL_UP                 0x7542
#define KEY_CTRL_DOWN               0x7547
#define KEY_CTRL_LEFT               0x7544
#define KEY_CTRL_RIGHT              0x7545
#define KEY_CTRL_F1                 0x7539
#define KEY_CTRL_F2                 0x753A
#define KEY_CTRL_F3                 0x753B
#define KEY_CTRL_F4                 0x753C
#define KEY_CTRL_F5                 0x753D
#define KEY_CTRL_F6                 0x753E
#define KEY_CTRL_CATALOG            0x7594
#define KEY_CTRL_FORMAT             0x7595
#define KEY_CTRL_CAPTURE            0x7567
#define KEY_CTRL_CLIP               0x7562
#define KEY_CTRL_PASTE              0x7554
#define KEY_CTRL_SELUP              0x7559
#define KEY_CTRL_SELDOWN            0x755C
#define KEY_CTRL_SELLEFT            0x755A
#define KEY_CTRL_SELRIGHT           0x755B
#define KEY_CTRL_COPY               0x7553
#define KEY_CTRL_CUT                0x7563
#define KEY_CTRL_INS                0x7551
#define KEY_CTRL_UNDO               0x755D
#define KEY_CTRL_MIXEDFRAC          0x7566
#define KEY_CTRL_FRACCNVRT          0x754A
#define KEY_CTRL_QUIT               0x754D
#define KEY_CTRL_LIGHT              0x756B
#define KEY_CTRL_PRGM               0x754C
#define KEY_CTRL_SETUP              0x7555
#define KEY_CTRL_HOME               0x756E
#define KEY_CTRL_END                0x756F
#define KEY_CTRL_PAGEUP             0x7564
#define KEY_CTRL_PAGEDOWN           0x7565
#define KEY_CTRL_MENU               0x7533

Added keys:
Code: [Select]
#define KEY_CTRL_FORMAT             0x7595 // SHIFT+5
#define KEY_CTRL_LIGHT              0x756B // SHIFT+OPTN (Not used by the Prizm OS)
#define KEY_CTRL_UNDO               0x755D // ALPHA+DEL
#define KEY_CTRL_HOME               0x756E // SHIFT+CURSOR_LEFT
#define KEY_CTRL_END                0x756F // SHIFT+CURSOR_RIGHT
#define KEY_CTRL_SELUP              0x7559 // Cursor keys for...
#define KEY_CTRL_SELDOWN            0x755C // ...block selection...
#define KEY_CTRL_SELLEFT            0x755A // ...when clip mode...
#define KEY_CTRL_SELRIGHT           0x755B // ...is enabled.
#define KEY_CTRL_COPY               0x7553 // F1 (clip mode)
#define KEY_CTRL_CUT                0x7563 // F2 (clip mode)

Changed keys:
Code: [Select]
#define KEY_CHAR_DQUOTE             0x0022 // Before: KEY_CHAR_DQUATE
Btw, 0x756A starts the connection wizard and 0x7D00 the test menu. Both cannot be entered normally.
« Last Edit: August 19, 2011, 04:59:44 am by cfxm »

Offline SimonLothar

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 129
  • Rating: +35/-1
    • View Profile
Re: Casio Prizm documentation
« Reply #563 on: August 03, 2011, 03:29:40 am »
The Prizm's LCD controller:
the renesas R61509 register pattern is a subset of the Prizm LCD controller's register set. On receiving a "Device code read (R000h)", the controller identifies itself as "renesas R61524", a manual of which could not be found yet. Moreover the term "renesas R61524" not even gives any response on the web. I fear this one is customized again. Luckily the manual of the renesas R61509 is available and covers most aspects of the Prizm LCD controller. Though, the R61509 has no backlight support. Hence some registers (f. i. h'5A1 or h'5A2) are not covered in the R61509 documentation. The renesas R61517 is a type with backlight control and would fit better. The are a lot of responses on the web, when "renesas R61517" is queried. :D But I could not find a manual yet. :(
« Last Edit: August 03, 2011, 04:42:42 am by SimonLothar »
I'll be back.

Offline z80man

  • Casio Traitor
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 977
  • Rating: +85/-3
    • View Profile
Re: Casio Prizm documentation
« Reply #564 on: August 04, 2011, 01:22:06 am »
Here is the manual that I've found for the r61509. it is quite complex but a lot of the information does not pertain to the Prizm so we can narrow it down. Hopefully we can get write our own simple driver soon and then we can start working on a high speed one to replace the normal syscalls.

List of stuff I need to do before September:
1. Finish the Emulator of the Casio Prizm (in active development)
2. Finish the the SH3 asm IDE/assembler/linker program (in active development)
3. Create a partial Java virtual machine  for the Prizm (not started)
4. Create Axe for the Prizm with an Axe legacy mode (in planning phase)
5. Develop a large set of C and asm libraries for the Prizm (some progress)
6. Create an emulator of the 83+ for the Prizm (not started)
7. Create a well polished game that showcases the ability of the Casio Prizm (not started)

Offline fxdev

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 177
  • Rating: +34/-6
    • View Profile
Re: Casio Prizm documentation
« Reply #565 on: August 04, 2011, 10:38:43 am »
« Last Edit: August 05, 2011, 05:53:55 am by cfxm »

Offline SimonLothar

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 129
  • Rating: +35/-1
    • View Profile
Re: Casio Prizm documentation
« Reply #566 on: August 04, 2011, 12:51:28 pm »
A few more datasheets: http://www.trulydisplays.com/tft/index.html
The R61526 and R61580 have a backlight control unit.
These findings give additional clues to understand the LCD controller of the Prizm.
The R61526 and the R61581 are completely new developments (2010). Their register patterns do not fit.
Though, the manuals could help to understand the way of modern LCD controllers.
The R65180 and the R61505 are intermediate developments (2009).
Their register numbers are a bit different to these of the R61509 (R61524), but the register descriptions match
and "used bits patterns" match too (especially in case of the gamma-control registers).
I'll be back.

Offline z80man

  • Casio Traitor
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 977
  • Rating: +85/-3
    • View Profile
Re: Casio Prizm documentation
« Reply #567 on: August 19, 2011, 02:09:52 am »
I found what appears to be the backup display ram for when the Prizm is in the menu and an app is paused. That location is from 0x880a2ad6 to 0x880cbd26. If you check from insight there is a screen bitmap in that block that corresponds to the currently running app. Currently I can not find any OS references to those addresses so it is not yet safe to use that space as other OS versions may use a different address

List of stuff I need to do before September:
1. Finish the Emulator of the Casio Prizm (in active development)
2. Finish the the SH3 asm IDE/assembler/linker program (in active development)
3. Create a partial Java virtual machine  for the Prizm (not started)
4. Create Axe for the Prizm with an Axe legacy mode (in planning phase)
5. Develop a large set of C and asm libraries for the Prizm (some progress)
6. Create an emulator of the 83+ for the Prizm (not started)
7. Create a well polished game that showcases the ability of the Casio Prizm (not started)

Offline MPoupe

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 168
  • Rating: +30/-1
  • The coder of yesterday
    • View Profile
    • My web site about Casio calculator
Re: Casio Prizm documentation
« Reply #568 on: August 19, 2011, 04:29:26 am »
I found what appears to be the backup display ram for when the Prizm is in the menu and an app is paused. That location is from 0x880a2ad6 to 0x880cbd26. If you check from insight there is a screen bitmap in that block that corresponds to the currently running app. Currently I can not find any OS references to those addresses so it is not yet safe to use that space as other OS versions may use a different address

Simon already documented this memory in his super manual (part of his mini SDK):
syscall 0x1E62 : void SaveVRAM_1( void );
saves the VRAM to 0x880A2AD5; the buffer seems to be used while process-switching with the MENU-key.

And I used it in my jpeg variant of video player (I need all RAM I could find:-) )

Offline z80man

  • Casio Traitor
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 977
  • Rating: +85/-3
    • View Profile
Re: Casio Prizm documentation
« Reply #569 on: August 19, 2011, 10:00:15 am »
It seems odd that Casio would use an odd number for the address of the saved vram because that means memory transfers can only be done 1 byte at a time meaning it is x4 slower than transfers that use longwords

List of stuff I need to do before September:
1. Finish the Emulator of the Casio Prizm (in active development)
2. Finish the the SH3 asm IDE/assembler/linker program (in active development)
3. Create a partial Java virtual machine  for the Prizm (not started)
4. Create Axe for the Prizm with an Axe legacy mode (in planning phase)
5. Develop a large set of C and asm libraries for the Prizm (some progress)
6. Create an emulator of the 83+ for the Prizm (not started)
7. Create a well polished game that showcases the ability of the Casio Prizm (not started)