Flash Apps
A Flash App lives in the calculator’s archive and opens from the apps menu. TIpy-asm builds one by translating your program to C and compiling it with CEdev. Flash Apps support more of Python than the assembly targets, including recursion and strings in variables.
The CE OS only accepts apps signed by TI, so a TIpy-asm app is delivered as AppVars
plus an installer program that copies it into flash. tipy-asm flash-app builds
both.
Build
With CEdev on your PATH, run this in a project folder:
tipy-asm flash-app
examples/flash_app in the repository is a complete project to start from: it
clears the screen and says hello world in the center. The
build writes to python_port/bin/:
File |
What it is |
|---|---|
|
The app, split into AppVars named |
|
The installer program. |
|
The app itself, which the CE OS will not accept directly. |
python_port/ is generated on every build, so do not edit it.
Install
Send
INSTALL.8xpand everyHELLO.*.8xvfile to the calculator.Run
INSTALLfrom the home screen. Depending on your OS version, you may need a shell such as Cesium, or the arTIfiCE jailbreak, to run it.Open the app from the apps menu. The installer offers to delete its own files.
Warning
The installer writes to the calculator’s flash memory. Back up anything important, and do not interrupt it while it runs.
Delete an app
Run INSTALL again. When the app is already installed, the installer shows its
name and asks whether to delete it. Press Enter to delete it, or Clear
to keep it. The installer only needs its own program for this, not the AppVars.
A deleted app stays in flash until the OS tidies the archive, which it does when the
installer exits. The installer checks the same app list as the apps menu, so a
deleted app no longer counts as installed, even before the tidy-up. To install again afterwards, send
the AppVars and run INSTALL once more. You can also delete an app from the
mem menu as usual.
How the installer works
The installer is a TIpy-asm program: ti84asm/installer/installer.py holds its
logic, and installlib.asm holds the routines that unlock, erase, and write flash.
flash-app compiles them with the CE target every time it builds an app, with the
app’s name and AppVar prefix filled in.
The installation logic is a line-by-line port of the installer in CE-Programming/app_tools, whose readme permits copying it to make a custom installer. A test runs the compiled installer against a Python copy of upstream’s C on hundreds of random layouts, and requires the same flash writes and erases, in the same order.
The flash routines are upstream’s assembly, with only their entry points changed to take arguments in registers.
Checking for and deleting an app follow the Cesium shell: the installer walks the apps with the OS’s
FindAppUp, which skips deleted apps, compares whole names, and callsDeleteAppto delete one.
None of this has been run on real hardware by the test suite, which uses a simulator. Test a new build in CEmu first.
Libraries
A Flash App imports the same ti84 libraries as an assembly program, with the
same methods and arguments: graphics, keyboard, math, random,
color, sprite, font, storage, and file. A method the Flash App
backend does not have yet, such as font.paragraph(), is a build error that says
so; tipy-asm api NAME lists flash among each method’s targets. Its fonts are
the same FontLibC fonts, and font.default() is the same built-in font.
usb and serial are assembly-only. ti84.graph is the one Flash-only
library.
Settings
[tool.tipy.flash] in pyproject.toml can change the defaults. All are optional.
Key |
Default |
Meaning |
|---|---|---|
|
The project folder |
Where |
|
|
|
|
The app’s name |
AppVar names, before the number: 1-6 letters or digits. |
|
|
The installer program’s name. |
|
|
Bytes per AppVar. |
Using your own installer
If project_dir contains installer/makefile, flash-app builds that CEdev
project as the installer instead, passing NAME, APPVAR_PREFIX,
APPVAR_SPLIT_SIZE, and BINDIR on the make command line. Its makefile’s
values are the defaults in that case.