Difference between revisions of "Programming cross z80 calculators"

From WikiTI
Jump to: navigation, search
(added prgm asm template)
m (Program in RAM template)
Line 51: Line 51:
 
  <nowiki>
 
  <nowiki>
 
#ifdef TI73
 
#ifdef TI73
 +
#include ti73.inc
 
;TI73 asm execution normally is on a APPS
 
;TI73 asm execution normally is on a APPS
 
#endif
 
#endif
 +
 
#ifdef TI82
 
#ifdef TI82
 
;#include ti82.inc
 
;#include ti82.inc
 
;depends on shell (?)
 
;depends on shell (?)
 
#endif
 
#endif
 +
 
#ifdef TI83
 
#ifdef TI83
 
#include ti83.inc
 
#include ti83.inc
 
  .org userMem
 
  .org userMem
 
#endif
 
#endif
 +
 
#ifdef TI83P
 
#ifdef TI83P
 
#include ti83plus.inc
 
#include ti83plus.inc
Line 66: Line 70:
 
  .db t2ByteTok,tAsmCmp  ; .db $BB,$6D tokens for ASM program
 
  .db t2ByteTok,tAsmCmp  ; .db $BB,$6D tokens for ASM program
 
#endif
 
#endif
 +
 
#ifdef TI85
 
#ifdef TI85
 
;#include ti85.inc
 
;#include ti85.inc
Line 75: Line 80:
 
  .dw tTitle ;no idea of what this is
 
  .dw tTitle ;no idea of what this is
 
#endif
 
#endif
 +
 
#ifdef TI86
 
#ifdef TI86
 
;#include ti86.inc
 
;#include ti86.inc
Line 84: Line 90:
 
  .dw tTitle
 
  .dw tTitle
 
#endif
 
#endif
 +
  
 
Start:
 
Start:

Revision as of 06:48, 27 November 2009

This article is a stub. You can help WikiTI by expanding it.


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:

This article is a stub. You can help WikiTI by expanding it.


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: