ExistOS-Team / ExistOS-For-HP39GII

GNU General Public License v3.0
198 stars 42 forks source link

Where are the sources and makefile to build this KhiCAS port? #80

Open parisseb opened 1 year ago

parisseb commented 1 year ago

Libs/libgiac*.libcpp or Libs/libkcasgui.libcpp are binaries, but I can't find a way to build them for ExistOS. It would be nice if I could build myself from sources, I have indeed made some recent improvements in the KhiCAS GUI, like functions graph tracemode.

parisseb commented 1 year ago

I know that, since I'm the author of KhiCAS:-) I need the additional build files specific to the hp39gii build : config.h (with the defines you are using), Makefile(s) ... So that I can compile myself (without headache) new versions of KhiCAS for the ExistOS, and perhaps I can improve the configuration to match the configuration of giac that is used for the stock firmware (I must check with the non public CAS HP39gii firmware, if my recollection is correct, ExistOS is significantly slower for commands like integrate(1/(x^4+1)). BTW, this is a requirement of the GPL :-)

parisseb commented 1 year ago

Just to make things clear: your team has made a wonderful job, congratulations! I'd just like to make it better!

Repeerc commented 1 year ago

The sources of libgiac* has been uploaded to this repository: https://github.com/ExistOS-Team/giac_xcas-for-39gii

libcas.libcpp and libkcasgui.libcpp are built from khicas (modified from giac35 for Fx-9860GIII) and is now being used by the current system. (libcas_full_stdout.libcpp seems to be enable -Og and put more printf info for debug, now is no longer used)

libgiac1.2.0.libcpp and libgiac1.4.9.libcpp are not used in the current system version, and were replaced with giac35 after lag was found during system testing in the early development phase (this calculator physical directly addressable memory is too small, codes and datas need to be swapped from flash frequently), but the binaries are still left in the project (We intend to remove the binaries.)

Most of us uses Windows environment for simple function development, and these sources need the Linux environment to build, so I pre-compiled these source codes under Linux and export Binary libraries for easy download and compilation.I apologize for the delay in opening the source code.

parisseb commented 1 year ago

Great! Thanks for your reactivity! In fact it's a good idea to have precompiled libraries for KhiCAS in ExistOS because that way I can work on my side on KhiCAS and you on your side and we can easily join our improvements. I will check how you compiled in the next days (I don't have my 39gii with me right now). I see a potential problem with endianness by starting from the Casio port of KhiCAS, for some predefined constants like sin(pi/3), otherwise the configuration seems to be right. It's perhaps possible to decrease a little bit the size of the code using flto optimizations flags (if compatible with thumb mode?). FYI, I worked in collaboration with HP on the 39gii, giac was the computation kernel of the first versions of the hp39gii, therefore I understand very well that the code should be as local and compact as possible, otherwise it becomes much slower. The giac CAS was never exposed to the user by HP, because it is not allowed during tests in some countries, and that was a big frustration for me, that's why I'm very happy to see KhiCAS running now on the hp39gii (I have my own CAS firmware on the 39gii but I can't publish it...)