Join us on Discord!
You can help CodeWalrus stay online by donating here.

C SDK and Libraries for the TI84+CE/TI8PCE

Started by MateoConLechuga, January 29, 2016, 02:59:00 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Adriweb

For instance, I just made a sample test config file on @MateoConLechuga 's graphx demo0: https://github.com/CE-Programming/libraries/commit/e825a5765075ce35e9e15bc914e65dd6941a0eda
With the very latest CEmu (not even the nightlies), it runs well :)

(As said, make sure libs are already transferred)
  • Calculators owned: TI-Nspire CX CAS, TI-Nspire CX, TI-Nspire CAS (x3), TI-Nspire (x2), TI-Nspire CM-C CAS, TI-Nspire CAS+, TI-80, TI-82 Stats.fr, TI-82 Plus, TI-83 Plus, TI-83 Plus.fr USB, TI-84+, TI-84+ Pocket SE, TI-84+ C Silver Edition, TI-84 Plus CE, TI-89 Titanium, TI-86, TI-Voyage 200, TI-Collège Plus, TI-Collège Plus Solaire, 3 HP, some Casios
Co-founder & co-administrator of TI-Planet and Inspired-Lua

Unicorn

#61
So just the wine command, and it sends the program to CEmu, executes the program, and does any key presses you want it to do, according to what you put in the configure file. Awesome! Great job, guys :)

EDIT: will we have to know some sort of language to use it, or will there be a reference document? I didn't understand much from the file, only declaring what file to send and if it is asm or not. How would key presses work?
  • Calculators owned: I own all of them: PICKACHUP TI 84+ CSE TI 83+ SE TI something something ??? ??? ??? ??? ???
  • Consoles, mobile devices and vintage computers owned: PICKACHUP ??? ??? ??? ??? ???



??? ??? ??? ??? ???

Adriweb

Hm, there's no wine involved nor any weird language to know about, you're just declaring some properties of the program to test, a sequence of actions to follow (useful for sequential testing, with actions in between, for instance), and hashes (from where, for how long, and expected value(s)).
The .json format is documented, but it's pretty self-explanatory from what you can read on an existing one: you can take the json test file I liked, for example, and make your own, considering it's a description-based format, here, not a whole script you'll have to program.
Eventually, CEmu will have an autotester test file maker/wizard, but that takes a bit of time to code...

Key sending (tokens directly, or just raw keypress from the keypad's PoV) already works - it corresponds to a "key" action in the sequence, for instance "key|enter" to make the autotester send an [enter] keypress.
You can find the list of key names here: https://github.com/CE-Programming/CEmu/blob/master/tests/autotester/autotester.cpp#L47-L53

Behind the scenes, you can see how it works here, if you're interested: https://github.com/CE-Programming/CEmu/blob/master/tests/autotester/autotester.cpp
  • Calculators owned: TI-Nspire CX CAS, TI-Nspire CX, TI-Nspire CAS (x3), TI-Nspire (x2), TI-Nspire CM-C CAS, TI-Nspire CAS+, TI-80, TI-82 Stats.fr, TI-82 Plus, TI-83 Plus, TI-83 Plus.fr USB, TI-84+, TI-84+ Pocket SE, TI-84+ C Silver Edition, TI-84 Plus CE, TI-89 Titanium, TI-86, TI-Voyage 200, TI-Collège Plus, TI-Collège Plus Solaire, 3 HP, some Casios
Co-founder & co-administrator of TI-Planet and Inspired-Lua

Unicorn

Sorry, I use wine to run make, on Linux :P But awesome, I will certainly use the auto send feature, but I'm not sure about the key presses thing, I think I'll wait for the wizard to do that :)

How would we tell the emulator to execute enter? Just type key|Enter on its own? Trying to figure things out :)
  • Calculators owned: I own all of them: PICKACHUP TI 84+ CSE TI 83+ SE TI something something ??? ??? ??? ??? ???
  • Consoles, mobile devices and vintage computers owned: PICKACHUP ??? ??? ??? ??? ???



??? ??? ??? ??? ???

Adriweb

Ah well okay (me too, in the PB, it's running under wine), but this is in CEmu, no wine there :P There's also a standalone autotester but it's probably less accurate than the one within CEmu, for threading/timing reasons.

The wizard isn't really planned right now, it's just if someone happens to have "a lot" of time on his hands at some point, he could implement it :P

And yeah, to make the tester send [enter]. it's just "key|enter" as a sequence parameter. Just like it could be "key|alpha", "key|2nd", "key|4" etc.
More tests will be written, for hopefully all examples and all libs functions, so may be able to see more examples of that.
  • Calculators owned: TI-Nspire CX CAS, TI-Nspire CX, TI-Nspire CAS (x3), TI-Nspire (x2), TI-Nspire CM-C CAS, TI-Nspire CAS+, TI-80, TI-82 Stats.fr, TI-82 Plus, TI-83 Plus, TI-83 Plus.fr USB, TI-84+, TI-84+ Pocket SE, TI-84+ C Silver Edition, TI-84 Plus CE, TI-89 Titanium, TI-86, TI-Voyage 200, TI-Collège Plus, TI-Collège Plus Solaire, 3 HP, some Casios
Co-founder & co-administrator of TI-Planet and Inspired-Lua

MateoConLechuga

#65
A list of the bugs fixed and repaired is detailed in this commit message. Please be sure to download the latest release of the toolchain and libraries; there's a lot of important fixes and changes. This doesn't affect any backwards compatibility as far as I am aware of, which is nice.

Keep in mind that the header files for everything is now in CEDev\include\lib\ce and CEDev\include\lib\std

Anywho, here's the links for downloading the toolchain and libraries:

Toolchain: https://github.com/CE-Programming/toolchain/releases/latest
Libraries: https://github.com/CE-Programming/libraries/releases/latest

Huge kudos to jacobly for fixing and optimizing many of the things :) He did a great job and made my life a lot easier.

I think this means all the pesky bugs have been fixed, and there is no longer anything left to do except for optimizations. Of course, I'm sure someone will find something along the way :P

Dream of Omnimaga

Good move to keep everything backwards-compatible, as always, and good job on the insect squashing :)
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

MateoConLechuga

The toolchain has been updated to use more discovered OS routines such as cos, sin, and more. This means reduced binary sizes, for example Atomas decreased in size by 1100 bytes. This can be configured via USE_FLASH_FUNCTIONS in the makefile.

In addition, timer functions have been removed due to bugs present in the bootcode. This means if your program uses any timer functions, it will no longer compile properly. Instead, demo 3 and demo 4 show the new style of using timers, which is hopefully even easier to understand, and more optimized. Thanks, go yell at TI about it :/

Toolchain: https://github.com/CE-Programming/toolchain/releases/latest
Libraries: https://github.com/CE-Programming/libraries/releases/latest

Don't forget to post any bug reports and feature requests! Thank you :)

A few minor bugs were also fixed in this release; you can also check to see if I missed any.

Dream of Omnimaga

What are the bugs in the bootcode about the timer? Do they also cause other issues outside C programs, such as the clock not working properly or something?

Hopefully TI won't remove those OS routines in future OS versions, although generally they rarely do that (the only major compatibility break was OS 2.43 <> 2.53MP). Also smaller size is always welcome. Good job :)
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

MateoConLechuga

#69
The FileIO library has been overhauled; and fixes a bug that would cause 2048 to crash and make the calculator unbootable :P In addition, the read/write functions are now 5000% faster, so enjoy :)

Download: https://github.com/CE-Programming/libraries/releases/latest

Quote from: DJ Omnimaga on September 21, 2016, 06:15:39 AM
What are the bugs in the bootcode about the timer? Do they also cause other issues outside C programs, such as the clock not working properly or something?
No, they just are weird. Really weird :P

MateoConLechuga

The C SDK and libraries have now been updated along with a fancy new interrupt library with the help of jacobly and calc84 :D You can now create your own interrupt service routines, set vectors, and do much, much more with all the peripherals. This is useful if you want to consistently handle keypad presses, without the need to actually check for them. The keypad lib has also been updated with some interrupt handling things, and 4 demos (demo_6, demo_7 and the keypad lib demo_2 and demo_3) have been added to demonstrate working with interrupts and just how useful they can be. Enjoy! :)

Toolchain: https://github.com/CE-Programming/toolchain/releases/latest
Libraries: https://github.com/CE-Programming/libraries/releases/latest

Also, don't forget to post any feature requests and bug reports :)

Dream of Omnimaga

Nice! As for the 2048 bug, if we never played the game, is our calculator safe? I'll update soon, though.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Unicorn

Quote from: DJ Omnimaga on October 06, 2016, 08:07:30 PM
Nice! As for the 2048 bug, if we never played the game, is our calculator safe? I'll update soon, though.
Probably? Also, if you have, jacobly made a program for resetting your calc to remove corruption, here
  • Calculators owned: I own all of them: PICKACHUP TI 84+ CSE TI 83+ SE TI something something ??? ??? ??? ??? ???
  • Consoles, mobile devices and vintage computers owned: PICKACHUP ??? ??? ??? ??? ???



??? ??? ??? ??? ???

MateoConLechuga

A small bug in the fileio lib was fixed that would cause a crash in ChessCE yesterday. Update is here:

Download: https://github.com/CE-Programming/libraries/releases/latest

Dream of Omnimaga

Thanks for the update. I really need to apply it to my calc when I have extra time, just in case.

Can games check for versions, by the way? (ideally if it's recent enough, not just 1 specific version, to prevent games from stopping running once we update)
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Powered by EzPortal