Jump to content



Photo
- - - - -

New Very Powerful Cas For Fx9860Gii !


  • Please log in to reply
6 replies to this topic

#1 scientifix

scientifix

    Casio Addict

  • Members
  • PipPipPip
  • 78 posts

  • Calculators:
    fx9860gII

Posted 06 April 2013 - 11:06 AM

Hi everyone,
I found all the source code of the HP49 CAS, It was written in C language !!!
You can have all the sources at this link http://www.hpcalc.or.../casrelease.zip
And we could be able to copy paste the code and make a great CAS for the fx9860gII Calculators !!
It would be great !
scientificus

#2 Karan901

Karan901

    Casio Addict

  • Members
  • PipPipPip
  • 71 posts

  • Calculators:
    Fx-9860GII

Posted 06 April 2013 - 11:48 AM

Would love to see this, i don't know very much about these calculators but would like to see it in a g1e if someone could do this.

#3 3298

3298

    Casio Addict

  • Members
  • PipPipPip
  • 79 posts
  • Gender:Male
  • Location:Germany

  • Calculators:
    fx-9750G Plus
    Algebra FX 2.0 (ROM 1.03,broken)
    HP 50G

Posted 06 April 2013 - 05:55 PM

No, the CAS is written in SysRPL. (I decompiled parts of it with the on-calc decompiler to learn some RPL tricks, so I know what I'm saying.) The four .c files you see in the archive are some tools on the PC used for compiling the CAS. Look into the subdirectories of the archive you linked - lots of .s and .h there containing SysRPL code. The HP 48/49/50 series did never contain any C code. (Except for the HPGCC3 libraries, but that's a third-party patch the user has to compile himself and not part of the official OS.)
So you can only copy-paste the CAS if you port the RPL environment first. Good look with that, it's nearly impossible because it heavily depends on the Saturn CPU. (That's why the ARM-based 48GII, 49G+ and 50G calculators run a Saturn emulator.)

#4 MicroPro

MicroPro

    Casio Overlord

  • Deputy
  • PipPipPipPipPipPipPip
  • 640 posts
  • Gender:Male
  • Location:Iran

  • Calculators:
    Casio ClassPad 300

Posted 07 April 2013 - 02:21 PM

The fact that they rely on the saturn processor is normal, it should be possible to emulate its instruction set. What is about it that makes it hard? (Are the .s files saturn assembler files, or a kind of "high-level" assembly language?)

Aren't open source saturn virtual machines, SysRPL compilers or SysRPL-to-C convertors already out there?

Hey, I know it's HUGE work to emulate an environment. :greengrin:

#5 scientifix

scientifix

    Casio Addict

  • Members
  • PipPipPip
  • 78 posts

  • Calculators:
    fx9860gII

Posted 07 April 2013 - 03:48 PM

could someone try to make this CAS ?
It would be great for all of us !

#6 3298

3298

    Casio Addict

  • Members
  • PipPipPip
  • 79 posts
  • Gender:Male
  • Location:Germany

  • Calculators:
    fx-9750G Plus
    Algebra FX 2.0 (ROM 1.03,broken)
    HP 50G

Posted 07 April 2013 - 09:11 PM

Sorry for that lengthy post, explanations just take some space. ;)

MicroPro:
Okay, emulating the Saturn on the Casio calculators might be an option (probably the only option) given the fact that the ARM in the newer calculators has an emulator running on it, and it's clocked at 75 MHz, so not much faster than the 9860. But there are some problems:
- The existing emulator on the ARM does not care about the memory-mapped I/O that happens in the Saturn environment. It just maps it to the corresponding zone in the ARM address space. On the 9860 this is not possible because the hardware is completely different. I expect a performance impact from emulating the hardware as well, and I doubt the 9860 has enough processing power to handle that.
- What do we do with the 9860's smaller screen? What about the infrared port or the (rarely used) overhead projector part of the serial port? How do we map the 9860's keys to the 50G's keys?
- Does the whole thing even fit into the 9860's memory? Cutting out the parts not used for the by the CAS is difficult because _everything_ in the calculator uses absolute addresses. You would create some holes here and there, but if you want to move stuff around to fill the holes, you pretty much have to rewrite it.

There are three or four open source Saturn emulators for the PC and similarly powerful systems, two of them by HP. The one on the 50G might be based on these (just guessing), but hpcalc.org has a recommendation for Emu48 (which is not by HP) in the description of the HP emulator running on the PC. I have no idea how hard it is to adapt one of them for the 9860.

SysRPL compilers? Yes, there are two on-calc (MASD and Jazz) in addition to the normal UserRPL compiler, and there is something in the Debug4x SDK (I believe it's a PC edition of MASD, but don't quote me on that). But they produce something which just runs in the RPL environment.

Problems with porting RPL ... that needs a rough explanation of how it works on the HP calculators:
RPL is a concatenative programming language, so compiling is mostly just usage of a lookup table. In this lookup table (it's called extable) the command names are associated with addresses. These addresses are stored in the compiled RPL code - it's basically a list of addresses (i.e. subroutine calls) and objects (numbers in many different formats, lists, arrays, RPL programs, ASM code objects, ...)
So the existing RPL compilers won't really help you. What you need is something which converts RPL to ASM or C or <insert language running on 9860 here>, which does not exist. :(
This use of absolute addresses is a major difficulty with porting RPL (just the runtime environment, without a Saturn emulator) to the 9860 (or any other calculator). As far as I know, the code of 9860 add-ins is not guaranteed to be at the exact same location all the time. So you can't use the existing system at all. Alternatives? I don't see any, because the compiler can't be a big thing running on the PC only: Entering any expressions invokes the UserRPL compiler.
Also, lots of Saturn ASM are scattered all over the place, they would need a rewrite without an emulator. If you understand what they are supposed to do in the first place.
A=DAT1 A
D1+5
PC=(A)
Find out what this does and you did your first step in Saturn ASM.

The .s files are RPL source. Just open them in a text editor to see what RPL looks like. For example: In the archive linked above, open CASrelease/ROM/CAS/build.s and look through it. The first ASM snippet (SYMBINCOMP) is around lines 90-100 and explodes a symbolic object into its components, the 2LAMBIND and 3LAMBIND above it are short RPL code pieces. They bind objects to lambdas (=local variables) without names ("nulllams"; they are accessed with an index instead of a name). Would you get what they do without this explanation and the comments above them? I guess not, because if I hadn't played with my 50G for a year and a half already, I wouldn't either.

scientifix:
I will definitely not attempt to port it because 1. it is way too difficult (the HP and Casio calculators are less compatible than your PC and your smartphone), 2. I do not have a 9860 and 3. I have a 50G already equipped with it.

Edited by 3298, 11 April 2013 - 04:12 PM.


#7 scientifix

scientifix

    Casio Addict

  • Members
  • PipPipPip
  • 78 posts

  • Calculators:
    fx9860gII

Posted 24 April 2013 - 05:19 PM

http://www.vroomlab.com/nhome/
good CAS




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users