Skip to content

An easy, lightweight, library and set of built tools for the TI-84

License

Notifications You must be signed in to change notification settings

HeronErin/TiConstructor

Repository files navigation

TiConstructor


Click here for docs.
Or click here to get back to github from the docs.

        This is a remake of my LibTi84 project and aims to provide a means for the construction of games for the ti-84 (NON CE). This is more or less a culmination of all my knowledge in this niche field. I am not an expert. And this is a personal tool I use in my quest for a real-time 3d game for the ti-84. Everything should be capable of being built as an app or as a program (As long as you don't use any non-constant global variables).

        I do not plan to rely on any shells, although Noshell is recommended for asm programs. This is made for linux, although you can use WSL if you must use windows.

How to get started

        First, make sure you have the right project, this is for the ti-84 monochrome calculators, if your calculator has color you have come to the wrong place. Next, I recommend you use an emulator for development so you don't brick your real device, I personally never run anything other than the end product on my physical calculator. You might want to use jsTIfied, an Online TI-83+/TI-84+ Graphing Calculator Emulator hosted on cemetech. But if you use an emulator you will need a rom (Read Only Memory dump of a calculator), the legal option is to dump your calculator's rom using rom 8x, although you can also download a rom from archive.org. Next, you will need to follow the installation steps. If you have the helloworld successfully building and running in the emulator you are about done. At this point, if you don't know what to do now, I recommend you learn how to program with the calculator from ti-84 in 28 days guide, I know you came here for C, but it provided essential info. Along with SDCC - Interfacing with Z80 assembler code, whitch provides essential info on how to use inline asm and differences with sdcc's z80 asm and what the guide uses. Also look in the src/ and look as what functions are avalible to use.

        Ok, ok, I know that was a lot to digest, but if you did all that, you are now ready to make all sorts of cool shit. If you want to make fun 2d games you can do it all in c(sort of), if you want to make some 3d games, you might not have such luck. That is what this project's goal is, to make a real-time 3d game, but that is quite hard with this calculator being an 8-bit device with half-baked 16-bit compatibility. But as of now, a world of possibilities is opened.

How to install

  1. First im going to assume you are using linux, or at least set up WSL. Although if you don't want to install anything you can try out github codespaces and skip the clone step, but everytime you build you need to download file.
  2. Clone this repo with: git clone https://github.com/HeronErin/TiConstructor.git
  3. Install SDCC version 4.1
  4. If you are using Ubuntu you need to use the rabbitsign ubuntu versing rm other_files/rabbitsign && mv other_files/rabbitsign_ubuntu_build other_files/rabbitsign && chmod +x other_files/rabbitsign
  5. Test it out
 build_prog.sh examples/helloworld/ helloWorld

or

 build_app.sh examples/helloworld/ helloWorld

Now that you have a working build system, install tilp (or TI Connect for windows) and send the file to your calc.

How this works

        This is not something that was simple to figure out, there is no unified guide to the ti84/ti83+. But here is my explanation of what this toolkit does. SDCC compiles c code to z80 assembly and assembles it into a binary file. Then if you are making a program binpac8x.py will pack it into a program file (.8xp). If you are making an app a buildid is generated for you, my script generates a custom header for you, and rabbitsign will sign it with the freeware key and converts it to an app file (.8xk). But thanks to the work of me and the giants whose shoulders I stand on, that is all abstracted away from you with a single line build command.

        For you, the developer, I gave you a few files in the lib/ forlder, these are some useful tools for what ever you are making. Since you are often trying to keep build sizes down, many functions require you to enable them with #define USE_FUNCTION_NAME after you #include the source file. I recommend you look at the source code of the library itself for the exact #includes you need to use. And now there exists some documentation for this toolkit over here.

Ps. Don't remove the .buildid files, you need to keep the same .buildid everytime you update an app on your calculator

Some useful resources

Random fun facts

  1. When you build an app, a .buildid file is generated with a unique(ish) id for your app. This is what allows you to update it on the calculator because can't replace an app on your calculator with an app with the same name but a different build id, and the calculator refuses to allow 2 apps to exist with the same build id, so don't delete your .buildid or you will be forced to get a new name >:{
  2. Since apps require you to bcall JForceCmdNoChar before you exit, I came up with an interesting trick to do this for you, since I didn't want a mandatory bcall. If you push a value to the stack without popping it, the ret keyword will jump to that memory address, this is how functions work, so before your app runs, I simply push the address of my code that runs the required bcall, making this run after your main function returns.

Credits

I did take some code from others, I just can't do it all myself.

About

An easy, lightweight, library and set of built tools for the TI-84

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages