Author Topic: Casio Prizm documentation  (Read 240159 times)

0 Members and 2 Guests are viewing this topic.

Offline z80man

  • Casio Traitor
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 977
  • Rating: +85/-3
    • View Profile
Re: Casio Prizm documentation
« Reply #270 on: January 21, 2011, 03:18:13 pm »
You'll have to wait for z80's work before anyone can write screen stuff. Speaking of Z80, I came upon some evidence that the OS naturally runs in 58 MHz mode. It's either that or the program crashed before writing to FRQCR or the OS switches to normal speed every time it exits the application, both of which I think are unlikely.

Yes, I was trying to overclock my Prizm :P

I'm just finishing up the screen program right now. If all goes well it shouls draw a couple of blue lines on the screen. Also I would agree the OS runs at 58 MHz. When I ran a looping program I expected it to take about 30 seconds, but instead it finised in 15.
@Qwerty, The program that I ran didn't cause a ram reset, but it still sent me to the select language menu. Is that what happened to you.

Edit: Finished my display program. Programming in SH3 hex is hard  :P Anyway I did not get blue lines on the screen. This program tested from B4000000 to B5000000. I could test other ranges, but I need ideas. The source and g3a app are inclided Note: This program can only test 16 megabyte ranges at a time. Double note: There is a 4 gigabyte range the lcd ram could be in. Triple note: I could modify it to check larger ranges, but that would require effort  :P also I don't to mess up my memory.
Code: [Select]
00007000: MOV.L @($0B*4+PC),R15 = #B40000A0
00007002: MOV.L @($0D*4+PC),R14 = #00007777
00007004: MOV $-1, R13
00007006: MOV.L @($0D*4+PC),R12 = #0000FFFF
00007008: NOP
0000700A: NOP
0000700C: MOV.W R14,@-R15
0000700E: MOV.W R14,@-R15
00007010: MOV.W R14,@-R15
00007012: MOV.W R14,@-R15
00007014: MOV.W R14,@-R15
00007016: MOV.W R14,@-R15
00007018: MOV.W R14,@-R15
0000701A: MOV.W R14,@-R15
0000701C: MOV.W R14,@-R15
0000701E: MOV.W R14,@-R15
00007020: ADD R12,R15
00007022: DT R13
00007024: BF $700C
00007026: DT R15
00007028: BF $7026
0000702A: RTS
0000702C: 0000 ?
0000702E: 0000 ?
00007030: .data b40000a0 dword ref:7000
00007034: 0000 ?
00007036: 0000 ?
00007038: .data 00007777 dword ref:7002
0000703C: .data 0000ffff dword ref:7006
Double edit: This program is location independant, meaning it can be ran anywhere in ram with the jump statements still working.
« Last Edit: January 21, 2011, 04:58:51 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 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 #271 on: January 24, 2011, 03:14:40 pm »
You'll have to wait for z80's work before anyone can write screen stuff. Speaking of Z80, I came upon some evidence that the OS naturally runs in 58 MHz mode. It's either that or the program crashed before writing to FRQCR or the OS switches to normal speed every time it exits the application, both of which I think are unlikely.

Yes, I was trying to overclock my Prizm :P

Yeah it seems that it runs at 58 MHz, according to stuff I read here and from other places. Even uberspire/kucalc mentions the calc runs at 58 MHz. It makes BASIC look even slower. X.x (It reminds me the AFX series, kinda)

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 #272 on: January 24, 2011, 03:32:00 pm »
I'm just finishing up the screen program right now. If all goes well it shouls draw a couple of blue lines on the screen. Also I would agree the OS runs at 58 MHz. When I ran a looping program I expected it to take about 30 seconds, but instead it finised in 15.
@Qwerty, The program that I ran didn't cause a ram reset, but it still sent me to the select language menu. Is that what happened to you.

Edit: Finished my display program. Programming in SH3 hex is hard  :P Anyway I did not get blue lines on the screen. This program tested from B4000000 to B5000000. I could test other ranges, but I need ideas.

...

My checksums were off by 0x0002h  <_<

Anyway, stay away from the 0xA000...  and 0x8000... ranges. Those are where the boot code and the OS are located respectively.
« Last Edit: January 24, 2011, 03:32:23 pm by Qwerty.55 »
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline bsl

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 157
  • Rating: +14/-0
    • View Profile
Re: Casio Prizm documentation
« Reply #273 on: January 24, 2011, 04:19:26 pm »
Try putting NOP's after branch instructions so that the program runs as expected:

00007020: ADD R12,R15
00007022: DT R13
00007024: nop
00007026: BF $700C
00007028: nop
0000702a: DT R15
0000702c: nop
0000702e: BF $702A
00007030: nop
00007022: RTS
00007024: nop
00007026: 0000 ?
00007028: 0000 ?

The instruction right after rts, bf,... is typically executed first.
So recode and recalc the checksum.

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Casio Prizm documentation
« Reply #274 on: January 24, 2011, 04:58:27 pm »
Hmm, there are a couple of errors you made in your thinking though. DT is not a branch instruction, and conditional branches only execute the following instruction if the BF/S or BT/S variants are used. You are correct about needing something after the RTS, though.
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline z80man

  • Casio Traitor
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 977
  • Rating: +85/-3
    • View Profile
Re: Casio Prizm documentation
« Reply #275 on: January 25, 2011, 01:18:39 am »
Hmm, there are a couple of errors you made in your thinking though. DT is not a branch instruction, and conditional branches only execute the following instruction if the BF/S or BT/S variants are used. You are correct about needing something after the RTS, though.
I didn't know that nop was a delayed branch instruction. I'll edit the code and see if i get anthing different. The $B4000000 was where the lcd ram for the fx 9860 was located so I thought I would start there.

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 #276 on: January 25, 2011, 01:21:14 am »
It isn't  ;)

NOP stands for no operation. When the branches are delayed, the next instruction in the pipeline is executed to avoid as many pipeline errors as possible. The NOP simply doesn't do anything. You could use any instruction in that slot except for another branch or PC dependent instruction and the results would be the same.
∂²Ψ    -(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 #277 on: January 25, 2011, 01:32:47 am »
It isn't  ;)

NOP stands for no operation. When the branches are delayed, the next instruction in the pipeline is executed to avoid as many pipeline errors as possible. The NOP simply doesn't do anything. You could use any instruction in that slot except for another branch or PC dependent instruction and the results would be the same.
Oh, I meant to say I didn't know rts is a delayed branch instruction. Therefore I should probaly place a nop after it.

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 jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: Casio Prizm documentation
« Reply #278 on: January 25, 2011, 07:35:01 am »
If we know the format of the color in the screens, why not just search for a section of color, instead of writing over bytes and possibly screwing up your memory.

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 #279 on: January 25, 2011, 11:19:55 am »
The memory is filled with a ton of "FF FF" words and that happens to be the very color the screen is changed to in order for apps to run. It'd be similar to looking for a needle in a pile of needles.
« Last Edit: January 25, 2011, 11:20:22 am by Qwerty.55 »
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Casio Prizm documentation
« Reply #280 on: January 25, 2011, 12:16:17 pm »
It'd be similar to looking for a needle in a pile of needles.

Found one!  :w00t:
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline z80man

  • Casio Traitor
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 977
  • Rating: +85/-3
    • View Profile
Re: Casio Prizm documentation
« Reply #281 on: January 25, 2011, 10:06:04 pm »
But it seems like there is an OS call that does a lot of that  app iniatilazation stuff such as menu bar and run indicator. If we have the call in the code then we could look for the proper memory contents.

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 #282 on: January 25, 2011, 10:21:55 pm »
Remember that we don't have access to the physical memory and the call's code is probably located with the rest of the OS functions in physical memory.
∂²Ψ    -(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 #283 on: January 25, 2011, 10:25:56 pm »
Remember that we don't have access to the physical memory and the call's code is probably located with the rest of the OS functions in physical memory.
We don't have access to physical memory? Does the proc through an exception or something if you try to access it in a program.

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 #284 on: January 25, 2011, 10:27:04 pm »
No, from what I'm aware, nothing can access it aside from the OS. I'll have to check again though to be sure.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ