TMS9900 Assembly Programming for the TI-99/4A


The TI-99 was pretty much the only computer to use the TMS9900, just like the Cpu itself, the TI-99 wasn't designed like most computers - with almost all it's ram as VRAM - it actually uses VRAM to store basic programs (which is not as fast as 'proper' memory!!)

Specs:

TI-99 4A
Cpu 3mhz TMS9900
Ram 256 bytes! (32k ram upgrade option)
Vram 16k
GPU TMS9918A
Resolution 160x144
Max Tiles 256 (8x8 px) - 360 onscreen
Max Sprites 40 (8x8 px 10 per line)
Colors 4
Sound chip TMS9919

TI-4A


TI Memory Map

Address  Details
>0000 Console / ROM / OS / GPL Interpreter / BASIC Interpreter
>2000 “Low” Ram Expansion (8k of 32k)
>4000 Device Service Routines
>7000 Cartridge ROM / Page Flip
>8000 RAM Memory Mapped Devices - VDP,GROM, SOUND, SPEECH.
>8000 CPU Memory 256 byte block
>8400 Sound Chip
>8800 VDP Data Read
>8802 VDP Status Read
>8C00 VDP DATA Write
>8C02 VDP Address Write
>9000 Speech Read
>9400 Speech Write
>9800 GROM Data Read
>9802 GROM Address Read
>9C00 GROM Data Write
>9C02 GROM Address Write
>A000 High Ram Expansion (24k of 32k)

TI VDP Memory Map

Address 
Details
>0000 Screen Image
>0300 Sprite Attrib
>0380 Color Table
>0400 Sprite Descriptor
>0780 Sprite Motion
>0800 Pattern Generator
>1000 Free Space
>3500 Disk DSRs

TI Default Charset

The Character set has no lowercase characters.

TI Key Map

To select a column of the Keymap we use CRU Address 0024h, we can then read in from the address 0006h
We can read a whole column into R4 with ST R4,8
We can test a single bit with TB n - where n is the bit (offset from 0006h) to test 


CRU Address Col 0 Col 1 Col 2 Col 3 Col 4 Col 5 Col 6 Col 7
0006h = . , M N / J1-Fire J2-Fire
0008h space L K J H ; J1-Right J2-Right
000Ah enter O I U Y P J1-Left J2-Left
000Ch
9 8 7 6 0 J1-Down J2-Down
000Eh fctn 2 3 4 5 1 J1-Up J2-Up
0010h shift S D F G A

0012h ctrl W E R T Q

0014h
X C V B Z



Sound on the TI99

The TMS9919 uses memory mapped port 8400h for its sound control... This port takes a single byte of data - except for tones which take 2 bytes
The data we send is in the format below:


Bits
Command Bit Details  7  6  5  4  3  2  1  0
Format Template L=Latch C=Channel T=Type XXXX=Data L C C T D D D D










Tone - Command 1/2 C=Channel L=tone Low data 1 C C 0 L L L L
Tone - Command 2/2 H= High tone data (Higher numbers = lower tone) 0 - H H H H H H
Volume C=Channel (0-2)  V=Volume (15=silent 0=max) 1 C C 1 V V V V
Noise Channel (Channel 3)  M=Noise mode (1=white) R=Rate (3=use tone 2) 1 1 1 0 - M R R


 

View Options
Default Dark
Simple (Hide this menu)
Print Mode (white background)

Top Menu
***Main Menu***
Youtube channel
Forum
AkuSprite Editor
Dec/Bin/Hex/Oct/Ascii Table

Z80 Content
***Z80 Tutorial List***
Learn Z80 Assembly
Hello World
Advanced Series
Multiplatform Series
Platform Specific Series
ChibiAkumas Series
Grime Z80
Z80 Downloads
Z80 Cheatsheet
Sources.7z
DevTools kit
Z80 Platforms
Amstrad CPC
Elan Enterprise
Gameboy & Gameboy Color
Master System & GameGear
MSX & MSX2
Sam Coupe
TI-83
ZX Spectrum
Spectrum NEXT
Camputers Lynx

6502 Content
***6502 Tutorial List***
Learn 6502 Assembly
Advanced Series
Platform Specific Series
Grime 6502
6502 Downloads
6502 Cheatsheet
Sources.7z
DevTools kit
6502 Platforms
Apple IIe
Atari 800 and 5200
Atari Lynx
BBC Micro
Commodore 64
Commander x16
Super Nintendo (SNES)
Nintendo NES / Famicom
PC Engine (Turbografx-16)
Vic 20

68000 Content
***68000 Tutorial List***
Learn 68000 Assembly
Platform Specific Series
Grime 68000
68000 Downloads
68000 Cheatsheet
Sources.7z
DevTools kit
68000 Platforms
Amiga 500
Atari ST
Neo Geo
Sega Genesis / Mega Drive
Sinclair QL
X68000 (Sharp x68k)

8086 Content
Learn 8086 Assembly
8086 Downloads
8086 Cheatsheet
Sources.7z
DevTools kit
8086 Platforms
Wonderswan
MsDos

ARM Content
Learn ARM Assembly
ARM Downloads
ARM Cheatsheet
Sources.7z
DevTools kit
ARM Platforms
Gameboy Advance
Nintendo DS
Risc Os

Risc-V Content
Learn Risc-V Assembly
Risc-V Downloads
Risc-V Cheatsheet
Sources.7z
DevTools kit

PDP-11 Content
Learn PDP-11 Assembly
PDP-11 Downloads
PDP-11 Cheatsheet
Sources.7z
DevTools kit

TMS9900 Content
Learn TMS9900 Assembly
TMS9900 Downloads
TMS9900 Cheatsheet
Sources.7z
DevTools kit
TMS9900 Platforms
Ti 99

6809 Content
Learn 6809 Assembly
6809 Downloads
6809/6309 Cheatsheet
Sources.7z
DevTools kit
6809 Platforms
Dragon 32/Tandy Coco
Fujitsu FM7
TRS-80 Coco 3
Vectrex

My Game projects
Chibi Aliens
Chibi Akumas

Work in Progress
Learn 65816 Assembly
Learn eZ80 Assembly

Misc bits
Ruby programming








































































Recent New Content
Joystick reading on the Vectrex - 6809 ASM

Joystick and Key reading on the Fujitsu FM7

Key and Joy reading on the Dragon / CoCo

YQuest6 - NeoGeo Specific code (Fix Layer)

6809 Lesson 4 - The StackS!

Hello World on the Fujitsu FM7

Hello World on the Vectrex

Hello World on the Dragon / Tandy CoCo

Porting 'Yquest' to the Genesis / Megadrive

Lesson P3- Sound with the TMS9919 on the TI-99

Lesson YQuest4 - Amiga Specific code

Nintendo DS Bitmap graphics (16 bit) Arm ASM


Gaming + more:

Emily The Strange (DS) - Live full playthrough

$150 calculator: Unboxing the Ti-84 Plus CE (eZ80 cpu)










Buy Chibi Akuma(s) from PolyPlay
Buy ChibiAkuma(s) games now!























































































































Recent New Content
Joystick reading on the Vectrex - 6809 ASM

Joystick and Key reading on the Fujitsu FM7

Key and Joy reading on the Dragon / CoCo

YQuest6 - NeoGeo Specific code (Fix Layer)

6809 Lesson 4 - The StackS!

Hello World on the Fujitsu FM7

Hello World on the Vectrex

Hello World on the Dragon / Tandy CoCo

Porting 'Yquest' to the Genesis / Megadrive

Lesson P3- Sound with the TMS9919 on the TI-99

Lesson YQuest4 - Amiga Specific code

Nintendo DS Bitmap graphics (16 bit) Arm ASM


Gaming + more:

Emily The Strange (DS) - Live full playthrough

$150 calculator: Unboxing the Ti-84 Plus CE (eZ80 cpu)










Buy Chibi Akuma(s) from PolyPlay
Buy ChibiAkuma(s) games now!























































































































Recent New Content
Joystick reading on the Vectrex - 6809 ASM

Joystick and Key reading on the Fujitsu FM7

Key and Joy reading on the Dragon / CoCo

YQuest6 - NeoGeo Specific code (Fix Layer)

6809 Lesson 4 - The StackS!

Hello World on the Fujitsu FM7

Hello World on the Vectrex

Hello World on the Dragon / Tandy CoCo

Porting 'Yquest' to the Genesis / Megadrive

Lesson P3- Sound with the TMS9919 on the TI-99

Lesson YQuest4 - Amiga Specific code

Nintendo DS Bitmap graphics (16 bit) Arm ASM


Gaming + more:

Emily The Strange (DS) - Live full playthrough

$150 calculator: Unboxing the Ti-84 Plus CE (eZ80 cpu)










Buy Chibi Akuma(s) from PolyPlay
Buy ChibiAkuma(s) games now!