Programming cross z80 calculators
From WikiTI
Contents
Introduction
It is a nice feature to do in your games and other programs to be able to use them across all the z80 calculators.
The difficulty to port depends on every case. In some games, it is enough changes in some graphics, safe rams and b_calls to make it work. Some cases might be a nightmare (in practical too difficult) or simply impossible.
General Advices
- Avoid b_calls
- use a assembler that supports #if #else #endif directives (give a example on how to use)
- use a linker capable of all z80 calculators format
- See in Z80 Routines a set of graphic routines to all calculators
Help Documentation
Safe Rams
Safe ram is simply some portions of fixed ram usable to the programmer without any worry to the TI-OS. But it depends from calculator to calculator. Here is a table to illustrate what is available or not across the z80 calculators:
Specific calculator info
Here you have important aspects of calculators (mostly hardware related).
TI-73
- just APPS programming (?)
TI-82
- No Hooks
TI-85
- memory mapped LCD (great but others don't)
TI-86
- memory mapped LCD (great but others don't)
TI-83
- Link port is different from TI-83+
TI-83+
- (most usual z80 platform)
TI-84+
- CPU is around 3x faster (good but not always)
- Some bad LCD can screw your beautiful graphics
Program in RAM template
#ifdef TI73 #include ti73.inc ;TI73 asm execution normally is on a APPS #endif #ifdef TI82 ;#include ti82.inc ;depends on shell (?) #endif #ifdef TI83 #include ti83.inc .org userMem #endif #ifdef TI83P #include ti83plus.inc .org userMem-2 .db t2ByteTok,tAsmCmp ; .db $BB,$6D tokens for ASM program #endif #ifdef TI85 ;#include ti85.inc .org asm_exec_ram-2 .db $8E,$28 nop jp lblStart .dw 0 .dw tTitle ;no idea of what this is #endif #ifdef TI86 ;#include ti86.inc .org asm_exec_ram-2 .db $8E,$28 ;no idea of what this is nop jp lblStart .dw 0 .dw tTitle #endif Start: #ifdef TI83P b_call(_RunIndicOff) b_call(_GrBufClr) #endif ret End: