* WalrusIRC

You need to have 5 posts and not be part of restricted usergroups in order to use the WalrusIRC embedded shoutbox. However, you can also access our IRC channel called #CodeWalrus via EFnet.

Author Topic: C SDK and Libraries for the TI84+CE/TI8PCE  (Read 14187 times)

0 Members and 1 Guest are viewing this topic.

Offline kotu

  • Microsoft Edge V
  • Super User
  • Join Date: Aug 2016
  • Location: UK<---.edge
  • Posts: 1123
  • Post Rating Ratio: +7/-10
  • Edge User
    • dj_kotu
    • @UCAy2ZF4hbc08iStnTn6jgxQ
    • rowanmedhurst
    • @romanov-psyco
    • futurerave.uk
  • Gender: Male
Re: C SDK and Libraries for the TI84+CE/TI8PCE
« Reply #75 on: October 19, 2016, 03:27:02 am »
Holiness
  • Calculators owned: TI 84+CE-T
  • Consoles, mobile devices and vintage computers owned: Sega Master System, Sony PlayStation 3

Offline MateoConLechuga

  • Full User
  • Join Date: Jan 2015
  • Location:
  • Posts: 223
  • Post Rating Ratio: +19/-1
Re: C SDK and Libraries for the TI84+CE/TI8PCE
« Reply #76 on: October 22, 2016, 04:36:55 pm »
This is a rather important update to the libs; it appears the gfx_VertLine_NoClip was off by one pixel. This has since been fixed; if you have used it in your program (I don't think anyone other than me has), you should check to make sure it is working properly. Thanks all! :D

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

Offline xlibman

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18601
  • Post Rating Ratio: +95/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: C SDK and Libraries for the TI84+CE/TI8PCE
« Reply #77 on: October 22, 2016, 05:29:20 pm »
I was scared at first because I thought that meant that all authors of games would need to update O.O. Hopefully it's not too much of an issue with old games, though.
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline MateoConLechuga

  • Full User
  • Join Date: Jan 2015
  • Location:
  • Posts: 223
  • Post Rating Ratio: +19/-1
Re: C SDK and Libraries for the TI84+CE/TI8PCE
« Reply #78 on: October 26, 2016, 06:01:24 am »
So the toolchain has had quite a ton of updates, including RTC support, more OS integration, and many other neat things that you will definitely want to explore. (hint: look at tice.h) Perhaps the most important is the release of v3 of the fileio library, which now allows you to set, store, and recall variables used in BASIC programs, such as Ans, Matrices, Strings, Lists, and others with ease. Be sure to update as soon as you can, and enjoy! :D

Download toolchain: https://github.com/CE-Programming/toolchain/releases/latest
Download libraries: https://github.com/CE-Programming/libraries/releases/latest
« Last Edit: October 26, 2016, 06:04:29 am by MateoConLechuga »

Offline xlibman

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18601
  • Post Rating Ratio: +95/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: C SDK and Libraries for the TI84+CE/TI8PCE
« Reply #79 on: November 17, 2016, 08:34:38 pm »
Thanks for the hard work on this Mateo. Most people who talk about doing C on the CE says they find the toolchain very easy to get started with, while with many other calc models, what usually happened was a flood of support topics where people asked why their C envionment showed errors. You did a good job at making it intuitive it seems, which is a must if you want many people to use it.
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline MateoConLechuga

  • Full User
  • Join Date: Jan 2015
  • Location:
  • Posts: 223
  • Post Rating Ratio: +19/-1
Re: C SDK and Libraries for the TI84+CE/TI8PCE
« Reply #80 on: November 18, 2016, 10:32:04 pm »
Okay, so this is a nice little breakdown of what is new and fixed, so update the toolchain and libraries whenever you get a chance :)

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

1) v3 of the graphx library fixes many persistent bugs and introduces new features such as clipped text.
3) The installation method on windows is now easier than ever, just a double click to run a program and the environment variables will be configured.
3) Wiki pages have been added to the toolchain wiki to describe how to build your first program and more.
4) ConvPNG has been updated to fix some issues with compressed sprites

If you would like to add to the toolchain wiki, feel free! It is open to all :)

Enjoy everyone; I think other than continued optimizations of library functions, that there isn't much else to add unless you all keep up with the requests :P

Some eye candy:

Offline Unicorn

  • ??? ??? ??? ??? ???
  • Super User
  • CW Contest II - 2nd place
  • *
  • Join Date: Jan 2015
  • Location: ??? ??? ??? ??? ???
  • Posts: 2819
  • Post Rating Ratio: +5/-2
  • make :PICKACHUP: a thing!
    • Unicorn808
    • 114/11432
    • ??? ??? ??? ??? ???
  • Gender: Male
Re: C SDK and Libraries for the TI84+CE/TI8PCE
« Reply #81 on: November 18, 2016, 10:59:41 pm »
And not to let the linux installation become to hard compared to windows, run this script to update and install the toolchain, as well as set up the environment variables. There is a wiki page here.

Code: [Select]
cd ~/
if [ ! -d "CEdev" ]; then
echo "$(tput setaf 2)Checking for CEdev Directory... Didn't find it."
echo "$(tput setaf 3)Updating Path and Creating Environment Variables..."
echo "export CEDEV=~/CEdev/" >> ~/.bashrc
echo "export PATH=$PATH:~/CEdev/bin/" >> ~/.bashrc
else
echo "$(tput setaf 2)Checking for CEdev Directory... Found it."
fi
echo "$(tput setaf 3)Downloading the SDK...$(tput setaf 1)"
wget $(curl https://api.github.com/repos/CE-Programming/toolchain/releases/latest -s| grep browser_download_url | awk '{ print $2; }' | tr -d \",) -q
echo "$(tput setaf 2)Unzipping...$(tput setaf 1)"
unzip -o -q CEdev.zip -d ~/
echo "$(tput setaf 2)Removing CEdev.zip$(tput setaf 1)"
rm CEdev.zip
echo "$(tput setaf 6)$(tput bold)C SDK Installed!$(tput bold)"
  • 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 ??? ??? ??? ??? ???



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

Offline Lionel Debroux

  • Full User
  • Join Date: Jan 2015
  • Location:
  • Posts: 220
  • Post Rating Ratio: +11/-0
    • debrouxl
    • 58/5891
Re: C SDK and Libraries for the TI84+CE/TI8PCE
« Reply #82 on: November 19, 2016, 08:04:58 am »
Several portability suggestions for your script, derived from the GCC4TI and libti*/gfm/tilp install scripts:
1) you should consider using either wget or curl, but not both ;)
2) you probably want to prompt the user for the value of the CEdev variable. The only reasonably portable way to do that is the `read` shell built-in: "dialog" implementations are not necessarily installed OOTB, and dialog usage is hilariously non-portable - I simply got rid of all that crap in the GCC4TI install script;
3) you should prompt the user whether to write to .bashrc - this way, those who don't use bash can opt out;
4) you should try to do without using awk, which is not installed OOTB on minimal Linux distros or at least some of the BSDs;
5) likewise, you should get rid of tput usage and use raw ANSI escape sequences. ncurses is probably installed OOTB on most Linux distros, but not necessarily elsewhere.

EDIT: heh, I now see that on IRC, jacobly posted two of the same suggestions, and a third one in a different form :)
« Last Edit: November 19, 2016, 08:14:36 am by Lionel Debroux »
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TIEmu and TILP.
Co-admin of TI-Planet.

Offline Unicorn

  • ??? ??? ??? ??? ???
  • Super User
  • CW Contest II - 2nd place
  • *
  • Join Date: Jan 2015
  • Location: ??? ??? ??? ??? ???
  • Posts: 2819
  • Post Rating Ratio: +5/-2
  • make :PICKACHUP: a thing!
    • Unicorn808
    • 114/11432
    • ??? ??? ??? ??? ???
  • Gender: Male
Re: C SDK and Libraries for the TI84+CE/TI8PCE
« Reply #83 on: November 19, 2016, 06:56:45 pm »
Several portability suggestions for your script, derived from the GCC4TI and libti*/gfm/tilp install scripts:
1) you should consider using either wget or curl, but not both ;)
2) you probably want to prompt the user for the value of the CEdev variable. The only reasonably portable way to do that is the `read` shell built-in: "dialog" implementations are not necessarily installed OOTB, and dialog usage is hilariously non-portable - I simply got rid of all that crap in the GCC4TI install script;
3) you should prompt the user whether to write to .bashrc - this way, those who don't use bash can opt out;
4) you should try to do without using awk, which is not installed OOTB on minimal Linux distros or at least some of the BSDs;
5) likewise, you should get rid of tput usage and use raw ANSI escape sequences. ncurses is probably installed OOTB on most Linux distros, but not necessarily elsewhere.

EDIT: heh, I now see that on IRC, jacobly posted two of the same suggestions, and a third one in a different form :)
So I've been told, @Lionel Debroux  :P Do you mind if I ask a few questions about what you mean?

Quote
2) you probably want to prompt the user for the value of the CEdev variable. The only reasonably portable way to do that is the `read` shell built-in: "dialog" implementations are not necessarily installed OOTB, and dialog usage is hilariously non-portable - I simply got rid of all that crap in the GCC4TI install script;
What do you mean promp for the value? How would you go about doing that?
Quote
3) you should prompt the user whether to write to .bashrc - this way, those who don't use bash can opt out;
How should I do this? Prompt, have them choose whether to write to bashrc or "other", and the specify other?
Quote
4) you should try to do without using awk, which is not installed OOTB on minimal Linux distros or at least some of the BSDs;
No idea what you just said there, awk is not installed on minimal distros? What is awk?
Quote
5) likewise, you should get rid of tput usage and use raw ANSI escape sequences. ncurses is probably installed OOTB on most Linux distros, but not necessarily elsewhere.
How would I use ncurses, or some other program for colored text?

Thanks in advance :)
  • 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 ??? ??? ??? ??? ???



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

Offline Lionel Debroux

  • Full User
  • Join Date: Jan 2015
  • Location:
  • Posts: 220
  • Post Rating Ratio: +11/-0
    • debrouxl
    • 58/5891
Re: C SDK and Libraries for the TI84+CE/TI8PCE
« Reply #84 on: November 19, 2016, 08:02:08 pm »
2), 3) for prompting the user, see e.g. the GCC4TI top-level install script at https://github.com/debrouxl/gcc4ti/blob/next/trunk/tigcc-linux/scripts/Install . It uses `read` a number of times at the beginning, as well as at the end.
3) I meant have the user choose whether (s)he wants to write to .bashrc. That's what the GCC4TI install script does at the end.
Extra bonus points for attempting to support zsh; however, you probably don't want to support csh, ksh, tcsh, old Bourne sh, and whatever else fell out of favor but I forget at the moment :)

4) awk is one of the usual scriptable *nix text parsing programs, great for parsing fields in delimited formats, but it can compute stuff, too. In the code snippet above, you used it in the pipe chain, between grep and tr :)
In some Linux distros, users have to install it by themselves, which is why I suggested rewriting the pipe chain not to use awk. On IRC, jacobly suggested a simpler `wget | sed` pipe chain.

5) I wrote ncurses because tput is part of it. And for the same portability reasons, to either minimal Linux distros or more probably some of the BSDs, I'm suggested to get rid of tput altogether, e.g. writing raw ANSI escape sequences in your script: \033[<code>m - even if it will print those sequences in the output even when the output is redirected to a file by the user. See e.g. the TILP install script, https://ti-pla.net/tilpinst -> https://raw.githubusercontent.com/debrouxl/tilp_and_gfm/experimental/tilp/trunk/build/scripts/install_tilp.sh .
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TIEmu and TILP.
Co-admin of TI-Planet.

Offline xlibman

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18601
  • Post Rating Ratio: +95/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: C SDK and Libraries for the TI84+CE/TI8PCE
« Reply #85 on: November 19, 2016, 09:42:58 pm »
@MateoConLechuga nice updates. Clipping being added to more features will make things even easier for certain games. :)
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline MateoConLechuga

  • Full User
  • Join Date: Jan 2015
  • Location:
  • Posts: 223
  • Post Rating Ratio: +19/-1
Re: C SDK and Libraries for the TI84+CE/TI8PCE
« Reply #86 on: December 18, 2016, 06:19:59 pm »
Here's a list of changes; you should definitely update :D

- LibLoad v2.0 format is used for libraries, this helps reduces their size
- Libraries are preconfigured to be sent to the archive
- graphx v4 is out; which fixes a few things and adds gfx_Lighten and gfx_Darken (Screenshot below, graphics demo 11 of the toolchain)
- Changing user header files triggers a rebuild of source files
- Some random cleanup of examples

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



Offline kotu

  • Microsoft Edge V
  • Super User
  • Join Date: Aug 2016
  • Location: UK<---.edge
  • Posts: 1123
  • Post Rating Ratio: +7/-10
  • Edge User
    • dj_kotu
    • @UCAy2ZF4hbc08iStnTn6jgxQ
    • rowanmedhurst
    • @romanov-psyco
    • futurerave.uk
  • Gender: Male
Re: C SDK and Libraries for the TI84+CE/TI8PCE
« Reply #87 on: December 18, 2016, 08:13:50 pm »
Sweet :)

gfx_Lighten and gfx_Darken work on the palette I presume?
  • Calculators owned: TI 84+CE-T
  • Consoles, mobile devices and vintage computers owned: Sega Master System, Sony PlayStation 3

Offline MateoConLechuga

  • Full User
  • Join Date: Jan 2015
  • Location:
  • Posts: 223
  • Post Rating Ratio: +19/-1
Re: C SDK and Libraries for the TI84+CE/TI8PCE
« Reply #88 on: December 18, 2016, 08:30:25 pm »
gfx_Lighten and gfx_Darken work on the palette I presume?
Yep, they can lighten or darken different hues. They take an original color as input.

Offline xlibman

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18601
  • Post Rating Ratio: +95/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: C SDK and Libraries for the TI84+CE/TI8PCE
« Reply #89 on: December 18, 2016, 09:08:34 pm »
Do you plan to keep backwards compatibility with old C programs that use the libraries in long terms by the way?

Just asking because TI and HP didn't with Nspire Lua and HP PPL
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

 


You can also use the following HTML or bulletin board code to share it on your page or forum signature!


Also do not forget to check our affiliates below.
Planet Casio TI-Planet Calc.news BroniesQC BosaikNet Velocity Games