CodeWalrus

CodeWalrus Website => Game, Software and Music Downloads => Programs and Utilities => Topic started by: MateoConLechuga on January 29, 2016, 02:59:00 AM

Title: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: MateoConLechuga on January 29, 2016, 02:59:00 AM
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 (https://www.cemetech.net/forum/viewtopic.php?t=11626), 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 :)

(http://myimages.wdfiles.com/local--files/start/CGraphicsTest.gif)

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.
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Dream of Omnimaga on January 29, 2016, 06:48:42 AM
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. :)
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: MateoConLechuga on January 29, 2016, 08:25:32 AM
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.
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Dream of Omnimaga on January 29, 2016, 08:56:23 AM
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?
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: MateoConLechuga on January 29, 2016, 06:33:14 PM
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.
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Snektron on February 15, 2016, 10:19:40 PM
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
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Adriweb on February 15, 2016, 10:52:31 PM
Ah yeah, because it's quite ancient, you'll want to avoid long paths, and ones with symbols/accents etc. :/
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Dream of Omnimaga on February 16, 2016, 05:16:00 AM
>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?
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Lionel Debroux on February 16, 2016, 06:36:09 AM
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.
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Dream of Omnimaga on February 16, 2016, 08:41:34 AM
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.
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Adriweb on February 16, 2016, 09:05:03 AM
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.
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: MateoConLechuga on March 19, 2016, 12:00:30 AM
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 :))

(http://www.cemetech.net/img/icon/dl.gif)CE C Development SDK (https://github.com/CE-Programming/toolchain/releases/latest)
(http://www.cemetech.net/img/icon/dl.gif)CE C Libraries (https://github.com/CE-Programming/libraries/releases/latest)

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 :)
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Dream of Omnimaga on March 19, 2016, 06:42:07 AM
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.
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: MateoConLechuga on March 21, 2016, 12:19:32 AM
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:

Download links:
C SDK: Download (https://github.com/CE-Programming/toolchain/releases/latest)
C Libraries: Download (https://github.com/CE-Programming/libraries/releases/latset)

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)
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Dream of Omnimaga on March 22, 2016, 05:49:23 AM
Great update. Will old programs require to be updated in order to run with this version of the libraries?
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Dudeman313 on March 22, 2016, 01:12:58 PM
I think not. The "latest" link makes me think otherwise.
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: MateoConLechuga on April 03, 2016, 02:10:06 AM
Because of some people's suggestions that the build system should be cleaner for the toolchain, I modified the directory structures and makefiles so that there is a src, obj, and bin directory as the layout for projects, along with a src/gfx folder where you can build graphics and things. ConvPNG and ConvHEX were also updated and placed in the CEdev/bin folder as well, so all you need to do is type 'convpng' at the command line, and boom, you have any sprite you want. Inclusion of an icon supported by Cesium and hopefully DoorsCE later on is now automatic, no need to do any extra work. Anywho, this may be one of the easiest to use C toolchains on the interwebs, so here's the links that provide the information on how to install/update the toolchain/libraries. Enjoy, and let the amazing adventures begin! :)

C Development SDK: https://github.com/CE-Programming/toolchain/releases/latest
C Standard Libraries: https://github.com/CE-Programming/libraries/releases/latest

Don't forget to comment if you have any ideas/suggestions! :)
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Dream of Omnimaga on April 03, 2016, 06:00:04 AM
It's good that you are making this as easy to use as possible for programmers. A lot of people can be turned away from a language only by the tools they have to use to program in it. THis is what killed BBC Basic on the 84+: Great language with lots of potential, but the way the on-calc program editor worked discouraged everyone from using that language.
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: MateoConLechuga on April 24, 2016, 05:20:06 PM
The graphics library has been updated to v3, with numerous bug fixes and additions suggested from all of you awesome people here :) It fixes some bugs with clipped sprites, monospace font, and a few minor things, including crazy optimizations of sprite and other routines. Here is also a list of some new functions, of which you will find descriptions of in the header file:

gc_ClipCircle();
gc_ClipLine();
gc_ClipDrawBGTilemap();
gc_ClipDrawFGTilemap();
gc_NoClipDrawBGTilemap();
gc_NoClipDrawFGTilemap();
gc_TilePtr();
gc_TilePtrMapped();
gc_LZDecompress();


As you may have noticed, tilemapping support for multiple drawn tilemaps has also been added, along with a demo program (screenshot below) for your enjoyment. gc_LZDecompress is useful for decompressing sprites using ConvPNG 'lz77' compression mode. Clipped lines and Clipped circles have also been added, and greatly improved by at least 5x speedup. Enjoy, and don't forget to report any bugs! :D

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

Tilemap demo:
(https://i.imgur.com/K38g7vp.gif)

Graphics test:
(https://i.imgur.com/KnGaRyN.gif)
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Dream of Omnimaga on April 24, 2016, 07:17:21 PM
Wow that seems fast O.O

I wonder if a smooth Mario game would be feasible?
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Adriweb on April 24, 2016, 07:17:50 PM
Looks like it :)
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: MateoConLechuga on April 24, 2016, 08:00:18 PM
Quote from: DJ Omnimaga on April 24, 2016, 07:17:21 PM
Wow that seems fast O.O

I wonder if a smooth Mario game would be feasible?
This is pretty much the whole point for making a really versatile tilemapping engine :) Platform games should be really easy to make now; and games like pokemon and zelda will be super simple too. The above tilemap demo draws at 34 fps using the clipped tilemapper, while using the unclipped tilemapper results in 44 fps. Scrolling just seems slow because of the OS key debouncing routines, which can be avoided by using the keypad library.

For the graphics test; here are the results per second:

495 clipped circles
772 clipped lines
1808 clipped rectangle outlines
779 unclipped circles
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Dudeman313 on April 24, 2016, 08:32:36 PM
Wow! I like it. :)
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Dream of Omnimaga on April 26, 2016, 12:12:11 AM
Quote from: MateoConLechuga on April 24, 2016, 08:00:18 PM
Quote from: DJ Omnimaga on April 24, 2016, 07:17:21 PM
Wow that seems fast O.O

I wonder if a smooth Mario game would be feasible?
This is pretty much the whole point for making a really versatile tilemapping engine :) Platform games should be really easy to make now; and games like pokemon and zelda will be super simple too. The above tilemap demo draws at 34 fps using the clipped tilemapper, while using the unclipped tilemapper results in 44 fps. Scrolling just seems slow because of the OS key debouncing routines, which can be avoided by using the keypad library.

For the graphics test; here are the results per second:

495 clipped circles
772 clipped lines
1808 clipped rectangle outlines
779 unclipped circles

THose frame rates are very good definitively, plus we can use lower bit modes anyway for higher FPS. Good job on this :)
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: MateoConLechuga on May 19, 2016, 08:49:30 PM
Hello everyone! :D Please update the SDK and libraries as soon as possible; there are some crucial changes and bugfixes detailed below.

SDK: https://github.com/CE-Programming/toolchain/releases/tag/v4.0
Libraries: https://github.com/CE-Programming/libraries/releases/tag/v4.0

You don't have to read all this, but you can if you want :)

Support for the graphc library has ended. The new graphx library has taken the role of graphical routines, along with a new API
  This library is not only easier to use, it also gains some nice speed boosts in places
There are a total of 17 demos now for the the libraries and toolchain to help you out
There is even one in the main toolchain for working with the hardware timers, which many of you have been asking about
ConvPNG has been updated to include support for easy tilemap conversions
ConvPNG has also been updated to fix a glitch with a pixel in the top left corner of icons
  It also provides support now for automatic conversion of icons; no need to figure out the colors anymore
The makefile has been adapted to work under wine without any problems
Assembly files and functions can be directly compiled into the main C code, in case you want to use an assembly routine in your C code
   This isn't new; it's just that no one seems to realize what this means :P
I could go on and on, but there's a ton of new stuff, and a ton of things that will make your life easier and better. Happy coding![/list]

The FileIO library has some new functions and version! Here they are:

char *ti_Detect(void **curr_search_posistion, const char *detection_string);
char *ti_DetectVar(void **curr_search_posistion, const char *detection_string, uint8_t var_type);
char *ti_GetTokenString(void **read_pointer, uint8_t *length_of_token, unsigned *length_of_string);
void *ti_GetDataPtr(const ti_var_t slot);


ti_Detect lets you find any variable by using a search string, very helpful with things like text editors and custom levelmaps :D
Plus now you can read and interpret BASIC programs and strings if you so choose.

The graphics library now has over 70 functions for directly interacting with the LCD. Here they are if you ever wanted to just look at a list :P
The newer ones that you haven't seen are towards the bottom, with some sprite flipping and rotation routines.

gfx_Begin
gfx_End
gfx_SetColor
gfx_SetDefaultPalette
gfx_SetPalette
gfx_FillScreen
gfx_SetPixel
gfx_GetPixel
gfx_GetDraw
gfx_SetDraw
gfx_SwapDraw
gfx_Blit
gfx_BlitLines
gfx_BlitArea
gfx_PrintChar
gfx_PrintInt
gfx_PrintUInt
gfx_PrintString
gfx_PrintStringXY
gfx_SetTextXY
gfx_SetTextBGColor
gfx_SetTextFGColor
gfx_SetTextTransparentColor
gfx_SetCustomFontData
gfx_SetCustomFontSpacing
gfx_SetMonospaceFont
gfx_GetStringWidth
gfx_GetCharWidth
gfx_GetTextX
gfx_GetTextY
gfx_Line
gfx_HorizLine
gfx_VertLine
gfx_Circle
gfx_FillCircle
gfx_Rectangle
gfx_FillRectangle
gfx_Line_NoClip
gfx_HorizLine_NoClip
gfx_VertLine_NoClip
gfx_FillCircle_NoClip
gfx_Rectangle_NoClip
gfx_FillRectangle_NoClip
gfx_SetClipRegion
gfx_GetClipRegion
gfx_ShiftDown
gfx_ShiftUp
gfx_ShiftLeft
gfx_ShiftRight
gfx_Tilemap
gfx_Tilemap_NoClip
gfx_TransparentTilemap
gfx_TransparentTilemap_NoClip
gfx_TilePtr
gfx_TilePtrMapped
gfx_LZDecompress
gfx_AllocSprite
gfx_Sprite
gfx_TransparentSprite
gfx_Sprite_NoClip
gfx_TransparentSprite_NoClip
gfx_GetSprite_NoClip
gfx_ScaledSprite_NoClip
gfx_ScaledTransparentSprite_NoClip
gfx_FlipSpriteY
gfx_FlipSpriteX
gfx_RotateSpriteC
gfx_RotateSpriteCC
gfx_RotateSpriteHalf
gfx_Polygon
gfx_Polygon_NoClip
gfx_FillTriangle
gfx_FillTriangle_NoClip


I would like the thank jacobly, Adriweb, grosged, Runer, and calc84 for there help and additions! I think the toolchain has now reached its first stable state, and will probably only be updated to fix bugs amd add features :D
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Dream of Omnimaga on May 19, 2016, 09:47:00 PM
Great job guys. :D That is a lot of updates and I'm glad that the 84+CE community got an independent set of libraries. :)
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: MateoConLechuga on May 21, 2016, 06:23:31 AM
Some updates that will help you with everything:

1) The user-end libraries had a few small bugs that have been fixed and updated. No one would have noticed them yet anyway.
2) The SDK now consists of a single folder. No need to download the libraries and move folders around; libraries are now integrated into the toolchain along with the demos
3) graphc has been removed; replaced by graphx (graphc will remain probably forever in the user-end libraries though, but future code should use the graphx library)

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

Quote from: DJ Omnimaga on May 19, 2016, 09:47:00 PM
Great job guys. :D That is a lot of updates and I'm glad that the 84+CE community got an independent set of libraries. :)
Indeed. :) One nice thing is that since they don't rely on anything, a BASIC parser hook could easily be written around them. But I have no plans for that; maybe someone might want to I guess.
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Dream of Omnimaga on May 21, 2016, 06:27:24 AM
Yay about #2. :D And yeah a BASIC parser hook would be nice. I know @c4ooo absolutely wants a parser hook-based lib for BASIC coders that is standalone (eg not require one specific shell) so perhaps he would be interested in making a lib that lets BASIC coders use the C libs? It would be kinda standard too since the C libs are already heavily used by C coders.
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Lionel Debroux on May 21, 2016, 09:03:00 AM
QuoteAnd yeah a BASIC parser hook would be nice.
Indeed, as would be e.g. a common timer framework. Common frameworks for hooks of all sorts and timers are on the wishlist I posted for the community TI-eZ80 programming environment, with a pointer to existing TI-68k hook frameworks, some aspects of which make sense on the TI-eZ80 series as well. Hook and timers frameworks were arguably lower priority than graphx, though, so Mateo and others were right to focus on graphx + fileio first :)

Short of contributing much code to furthering third-party TI-eZ80 series development, I'm attempting to contribute ideas and design feedback on the framework, as I did for graphx. Some of my suggestions make sense, and people even listen to them :D
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Adriweb on May 21, 2016, 02:31:40 PM
It's somewhat annoying to have graphc removed entirely from the toolchain (well, headers but without libs)
Some projects on the PB, for instance, still use graphc.

A better solution would be to add a "#warning blabla" inside graphc.h though ,so the user will know. But still, it should build (at least for now - aka graceful deprecation)
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: MateoConLechuga on May 21, 2016, 04:23:10 PM
Got it :) The graphc library+header has been readded in, with an annoying #warning message everytime someone compiles with it or looks at the header :)
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Dream of Omnimaga on May 21, 2016, 04:30:47 PM
Yeah I think it's good to leave that in, because that helps for compatibility with older projects and programmers won't wonder why all of a sudden their game no longer compiles or has errors during run time. :P
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: c4ooo on May 21, 2016, 07:53:00 PM
Quote from: DJ Omnimaga on May 21, 2016, 06:27:24 AM
Yay about #2. :D And yeah a BASIC parser hook would be nice. I know @c4ooo absolutely wants a parser hook-based lib for BASIC coders that is standalone (eg not require one specific shell) so perhaps he would be interested in making a lib that lets BASIC coders use the C libs? It would be kinda standard too since the C libs are already heavily used by C coders.
@DJ Omnimaga @MateoConLechuga This is a great idea. Infact i have already considered pausing work on my shell and starting the API. Maybe i can also include @DrDnar's TextLibCE and @grosged's sprite lib.
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Dream of Omnimaga on May 22, 2016, 09:20:00 PM
As long as they're standalone, as in, not require installing your shell. We are trying to avoid repeating the same issue as with xLIBCE, right?
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: MateoConLechuga on May 22, 2016, 10:59:51 PM
Basically, I think that a single program to install/uninstall the parser hook would be best. It would eliminate any need to have a ton of different programs and hook chaining in order to perform hybrid basic operations, of which it seems to me seems a little daunting at the moment.
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Dream of Omnimaga on May 23, 2016, 04:10:44 AM
Well, what I meant is that for example, there are some people who would like to use xLIBCE without being forced to put Doors CE 9 on their calculator, especially those who prefer Cesium or PHASM and are not willing to have two shells on their calc. c4ooo was one of the people to express that sentiment so I thought that his last post about including CE Textlib and Sprites v3 inside his shell was kinda contradictory. I might have misunderstood, though, so perhaps further clarification would be nice. But yeah, a program to install all hooks would be nice, if that's feasible with a potentially growing set of libs.

But yeah, back on the C libs topic, it would definitively be cool if someone made a parser hook that allowed the use of those libs in TI-BASIC. Since many C programs use the libs, most people will eventually have them on their calculator, so when downloading hybrid games they would have even less stuff to send to their calc.
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: MateoConLechuga on May 24, 2016, 04:48:01 PM
Minor update to the makefile to fix some spelling errors and make time issues that occasionally happened. Should work better on Linux too, @Unicorn :)

https://github.com/CE-Programming/toolchain/releases/latest
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Dream of Omnimaga on May 24, 2016, 09:25:54 PM
What do you mean by make time issues?
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Adriweb on May 24, 2016, 10:30:23 PM
This apparently: https://github.com/CE-Programming/toolchain/commit/7a57fe1 :P
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Dream of Omnimaga on May 25, 2016, 01:30:49 AM
That doesn't tell me much but thanks anyway :P
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: MateoConLechuga on May 26, 2016, 03:12:04 AM
Minor makefile update that properly fixes a race condition if your computer is fast... Haha :P

https://github.com/CE-Programming/toolchain/releases/latest
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Dream of Omnimaga on May 26, 2016, 03:19:39 AM
Wait... did it actually fail to compile or something if your computer was too fast? XD

/me hopes that in 10 years, programming with C SDK for TI-84+CE won't require something like DOSBox with old PC games. :P
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: MateoConLechuga on May 26, 2016, 03:26:16 AM
Haha, yeah. It was just a minor thing that not a lot of people would have experienced, just a thing that depended on how fast and in what order your OS would like to execute things :)

And actually, there's no DOS box or anything. All you do to compile a program is type 'make' at the command line. :)
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Dream of Omnimaga on May 26, 2016, 03:28:14 AM
Wait, is the C SDK entirely command line-based when it comes to compiling stuff? This might deter some programmers, since most Windows users prefer working through GUI's (eg like in TIGCC where we can compile programs with a single click). Or maybe I misunderstood something (I don't use C)
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: MateoConLechuga on May 26, 2016, 03:33:51 AM
Actually, I should really clarify this. The toolchain is based around a makefile, which pretty much any C IDE can hook into. So you can use any editor, Atom, Qt, Eclipse, etc, and it will provide any interface you want to use for compiling, be it a little button or whatever. :) I prefer to go the shell route, because I find it easier.
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Dream of Omnimaga on May 26, 2016, 04:14:20 AM
Oh I see now. That clarify things now (I thought that only one editor could be used) :)
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Lionel Debroux on May 26, 2016, 11:08:16 AM
Fortunately, nope. For the long term, environment-specific tools, as the GCC4TI IDE and its ancestor, or the even more dead TIFS IDE, are a maintenance liability :)
Makefiles have their warts, but they're a common denominator to most environments (higher-level build systems usually produce Makefiles), and leave more freedom to the user.
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Adriweb on May 26, 2016, 12:07:22 PM
Yeah, for instance TI-Planet's Project Builder (and SourceCoder) has everything based off the Makefile etc., they merely add a GUI side and extras to all the existing toolchain stuff.
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Unicorn on May 27, 2016, 08:25:19 AM
Oh, we can hook the makefile into an IDE? Good to know, I may end up doing that sometime...
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Adriweb on May 27, 2016, 10:12:54 AM
Yeah, often it's basically a build with "External build system", for instance, if it's not automatically setup already. From there you can configure where make is, which makefile to use, etc.
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: c4ooo on May 30, 2016, 11:20:39 PM
@DJ Omnimaga if i do ever release a API, i will make sure that it will be available as a stand alone ;)
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Dream of Omnimaga on May 30, 2016, 11:28:00 PM
Do you mean an API for your shell (eg to let people use the libs in BASIC) like what was discussed a while ago? A standalone lib would definitively be nice. I think it would be a good move if such API was open-source and easy to update by anyone once it's done, though, so if for example you go inactive then other people can update it if compatibility breaks between new versions of the C libs and your API.
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: MateoConLechuga on May 31, 2016, 02:50:18 AM
The CEmu autotester now has many features integrated into CEmu, along with easy loading of JSON configuration files for easy testing of common code and programs, without the need to actually type anything into the calculator, which is pretty awesome :)

You can now set memory watchpoints on variables and breakpoints on functions or addresses with the latest versions of CEmu and the toolchain. This will greatly help with debugging your programs as you can assign a variable that you would like to watch, and tell CEmu to break if the value changes, is read by something, or just treat it as a non breaking watchpoint so you can just see the value of your variable at any given time. Please note that CEmu is still in development stages, so feel free to report any bugs and/or features you would like :)

CEmu:
http://pimathbrainiac.me/CEmu/

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

Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Dream of Omnimaga on May 31, 2016, 02:59:38 AM
/me wonders if Mateo posted in the wrong topic instead of the CEmu topic :P

But nice to see CEmu updates :D . One thing that was missing for the CE was definitively debugging tools, but I didn't realize that they were still missing from CEmu. O.O

I guess that I forget how young this project still is :)
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: MateoConLechuga on May 31, 2016, 03:07:59 AM
They weren't missing at all :P No other emulator has this feature, which is pretty nice :) By being able to set these things, I mean that you can set them from within your code itself. So when your program executes, you can call a C function or run an asm routine that will add a breakpoint or watchpoint for you.

For example, demo 4 of the toolchain shows you an example of how to interact with CEmu's debugger when writing your C programs :) (Which is why it is posted in this thread, because it requires an update of the toolchain)
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Dream of Omnimaga on May 31, 2016, 03:52:33 AM
I thought that WabbitEmu had debug features? That's unless you mean CE emulators, but in this case not only no other CE emulator has debugging features, but none exist at all (except TI-Smartview but that doesn't really count :P)

Thanks for the clarification, though :)
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: MateoConLechuga on May 31, 2016, 05:03:31 AM
No, CEmu already *had* all of the debugging features that all the other emulators have, and a ton more in addition. This is a yet another new feature that allows for software breakpoints, which you can set in C, hence why I posted in the toolchain thread. You can also set them in assembly too. It's just a thing that was added recently, so most people probably wont have the correct build of CEmu.
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Dream of Omnimaga on May 31, 2016, 05:31:49 AM
Oh right. I am confused about that stuff >.<. My bad.



What's an emulator, by the way? (just kidding <.<)
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Unicorn on May 31, 2016, 05:01:37 PM
So, @MateoConLechuga if we do things correctly, when we send a certain program to the emulator, it will automatically run it and send key presses if we want it to?
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: MateoConLechuga on May 31, 2016, 05:08:46 PM
@Unicorn Yes, that's exactly what the AutoTester is able to do. If you have already sent the libraries and such, it is a simple matter to make a config file that can load your program into CEmu, run it, and execute key presses and make checks on memory to make sure everything is working right  @Adriweb would be able to explain it a lot better than I can :)
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Adriweb on May 31, 2016, 05:11:37 PM
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)
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Unicorn on May 31, 2016, 05:14:41 PM
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?
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Adriweb on May 31, 2016, 05:26:38 PM
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 (https://github.com/CE-Programming/CEmu/blob/master/tests/autotester/json_file_documentation.txt), 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
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Unicorn on May 31, 2016, 05:42:38 PM
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 :)
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Adriweb on May 31, 2016, 05:46:47 PM
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.
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: MateoConLechuga on September 07, 2016, 03:38:20 AM
A list of the bugs fixed and repaired is detailed in this commit message (https://github.com/CE-Programming/toolchain/commit/7d3e9d7969b130e24a4706e8791fa5e7ac669428). 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
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Dream of Omnimaga on September 07, 2016, 04:40:40 AM
Good move to keep everything backwards-compatible, as always, and good job on the insect squashing :)
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: MateoConLechuga on September 21, 2016, 01:41:49 AM
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.
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Dream of 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?

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 :)
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: MateoConLechuga on October 02, 2016, 06:07:04 PM
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
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: MateoConLechuga on October 06, 2016, 12:00:16 AM
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 :)
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Dream of 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.
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Unicorn on October 08, 2016, 08:07:49 AM
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 (https://www.cemetech.net/programs/index.php?mode=file&id=1508)
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: MateoConLechuga on October 10, 2016, 06:43:34 PM
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
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Dream of Omnimaga on October 19, 2016, 03:24:45 AM
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)
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: kotu on October 19, 2016, 03:27:02 AM
Holiness
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: MateoConLechuga 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
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Dream of Omnimaga 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.
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: MateoConLechuga 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
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Dream of Omnimaga 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.
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: MateoConLechuga 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:
(https://usercontent.irccloud-cdn.com/file/xP1SQmC2/evencooler.gif)
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Unicorn 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 (https://github.com/CE-Programming/toolchain/wiki/Automated-Linux-Install-Script).

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)"
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Lionel Debroux 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 :)
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Unicorn on November 19, 2016, 06:56:45 PM
Quote from: Lionel Debroux 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 :)
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 :)
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Lionel Debroux 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 .
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Dream of Omnimaga 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. :)
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: MateoConLechuga 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

(http://i.imgur.com/MCLmnRc.gif)
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: kotu on December 18, 2016, 08:13:50 PM
Sweet :)

gfx_Lighten and gfx_Darken work on the palette I presume?
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: MateoConLechuga on December 18, 2016, 08:30:25 PM
Quote from: kotu on December 18, 2016, 08:13:50 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.
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Dream of Omnimaga 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
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: TheMachine02 on December 18, 2016, 10:09:20 PM
For now, the backward compatibility is kinda mandatory. I guess that a big update will just see the library change as a whole, like graphc to graphx.
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: MateoConLechuga on December 18, 2016, 10:17:58 PM
Yeah versions are always backwards compatible, unless there happens to be a major bug (as what happened with graphc above)
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: MateoConLechuga on December 28, 2016, 04:24:50 AM
There is a new update to the toolchain and convpng that totally revamps and fixes compression since everyone seems to want it :P You can check out graphics demos 5 and 7 for useage, and the new header file "decompress.h".

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

For comparisons:


Input Image
(http://i.imgur.com/QL2y6Ln.png)

ConvPNG outputs:
no compression = 52802 bytes
old compression = 29966 bytes
new compression = 20881 bytes
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Dream of Omnimaga on December 28, 2016, 06:33:50 AM
Wow, great job MateoC :D. I wonder if this new compression also applies for ConvPNG images dedicated for ICE Compiler?
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: kotu on January 02, 2017, 08:10:58 PM
nice update :)
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: PT_ on January 02, 2017, 10:51:25 PM
Quote from: DJ Omnimaga on December 28, 2016, 06:33:50 AM
I wonder if this new compression also applies for ConvPNG images dedicated for ICE Compiler?
No, because ICE can't handle compressed sprites.
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Dream of Omnimaga on January 06, 2017, 05:41:40 PM
Ah ok. D:

/me noms PT_ :3=
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: MateoConLechuga on January 21, 2017, 01:31:02 AM
The new version of the toolchain is here! It adds the ability to compress your programs easily from the makefile, and fixes a compiling bug with one of the demos. If you haven't updated, you should :)

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

Also, there is more documentation for all of you who are just starting out! Feel free to check out the github wiki: https://github.com/CE-Programming/toolchain/wiki
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Adriweb on January 21, 2017, 08:06:42 AM
Also TI-Planet's PB now has compression support :) In fact it's always enabled and will make both and only keep the smallest 8xp (whether it's the compressed one or not).
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Dream of Omnimaga on January 21, 2017, 06:58:40 PM
Nice that you added compression on the project builder Adriweb. Also godd to see more doc available Mateo :)
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: kotu on January 21, 2017, 07:01:12 PM
Quote from: MateoConLechuga on January 21, 2017, 01:31:02 AM
The new version of the toolchain is here! It adds the ability to compress your programs easily from the makefile, and fixes a compiling bug with one of the demos. If you haven't updated, you should :)
mateo that's cool, does it now mean there is no need to compress your graphics beforehand, as they also get compressed?

Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: MateoConLechuga on January 21, 2017, 07:17:53 PM
Technically it can still be important to compress graphics, as the user must have more ram free to decompress a program.
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: MateoConLechuga on February 14, 2017, 02:46:33 AM
Latest release is here! Feel free to download whenever you get a chance :)

Toolchain: https://github.com/CE-Programming/toolchain/releases/latest
Libraries: https://github.com/CE-Programming/libraries/releases/latest
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Dream of Omnimaga on February 14, 2017, 08:26:45 AM
Thanks a lot MateoC for your contributions to CE programming. Even though I can't do C, those libs have made it so easy for C programmers to make advanced games and in some ways I kinda used them since ICE uses them. :)

I wonder if anything in the toolchain can help making 3D stuff, by the way?
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: kotu on February 14, 2017, 08:29:41 AM
if i recall there is a polygon routine.
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: MateoConLechuga on February 15, 2017, 03:11:24 AM
Minor update to the toolchain that fixes some interrupt things: (Only really applicable if you downloaded 7.0 lol)

Toolchain: https://github.com/CE-Programming/toolchain/releases/latest
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Dream of Omnimaga on March 05, 2017, 05:28:52 AM
Thanks for the update Mateo. I'll definitively update even if I didn't download 7.0, though, because I think my C libs are from around November or so <_<
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: TheMachine02 on March 20, 2017, 03:28:37 PM
I did a very small C library for fixed 8.8 point format, https://github.com/TheMachine02/FixedPoint8/blob/master/fixedpoint.h . Should be quite fast (at least almost as integer and much better than float) although I guess it could be better and could  support 16.8 too  :P
There isn't all math functions either, so that will need to be coded  :)
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Alvajoy123 on March 28, 2017, 12:16:15 AM
Do you use the program on the calc or what ? :crazy:
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Dream of Omnimaga on March 28, 2017, 02:00:27 AM
No, TI-84+CE C is programmed on the computer.
Quote from: TheMachine02 on March 20, 2017, 03:28:37 PM
I did a very small C library for fixed 8.8 point format, https://github.com/TheMachine02/FixedPoint8/blob/master/fixedpoint.h . Should be quite fast (at least almost as integer and much better than float) although I guess it could be better and could  support 16.8 too  :P
There isn't all math functions either, so that will need to be coded  :)
Hm that might be handy for 3D stuff. It's not as accurate, but it's much faster than floating points.
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Alvajoy123 on March 28, 2017, 02:03:22 AM
we need to find a way to make everything compatible on the calc
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Dream of Omnimaga on March 28, 2017, 02:08:26 AM
Maybe one day that will come, since we can now program ASM on-calc with Mimas on the TI-83+/84+/SE, but it will most likely depend if there is enough demand.

Also, the calculator only has a small amount of user RAM and Flash, and the C code will take a considerable amount of space compared to the executable, especially with comments. Don't expect to make a large game directly on-calc, especially with good graphics (since an on-calc sprite maker would most likely take longer to use)
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: MateoConLechuga on April 07, 2017, 01:47:35 AM
Pretty awesome toolchain update! Installing on windows is probably the easiest toolchain installation in the entire world now. Lots of bug fixes and feature additions, keep reading for more or just get the download.

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

Note: Libraries are now included by using '#include <graphx.h>' rather than '#include <lib/ce/graphx.h>'. Also, if you are updating an older project, please use an updated makefile from the examples folder. These changes are important, so be sure to make them! :)

Things that have changed (there's more too, take a look at github):

Also, jacobly is doing insane things with llvm, so feel free to give him some kudos whenever he's around :) Many thanks to jacobly and Adriweb for testing and telling me when I messed things up :P Enjoy everyone! Until next time.
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: xMarminq_ on April 07, 2017, 02:17:09 AM
<3
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: kotu on April 07, 2017, 04:03:22 AM
__ @MateoConLechuga , dude


Originally in your first relase we had 2 folders,

#include <include/lib/ce/graphx.h>   
AND
#include <lib/ce/graphx.h>          which was used in some of the demos



Now you have just said

Quote from: MateoConLechuga
Libraries are now included by using '#include <lib/graphx.h>' rather than '#include <lib/ce/graphx.h>'.
Firstly, they were NEVER IN  <lib/ce/graphx.h> !!! AND
Secondly, they are not in your new '<lib/graphx.h>'

They are actually in <include/ce/lib>
ALSO there are only 3 in there - where are the others??!


Personally I consider EVER changing folder locations of include files to be abominable act.
PLEASE, PLEASE leave them in

AND LET THEM BE FOREVER! PLEASE!!

grr
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: MateoConLechuga on April 07, 2017, 04:24:00 AM
This is because of people who apparently need it for their online IDEs. But since you don't like it, I'm just going to scrap it and put everything in one folder if that is okay with you. Then it will just be #include <graphx.h>, which obviously will never be changed.
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: kotu on April 07, 2017, 05:18:26 AM
Good move
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: MateoConLechuga on April 07, 2017, 05:39:13 AM
Quote from: kotu on April 07, 2017, 05:18:26 AM
Good move
Trust me; I was going to do it this way in the beginning :P Anywho, the toolchain is updated again; now you just have to do #include <graphx.h>. No more worries about breaking future things I guess :P
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Adriweb on April 07, 2017, 03:39:08 PM
That said, I guess I'll commit some compatibility thing for the older paths to still work instead of possibly make people angry about the toolchain updates breaking their stuff.
*However* because things should still be updated, it will print an annoying deprecation warning message until their code gets fixed :P And eventually, I guess this compatibility layer may get removed.

This is the proper way to handle a graceful deprecation/removal for "breaking" changes (even if it's here a matter of removing just a few chars)

Edit: done https://git.io/vSwbz
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: Dream of Omnimaga on April 07, 2017, 04:32:20 PM
IMHO, whenever possible, it would be good to keep things compatible as often as possible in the future, otherwise this will just prompt some coders to stop upgrading.
Title: Re: C SDK and Libraries for the TI84+CE/TI8PCE
Post by: MateoConLechuga on January 30, 2018, 01:21:13 AM
If you are curious about C and want to try learning it, this update was made for you!

The toolchain has been completely revamped and now uses jacobly's fasmg-ez80 tools to perform the assembling and linking stages that were once handled by the old ZDS tools. What this means:


You can also use the standard [mono]stdio.h[/mono] commands for interfacing with files! This includes functions such as fopen(), fputs(), fread(), etc. This leverages the shared fileioc library to make porting applications even easier.

Download links are below, happy coding!

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

Many thanks to jacobly who contributed a significant portion in making this possible.