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 1 Guest are viewing this topic.

MateoConLechuga

Hello all! I'm happy to announce that version 1.0 of the C development SDK for the TI84+CE and TI83PCE is available on GitHub now. Rather than going through this crazy process, you can now simply download the zip file, copy the folder to somewhere on your computer, set up your environment variables specific to your OS, and then use make in order to build your programs locally. Of course, it uses the ZDS compiler which is only natively supported on Windows, but works perfectly under Wine. If you wish to avoid even more hassle and you have access to the onlines, you can also use TI Planet's C Project Builder, available here: https://tiplanet.org/pb/ (You will need an account if you don't have one)

Now, ignoring all the craziness that happened with licenses, some standard CE C libraries have also been released. Currently there are 2; one for graphics and one for interfacing with the keypad. Included in each you will also find example programs in C using these libraries, and ASM source code licensed under the BSD 2 Clause. These libraries outperform their direct C equivalent as they are written in assembly and can behave however they want. Since they are still in version 1.0, there's a long way to go. But since things are easy to add to now, hopefully I can get some help ;) Anywho, here are the links so you can build your own programs, along with a screenshot using the C graphics library just for fun.

C Development SDK: https://github.com/CE-Programming/toolchain/releases
C Standard Libraries: https://github.com/CE-Programming/libraries/releases
LibLoad, for use with C libraries: https://github.com/CE-Programming/libload/releases

Enjoy everyone, and please post any pull requests/bug reports and comments you may have! This has been a long ride :)



Note:To install libraries so you can use them in development, simply read the readme provided on GitHub or in the zip. It's really easy.

Dream of Omnimaga

Wow, great job Mateo for making it so much easier for CE C programmers. Also those libraries seems very handy. Just in September, there were concerns on CodeWalrus about whether TI-84+CE development was already dead or not and when people were questioned about their lack of interest towards the CE, they cited the lack of emulation and a proper C IDE. I assume that the lack of libraries did not help too. Now this is all coming along together, so hopefully this helps convincing more people to make C programs for this calculator. :)
  • 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

#2
I hope so, now that emulation, libraries, and a native C SDK are available, along with a handy online C compiler. The only real issue now is documentation; I'm slowly slogging my way through that, and luckily that is a little easier than other things :)

Since the build system just uses a makefile, you can use whatever C IDE you choose. I prefer a combination of Notepad++ along with a simple "make" shell command, but that's just me. It's easily configurable to however you want to set it up.

Dream of Omnimaga

That's good. I wasn't sure if the calculator was documented yet, but I think I recall the CSE got documented very fast on WikiTI when it came out, right?
  • 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

Fairly fast, but kind of stopped now. The CE was way more documented than the CSE within the first couple of months. USB documentation is still a work in progress, but I imagine it can be eventually figured out.

Snektron

#5
Whenever im trying to compile the demo0 project, ez80link throws a syntax error. Any ideas?
EDITL nevermind, it was ZDS being picky about path names
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Adriweb

Ah yeah, because it's quite ancient, you'll want to avoid long paths, and ones with symbols/accents etc. :/
  • 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

Dream of Omnimaga

>choking on long path names
>2000 release date

I did not know that Year 2000 was actually 1989.

I wonder if eventually the current ez80 tools will move away from ZDS?
  • 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

Lionel Debroux

Moving away from ZDS could happen if an alternative, presumably LLVM-based toolchain raises up to a comparable level of functionality and stability. Clang's C/C++ front-end is so much superior to ZDS's frontend that it isn't funny.
There have been past attempts to build a Z80 target for LLVM+Clang, outside and inside the TI community. jacobly recently started working on another Z80 / eZ80 target for LLVM/Clang.
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TIEmu and TILP.
Co-admin of TI-Planet.

Dream of Omnimaga

Hm I see. I guess that perhaps we shouldn't count on it, then, because many projects never get completed, so for now it's better to continue using ZDS until someone else comes with an alternative, rather than waiting until then. But a better alternative would definitively not hurt.
  • 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

Adriweb

The C calling convention has to be the same anyway, for compatibility reasons, so yeah, go ahead and use the ZDS toolchain for now, since that's the only choice anyway, but when the LLVM-based tools are ready and sufficiently usable, it's going to be a huge leap forward.
  • 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

#11
LLVM would be immensely nice, but there is nothing particularly wrong with ZDS, and it works great as well.

Yet another update to the toolchain and libraries! This one fixes some minor bugs in the fileio library, and changes the makefiles a bit to be easier to use. It is important as always that you have the latest release of the toolchain and libraries in order to make sure nothing goes wrong :)

When including libraries, it is now more practical to do it like this:

#include <lib/ce/graphc.h>

This just makes it easier for IDEs to automatically include libraries for you.

Anyways, here are the usual links for getting the new libraries and toolchain: (Note that now the header files are included in the release, rather than in the source :))

CE C Development SDK
CE C Libraries

Anyway, one thing I find interesting is that more people aren't taking advantage of the amazing capabilities that C offers :P A CAS system could be built, awesome GUIs, games, etc. I realize it is still early, but C opens up so many possibilities, it isn't even funny. Platformers, scrolling shoot-em-ups, educational programs such as a chemical equation balancers and so much more. I look forward to it :)

Dream of Omnimaga

Lol I noticed you used the Cemetech download icons as post template even though the files are on Github :P

And nice update Mateo. I think the reason why people are not taking advantage that C offers is because most are new to 84+CE C programming or C in general. Also, I think the main issue right now is that on each calc site there isn't a page that explains how to get started with C and what tools/tutorials can be handy. Right now CW now has a page linking to various emulators, but it's still in early stages. Also, the old Omnimaga user base (prior the 2014 upgrade), as well as CW user base tend to be more versed into higher level languages such as TI-BASIC and find C extremely difficult. I would definitively like to see new softwares for the 84+CE from our resident C programmers, though. :)


One suggestion I have for the C libraries by the way would be to edit the readme and descriptions to encourage programmers to warn users in their readme/file descriptions that their games and programs require the libraries. I noticed in the past that various authors fail to do that and when  people play their games they report missing dependency issues because they were unaware that there were dependencies. Another thing that might be nice is if @Travis on Ticalc.org required TI-84+CE C programs that are dependent on your libraries to be put in a different folder such as "TI-84 Plus CE assembly games (C libraries)" or a checkbox on the file upload form asking the author if C libraries are required and if they are, then add a link to the Github page.
  • 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

Quote from: DJ Omnimaga on March 19, 2016, 06:42:07 AMOne suggestion I have for the C libraries by the way would be to edit the readme and descriptions to encourage programmers to warn users in their readme/file descriptions that their games and programs require the libraries.
Cool; nice idea, added that in this release :)

Well, I've been rather busy as spring break winds down, so here is update 3.0 which includes a lot of major changes:

    Library functions are now only compiled in if you use them. This reduces your program size, and generally is a lot cleaner.
    The _OS macro has been replaced with an _OS function; which provides a default wrapper for all assembly functions on-calc. Wrappers for particular assembly functions can also be made now; which will be really handy in the future.
    The source for runtime library and build tools have been added to the toolchain for faster and easier testing and development.
Download links:
C SDK: Download
C Libraries: Download

Also, the library setup is a little different, just copy everything in the dev folder in the library download to CEDev\lib\ce folder and it will be fine :)

Anyways, enjoy! This is a pretty big update; I think I'll focus more on fixing a few library bugs, but the toolchain setup is pretty much perfect now :D
(By library functions not being added in, I mean that they aren't added to the relocatable jump table)

Dream of Omnimaga

Great update. Will old programs require to be updated in order to run with this version of the libraries?
  • 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