ExistOS-Team / giac_xcas-for-39gii

0 stars 1 forks source link

khicas code updates #2

Open parisseb opened 1 year ago

parisseb commented 1 year ago

You will find code updates for the khicas subdirectory on my web page https://www-fourier.univ-grenoble-alpes.fr/~parisse/hp39gii/giac39.tgz Untar the archive in your khicas subdirectory and recompile. This archive assumes that DISPBOX order is left, right, top, bottom (cf. issue 1).

I'm using tar archives because I'm not comfortable enough with git and I don't want to make errors using a tool I don't master. Sorry for the inconvenience ... that should not really be a problem since I work alone on my side.

Current status: I have fixed some shell and expressions editor quirks, it should be much more usable now. I will add function graphs/parametrice plots tracemode soon. Check the archive from time to time to get the best of KhiCAS.

yuuki410 commented 1 year ago

When using the source from https://www-fourier.univ-grenoble-alpes.fr/~parisse/hp39gii/giac39.tgz:

yuuki410@yuuki-laptop:~/giac_xcas-for-39gii/khicas (git)-[main] % make
arm-none-eabi-g++ -Os -mtune=arm926ej-s -mcpu=arm926ej-s -mlittle-endian -mfloat-abi=soft -mthumb -std=c++11  -fpermissive -fno-use-cxa-atexit -fno-strict-aliasing -fno-rtti -fno-exceptions -DHAVE_CONFIG_H -I../libtommath-0.39 -I. -ffunction-sections -fdata-sections -Werror=reorder -c kglobal.cc
In file included from kglobal.cc:2531:
static_lexer_.h: In function 'int giac::find_or_make_symbol(const string&, giac::gen&, void*, bool, const giac::context*)':
static_lexer_.h:19:1: error: 'at_addr' was not declared in this scope; did you mean 'at_add'?
   19 | at_addr,
      | ^~~~~~~
      | at_add
make: *** [Makefile:38: kglobal.o] Error 1
2 yuuki410@yuuki-laptop:~/giac_xcas-for-39gii/khicas (git)-[main] %   

Is that a typo mistake?

After comment this line it will work well.

parisseb commented 1 year ago

Hi, It's a new command that gives the memory address of a KhiCAS object (like id in Python). The implementation was indeed missing, should be fixed now. I have included in the archive a README explaining which files I changed outside of the KhiCAS directory. The main change is in kcasporing.c/.h where I added support for 1 bit per pixel screen buffer (instead of 8), this spares 28K of RAM and that much swapping, integrate(1/(x^4+1)) is now 0.94 second (default CPU config). There are changes in the configuration in order to increase ROM base size, this is necessray if we want a full KhiCAS port on the 39gii, that is with full set of CAS commands, spreadsheet, geometry, ..., like on the Casio FXCG50, it's not possible on the Casio monochrom because Casio addins are limited to 2Mo and there is no space left on the flash.

The up to date version of the giac39.tgz source archive has a visible changes: the fontsize in the shell is now 16 instead of 12, it was not readable enough for my eyes on the calculator. In the programming editor you can select 16 or 12 fontsize. The function plotter (e.g. plot(sin(x))) has now tracemode included and can show a table of values (F2 then F1). I also fixed many small UI quirks, there are still some quirks, some of them with numerics where I suspect endianness problems.

parisseb commented 1 year ago

New version, I have included a 7x14 font in kcasporing_gl.c, and set the shell fontsize to 14.