03-04-2019, 02:05 PM
I finaly got an HP Prime G2 from Germany last Thursday.
So to test it a bit I wrote a first draft of an HP41 emulator...
See : HPP41v0
This is a first draft. Only direct key usable in PRIME USER key mode.
I have no idea to deal with 'shift' and 'alpha' ... we can not redefine them in USER mode, and I prefer to avoid a 'loop'. Actually, a normal 41 do like this too, waiting key press to start cpu again. 4 5 SIN seems ok .... Silly me : a simple K:=WAIT will do the trick I hope and without USER mode (no high cpu use in waiting ?) now a v1 with shift & alpha
It reset at each 'start'. About the speed, it is a bit slower than a real 41, same speed as the first C version on a TI83PCE. An ASM version on a TI83PCE is now 5 time faster than a real 41CX (with the time hardware emulated and bank-swapping).
There are certainly some bugs left (ie Lcd prog does not 'left align' the name of a function when pressed as a real 41 does). Feel free to look at code and I am open to any idea to continue it.
P.S. I already 'lost' 200MB of ram ... the first time I re-initialized the calc to get them back. Then again I re-lost 200MB of ram (got only 245.52MB free, had 4xx MB at start) without doing anything special... I will let it like that ... perhaps a garbage collector will start when ram will be too low ... who knows)
So to test it a bit I wrote a first draft of an HP41 emulator...
See : HPP41v0
This is a first draft. Only direct key usable in PRIME USER key mode.
I have no idea to deal with 'shift' and 'alpha' ... we can not redefine them in USER mode, and I prefer to avoid a 'loop'. Actually, a normal 41 do like this too, waiting key press to start cpu again. 4 5 SIN seems ok .... Silly me : a simple K:=WAIT will do the trick I hope and without USER mode (no high cpu use in waiting ?) now a v1 with shift & alpha
It reset at each 'start'. About the speed, it is a bit slower than a real 41, same speed as the first C version on a TI83PCE. An ASM version on a TI83PCE is now 5 time faster than a real 41CX (with the time hardware emulated and bank-swapping).
There are certainly some bugs left (ie Lcd prog does not 'left align' the name of a function when pressed as a real 41 does). Feel free to look at code and I am open to any idea to continue it.
P.S. I already 'lost' 200MB of ram ... the first time I re-initialized the calc to get them back. Then again I re-lost 200MB of ram (got only 245.52MB free, had 4xx MB at start) without doing anything special... I will let it like that ... perhaps a garbage collector will start when ram will be too low ... who knows)