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

C SDK and Libraries for the TI84+CE/TI8PCE

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

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Dudeman313

I think not. The "latest" link makes me think otherwise.
  • Calculators owned: TI-84 PCE
  • Consoles, mobile devices and vintage computers owned: Android O Phone
Does this qualify as a signature? 
The answer is "Sure."


MateoConLechuga

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! :)

Dream of Omnimaga

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.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

MateoConLechuga

The 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

Tilemap demo:


Graphics test:

Dream of Omnimaga

Wow that seems fast O.O

I wonder if a smooth Mario game would be feasible?
  • 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

  • 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

#21
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

Dudeman313

  • Calculators owned: TI-84 PCE
  • Consoles, mobile devices and vintage computers owned: Android O Phone
Does this qualify as a signature? 
The answer is "Sure."


Dream of Omnimaga

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 :)
  • 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

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

    Dream of Omnimaga

    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. :)
    • 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

    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.

    Dream of Omnimaga

    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.
    • 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

    #28
    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
    Member of the TI-Chess Team.
    Co-maintainer of GCC4TI (GCC4TI online documentation), TIEmu and TILP.
    Co-admin of TI-Planet.

    Adriweb

    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)
    • 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

    Powered by EzPortal