Files
Writing a preset file, step by step
A preset file is nothing more than plain text. This tutorial builds one up from nothing, one section at a time, so you can see exactly what each line changes. Every step below is also a real, downloadable .ti59 file you can load in Calc-U 59 as you go — try each one before moving to the next.
Before you start
A preset is just a text file, so it's usually easiest to write and edit it on a computer with a proper text editor, then get the finished file onto whichever device runs Calc-U 59. In the Apple ecosystem, the simplest way is to keep your presets in the Calc-U-59 folder under iCloud Drive on your Mac — the same folder the app uses for virtual magnetic cards — and let iCloud sync it to your iPhone or iPad automatically; open it there from the Files app or the preset picker. (There's no equivalent recommendation here for Windows — any folder that syncs to your phone works.)
None of that is required, though: you can write and edit a preset directly on an iPhone or iPad in any text editor that saves plain text, with no computer involved at all. That also means you can read this tutorial on the device itself and download each step's file straight to it — the same goes for every other preset on the TI-59 Software Collection page.
Watch out for .txt
When you save a preset with a plain text editor, it's easy to end up with my-preset.ti59.txt instead of my-preset.ti59 — Windows and macOS both hide known file extensions by default, so the file still looks like my-preset.ti59 in Finder, Explorer, or the iPhone file picker. Calc-U 59's preset picker only accepts .ti59, .ti58 and .ti58c, so a file with a hidden .txt tail shows up grayed out and can't be selected. If that happens, turn on "Show file extensions" (Windows Explorer) or "Show all filename extensions" (macOS Finder — Finder ▸ Settings ▸ Advanced) and rename the file, or rename it from a terminal with mv my-preset.ti59.txt my-preset.ti59.
Step 1: Setup
Start with the three lines every preset can begin with: MODEL picks which calculator you get (TI-59, TI-58 or TI-58C), SOLID-STATE-MODULE loads one of the fourteen library modules by its two-letter code — here ML for the Master Library — and PRINTER switches the emulated PC-100C on or off.
Load this file and you already have a working calculator: nothing else in a preset is required. Everything from here on is optional, added only because this particular preset needs it.
# TI-59 Preset File Tutorial — Step 1: setup # # This is the smallest possible preset file: it only picks the calculator # model and a couple of options. Load it in Calc-U 59 right now and you get # a TI-59 with the Master Library module and the printer switched on — # nothing else has been set up yet. # Setup the system: Choose the model, solid state module and printer on/off MODEL: TI-59 SOLID-STATE-MODULE: ML PRINTER: on
Step 2: Partition
PARTITION sets the split between program memory and data registers — the same trade-off the real TI-59 keyboard sequence 2nd Op 17 controls. The value is written as steps.registers: 719.29 means step 719 is the last program step, so 720 steps remain for the program and the other 79 slots become 30 (numbered 00–29) usable data registers on a TI-59. Leave this line out and the emulator uses the model's default partition instead.
This step doesn't change what you see when you load the file — there's no program or cue card yet — but it matters once Step 4 writes a program past the default partition boundary.
# TI-59 Preset File Tutorial — Step 2: partition # # Same as Step 1, with one addition: PARTITION changes the split between # program memory and data registers. # Setup the system: Choose the model, solid state module and printer on/off MODEL: TI-59 SOLID-STATE-MODULE: ML PRINTER: on # Change the partition layout of the calculator PARTITION: 719.29 # 720 steps, 30 data registers (3 2nd Op 17)
Step 3: Cue card
CUECARD is what turns a blank calculator into a labeled one. Template: MagnetCard and CueCard draw almost identical card art — real magnetic cards and cue cards used the same front-side label design. The difference is the back: a magnetic card stores the program, a cue card doesn't, so MagnetCard is the right choice here since this file is building toward one. Title and Banks are the card's header text and bank badges.
Row1 replaces the entire A′–E′ label row with one line of running text instead of five separate key labels — handy for a one-line instruction like this tutorial's "Calculates the sum of 1..N the slow way". A through E label the plain key row individually; \blank on D and E merges those key positions into C's label so "Enter number, then A" reads across all three keys.
Load this file now and the card appears immediately — nothing on it does anything yet, because there's still no program behind the A key. The full CUECARD field reference covers every field, the math-notation shortcuts, and both templates in more depth.
# TI-59 Preset File Tutorial — Step 3: cue card # # Adds a CUECARD section: the on-screen card shown once the preset loads, # labeling the A-E keys the way a real magnetic card would. # Setup the system: Choose the model, solid state module and printer on/off MODEL: TI-59 SOLID-STATE-MODULE: ML PRINTER: on # Change the partition layout of the calculator PARTITION: 719.29 # 720 steps, 30 data registers (3 2nd Op 17) # Setup the cue card that is shown after loading the preset. # For the template, either use "MagnetCard" for the TI-59 cards, or "CueCard" # for the blank cards without a magnetic coating. CUECARD: Template: MagnetCard Title: TI-59 Preset File Tutorial Magnetic Card Banks: 1,2 Row1: Calculates the sum of 1..N the slow way Row1Align: left A: Sum 1..N C: Enter number, then A D: \blank E: \blank
Step 4: Program
PROGRAM loads program memory as key codes — the same codes the calculator itself displays while you record a program by hand, not the physical key positions. Whitespace and line breaks are cosmetic; the loader reads a flat stream of two-digit codes and ignores anything after #, so the step-number comments above are for the reader, not the parser. This particular listing sums a number down to 1: it stores the entered value, loops subtracting and adding into a running total, and stops with R/S when done.
Load this file and press a digit, then A — the cue card told you to — and the program actually runs now.
# TI-59 Preset File Tutorial — Step 4: program # # Adds a PROGRAM section: the calculator's program memory, entered as key # codes. This particular program sums the numbers from 1 down to whatever # you enter — press a number, then A. # Setup the system: Choose the model, solid state module and printer on/off MODEL: TI-59 SOLID-STATE-MODULE: ML PRINTER: on # Change the partition layout of the calculator PARTITION: 719.29 # 720 steps, 30 data registers (3 2nd Op 17) # Setup the cue card that is shown after loading the preset. # For the template, either use "MagnetCard" for the TI-59 cards, or "CueCard" # for the blank cards without a magnetic coating. CUECARD: Template: MagnetCard Title: TI-59 Preset File Tutorial Magnetic Card Banks: 1,2 Row1: Calculates the sum of 1..N the slow way Row1Align: left A: Sum 1..N C: Enter number, then A D: \blank E: \blank # Setup the program memory. The format is very flexible, here we use 10 steps per line # and add a comment for the line numbers. The loader simply takes the key codes and ignores the rest. PROGRAM: 43 00 44 01 97 00 00 00 43 01 # 000-009 91 76 11 42 00 25 42 01 61 00 # 010-019 00 # 020
Step 5: Registers
REGISTERS preloads data register contents as plain decimal numbers, at the calculator's full internal precision — 13 significant digits. The value here, 3.000000000004 in register 29, is deliberately one that's awkward to key in by hand on real hardware (you'd need SUM and a division to land on it exactly); a preset just states the final value directly.
This step doesn't change what the program does — register 29 isn't part of the sum routine above — it's here so the next step has something worth recalling with RCL.
To check that a value actually loaded, open the debugger and look at the register list — on Mac and on iPad in landscape it's visible right alongside the calculator; on iPhone (and iPad in portrait) swipe to it. The debugger has to be turned on first on iPhone/portrait iPad: enable Debug Page in Portrait under Settings, or it won't be there to swipe to.
# TI-59 Preset File Tutorial — Step 5: registers # # Adds a REGISTERS section: preloaded data register content, entered as # plain decimal numbers, at the full TI-59 precision. # Setup the system: Choose the model, solid state module and printer on/off MODEL: TI-59 SOLID-STATE-MODULE: ML PRINTER: on # Change the partition layout of the calculator PARTITION: 719.29 # 720 steps, 30 data registers (3 2nd Op 17) # Setup the cue card that is shown after loading the preset. # For the template, either use "MagnetCard" for the TI-59 cards, or "CueCard" # for the blank cards without a magnetic coating. CUECARD: Template: MagnetCard Title: TI-59 Preset File Tutorial Magnetic Card Banks: 1,2 Row1: Calculates the sum of 1..N the slow way Row1Align: left A: Sum 1..N C: Enter number, then A D: \blank E: \blank # Setup the program memory. The format is very flexible, here we use 10 steps per line # and add a comment for the line numbers. The loader simply takes the key codes and ignores the rest. PROGRAM: 43 00 44 01 97 00 00 00 43 01 # 000-009 91 76 11 42 00 25 42 01 61 00 # 010-019 00 # 020 # Setup register content. The full TI-59 precision is supported. On the real hardware, the number below # can't be entered directly, one would need SUM and division to set this up. REGISTERS: 29 = 3.000000000004
Step 6: Keystrokes
KEYSTROKES is the odd one out: everything above describes the calculator's state, but this section acts, sending real key presses after everything else has loaded — Wait: 2s pauses between groups so you can watch the display change. Keystrokes use matrix coordinates, not the program-memory key codes from Step 4 — the digit 5 is program key code 05 but matrix code 73. The two tables are documented separately in the format reference precisely because mixing them up is the most common preset-writing mistake.
This is the finished tutorial file. Loading it types 5, A to run the sum program from Step 4, waits, then recalls register 29 from Step 5 and subtracts 3 from it — demonstrating, in order, every section this tutorial added.
# TI-59 Preset File Tutorial — complete # # This file is used to explain how preset files are constructed. See # https://www.calcu59.ch/presets/tutorial/ for the step-by-step walkthrough. # Setup the system: Choose the model, solid state module and printer on/off MODEL: TI-59 SOLID-STATE-MODULE: ML PRINTER: on # Change the partition layout of the calculator PARTITION: 719.29 # 720 steps, 30 data registers (3 2nd Op 17) # Setup the cue card that is shown after loading the preset. # For the template, either use "MagnetCard" for the TI-59 cards, or "CueCard" # for the blank cards without a magnetic coating. CUECARD: Template: MagnetCard Title: TI-59 Preset File Tutorial Magnetic Card Banks: 1,2 Row1: Calculates the sum of 1..N the slow way Row1Align: left A: Sum 1..N C: Enter number, then A D: \blank E: \blank # Setup the program memory. The format is very flexible, here we use 10 steps per line # and add a comment for the line numbers. The loader simply takes the key codes and ignores the rest. PROGRAM: 43 00 44 01 97 00 00 00 43 01 # 000-009 91 76 11 42 00 25 42 01 61 00 # 010-019 00 # 020 # Setup register content. The full TI-59 precision is supported. On the real hardware, the number below # can't be entered directly, one would need SUM and division to set this up. REGISTERS: 29 = 3.000000000004 KEYSTROKES: # Automate keystrokes, sent after everything above has been set up. As a sample here, we calculate # the sum from 1..5 using the program above. Keystrokes use the matrix coordinates, not the program # memory keycodes. Hence, the key "5" is 73, and not 05. 73 # 5 11 # A Wait: 2s # Wait for 2 Seconds in order to see the result 43 # RCL 83 # 2 64 # 9 Wait: 2s # The display only shows "3.", because there are not enough digits for the fraction. 75 # - 84 # 3 95 # = # After subtracting 3 we see the fraction.
That covers enough to write your own preset from scratch. The preset reference page documents every section in one place, and the complete grammar — the full matrix code table, 2nd-function key codes, and the CUECARD field list — is developer documentation in the GitHub repository: reference/StateFileFormat.md →
For more preset files to read and load, including much longer real-world programs, see the TI-59 Software Collection.