Color Computer 1/2/3 Hardware Programming, Chris Lomont, V0.82
Total Page:16
File Type:pdf, Size:1020Kb
Color Computer 1/2/3 Hardware Programming, Chris Lomont, v0.82 Color Computer 1/2/3 Hardware Programming Chris Lomont, Aug 2007, version 0.82 This document collects and details hardware programming information for the TRS-80 Color Computer, versions 1, 2, and 3. Although it has some tutorial information in it, it is designed to be a reference. Many areas also apply to the Color Computer Clones such as the British Dragon 32/64. It is compiled and edited by Chris Lomont, www.lomont.org. Send comments, corrections, and errors to CoCo3 at the above domain. Please don't repost this on the web, but point to this copy, so eventually all information is corrected and integrated. This document is compiled from many sources, listed in the Bibliography. If you feel this infringes any of your copyrighted material, email me with your material, and I will remove or rewrite from scratch the offending sections. Hex numbers start with a $, as in 255=$FF. Addresses like $FFFE (65534) give the decimal in parentheses. 16-bit addresses like $B0F1 are in 6809 CPU address space. On the Color Computer 3, 20-bit addresses like $70FFF are in GIME address space. Also on the Color Computer 3, the Memory Mapping Unit (MMU) maps eight 8K pages from the GIME space into CPU space. Many sections (marked TODO) need a lot more work, which I will do given time. DISCLAIMER: All information provided as is, etc. Use at your own risk. Version History 0.8 June 2006 Initial version and organization of material. 0.81 July 2007 One pass of cleanup and some new material added. 0.82 Aug 2007 Rewrite, reformat, complete overhaul. 1 Color Computer 1/2/3 Hardware Programming, Chris Lomont, v0.82 Table of Contents COLOR COMPUTER 1/2/3 HARDWARE PROGRAMMING .................................................................................1 TABLE OF CONTENTS.................................................................................................................................................2 HARDWARE INTRODUCTION...................................................................................................................................5 6809 CPU NOTES............................................................................................................................................................5 COLOR COMPUTER 1/2 HARDWARE TOPICS (PIA, VDG, SAM)......................................................................7 PIA (PERIPHERAL INTERFACE ADAPTERS).....................................................................................................................7 VDG (VIDEO DISPLAY GENERATOR).............................................................................................................................7 SAM (SYNCHRONOUS ADDRESS MULTIPLEXER)...........................................................................................................8 COLOR COMPUTER 3 HARDWARE TOPICS (GIME) ..........................................................................................9 GIME (GRAPHICS INTERRUPT MEMORY ENHANCEMENT).............................................................................................9 MMU (Memory Management Unit)........................................................................................................................10 Graphics .................................................................................................................................................................10 Palettes ...................................................................................................................................................................10 Interrupts................................................................................................................................................................10 CoCo 1/2 compatibility...........................................................................................................................................10 MEMORY MAPPING ..................................................................................................................................................10 COCO 1/2:....................................................................................................................................................................10 CoCo 2 memory map..............................................................................................................................................10 COCO 3........................................................................................................................................................................11 Simple CoCo 3 Memory Map .................................................................................................................................12 COLORS.........................................................................................................................................................................14 COCO 1/2:....................................................................................................................................................................14 COCO 3:.......................................................................................................................................................................14 GRAPHICS MODES.....................................................................................................................................................15 COCO 1/2.....................................................................................................................................................................15 COCO 3........................................................................................................................................................................18 TEXT MODES...............................................................................................................................................................18 COCO 1/2.....................................................................................................................................................................18 COCO 3........................................................................................................................................................................19 KEYBOARD ..................................................................................................................................................................21 JOYSTICK .....................................................................................................................................................................22 MOUSE...........................................................................................................................................................................23 INTERRUPTS................................................................................................................................................................23 COCO 1/2/3..................................................................................................................................................................23 COCO 3........................................................................................................................................................................24 SOUND ...........................................................................................................................................................................25 CASSETTE STORAGE ................................................................................................................................................25 FILE FORMAT ...............................................................................................................................................................25 HARDWARE..................................................................................................................................................................26 DISK STORAGE ...........................................................................................................................................................28 2 Color Computer 1/2/3 Hardware Programming, Chris Lomont, v0.82 DISK FORMAT ..............................................................................................................................................................28 CONTROLLER ...............................................................................................................................................................30 DUP - MERGE AND REMOVE.........................................................................................................................................33 SERIAL I/O....................................................................................................................................................................35 SOFTWARE ...................................................................................................................................................................35 HARDWARE..................................................................................................................................................................35 CARTRIDGE INFO ......................................................................................................................................................36 BASIC, EXTENDED