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

[TI-84+CE] - xLIBCE

Started by tr1p1ea, March 22, 2016, 03:35:50 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

tr1p1ea

I have been working on porting over xLIBC to the CE and after a slow start have been making some good progress of late.

At this stage I have a number of routines for tilemaps, sprites, images, key input, drawing strings and such already ported, along with support routines for collision detection and map checks etc.

There have been some nice speed improvements with the CE version even in the current unoptimised state (working on functionality first).

Here is a tilemap scrolling test:
TI-84+CSE:

TI-84+CE:


And this morning I ported over the BGPIC & BGPIC32 functions as seen below:



I should have noted that this is the CSE xMEME example program running completely unaltered.

I have implemented 'frames' for both BGPIC's and BGPIC32 images so that you can store multiple images in a single appvar. Here is a speed test between the CSE and the CE:
CSE

CE


I have also ported enough routines so that the xZELDA demo works in fully. Note that this program is unaltered from the CSE version:

Dream of Omnimaga

What I love about this is that since this uses hooks, this will allow TI-BASIC to almost take full advantage of the TI-84+CE speed boost over the CSE, even more than CE Textlib, plus it has built-in sprite/tiles support. I like the new feature additions such as multi-pic appvars. I hope that 32 color pics will support partial draw too.

Also that scrolling speed is impressive. I'm glad you managed to port xLIBC to this calc, even though there's no community Flash app support. :)
  • 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

Dudeman313

This is impressive! I love the looks and the speed! I just no longer have a CE.  <_<
  • 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

What would be cool is if xLIBCE supported the following:

-The ability to choose between two resolutions when displaying parts of background pictures, so we could use full-screen 80x60 pics that have fewer colors. There are many scenarios where someone will not need 256 colors for a 80x60 picture, thus, making the higher color depth a waste of space.

-2, 4, 8 and 16 colors background pics with palettes. There are many scenarios where someone might want to use anime-like cutscenes that only requires about 4-6 colors at most.

That would allow people to save a considerable amount of space.
  • 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

Snektron

Impressive. How have you made the hook? Does the program which uses xLIB need to enable and disable it or do you store it in some semi-safe place in ram?
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Dudeman313

Also, @tr1p1ea , is this also compatible with xLIB programs (like Builderboy's SHIFT port)?
  • 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

It won't run monochrome xLIB games. xLIBC is entirely different. I bet that games could be ported without too much hassle, though. The main difficulty would be that command syntax is a bit different (eg real(12 will be real(7) and making sprites is different.
  • 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

tr1p1ea

At this stage I haven't 100% locked down the location of the hook stub itself but the routines will be run from a standard location. There are a number of areas in RAM that can be useful for storing hooks as well.

This may change over the life of XLIBCE however the end user shouldn't notice.

Unfortunately monochrome projects won't work out of the box, however they can be ported with graphics updates and such.

Dream of Omnimaga

What happens if someone else makes an hook-based library by the way? For example, on the CSE @Cumred_Snektron made DovahCalc CSE, which replaces the TI-OS fonts with something else, and DCS BASIC libs worked fine with it installed. The only difference is that when using Celtic colored text, the font was disabled due to DCS overriding its hook, and when exiting the program it re-enabled the font hook. But could there be conflicts happening on the CE?
  • 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

#9
Yup, there could be (and already have been) conflicts between hooks on the TI-eZ80 series. That's why I've been campaigning, perhaps a bit repetitively but for good reason IMO (*), for a common hook framework on the TI-eZ80 series.

*: I think that a common hook framework provided by e.g. libload, or any related place containing core "shell"-independent functionality, is the best way forward for the TI-eZ80 series. Like a powerful library loader, now implemented by Mateo for a little while, that's what was done by the community on the TI-68k/AMS platform as well, with two conventions:
1) Kevin Kofler's "evHk" convention limited to event hooks, which worked without a "kernel";
2) Matthieu "flanker" Gallet's little-known but much more powerful, "kernel"-based, UTSRlib ( http://ti-fr.com/?act=66&art=11 ). Most of this article is written in French but the API description is fortunately mostly in English.

On the TI-eZ80 series, TI-68k old-timers like me can't necessarily bring in much new calculator-side code, but they can at least bring in what they know about existing good and bad practices from 1-2 decades ago in another calculator series from which the TI-eZ80 imported several traits (flat addressing space, flat OS and FlashApps, etc.).
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TIEmu and TILP.
Co-admin of TI-Planet.

Dream of Omnimaga

Actually, this is a bit why making all basic tools and ASM routines as libraries would be nice. It would perhaps make shells less useful, but at least we would be able to use Basic libs without being forced to use 1 shell in particular. Mateo's lib already does that and that is how it works on PC I think. But of course it's the author's choice. It would just be more convenient to users I think.
  • 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

123outerme

Do you plan to port your changes like the "frames" thing in BGPIC and BGPIC32 back to the CSE, or is it just not fast enough for these things?
  • Calculators owned: TI-84+CSE, TI-nspire Clickpad, TI-84+SE

tr1p1ea

DCSE will perform hook chaining so there shouldn't be much of an issue.

The frames functionality was actually written for the CSE first however it hasnt been released. It will depend if there is an update to DCSE8 I suppose.

Dream of Omnimaga

I'm curious about if Kerm has plans to update DCSE 8 as well. That calc is discontinued but even Kerm himself still releases stuff for it (Graph 3DC comes to mind)
  • 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

tr1p1ea

I'm not entirely sure however there is a strong focus for myself on getting CE related stuff released :).

Also I fixed a bug in the DrawString command which can be seen with the extra character in the xMEME example - hopefully it's good now.

I have another bug where some tilemap data gets overwritten that I am investigating now.

I'm very glad that I have 4 days off over easter and am hoping to knock off a few more functions :).

Powered by EzPortal