Calculator Community > Casio Calculators

Compiling stuff for Prizm

(1/20) > >>

Kristaba:
Hey guys :)
I saw nobody here posted a real tutorial about how to build stuff for SH3 (and later for Prizm itself) :(

Simon Lothar and Andreas Bertheussen, two casio hacker, made some years ago a good reverse engineering of fx9860 calculator, and they wrote some tools
for, and some informations about how to use GCC to make G1A Addin :
http://sourceforge.net/apps/trac/fxsdk/wiki/UsingGCC

I advise you to subscribe and download the Kpit GNU tools (most recent and up-to-date) at http://www.kpitgnutools.com/index.php
They have a strange policy : they allow to download freely the code (because GCC is under GNU GPL license of course ::) ) but you need to subscribe to download the binaries, so I think it could be a good thing to distribute ourselves the binaries from their source in the future...

The link I give is about fx9860, so they are some thing to do before use this for the Prizm :
* In addin.ld change "rom  : o = 0x00300200" by "rom  : o = 0x00300000"
* crt.s need to be modified (we need to to do a reverse-engineering on the Prizm initilization code)
* a g3a wrapper

Edit :
Okay, so I disassembled Converter addin this morning (downloaded on casio.edu) to try to isolate the init stuff.
The complete disassembled sources (all conv.g3a), with only some labels to understand more the code (because 200 lines of assembly without any label to indicate constant values, loops and functions is really hard to read) is here http://pastebin.com/xT8XNAhH

I rewrote the code that seems to be the init stuff, and as I expected it's very similar to the fx9860 crt0.s written by SimLo and/or Andreas, but it seems call only _GLibAddinAplExecutionCheck after the ram is initialized, and immediately jump to _main...
So it's either the Prizm OS does a part of the initialization that was did by the addin code in fx9860 OS, or a part of the Converter code I thought it's the "_main" code is in fact init code.
Maybe Simon Lothar already isolate the init stuff, so, if you see this, please say what you think about that...
crt0.s : http://pastebin.com/ccE3NPhZ
my addin.ld : http://pastebin.com/YMrdDHWS

(and really sorry for my poor english ;D)

JosJuice:
Great! I can't really check this out now, since I don't have a Prizm yet... But it certainly does look nice. Is this mostly for assembly, or is it for C?


--- Quote from: Kristaba on February 15, 2011, 08:43:56 am ---* In addin.ld change "rom  : o = 0x00300200" by "rom  : o = 0x00300000"

--- End quote ---
Shouldn't this be 0x00307000 on the Prizm?

Kristaba:

--- Quote from: JosJuice on February 15, 2011, 09:31:41 am ---Great! I can't really check this out now, since I don't have a Prizm yet... But it certainly does look nice. Is this mostly for assembly, or is it for C?


--- Quote from: Kristaba on February 15, 2011, 08:43:56 am ---* In addin.ld change "rom  : o = 0x00300200" by "rom  : o = 0x00300000"

--- End quote ---
Shouldn't this be 0x00307000 on the Prizm?

--- End quote ---

Yeah, I know the problem because I haven't my one yet too :/
It's a fully GCC so you can compile a lot of languages, mainly asm and C, but also C++ (with some change to remove the runtime), Ada, Fortan, etc...

And no, it seems Prizm set the MMU to 0x300000 as the first code address (Andreas wrote this in Casio Kingdom same days ago)

Edit 02/16/11 :
First post updated

DJ Omnimaga:
Hmm nice, hopefully this could be useful, since both calcs are similar processor-wise.

SimonLothar:
I attached the current version of insight (see directory projects\insight\insight.g3a). The source and the tools to build the g3a are included, too. Only one exception: the BIN-directory of the legacy CASIO fx-9860 SDK, which is needed, is not included.

EDIT:
New version: http://ourl.ca/9205/182330
version 1.01 removed.

Navigation

[0] Message Index

[#] Next page

Go to full version