=== page p-01 oe Texas Instruments Home Computer wy Me TI-99/4A CONSOLE AND - PERIPHERAL EXPANSION SYSTEM TECHNICAL DATA === page p-02 Texas Instruments Home Computer eee TI-99/4A CONSOLE AND PERIPHERAL EXPANSION SYSTEM TECHNICAL DATA === page p-03 TABLE OF CONTENTS Section A--TI-99/4A CONSOLE A.l General Description.......... Came e ee eneeneneces weer ed i A.2 I/O Pin Descripliun..cecesecees eee enees see neereencree 7 ' A.3 Memory Allocation... A.4 CRU Allocation..... A.5 Interrupt Handling A.6 Electrical CharacteristicS..cssssscceccceees seeeeveedZ Il lustrations—-Section A FLGUKE A TI-99/4A System Block Diagram.......ccseceeee eee ee eb B 1/0 READ Timing......cccccccccssccvtececceces eeeeeed3 Cc I/O WRITE Tiwiny...... rire te) 1) CRU Timing...ccscvescceece ere ee err rrr of E Connector Pin Identification Diagram....scseseeeeseel8 F TI-99/4A Logic Board Component Location Diagram,....19 G TI-99/4A Power Supply.......cceeccceccccccccvecccees 20 Section B-—-INTERFACE CONSIDERATIONS B.1--CPU Requirements B.1.1 General Comments.......ccccccccccvuscceucccce re | 8.1.2 TI-99/4A Memory Space Organization....... él 8.1.2.1 READ before WRITE considerations.. ers B.1.2.2 Cartridge Memory Space... .s.ecseceeecs MIT 22 B.1.3 CRU Space Definition. .ccccccceces ween e ee eeee oe eeeees 00004 B.1.3.1 Disallowed Instructions..... B.1.3.2 CRU OUTPUT Definition......... B.1.3.3 CRU INPUT Definition................... B.1.3.4 Spare CRU Bit Use........ wee B.1.4 TI-99/4A Peripheral Polling......... B.1.5 Indicator LED...... een ee cc eeeeeeeseeesesee acne eenreneceedl Bo1.6 DSR ROM Considerations... cccccccecveccccccsceencs venee etl B.1.6.1 Extended DSR ROM Techniques...... ceeecereneseee esas B.2--Expansion Unit Requirements B.2.1 System Bus Requirements...... see ee ene e cece eeeeeee veaweeel B.2.1.1 Remote Data Bus Driver........0- wee e cece eee 200008 B.2.1.2 Burn-Tn Consideration. ............2..-200-000 ee eee 28 B.2.2 Power Allocation Assumptions........ee0e eee e nec ceeeeeee 28 B.2.3 System Bus Pin Definition.....cccceccsncecce ee se eens 100029 B.3--Design and Development Requirements......... eee aucccerees veeeedl Il iustrations—-Section B TI- onlaa Memory Map. CRU Map..sscorsssvevves Peripheral Expansion Unit Schematic Diagram. ..sccceee eee eerccees eeeed2 2S =. =e eee eee Se ee Pe ee === page p-04 Section C--FILE MANAGEMENT SPECIFICATIONS Col Introduction... ...c.ccesecccccvscenes eee ceeee see e eee ee ces eeee edd T/O Handlingsc..ccccesccscccecscevccccoes eonnceee ee eerceee 00 34 File Organization and Use.....ccccscucvesecs pe sccceeeeees dF «1 Sequential FICS. eee seeseeenes eeeeee teeeeenee woe ee 34 e2.1 Terminology..c.cceceesccsccuvcces .2.2 File-Type Attribute.......cceee o¢.3 Mode of Operation.........ceeee 2 ol 02, 2. 2 File Management Overview....ccsescccsccscvsccaceeeee 2 2 oz 2.2.4 Temporary FileS......scceeece oe Implementation. .ccesecescccccccseceeevcscees seaee er rrrey 2 3 C.3.1 Peripheral Access Block Definition.....ccscceccscecescseeedl C.3.2 1/0 Opcodes..... ea C.3.7.1 OPEN... ccc cece ence cee enee a eenecese ee AO C.3.2.2 CLOSE. occ cece cece cece nce e cece ete ceeceseucnseececeas 40 C.3.2.3 READ... . ce. c eee eee Coen eee eeseee 40 C.3.2.4 WRITE. ccc cc cceecceececccescaveccecestseeenesanecucena 41 C.3.2.5 RESTORE /REWIND... se eeeees peeeeeee 41 C.3,2.6 LOAD. ..ccccccccccnccsccncceeccenccrsccvceccnvesevesee4l C.3.2.7 SAVE cc cecseccccsevcrscncrecerencsseesescececsesaed se e4l C.362.8 DELETE. ec eee eee ccc ccccccccceesetveees eevee renee eee eZ C.3.2.9 SCRATCH RECORD.......cueeecee tee c ce recceseceenes sees eG2 C.3.2.10 STATUS. cc. ccccecncccceccuscccaveeccesnces oe 42 C.3.3 rror Codes..seueee Cerne ence rewesernecneueesas even edd CVALTIONS. ccc esceeccccececccce ae eeeee tee eneceecen cece oAG R Actions and Reactions....... ee eee tween eee ene ee 44 Error Conditions. .... 0... cece eee e cece een ceceeceees 44 -l.1 Non-existing DSRs......- tee e eee ereccceee ee esn ee ee 44 -1.2 DSR-detected Errors..... pee c cence e cece nese aces c44 SPOC1Al T/O MOGES..cececcccecsscccenvccvccvercscrceees4d Default Handling... mory Requirements.... ue WN EE HAG 5 Linkage to BASIC...........00005 eevenee san eeeeececceece cece cc e46 C.5.1 BASIC PAR modifirations. 202022 e ee eee cence oe AG C.5.2 BASIC PAB linkage........... Occ c eect e cece meee tec eeneees 48 el.d PAB Layout...cecuseseccee Deere merece nonce eeteerecee eeeneee 39 ol 1/0 Opcodes..ccccesccccccccce Poem cree eee ecesecesenseceneee cA odified PAB Layout.......eeeeee eeeecee per ecceeeercece woecee 47 ASIC Link Structure.....cccceceucvese sone nee ecceeeeeee ees e848 ann & oe . Ror Re Q= === page p-05 Section D--DEVICE SERVICE ROUTINE SPECIFICATIONS D.1 Introduction....ccccsceccvvees 0.1.1 General Interface......eecoee D.2 1/0 BUS..cccscrsccccccccccrsecvevccecceners seve ee eeeenseesees 50 D.2.1 1/0 Bus Pin Assignments and Description....ccceeseees - 50 D.3 Hardware Structure of DSR... cccececceeeees bec ce eee rccneceene 51 0.3.1 DSR ROM. .ccceccccncescreres peace reeeeces eee eeeenece oS] D.3.2 CRU Mapping. ...scccvcccsevececccccssece eens) | 0.4 Software Structure of DSR... cseceseseeeee se enccecenees pone ee ede D.4.1 = - Symbol Definition BIOCk....ccccscusccccccccececncs Psy 4 U.4.2 Header and Linkage BlOCK.....eeeeee see eeeecsees eee eee IS D.4.2.1 A Sample Program for Header and Linkage Block. ceeeeeeee 54 0.4.3 Power—up Routine......eeeee pace cone cence eweceeeees see 200 D.4.4 Interrupt Routinescsrsscecececcccees sree e ween er eee e ee bb GIDSSARY. 20.22 eee ee ene ence meen nereneee 57 APPENDIX--Fold-out Schematic Diagrams TI-99/4A Schematic Diagrams (5 pageS).......cceseeeceeceee 09-63 Flex Cable 1/0 Schematic Diagrams (2 pages)........eese0++ 664-65 Peripheral Expansion Unit Power Supply..... wen eee cecsesese ses 066 f === page p-06 SECTION A TI-99/4A CONSOLE A.1 GENERAL DESCRIPTION The purpose of Lhis section 1s to Provide neccesary information concerning the 1/0 bus (input/output signal connection) of the TI-99/4A console for persons interested in designing peripherals for the computer. It is assumed that readers of this manual have a working knowledge of electronics and computers, especially in regard to the TMS 9900 microprocessor and its Communications Register Init (CRU) I/o technique. Sources fur this information are the TMS9900 Microprocessor Data Manual (MPOO1, Revision A) or the TMS9901 Programmable Systems Interface (MPO03; Jul , 1978). These books may be obtained from T semiconductor distributors or the TI Learning Center, A ylussary 1S provided on page 57 of this manual. The I/0 bus provides an interface between the console and its peripherals. This bus utilizes both memory-mapped I/O and LRU 1/0. The memory bus is frequently used for instruction fetch from read-only memory (ROM) in external peripherals and for data transfer to and from memory-mapped portions of these devices. The CRU bus is used for Peripheral enable/disable, device control, and data transfer to/from CRU-mapped portions of these peripherals. The TMS 9900 microprocessor accesses each peripheral to obtain instructions j from the device service routine (DSR) ROM. Since each peripheral contains its ! own DSR, the TI-99/4A does not have to be designed to anticipate future peripheral requirements. The dual 1/0 bus capability, interrupt handling, and external DSRs provide flextb111ty at low cost. === page p-07 TINGOW WIZE NOIS H94adS NVdX3 WOH 9 --------- WwuaHaluad 39V-H3LNI SUSHLNAS foo 22-SU a390uLuva ! sna 0/1 tor LuOd-1vNG alvisaiios ! qaiT1Wwuvd Siga1as 30Vi0aNI wee ee ' Nid vp 40-00 AMOWAW GLv-0V Hd r ga | YaLNI 1u3 | WvuHO WOH ! L. Ivnowiggy C7 "ek xp) | SWOU SJIHdVED L _1WNoliaawy JIVAYMILNT | | FIVIBILAI MOILLSAOr iLLASsv) WOIINVHIS Wwnl guvogA3y — 300930 ssauddy AYOWAW $L9373S 19078 AdOWIW TOYLNO9 O/I SWL a HOLVYINID < it] NNO0S X32 1IW09 6166 SWL YALYIANO) sng vivd 18 8 OL 1I9 SL JOV4NILNINGD TOULNOD SN ssauaav WO.LNWHd 40SS390ud AW1dS10 O301A 9ILt SWL WV Ovd BX HL HOLWHOS 91901 ANOWAW SLX 8Zb 1ON.LNOI AV 1dsid 8 SWYY90Hd aiswa YOSSAIOHdOYIIW LIdSL CI ZHW ev ¥OLINOW 0066 SWL $0103 . YJAIN 4073 WVYSVIG 19018 WALSAS Vt/6G-1L ‘VW FUNDS === page p-08 A.2 1/0 PIN DESCRIPTION SIGNATURE AO (MSB) Al A2 A3 A4 AS AG Al A8 AQ Al0 All Al2 Al3 Al4 A15/CRUOUT DO (MSB) D MEMEN DBIN WE MBE CRUCLK CRUIN PIN 37 39 42 35 38 34 32 26 28 33 1/0 Out Out Out Out Out Out Out Out Out Out Out Out Out Out Out Out 1/0 1/0 T/0 1/0 1/0 1/0 I/0 1/0 Out Out Out Out In DESCRIPTION ADDRESS BUS AQ through A15 comprise the address bus. This bus provides the 16-bit memory address vector to the external memory system when MEMEN is active. Address bit 15 is also used for CRU DATA OUT on CRU output instructions. DATA BUS DO through D7 comprise the bidirectional data bus. This bus transfers memory. data to (when writing) and Crom (when reading) the external memory system when MEMEN is active. BUS CONTROL MEMory ENable. MEMEN indicates a memory access, Dala Buy IN. When active (high) the data buffers and 9900 are in the input mode. Write Enable. WE indicates a memory write. Memory Block Enable. MBE indicates a memory access in memory block 4000-5FFF. CRU Clock. Input data line to the Home Computer. CRU data IN. input data line to the Home Computer. === page p-09 T/O PIN DESCRIPTION (CONTINUED) SIGNATURE CIN READY 12 IAQ 41 TOAD 13 RESET 3 EXT INT A 63 24 GND 21,23 25,27 SBE 2 AUDIO IN 44 +5 1 -5 43 10 Out Out In Out Out In DESCRIPTION MEMORY CONTROL READY (when MEMEN is active) indicates external memory is ready for a memory access. Instruction AcQuisition indicates the CPU is acquiring an instruction during the current memory cycle. TIMING AND CONTROL When active, LOAD causes the CPU to execute a nonmaskable interrupt; memory addresses FFFC and FFFE contain the new workspace and PC vectors, respectively. When active, RESET causes the Home Computer and the peripherals to be reset. RESET will be held active for a minimum of five clock cycles. EXTernal INTcrrupt. When active, EXT INT causes the CPU to execute an interrupt. CPU Clock. Phase 3 nf the (PH clork. POWER Ground reference. SPEECIi MODULE SIGNALS Speech Block Enable. SBE indicates a memory access in the speech memory. Input for the audio from the speech module Supply voltage (+5v Nom) for speech module (50ma Max)* Supply voltage (~5v Nom) for speech module (50ma Max)* * NOTE. Pitts 1 and 43 are not intended for use by consumer. Uverload may cause permanent damage to console. === page p-10 A.3 MEMORY ALLOCATION The memory address space is broken into eight blocks of 8K bytes of memory. The third block (addresses 4000-5FFF) is predecoded and made available at the 1/0 port for the peripherals. The second. sixth, seventh, and eighth blocks (addresses 2000-3FFF and AOQOO-FFFF) are in the Memory Expansion peripheral. For the speech module (addresses 9000-97FF), a predecoded line is available at the [/0 port. SYSTEM MEMORY MAP HEX ANNRFSS O-LFFF Console ROM space 2000-3FFF - Memory Expansion Peripheral 4000-5F FF Peripheral Expansion (predecoded to 1/0 connector) 6000-7FFF . Cartridge ROM/RAM (predecoded to GROM connector) 8000-9F FF Microprocessor ROM, VDP, GROM, SOUND and SPEECH select. AQ00-BFFF Memory Expansion peripheral CO00-DFFF Memory Expansion peripheral EQOO—FFFF Memory Expansion peripheral MEMORY-MAPPED DEVICES ADDRESSES AQ Al A? AR Ad AS Al4 USE “ D007 —C—i(“<~iTS 0 v0 y Trternal RAM (8300-83FF ) 8400 1 0 0 0 0 1 0 Sound 8800 1 v) U 0 1 0 0 VDP Read Data 8802 1 0 0 0 1 0 1 VOP Read Status 8C00 1 0 0 0 1 1 0 VDP Write Data 8002 1 0 0 0 1 1 1 VDP Write Address 9000 1 0 0 1 0 0 0 Speech Read 9400 1 0 0 1 0 1 0 Speech Write 9800 1 ia) 0 1 1 0 0 CROM Read Data 9802 1 0 0 1 1 0 1 GROM Read Address 9c00 1 0 0 1 1 1 0 GROM Write Data 902 1 ) 0 1 1 1 1 GROM Write Address NOTE: Memory-mapped devices at addresses >8000 through >9FFF are only partially decoded. Thus, the devices will respond not only at the base addresses 1isted above, but also at other addresses within the 1K block. For more information, see Section B.1 on page 25. === page p-11 CRU ASSIGNMENTS 9900 INTERRUPTS VECTOR LOC. INTERRUPT (MEMORY ADDR. CPU DEVICE LEVEL IN_HEX) PIN ASSIGNMENT (Highest 0000-WSP RESET RESET Priority) 0002-PC 0 FFFC-WSP LOAD LOAD FFFE-PC 1 0004-WSP -- EXT DEV (9901) 0006-PC . A.4 CRU ALLOCATION OF Lhe available 4K of CRU bits, the first 1K {addresses O0O0-O7FE) are used internally in the console. The second 1K (addresses O800-OFFE) are reserved for future use. The last 1.9K (addresses 1000-1FFE} are reserved for the peripherals to be plugged in the T/M port. A hlock of 128 CRU bits is assigned to each peripheral as listed below. CRU ADDRESSES A3 A4 AS A6 AZ USE OOOO-OFFE 0 X X x X Internal Use 1000-10FE = 1 0 0 0 0 Unassigned 1100-11FE 1 0 0 0 1 Disk Controller Card 1200-12FE 1 0 0 1 0 Modems 1300-13FE 1 O 0 1 1 — RS 232 (primary) 1400-14FE = 1 0 1 0 0 Unassigned 1500-15FE 1 0 1 0 1 RS 232 (secondary) 1600-16FE 91 0 1 1 0 Unassigned L/U-l/Fe 1 U 1 1 1 HE K-BUSTM 1800-18FE = 1 1 0 0 0 Thermal Printer 1900-1FFE 1 1 0 0 0 EPROM Programmer 1AOO-1AFE 1 1 0 1 0 Unassigned 1B00-1BFE 1 1 0 1 1 Unassigned 1cOO-1CFE 1 1 1 0 0 Video Controller Card 1nna..10FF 1 1 1 0 1 TFEF 488 Controller Card 1EQO-1EFE 1 1 1 1 0 Unassigned IFOO-1FFE 1 1 1 1 1 P--Code Card A.5 INTERRUPT HANDLING The interrupt available on the I/O port is one of the maskable interrupts of Lhe TMS 9901 Pruyraumable Systems Interface. Interrupting is done only on Level 1. The additional interrupts available are implemented on 9901. Interrupt Level 1 is decoded by software to be either (1) VDP vertical sync., (2) 9901 internal timer, or {3} 1/0 bus generated. 10 === page p-12 9901 BIT ORGANIZATION ADDRESS CRU BIT 9901 PIN FUNCTION 0000 0 Control Control 0002 1 INTI 17 External Interrupt 0004 2 INTE 18 Video Visplay Processor Vertical Sync Interrupt 0006 3 INT3 9 9901 Internal Timer Interrupt, keyboard "=" line, joystick "FIRE" 0008 4 INT4 8 Keyboard "Space" line, joystick "left" OUUA 5, INT5 7 Keyboard "ENTER" line, joystick "Right" o00c . 6 INT6 6 Keyboard "0" line, Joystick "Down" OO0E 7 INT? (P15) 34 Keyboard “FCTN" line, ; joystick "Up" 0010 8 INTS (P14) 33 Keyboard "SHIFT" line 0012 9 INTS (P13) 32 Keyboard "CTRL" line 0014 10 INTIO (P12) 31 Keyboard "Z" line 0016 11 INTI1 (P11) 30 Not llsed As Interrupt QUL8 12 INTI2 (P10 29 Reserved, High Level OO1A-1E 13-15 INTI3- INTI5 28,27 Not Used As Interrupt and 23 “ 9901 1/0 MAPPING ANNRESS CRU BIT 9901 PIN FUNCTION 0020 16 PO 38 Reserved 0022 17 Pl 37 Reserved 0024 18 P2 26 Bit 2 of Keyboard Select 0026 19 P3 22 Bit 1 of Keyboard Select 0028 20 Pq 21 Bit 0 (MSB) of Keyboard Select 002A 21 Pb 20 Keyboard (ALPHA LOCK) 002C 22 P6 19 Cassette Control 1 (motor control) 002E 23 P7 (INTIS) 23 Cassette Lontroi 2 (motor control) 0030 24 P8 (INT14) 27 Audio Gate 0032 25 PQ (INTT3) 28 Mag Tape Out 0034 26 P10 (INT12) 29 Reserved 0036 27 Pll (INTIT) 30 Mag Tape Input 0038-003E 28-31 Pl2~P15 31-34 Not Used IN T/O Mapping il === page p-13 A.6 ELECTRICAL CHARACTERISTICS DRIVE CAPABILITY OF I/O SIGNALS SIGNAL NAME DRIVER $3 74.8244 CRUCLK 74LS244 WE 74LS244 AO 7ALS244 Al 74LS244 UBIN 74.804 MBE 74LS244 MEMEN . 74LS32 A3-A14 7FALS367 DO-D7 74LS245 A15/CRUOUT 74LS244 SBE 74LS03 HOLD 74L$32 RESET 74LS04 1/0 READ A CPU Read cycle for the external device consists of two 8-bit read cycles (Figure B). The two bytes read are assembled as a 16-bit word before they arc presented to the 9900. Shown in Figure B are two 8-bit read cycles with one wait state inserted in each to work with slow memories. At the beginning of clock cycle 1, MEMEN goes low true and DBIN goes high true. At the same time that MEMEN goes true, the address bus goes active. WE stays high false during the entire cycle. In order to eliminate noise and glitches (associated with crosstalk and simultaneous switching), a minimum of 100 nanoseconds should be allowed for the address lines to Settie. MBE (predecoded from AO, Al, and AZ) gues true during the leading edge of 62 of clock cycle 1. Data read from the peripherals must be valid 750 nanoseconds after the start of clock cycle 1. The CPU will look at the full 16-bit data bus during the leading edge of #1 of clock cycle 6. Under worst-case conditions, data must be valid 100 nanoseconds before that time. a8 8888 === page p-14 ONIAIL GVvay O/1 “a JHNDIH (NI) S409 = 0066 YO AWIL dN.Las © OX7IA) SU0S9 = (ZINVHANIVIN + TWHaHdIeSd) AVIIO 45Ng Viv +51 Vivat+ WOH USC HO FWIL SS399” 3) ® VLVO GITVA (ALVLs (Alvis Lym) ALIvM) [¢-— 999-—je— 09 —}4— 00 (ALVLS De > 0 re VLVG QITVA (NIW SUOOL = 3WILL ONITLLAS ®D Adqvau £q-00 Lnonyysiv aavdaitva 13 === page p-15 1/0 WRITE Figure C shows a 16-bit I/O write cycle. As described earlier, it 1s composed of two 8-bit writes. A write cycle will always be preceded by an ALU cycle. MEMEN and DBIN go true (low) at the start of the cycle. A time_of 100 nanoseconds (min) is allowed for the address lines to settle. WE goes true (low) on the leading edge of @2 during the wait states and stays true for 666 nanoseconds (TYP). During a Read or a Write the odd byte (LSBY) is accessed first, then the even byte (MSBY). A15/CRUOUT changes its state 1 microsecond (TYP) after the cycle is initiated. The second 86-bit wrile cycle 1s identical to the first 8-bit write. MBE stays true (low) during the entire (1.8 microseconds) cycle. T/O BUS LOADING TOTAL SWITCHING MAXIMUM PERTPHFRA! SIGNAL LOAD (pF) LOAD (pF) DO-D7- ~~ 210— 90 AQ-A2 100 90 A3-A14 lou 90 A15/CRUOUT 110 100 3 110 100 . RESET 100 90 READY 80 70 CRUIN 125 90 CRUCLK 100 90 MBI 100 90 WE 100 90 SBE 35 25 OBIN 100 90 MEMEN 100 90 HOLD 80 70 14 === page p-16 ONIWLL 3LIMM O/1 “OD SHND vive ava © (dAL) $48Z¢ = H.LGIMasInd am @ (NIV) S¥OOL =aWiL ONITLLAS CD) Agvaud £3-0a qaw 1nonys/siv 1d (aLvis (aLVLs ‘SLVLS (21LVLs L ATQAD LIVM LlvM) Aiwa) divM) NI019 ,— 902 —ole— $95 vO a £99 —he— roo) he supee 4 : (dAL, SUG6E === page p-17 CRU TIMING CRU interface Liming is shuwn in Figure D. The CRUQUT cycle ts composed of two clock cycles. When placed on the address bus AO through Al4, the CRU bit address is allowed to settle for 100 nanoseconds (min). CRUCLK is a 63 nanoseconds (max) low true signal which occurs on the trailing edge of ¢1 of clock cycie 2. CRUOUT data is valid at the start of clock cycle 1 and is latched by the CRUCLK in the respective peripheral. CRUIN also consists of two clock cycles of 666 nanoseconds (TYP). Again 100 nanoseconds is allowed for the address bus to settle. The CPU samples tne CRUIN line on the leading edge ot 1 of clock cycle 2. Data must be valid 40 nanoseconds (min) before that. This implies an access time of less than 400 nanoseconds for CRUIN. === page p-18 ONIWIL MHD “GC 3HNDI4 (XVIN) S4OOP = NINH GIIWA OL GIA Gav © (AL) SUEEZ = 419NHO OL dNWA aav @ (NH) SUOOL = AWIL ONITLIas © a i m9 So hat 09 ANAC AVAVAVAVAVAVAVAVAVAWAVAVAVAVIIZEE=AVAVAVAVAVAVAVAVAVA ninwo (€) Lnonus/sty *onwo 7 vLY-0V ve eg (4 LJ LS LSJ L_SI 1 | 1 en LS Le ZSIDAI LIDA9 ZI19A9 L 319A 99079 -+— 9019 019 he 9979 ; (dA) sugg9 (dA Sugg9 === page p-19 LEFT SIDE VIEW JOYSTICK 03 40 3 °. BACK VIEW CASSETTE RIGHT SIDE VIEW voProrT 44 FIGURE E. CONNECTOR PIN IDENTIFICATION DIAGRAM eee eee ee eee Ss 86 8 sé === page p-20 U4g1_ R510 W 500 t co {5 , i usta. eo — 601 SOI i u "0 O00E 38 22 FIGURE F. T!199/4A LOGIC BOARD COMPONENT LOCATION DIAGRAM === page p-21 A1ddNS YAMOd J1OSNOO Vb/661L “D IHNDIA "WAGYOANV NI LPO 34 AVW Sa#IM 4H1 “INdLNG LI0A G+ SHL Lsaray OL Ind 3Y4v PW NYHL LM, Ai- ano Ai Ag+ i Tsdoor oewvn i Lt en Mm ra L-GESLOSLN/d d19v1daca4 2S86GLOL-Nd YAWYOSSNYSL T1WM ny === page p-22 SECTION B--INTERFACE CONSIDERATIONS B.1--CPU REQUIREMENTS B.1.1 General Comments The purpose of this section is to outline considerations necessary or advisable for hardware used for interfacing peripherals to the TI-99/4a. Required TI-99/4A timing is shown on pages 12-17 in Section A of this manual, and Section D includes details concerning the software requirements for peripheral interfacing. B.1.2 TI-99/4A Memory Space Organization The memory map of the TI-99/44 is as follows. The allocated spaces are shown in parentheses, and the actual memory Space used is shown where applicable. This is notable of the memory-mapped devices (MMD) in the s8000 to >9FEF space. All of these devices reside in 1K blocks, and block decoding is used to select them. Even though they are shown to respond at the base address, they will respond ANYWHERE in the 1K block assigned to them. An example is the 256 byte SRAM which 1s decoded to respond at a base of >8000. This SRAM repeats at bases of >8100, >8200, and >8300, and software is written to conform to the >8300 base. Note that there is a given amount of space which cannot be used because of the basic space definiliun and the decoding used on existing products. === page p-23 B.1.2.1 READ Before WRITE Considerations There are different READ and WRITE addresses for most of the memory-mapped devices (MMDs). This is because the TMS 9900 does a READ operation at the destination address prior to writing to it. Many of the MMDs have internal address registers that autoinecrement after either a RFAN or a WRITF Operation. This autoincrement characteristic of the MMD may not produce the desired results if it is not taken into consideration when designs or modifications are made. The READ before WRITE exists because the 9900 is a word-oriented machine from a memory access standpoint. The several byte-oriented instructions are carried out by the machine in a word execution format, and the other byte in the word must not be altered. The machine itself must save the unaltered byte, concatenate the new byte with it, and return the word to memory. The internal logic of the TMS 9900 is designed this way because it was to the designers distinct advantage to do this same READ before WRITE on both byte and word moves. B,1.2.2 Cartridge Memory Space The cartridge memory space at >6000 must be treated as if it is logically connected to the cartridge port. The GROM chips are rather poor line drivers at best, and their life on the 1/0 data bus is limited. Even though the GROM data bus is currently connected directly to the [/0 data bus, there is no guarantee that updated versions of the TI-99/4A will have the sdme connection. The new generation TI console will probably isolate the GROM data bus from the 1/0 data bus. DON'T TRY TO ACCESS THE CARTRIDGE MEMORY SPACE FROM THE I/O PORT! 22 === page p-24 TI-99/4A Memory Map ! +0000 : Console ROM : (8K BY) >1FFF 2000=¢~*~*”~CS*~*~“CS*~S~S~S : Used by 32K Mem Exp : (8k BY) >SFFF + >4000 : DSR ROM Space ! (8K BY) 2 OF FF Fe : >6000 ! Cartridge Memory Space : (8K BY) >TFFF ve + >8000 + Console 256 byte RAM : (1K BY) >83F F i400 SOS : Sound Chip, 1 BY req'd ! (1K BY) >87FF ve + >8800 : VDP READ, 2 BY req'd : (1K BY) >8BFF !>8C00 : VDP WRITE, 2 BY req'd ! (1k BY) >8F FF ‘59000 !Speech Module READ Space : (1K BY) >93FF >9400 Speech Module WRITE Space (1K BY) >97FF (1K BY) >9BFF GROM WRITF, 2 BY req'd (1K BY) >OFFF Used by 32K Mem Exp (24K BY) >FFFF ‘ 4 1 ' 1°" GROM READ, 2 BY req'd ; ' === page p-25 | B.1.3 CRU (Communications Register Unit) Space Definition As with the memory space decoding, the CRU space devices are not fully decoded. Thus, most devices will respond just as well to other addresses in their block as they will to the block base address. By and large, the CRU space ig allocated to peripherals with only a very small_amount devoted to internal machine control (keyboard scan, cassette control, etc.). B.1.3.1 Disallowed Instructions. The control signal "CRUCLK" is also not fully decoded. Because the most~-significant three address bus bits are not included in the decode, certain instructions of the TMS 9900 must be disallowed. These are: LREX, CKOF, CKON, RSET, and IDLE. DO NOT USE THESE INSTRUCTIONS. THE LOGIC BLOCKS FED BY CRUCLK WILL INTREPRET THAT CLOCK’ SIGNAL AS A CRU OPERATION. B.1.3.2 CRU OUTPUT Definition. There 18 a Single restriction on the detinition of LKU UUIPUT bits tor peripheral use: the base address bit. This bit must be used to “page in” DSR ROM's when SET, and should, where possible, be RESET by the Power-Up RESET line in the 1/0 Port. Thus, the DSR ROM will be “paged out" by a RESET operation. For more information, see the paragraph on DSR ROM CONSIDERATIONS. R.1.3.3 CRU INPUT Definition. There is no definition for CRU Input lines, and one is free to define them within that peripheral space as desired. B.1.3.4 Spare CRU Bit Use. Spare CRU bits may be put Lu youd use as Lest bits. If spare INPUT and OUTPUT bits are available, the ones used should be chosen so that spare INPUT's may be connected to spare OUTPUT's (each pair displaced by the same amount from the base) to form software FLAG bits. Otherwise, spare INPUTS bits should be tied to VCC or GROUND in some manner that will be verified during the power-up routine execution for that peripheral. Spare OUTPUT bits may be left unconnected or terminated on an etch pad to be connected to automatic test equipment. This is particularly useful when combined with signature test hardware and test software. 24 === page p-26 sn ee ne se ss CRU MAP CPU TMS 9901 space 32 lines required >03FE For test equipment use on production line (128 Lines) >1lOFE >1100 Disk Controller (128 Lines) >L1FE s10002~¢@~C~”~”~CSCSt“‘CSS Modem >l2FE 21302=~¢C~C~”~CS—~“sS~*~S~SS Primary RS232 >13FE >1400 Unassigned >1l4FE >1500 a Secondary RS232 >15FE >1600 Unassigned >16FE p1700002~C*~*~<“‘17FE 51800 Thermal Printer >1 AFF >1900 25 Om me oe oe ee ee mee eee en ee em em ee seen ee omen nee === page p-27 + >1A00 : Unassigned : >lAFE + >1B00 ‘ Unassigned : >1BFE +>1C00 ! Video Controller Card : >1CFE Dn ee +>1000 + IEEE 488 Controller Card : >1DFE | eee + >1€00 : Unassigned : >lEFE goo !>1F00 : P-Code Card ‘ >1FFE 2A === page p-28 B.1.4 TI-99/4A Peripheral Polling The Ti-99/4A polls the 1/0 Port for the presence of peripherals on either a software restart or a hardware RESET. This polling starts in the CRU space at >1000, and continues in increments of 100 until >1FNN has heen polled. Power-up routines will be executed for each peripheral as its DSR ROM is polled (if the DSR header indicates that a power-up sequence is required). B.1.5 Indicator LED An indicator LED shall be provided, and shall be driven by a unique CRU OUTPUT bit. If all CRU OUTPUT bits have been defined, it shall be acceptable to connect the LED drive to the DSR ROM page bit. This LED provides visual feedback to the user that the peripheral card is present and active. All cards presently marketed by TI must provide this indicator. The LED is amber or yellow. . B.1.6 DSR ROM Considerations The DSR ROMs for all peripherals must be based at >4000 and may be contiguous through >SFFF. These ROMs must not respond unless the respective CRU DSR ROM page bit is set ON (set tu a tiyh level wilh either a SBO instruction or "1" data in a LDCR instruction). It is the responsibility of the CPU to insure the proper control of al] of the DSR ROM page bits. B.1.6.1 Extended DSR ROM Techniques. ROM Space in excess of 8K bytes may be obtained by bringing sequential 8K blocks into the DSR ROM page. Secondary btocks {pages) may be placed anywhere in available TI-99/4A Memory Space. The secondary page bit may be obtained from the assigned CRU space to that peripheral (as was done on the P-Code PCB) or by writing Lu a ROM address and then decoding that condition to strobe a flip-flop. The latter method was used on the Extended Basic cartridge to page the upper 4K half of that space. Either a data bus or an address bus bit may be used for data to the FF. Both schemes provided a nonpaged 4K base ROM, and paged the upper 4K half of the space. === page p-29 B.2--EXPANSION UNIT REQUIREMENTS B.2.1 System Bus Requirements There are only two design considerations that must be understood to interface with the system bus. Qne controls a Data Bus driver on the TI-99/4A end of the connecting cable, and the other is used during printed circuit board (PUB) burn-in. B.2.1.1 Remote Data Bus Driver. As has been previously noted, there are additional requirements for interfacing through the Peripheral Expansion Unit (PFII). Regardless of the processor driving the PEU, a signal must be provided to indicate to the interface that a memory cycle is being requested for a PCB in the PEU. This signal is termed "RDBENA*", and is used to enable Data Bus drivers on the TI-99/4A end of the cable. It must function as an open-collector signal, but a tri-state gate may be used instead if the input is grounded and the tri-state controller is connected in parallel with that gate for the Data Bus Buffer. B.2.1.2 Burn-In Consideration. A single high true line shall be provided to enable the PCB to respond to both memory and CRU accesses. This line is held at a high level in the PEU, but is driven to allow a parallel connection of 16 PCBs during burn-in. When low, this signal shall disable the PCB from driving any of the system memory and CRU bus lines. The interrupt sensing has been excepted from this in the past. 8.2.2 Power Allocation Assumptions The following is a guide for maximum load current a PCB should present to the PEU. ) 250 ma on the +15v unregulated bus. o 500 ma on the *+8v unregulated bus. ) 30 ma on the -15v unregulated bus. 28 === page p-30 B.2.3 System Bus Pin Definition { - 100" PIN TO PIN SPACING, ATTLEBORO CONNECTOR i PIN NO. MNEMONIC FUNCTION | q 1 +5v 3-T Regulator supply voltage | 2 +5v 3-T Regulator supply voltage 3 GND Logic Ground i 4 READY A System READY i 5 GND Logic Ground : 6 RESET* Active LOW system-driven RESET 7 GND Logic ground | 8 SCLK System clock 9 LcP* Second generation CPU indicator. ! Q=Second generation CPU; l=! 1-99/4 10 AUDIO Input audio 1 11 RBDENA* Active LOW remote data bus driver | Enable control line | 12 PCBEN Active HIGH PCB enable for burn-in 13 HOLD* Active LOW CPU HOLD request | Second generation CPL only ! 14 TAQHA TAQ HOLDA logical OR : Second generation CPU only q 15 SENTLA* Interrupt Level A Sense Enable ~ 16 SENILB*® Interrupt Level B Sense Enable Second generation CPU only 17 INTA* Active LOW Interrupt Level A 1e LOAD+ Low for TI-99/4 Memury Expansion, High for linear memory space. _ Second generation CPU only. TMS9900 LOAD* input 19 D7 System DATA Bus, LSB 20 GND Logic Ground 21 D5 System DATA Bus 22 D6 System DATA Bus 23 D3 System DATA Bus 24 D4 System DATA Bus 25 D1 System DATA Bus 26 D2 System DATA Bus 27 GND Logic Ground 28 00 System DATA Bus, MSB 29 A14.A Address Bit 30 A15/CRUOUT.A Address Bit, LSB : 31 Al2.A Address Bit f 32 Al3.A Address Bit ; 33 A10.A Address Bit : === page p-31 System Bus Pin Definition (Continued) PIN NO. MNEMONIC 34 All.A 35 AU8.A 36 A09.A 37 AG6.A 38 AQ7.A 39 A04.A 40 A05.A 41 AQ2.A 42 AQ3.A 43 AQO.A 44 AQL.A 45 AMB.A 46 AMA.A 47 GND 48 AMC.A 49 GND 50 CLKOUT* 51 CRUCLK Ax 52 OBIN.A 53 GND 54 WE .A* 55 CRUIN 56 MEMEN.A* 57 58 59 60 Address Address Address Address Address Address Address Address Address Address Address Address Address Logic Gr Address Logic Gr Active L Active L Data Bus FUNCTION Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit, normally HIGH Bit, normally HIGH ‘ound Bit, M3B nurmally HIGH ound OW CPU CLOCK OW CRU Qutput Clock Dir'tn, HIGH is CPU READ Logic Ground LOW true CPU Write Enable- HIGH true CRU Input data Active L OW memory request -l2v 3-T Regulator supply voltage -12v 3-T Regulator supply voltage +12y 3-T +12y 3-T Reguiator supply voltage Regulator supply voltage === page p-32 B.3--DESIGN AND DEVELOPMENT REQUIREMENTS This listing covers both hardware and PCB design rules. ie) Each PCB must be completely disabled by an active low disable (active high enable). The disable must disable both memory and CKY functions on the PCB and is used for burn-in purposes. The +12v, -5v, and ~12v power etches shall be double spaced from other etches where possible. This minimizes a TTL to power line short or a power etch to power etch short. Signals such as CRUIN that are taken very far from the system I/0 connector shall be guarded with GROUND etch. Where practical, these signals should be buffered with tri-state buffers. Buffers to drive the bus must be physically close to the I/O Bus. The prototyping PCBs have most of this already in place, but signals such as READY and CRUIN do not have them because they are not always used. A connection to the system bus constitutes a stub connection, which generally obeys transmission line theory. These stubs should be kept as short as is practical. Al] 19 system address bits shall be included in the memory space decode for that peripheral. Assume AMC, AMB, and AMA to be in the high state. Address lines AQQ through AQ7 shall be included in the CRU Space decode even though the TI-99/4A assumes AOO thru AQZ to be zero. There are two levels on which to interrupt, but the TI-99/4A supports only one (INTA*). THIS IS THE ONE YOU MUST USE. Interrupt level status bits are defined by the Personal Computer PCC at Texas Instruments, and for the moment are not sensed by the TI-99/4A. If they were to be sensed, the TI-99/4A would cause a line to go jow (SENILA*), which tells the PCB logic to gate its status bit to the System data bus. As a design aid, the Personal Computer Group has available a prototyping printed circuit board (PCB). This PCB wili accomodate about 36 16-pin DIP sockets, and has the necessary system bus buffers in place with etch connections to the system 1/0 pins. The PCB designer need only to hook the buffered signal to his logic design. Schematics of this PCB are available (TI part number 1039334) and standard TI-99/4A timing diagrams should be used for the PEU PCB Design. 3l === page p-33 WV VIC SILVWIHOS LINN NOISNVdXJ WHIHd|uad WdZdAL TWdZdAL {L-B3E00SL) TWH a -—a Wd € AL aNOKOL ONIN — {L-€S€0)51) a3LVTsNl ovVH ¥O193a0N02 (L-2S€00SL) {L-LSEOOSL) : aalvinsni GALVTNSNI “ avi aTOVLdI9394 (L-SLPGEDL} est) YO193NNO9 = =-HO.193ANO0 Lint 3AIYQ Sid TWNH3INI {e-Z9sse0L) MOL93NINOD (L-€8°6E01) waNod HO_ IMS: ga CEs uaAOd usa Is WNYIINE {L-ELZ00SL) YBINMO2SNVHL (UPPOGEOL) giouoL AL NDVI (E-S8E6E0L) YO193NNOO ot LIA WHINAN L-€9e00St) Had {L-€LG00SL) 3SN4—(4-29600S1) {L-OLp6e0r) NW YO YaMOd === page p-34 Section C--FILE MANAGEMENT SPECIFICATIONS C.1 Introduction This document contains a complete specification for the File manayemenl sys len of the TI-99/4A Home Computer. The text in this document has been completely revised to reflect changes that have been made to facilitate new options in the TI-99/4A Home Computer. The TI-99/4A Home Computer will support all file features described in this document. Some minor additions have been made concerning the status (C.3.2.10) and the error code section (C.3.4) to reflect changes for the TI-99/4A Disk Peripheral. These changes do not affect any DSR that currently exists, Section C.4.3 has been provided to give information to the GPL applications programmer on how to access DSRe and for the peripheral programmer on how the information is passed on a DSR. === page p-35 C.2 1/0 Handling The approach used in the TI-99/4A Home Computer File Management System has been that all devices should look the same to an application program. Therefore when peripherals are added to the computer, it should not affect the BASIC inlerpreter. Only the peripheral driver (Device Service Rouline, or DSR) will have to be added to the software. All peripherals for the TI1-99/4A Home Computer, with the exception of the keyboard/display, are considered equivalent by an application program, within physical limitations (reading data from a thermal printer is clearly impossible). These physical limitations are determined in the device service routine and returned to the application program as an error condition. The TI-99/-4A Home Computer File Management System supports both random and sequential access files. Both file types use the same supervisor call mechanism in order to insure a high degree of device independence. Hardware devices (such as a line printer) are accessed as sequential files except that no file name is appended to the device name. The following sections describe the file structures available to the BASIC interpreter, how to create and delete files, and how to perform file 1/0. Two different kind of file organizations are supported: o Sequential files o Relative record files (random access) C.2.1 Tile Organization and Use The following paragraphs discuss the file organization and use for each of the two file types. C.2.1.1 Sequential Files Sequential files are both used for disk-based files and for I/0 to other devices. They consist of fixed or variable record length files whose records are always accessed serially, like the output to the thermal printer. C.2.1.2 Relative Record Files Relative record files are also called random access files because, unlike a sequential file, records may be accessed in an arbitrary order. Therefore relative record files can only be supported on random access media such as floppy disks. 34 a . : a === page p-36 = re | The records within a relative record file are addressed by a unique record \ number. To access record xX, the value X has to be placed in the appropriate field of the I/O Peripheral Access Block. The range of record numbers is from zero to one less than the number of records in the file. Records in a relative record files are a fixed length, specified al file i creation. Records in a relative record file can also he accessed in a sequential way by specifying only the first record in the sequence. The supervisor then automatically updates the record number each time after a record has been read. C.2.2 File Management Overview C.2.2.1 Terminology A file consists of a collection of data groupings called logical records. This division of the file into logical records docs not necessarily correspond to the physical division of data on the medium (like a sector on a disk). Thus there are two types of records: o Logical records--The data grouping of a file as seen by an application program. Physical records--The buffers physically transferred between memory and medium. Relative file 1/0 from a program is done on a logical record with a fixed length. This enables the system to compute the actual location of any logical record relative to the beginning of file. Sequential files allow both fixed and variable length records. When a file is created, the logical record size must be specified. For relative record tiies this size must be exact. For sequential files the specification indicates an upper limit for the size of a variable record, or the exact length of a fixed-length record. In case a zero is specified for cither filetype, the DSR must select a default for the recurd size. The physical record size for any medium is specified within the DSR and is implementation dependent. === page p-37 C.2.2.2 File-Type Attribute The file-type attribute specifies the format in which the data in the file is represented. The two file types are: 0 DISPLAY--Displayable or printable character strings. Each data record corresponds to one print line. ° INTERNAL--Data in INTERNAL machine format. The file-type attribute is internal to the application program. It is merely stored and passed on by the OSR as a distinction hetween two data types, without affecting the actual data stored. C.2.2.3 Mode of Uperation A file is opened for a specific mode of operation, specified in the OPEN T/O call. The four modes of operation are: 0 INPUT - The contents of the file may be read, but may not be altered. 0 OUTPUT - The file is being created. Its contents may be written but not read. - ) UPDATE - The contents of the file may be both written and read. Note that this mode of operation is only be supported by random access devices. 0 APPEND - New data may be added at the end of the file, but the contents of the file may not be read Each DSR decides whether or not a specific mode for an 1/0 operation can be accepted by the corresponding device. C.2.2.4 Temporary Files In the subsets of TI standard BASIC used for the T1-99/4A Home Computer, the file-life attribute is not implemented. Therefore there is no need for the File Management System to support temporary files, and all files are permanent by definition. 36 === page p-38 C.3 Implementation As mentioned in section C.2, the DSRs should present a uniform interface between the File Management System and the peripherals. This section will give details about implementing this interface. C.3.1 Peripheral Access Block Definition All DSRs are accessed through a Peripheral Access Block (PAB). The definition for the PAB is the same for every peripheral. The only difference between peripherals, as seen by any application program, is that same peripherals will not support every upLion provided for tn the PAB. All PAB's are physically located in VDP RAM. They are created before the OPEN call and are not ta he released until the 1/0 has been closed fur that device or file. Figure C.3.1.1 shows the layout of a PAB. The PAB has a variable length, depending upon the length of the file descriptor. The meaning of the bytes and bits within the PAB is explained below, Byte Bit Meaning - 1/0 opcode Contains opcode for the current 1/0 call. A description of the valid opcodes are given in section C.3.2, - Flagbyte/status-~ All the information the system needs about file-type, mode of operation, and data-type is stored in this byte. The meaning of the bits within this flagbyte is: '-- Filetype often Mode of operation soso os en Datatype acco -~- Recordtype 37 === page p-39 Byte Bit 1,2 Meaning Filetype--Indicates filetype. 0 1 Sequential file Relative record file Mode of operation--Indicates operation mode for which file has been opened. 00 = UPDATE 01 = OUTPUT 10 ~ INPUT 11 = APPEND Datatype--Indicates type of data stored in the file. 0 = DISPLAY type data 1 = INTERNAL type data Recordtype--Indicates type of record used. O - Fixed length records 1 = Variable length records Error code--These three hits indicate, in combination with the 1/0 opcode, the error type that has occurred (0 = no error). Data buffer address--Address of the data buffer the data has to be written to or read from. Logical record length--Indicates the logical record length for fixed length records, or the maximum length for a variable length record (see flaghyte). Character count--Number of characters to be transferred for a WRITE opcode. or the number of bytes actually read for a READ opcode (not equivalent to INPUT and OUTPUT mode). Record number--Unly required it the file opened is of the relative record type. Indicates the record number the current 1/0 operation is to be performed upon (this limits the range uf record numbers 0-32767). The highest bit will be ignored by the DSR. RR === page p-40 Byte Bit Meaning 8 - Screen offset--Offset of the screen characters in respect to their normal ASCII value. 9 - Name length--Length of the file descriptor following the PAB. 10+ - File descriptor--Device name and, if required, the filename and options. The length of this descriptor is given in 9. ee * ! 0 1/0 OPCODE ! 1 FLAG / STATUS Ue : i 2,3 ‘ : DALA BUFFER ADDRESS : a : LOGICAL RCCORD LENGTH i CHARACTER COUNT $ 1 6,7 ‘ ‘ RECARO NUMBER - ‘ er er i SCREEN OFFSET NAME LENGTH ‘ Figure C.3.1.1 PAB Layout C.3.2 1/0 Opcodes This section describes the valid opcodes that can be used in a PAB. These valid opcodes are shown in Figure C.3.2.1. Ihe tollowing section will describe the general actions invuked by an I/O call with each of the 1/0 opcodes. Each I/0 call returns any error codes in the FLAG/STATUS byte of the PAB. 39 === page p-41 Opcode Meaning 00 OPEN ol CLOSE 02 READ 03 WRITE 04 RESTORE /REWIND 05 LOAD 06 SAVE 07 DELETE 08 SCRATCH RECORD 09 STATUS Figure C.3.2.1 1/0 Opcodes C.3.2.1 OPEN The OPEN operation should be performed before any data transfer operation except LOAD ur SAVE. The File remains vpen until a CLOSE uperation 1s performed. The mode of operation for which the file has to be opened should be indicated in the flagbyte of the PAB. In case this mode is UPDATE, APPEND, or INPUT, the record length will be returned in byte four. Any given non-zero record length will be checked against this stored length. For OUTPUT the record length can be specified, or a default can be used by specifying record length zero. - For any device, an OPEN operation must be performed before any other 1/0 operation. The DSR need only check the record length and I/O mode on an OPEN. Changing 1/0 modes after an UPLN may cause unpredictable results. C.3.2.2 CLOSE The CLOSE operation informs the DSR that the current I/0 sequence to that OSR has been completed. After the CLOSE operation, the space allocated for the PAB may be used for other purposes. As long as a PAB is connected to an active device, the contents of that PAB must be preserved. If file or device is opened for OUTPUT or APPEND mode, an EOF (end of file) record is written to the device or file before disconnecting the PAB. €.3.2.3 READ The READ operation reads a record from the selected device and copies the bytes in the specified buffer. The buffer address is specified in PAB entry 2 and 3; the buffer size is specified in PAB entry 4. The actual number of characters stored is returned in PAB entry 5 (CHARACTER COUNT). If the length of the input record exceeds the buffer size, the remaining characters will be discarded. Pe : === page p-42 C.3.2.4 WRITE The WRITE operation writes a record from the buffer specified in the PAB to the specified device. The number of bytes to be written is specified in byte five of the PAB. 0.3.2.5 RESTORE/REWIND The RESTORE/REWIND operation repositions the file READ/WRITE pointer either to the beginning of the file, or, in the case of a relative record file, to the record specified in bytes six and seven of the PAB. A RESTORE can only be used if the file is opened for TNPIT ar UPDATE mode. For relative record files, a RESTORE could be simulated in any 1/0 mode by specifying the record at which the file has to be positioned in bytes six and seven'of the PAB. The next 1/0 operation then automatically uses the indicated record. C.3.2.6 LOAD The LOAD operation loads an entire memory image from an external device or file into VDP RAM. All the control information the application program needs should be concatenated to the program image. No intermediary buffers are used. The entire memory image is dumped starting at the specified Jocation. The LOAD operation is a stand-alone operation, i.e. the LOAD operation is used without a previous OPEN operation. For the LOAD operation, the PAB needs to contain the following information: Bytes 2,3--Start address of the memory dump area Bytes 6,7--Number of bytes available. Aside fram the [/0 opcode and the file descriptor, no other PAB entry is required for a LOAD operation. C.3.2.7 SAVE SAVE is the complementary operation for LOAD. It is used for writing memory images to a device or file. All necessary control information shuuld be Vinked Lu the memury imaye, so that the information plus program image use on contiguous memory area. Again, only a small part of the PAB is used . Aside from the usual information (1/0 opcode and file descriptor), the PAB contains: Bytes 2,3--Start address of the memory area Bytes 6,7--Number of bytes to be saved. === page p-43 C.3.2.8 DELETE The DELETE operation deletes the specified file from the specified device. This operation also CLOSEs the 1/0 sequence. C.3.2.9 SURKAICH RECORD The SCRATCH RECORD operation scratches the specified record from the specified relative record file. The record to be scratched is specified in bytes six and seven of the PAB. This operation will cause an error for sequential files and devices. This operation is not currently supported by any device. C.3.2.10 STATUS This information can be asked for at any time, although some information is only meaningful if a file has been opened for access. To indicate the current status of Lhe file, byle eighl (SCREEN OFFSET) 1s used. Upon the DSR call byte eight should contain the usual screen Characters base address. The DSR can use only this byte and is guaranteed not to destroy any other entry in the PAB. The meanings of the bits within byte eight after return from the DSR are: 0 Logical end of file. If this bit is set, the file is at the end of its previously created contents. This is usually the case if the Tile has been opened for APPEND mode. ODepending upon the mode of operation for which the file has been opened, data can still be written to the file (APPEND, OUTPUT or UPDATE mode). However, a "read" operation will cause an ATTEMPT TO READ PAST EOF error to occur. 1 Physical end of file. If set, no more data can he written, sinre the physical limits of the device have been reached. Generally this means an end of medium has been detected on the device. 42 BEEREEEEEEEREREEEE EF === page p-44 Bits two~— zero and o access. A zero in th C.3.3 Error Codes The File M Error ode 0 1 2 w of a Record type. If set, the record type is VARIABLE length. If Cleared the record type is FIXED length. Filetype. If set, the file is a Program file. If cleared, the file is a data file. Data type. If set, the data type is binary (INTERNAL). If Cleared the data type is ASCII (DISPLAY) or file is program file. Reserved for the future use. Fixed to zero in the current peripherals. PROTECT flag. If set, the file is protected ayainst modifications. If cleared, the file is not protected. File requested does not exist. A device will not set this bit, which means that on a device, any file exists. seven are valid if the file has not previously been opened. Bits ne can only be used for files that are currently opened for file that is not currently open for access should indicate a ese two bits. anagement System supports a numher of error codes. They are: Meaning Bad device name; the device indicated is not in the system. Device is write protected, Bad open attribute such as incorrect file type, incorrect record length, incorrect 1/0 mode, or no records in a relative record file. Tilegal operation; i.e. an operation not supported on the peripheral or a conflict with the OPEN attributes. Out of table or buffer space on the device. Attempt to read past the end of file. When this error occurs, the file is closed. Also given for non-extant records in a relative record file. Device error. Covers ail hard device errors such as parity and bad medium errors. File error such as program/data file mismatch, non-existing file opened in INPUT mode, etc. === page p-45 C.4 DSR Operations This section describes how a variety of DSRs should react on the different 1/0 calls. It also discusses detailed software operations descriptions such as available registers and memory. C.4.1 DSR Actions and Reactions In the Home Computer File Management System, several assumptions are made about the way tn which DSRs should react on conditions such as errors, special 1/0 modes, defaults, etc. This section is intended to explain the reactions of a DSR on these conditions. C.4.1.1 Error Conditions C.4.1.1.1. Non-existing DSRs If a non-existing DSR is called by an application program, the File Management System will automatically return with the COND bit set. In this case, no USR has actually been catled, so the error code will show no errors. The DSR search mechanism of the File Management System takes care of searching for the requested DSR. It tries to match the file descriptor to the DSR entries in the system. The matching algorithm matches the end of the descriptor, or the first period, whichever comes first. This enables the applications program to add special information for the DSR in the file descriptor, such as filename, BAUD-rate, print-width, character set, etc. C.4.1.1.2 Usk-detected -rrors DSR-detected errors (see section C.3.4) should be indicated in the flag byte of the PAB. It is the application program's responsibility to clear this flag byte before every 1/0 call, and check it after the 1/0 call. This type of error is NOT indicated with the COND bit. The DSR may provide additional information about the error type in the I/0 opcode byte, although it is good practice not to destroy the least significant four bits of this byte, since they specify the 1/0 call. At no time should the DSR use bits zero~-four of the flagbyte for error indication, since these bits might contain vital system information about the file device. 44 === page p-46 C.4.1.2 Special 1/0 Modes To enable the application program to use special device-dependent functions, the File Management System DSR search algorithm only uses a well-defined part of the file descriptor for its search (see section C.4.1.1.1). The remainder of the descriptor may be used to indicate special device-related functions such as BAUD rate, print width, etc. It is advisable for a DSR to ignore descriptor parts it doesn't recognize, so that the same application program might be used for different devices. In the latter case it would handle specific device-dependent functions only if the device used was capable of performing them. If the descriptor dealt with a function not applicable to a particular device, Lhe DSR would not recognize the descriptor and would ignore it. An example of a special 1/0 mode descriptor could be RS232. BAUDRATE=1200 . DATABITS=7. CHECKPARITY, PARITY=ODD C.4.1.3 Default Handling Sometimes, especially if a file is opened for UPDATE, INPUT, or APPEND, it is useful to provide a default value fur Lhe record length. in the above cases, the application program will usually use the value specified on file creation. Therefore, if the application program does not provide a,value for the record length. the DSR should provide this valuc for it. In case the application program does provide a record length, the DSR should check this value against the value given on record creation. An error should be indicated in case of incompatibilities between stored and provided record lenglh. If logical record length is given as zero on OPEN, the DSR must provide a default record length. C.4.2 Memory Requirements Because of the limited amount of register memory (256 bytes of RAM), the register usage for NSRs has to be restricted to the following registers/memory to avoid interference with application programs Kegisters RO--R10 of the calling workspace. Memory locations >DA through >DF are available if the DSR is called in a non Interrupt-driven mode, i.e. through a standard DSR entry. A standard scratch area of 36 bytes, al lucations >4A through >6D, has been assigned for OSR usage. The base address for CPU memory in the TI-99/4A Home Computer is +8300. Tu allow for future changes in this base address, it will be derived from the given value of the workspace pointer. This means the loss of one of the workspace registers for this purpose. === page p-47 C.4.3 GPL Interface to DSRs The GPL interpreter interfaces to DSRs through the monitor. The GPL program that wants to access a DSR has to use the following GPL CALL sequence: CALL >10 DAIA 8 This will cause the monitor to start searching for a DSR with the same name as the string pointed to by CPU location 756. This scarch routine will stop comparing names at the end of the given string or at the first imbedded period, whichever comes first. On the DSR side, CPU location >56 is left pointing at the first character behind the DSR name, i.e. a period or an end of string. CPU location >54 contains the DSR name length (one word). To get the start address of the PAB in VDP RAM, the following formula has to be computed: CPU(>56) - CPU{>54) - >0A The result will point at the 1/0 OPCODE entry in the PAB. It 3s up to the DSR to check for any switches in the nama. For’ this purpose the length of the PAB name string has been given in the PAB, Comparing this length against the length given in CPU location >54 will show if the user specified more than just the OSR name. C.5 Linkage to BASIC This section describes the way the BASIC versions of the Professional Computer and the Home Computer are linked to the File Management System. This section also describes how to access PAB'c from GPL subroutines that are callable from BASIC and assume a PAB link structure has been set up by BASIC. 46 ee ee ee a ee ee ee ee oe oe ee he oe ee he ee oe === page p-48 C.5.1 BASIC PAB modifications Aside from the control information contained within the PAB, as already discussed in section C.3, BASIC adds four more bytes to the top of the PAB for specific BASIC-related control information. Ihe new PAB structure within BASIC is drawn in Figure C.5.1. ' 0,1 : LINK TO NEXT PAB IN CHAIN ! ja La iJ ig i ! ‘CHANNEL NUMBER =! ~—sINTERNAL OFFSET ! bene {ae e ' 24 5 : ! 1/0 OPCODE ! FLAG / STATUS ' ene anne Yee eee ! $ 6,7 : ' DATA BUFFER ADDRESS ! ve ce J 13 ‘og ! SLOGICAL RECORD LENGTH ! CHARACTER COUNT \ Be Ce ee ‘ 110,11 be : RECORD NUMBER i |e eee {aan ! 12 1 13 ! ! SCREEN OFPSET : NAME LENGTH : 14... ; ' FIGURE C.5.1 Modified PAB Layout The additional four bytes contain additional control information BASIC needs for its internal PAB linkage structure. The PAB's within the BASIC control structure form a simple linked list, which means each PAB has a pointer to the next PAB in the system. The last PAK in the list has a zero ("O") link, indicating that it is at the end of the list. Rytes 0 and 1 in the BASIC PABe contain the link mentioned above. Byte 2 contains the actual BASIC channel or file number (1-255); byte 3 contains the offset of the current data pointer within the data block. The offset indicated in byte 3 of the BASIC PAB indicates the position of the current data pointer within the data buffer given in bytes 6 and 7. If byte 3 equals zero, the current data buffer is "blank"; i.e. if in "read" mode, a new butter has to be read in before any further processing, but in "write" mode the entire buffer is still available for data storage. 47 === page p-49 If byte 3 is non-zern, it contains an “offset" within the data buffer. Added to the start address of the data buffer, it will give the actual address of the first data byte to be read or written. This is only the case if we have pending PRINT operations (the most recent PRINT ended on ";""or ",") or pending INPUT operations (the most recent INPUT ended on a ""). In all other cases, byte 3 will be zero. C.5.2 BASIC PAB Linkage As mentioned already, BASIC utilizes a simple linked structure for the management of its PAR's. Each PAR contains a link ta the next PAR in the chain. In order to access the chain, we need to have a link to the first PAB in that chain. This link is given in CPU location >3C for GPL programs, which is equal to location >833C in 9900 assembly language. A graphical representation of the link structure could be: CPU RAM Keene ene n nen enn nn = VDP RAM ---------------—=--— > 003C OF AB 0E27 OD1A PAB no. 2s » PAB NO. 3. 7 , ' FIGURE C.5.2 BASIC Link Structure ' PAB no. ds ’ Please note that all PAB's are located in VDP memory, whereas the initial link to them is Yncated in CPI) memory. Also note that although usually the PAB's will be allocated in lexical order, depending upon the program, they can be allocated in any arbitrary order. 48 mm a —_—_— nem =— —_—_ =_—_ mE Oe _ EE a = =) 6) ma) === page p-50 Section D--DSR SPECIFICATIONS D.1 Introduction This document describes the hardware and sottware interfaces between the console and peripherals of the TI-99/4A Home Computer family. The purpose of this document is to provide a reference for third parties who want to design new peripherals for the TI-99/4A family. 0.1.1 General Interface Each peripheral should incluce a nonvolatile Device Service Routine (DSR) software package to drive the peripheral. The DSR communicates with the console software through certain memory locations. The console software sels up information in these memory locations and passes it to the user-se]ected peripheral. From there on, the selected peripheral's DSR should have the capability to interpret the information set up by the console software, physically drive the peripheral, and pass the peripheral's data or status to the console software if neccessary. 49 === page p-51 D.2 1/0 Bus--The purpose of this section is to describe the pin assignments of the 1/0 Bus, tuntions of 1/0 viynals, sources of Output Signals, and destinations of Input Signals. D.2-1 1/0 Bus Pin Assignments and fescriptions Pin No. Notation 1/0 Description 1 +5V 0 5V Power Supply 2 SBE 0 Low when MPU read from >90XX or write to >94XX memory 3 RESE1 0 Master Reset, low active 4 EXTINT I External Interrupt, low active 5 Ad 0 Address Bit 5 6 AiO 0 Address Bit 10 7 A4 0 Address Bit 4 8 All 0 Address Bit 11 9 OBIN 0 Derived from MPU's DBIN pin, same parity 10 A3 0 Address Bit 3 il Al2 0 Address Bit 12 12 READY I lf device or memory is ready after being addressed by MPU in memory R/W cycle, device or memory should cause this input to go high 13 TOAD I To 9900's LOAD pin 14 AG 0 Address Bit & “ 15 Al3 0 Address Bit 13 16 Al4 0 Address Bit 14 17 Aq 0 Address Bit 7 18 AQ 0 Address Bit 9 19 A15/CRUOUT 0 CRU Output/Address Bit 15, LSB 20 A2 0 Address Bit 2 21 GND 0 Signal Ground 22 CRUCLK 0 Inversion of MPU's CRUCLK pin 23 GND 0 Signal Ground 24 O38 Q Inversion of Phase 3 Clock 25 GND 0 Signal Ground _ 26 WE 0 Derived from MPU's WE pin, same parity e7 ND 0 Signal Ground 28 MBE 0 Low when MPU addressing >4000-->oFFF Memory 29 AG 0 Address Bit 6 30 Al 0 Address Bit 1 31 AO 0 Address Bit 0, MSb 32 MEMEN 0 Derived from MPU's MEMEN pin, same parity 33 CRUIN I CRU Input to MPU 34 07 1/U Data Bus Bit 7, LSB 35 D4 1/0 Data Bus Bit 4 36 06 I/O Data Bus Bit 6 37 DO 1/0 Data Bus Bit 0, MSR 38 05 1/0 Data Bus Bit 5 39 D2 1/0 Data Bus Bit 2 AO D1 I/O Data Bus Bit 1 41 1AQ 0 MPU's IAQ pin 42 D3 1/0 Data Bus Bit 3 43 -5V 0 ~5V Power Supply 44 AUDIO IN 1 To Sound Generalur Controller's AUDIO IN pin 50 === page p-52 D.3 Hardware Structure of DSR 0.3.1 DSR ROM Normally, a DSR is written in the 9900 Assembly Language amu is housed in a ROM, which is itself part of the TI-99/4A family's peripheral. All DSRs must begin at address >4000 and should not exceed >oFFF. All of the eight data pins of the DSR ROM must be buffered before heing connected to the data bus of the 1/0 Bus. This buffer is enabled and disabled by a preassigned CRU output bit which is controlled by the console software, so that not more than one DSR is accessed at any time. D.3.2 CRU Mapping The CRU I/f1 is used by the system to access the peripherals, 1f tne speed of data transfer is not too crucial. The decoding format for the CRU address ing is indicated as: AU AL A2 A3 A4 A5 A6 A7 A8 AQ AiO All Al2 A13 Ala A15/CRUQUT 00 0 User ID Device CRU 1/0 Bit Decode 0 The CRU address space, ranging from >0 to >1FFE with AO, Al, A3e and A15 unused, is broken into eight blocks of 512 bits each. The User ID, indicated through the Address Decoding of A3, A4, and AS, represents each of the 512 Bit Block. They are assigned as follows: MPU Address A3 A4 AS Assignment 0000-0 3FE 000 Console Use 1000-13F E 100 TI Peripheral Space No. 1 1400-17FE Tol TI Peripheral Space No. ? 1800-1BFE 1 1 0 TI Peripheral Space No. 3 1CO0~1FFE 111 TI Peripheral Space No. 4 The standard device decoding through AG and A/ gives a total of four device blocks within each User ID Block. The CRU I/O Bit decoding through A8-Al4 allows 128 addressable bits each of input and output. In the 128 CRU Output bits, the first bit, with A8 AIA all O's, is reserved fur enabling the Data Buffer of the DSR ROM in each Peripheral as mentioned in the last subsection. Setting this bit to logic one enables the DSR ROM, while setting it to logic zero disables the DSR ROM, === page p-53 D.A Software Structure of NSR A DSR must follow a specific format in order to communicate with the console software properly. The purpose of this predefined format is to let the console software have the least overhead and the VSR have the maximum flexibility in device servicing. A DSR, in general, contains the following elements: Symbol Definition Block Header and Linkage Block Power-up Routine (optional) Main Device Service Routine Interrupt Routine (optional) Ma Pwrr Each of the above elements will be discussed in detail in the following sections. D.4.1 Symbol Vetinition Block The Symbol Definition Block serves two purposes. First, it equates frequently used data or addresses with symbols for case of recognition. Secondly, it specifies the CPU RAM location in a certain way so that each DSR can be used around future and existing CPU family members such as the TI-99/4 and the TI-99/4A with the least modification. The first purpose is common in every program, but the second one needs more explanation. Each model in this family has a different memory structure within the console. Therefore, care must be taken in handling memory addressing in a DSR so that the DSR can support future Home Computer models. The console software always enters the OSR through the instruction: BL *RQ where R9 contains the DSR entry address. Upon entry of the DSR, the workspace pointer contains the beginning address of the Register File, which the console software uses. If all the CPU RAM's which the DSR may access are predefined with respect to this workspace pointer, the DSR does not have to know the memory map of each console. The DSR can address each CPU RAM through index addressing via the workspace pointer. For example, if you want to move the contents of a CPU RAM (having a displacement [DISP] with respect to the workspace pointer) tu RO, du the following: ENTRY STWP R4 entry of DSR MOV at DISP (R4). RO 52 === page p-54 Some of the frequently used CPU RAM's symbols and locations are listed below. PAD EQU —>E0 start of CPU RAM in TI-99/4A console FAC EQU PAD+4A start of 36 bytes available to DSR ROLB EQu PAD+E1 lower byte of RO R1LB Equ PADTE3 lower byte of R1 OPCODE EQU FAC+O beginning of PAB, I/0 operation code FLESTS EQu FAC+1 PAB--F lag/Status BUF ADR EQu PAC+2 PAB--Data Buffer Address LRECLN EQu FAC+4 PAB~-Logical Record Length CHRCNT EQu FAC+5 PAB--Character Count RECNUM EQU FAC+6 PAB--Record Number SCNOFF EQu FAC+8 PAB--Screen Offset OPTLEN EQU FAC+9 PAB--Option Length DEVLEN £QU FAC+10 PAB~-Device Length PABVUP EQU FACt+12 PAB--Pointer to PAB in VDP RAM VWA ~EQU >8C02 address for VDP Write-Address operation GRD Equ >9800 address for GROM Read-Data operation D.4.2 Header and Linkage Block The DSR must contain a certain header starting at >4000 so that the linkage to the console software can be established Properly. This header contains the following information: 1. validation flag ( >AA ). 2. name(s) of device(s) being serviced by this DSR (the device name should be 7 characters or less). 3. entry point(s) of the device(s) being serviced by this DSR. 4, entry point of Power-up Routine, if necessary. 5. entry point of Interrupt Routine, if necessary. === page p-55 D.4.2.1 A Sample Program for Header and Linkage Block This section gives an example uf Uhe Header and Linkage Block in a typical DSR. The syntax of DX10 Assembler is obeyed in this program. DX10 Assembler Language is similar to, but not identical with, the TI Editor/Assembler. Infurmation on the language can be found in the 9900 Family Design Book. Sample Program Showing DSR Header Format RORG >4000 start of DSR BYTE >AA telling console this is a valid DSR BYTE 1 version number, always 1 DAIA U not used in DSR calls; leave it 0 DATA PWRLNK Power-up Routines* Link. PWRLNK is replaced by 0 if power-up set is not necessary DATA 0 not used in DSR calls; leave it 0 DATA DSRLNK DSR tink; can't be 0 here DATA 0 not used in DSR calls; leave it 0 DATA INTLNK Interrupt Routine's Link. INTLNK 1s replaced by 0 if interrupt is not used DATA 0 not used in DSR calls; leave it 0 * *k* This Power-up Routine can be omitted if power-up * *** initialization is not necessary for this peripheral 6 o PWRLNK DATA 0 linkage, set to 0 DATA PWRUP entry point of power-up routine BYTE 0 name lenaths set to 0 EVEN PWRUP . entry of power-up rouline B *R11 return to console software through R11, if it is not destroyed * eek This Interrupt Routine can be omitted if Interrupt * xk Request is never issued by this peripheral * INTLNK DATA 0 linkage; set to U DATA INTDSR entry point of the Interrupt Routine BYTE 0 name length; set to 0 EVEN 5A —_— —— === page p-56 Sample Program (continued) INTDSR . entry of interrupt routine: . IF interrupt request from this peripheral = true THEN begin interrupt service; reset interrupt request; GOTO INTEND f END i ELSE GOTO INTEND INTEND B *R11 return to console software through R1i, j if it is not destroyed i * : * *** Main Device Service Routine. Assuming three devices, i a *** with names UEViCE, DEVICE/1, DEVICE/2, are * *** supported in this peripheral. * OSRLNK DATA DSRLK2 linkage to next device field i DATA ENTRY1 entry point of Ist device i BYTE 6 name length of Ist device ‘ TEXT ‘DEVICE! name nf ist device EVEN DSRLK2 DATA DSRLK3 linkage to next device field DATA ENTRY2 entry point of 2nd device ~ i BYTE 8 name length of 2nd device TEXT 'DEVICE/1' name of 2nd device 4 EVEN 4 DSRLK3 DATA 0 linkaye Lu next device Tieid (none) i DATA ENTRY3 entry point of 3rd device i BYTE 8 neme length of 3rd device : TEXT "DFVIC/2# name of 3rd device | EVEN ) ENIRYL : entry of Ist device servicing i i} ENTRY2 : entry of 2nd device servicing ENTRY3 : entry of 3rd device serviciny EXIT INCT R11 return tn cansole software through B *RIL * Ril, if it is not destroyed 55 === page p-57 D.4.3 Power-Up Routine For same peripherals, it is necessary ta initialize the hardware at power-up time. It is suggested that a power-up routine be included to do the initialization through software for these peripherals. Power-up Link should be set in the Header Field as described above. Power-up routines are executed whenever the system is reset by either hardware or software. The console software searches all peripheral DSR for power-up routine addresses and executes them if they are found. Each power-up routine can use RO-R10. Upon entry, R12 is set to the beginning address of the CRU space for that peripheral DSR (note that this address is used to enable the DSR ROM). R11 contains the return address. R13 and R165 contain the memory-mapped addresses of GROM Read Data and VDP Write Address, respectively. All VOP and GROM operations can be indexed from these two registers. The power-up routine may use VDP RAM from 0 to the location pointed by CPU RAM >70, offset from workspace pointer - >E0). It can use all CPU RAM except location >55, <6D, and >CO through >DF offset from workspace pointer - >E0. All power-up routines must return with B *R11. D.4.4 Interrupt Routine If the peripheral issues Interrupt Request to the 9900 CPU, the DSR should alsn inctude an interrupt routine and Interrupt Link in the Header as described above. Every interrupt that is not recognized as console interrupt (VDP or 9901 Timer) causes the console software to execute every interrupt routine it can find. The interrupt routine must check to see whether the Interrupt Request is raised by this peripheral. If it 1s not, exit by B ¥RII1. The interrupt routine may use R1-R8, and R10. The contents of R11-R15 are the same as those of the Power-up Routine Section. The interrupt routine and Main DSR can split the allocation of CPU RAM from >4A to >6D offset from workspace pointer — sFO ). All interrupt routines end with B *R11. Interrupt Request raised by the peripheral must be cleared before exit. To exit DSR, do INCT Ril B *R11 56 === page p-58 GLOSSARY ALU bit byte cartridge memory CPU CRU DRAM DSR GPL GROM 1/0 LSB LSBy MMD MSB MSBY MPU PAB PC PCB Arithmetic Logic Unit. Smallest unit of memory; Binary digiT. 8 bits of memory. ROM space found within a plug-in cartridge. Central Processing Unit. Communication Register Unit (1/0 technique tor IMS 9900 Microprocessor). Dynamic Randam Access Memory. Device Service Routine (TMS 9900 machine language for Device Interface). Graphics Programming Language. Graphics Read-Only Memory (TML 0430). This memory device is a 6144 byte read-only memory with on-board 13-bit program counter. The Program counter can be written or read through an 8bit interface and will aulomattcally increment. Input/Output. Least Significant Bit. Least Significant byte. Memory-Mapped Device. Most Significant Bit. Most Siqnificant Byte. Microprocessor Unit. Peripheral Access Block. Program Counter. Printed Circuit Board. Peripheral Expansion Unit. === page p-59 RAM ROM SRAM WORD Random Access Memory. Read-Only Memory. Static Random Access Memory. Video Display Processor (TMS 9918A). 16 bits/2 bytes of memory. 58 === page p-60 U107 U106 un bi el SH2.U600.10 (=AT4 SH3-U300-18 (VOPINT) sH2-u600.41 (cog —)—MSB $SH2-U600-42 (tnt) $H2-U600-43 (—Cba-) SH2.u600-44 (“E03 _) st2-u600-45 (cpa) SH2.u600-46 (CCh5_) SH2-U600-47 (C6) SH2U600-48 (tpy—)—tS8 14 TMS 4116 16K XT SH2.U6014 ( _RgT9918 wina SNDOUT === page p-61 © +12V1D O +5VID O -SVID 14. TMS 4116 16K X1 74 TMS 4116 16K X1 14 TMS 4116 16K X 1° MOLEX ~6V}O/1 12v10]2 GND] O}3 “ov [O | cate x: L114 68 ss L113 6.8 L112 68 nA. + C135 ~ ay +1Z VID +5VID -5VID T1-99/4A SCHEMATIC DIAGRAM === page p-62 (MsB) CDO (MSB) EVEN BYTE HET | vee a7 654321 20 1» TMS 4732/2532 Ue10 vss 8 assi0.9 87 6 5 43 2 108 eT eC EEC TT Te! 7654321 ce TMS A7RP/9RR2 116811 8.76 5 4 3 201 ‘Ag SH4-R508 SH3-U500-11 SH3-U300-4 SH5-R523-1 SH4-R527-2 (CROMEN) SH4-U504-11 C—Ma4 > $H4-u505-13 C-coP )—=SS VOPR === page p-63 74LS245 VsS_DIR TO voP SH1 (io) SHS C_ At) aD) AB CATs) SHS,3 Cait) SH5,3,1 us0t US02 Us1t TO GROMS AUDIO 1/0 PORTS, SHS5-U510-15. SH3-U300-3 SH3-U300-2 3H 14)100-34, 3119-47500-1 1/0 PORT #3-SH5 10 PORT #41-SHS fo PORT #32 504-4 SH4 SH4 $H3-4U300-10 SH5-U5108 SH4-U506-4 & GROM PORT 25 SH4-U507.5 & U510-14 SH5-U511-5 ‘SHS-U5 10-13 GROM PORT 8 $H4-U5055 RAMBLK) SH3-U300-5 ‘ T1-99/4A SCHEMATIC DIAGRAM === page p-64 22 p2 [28 | 13 sH2u6008 (ETH) SHS.GP-6/R625 sH2.U60031 CGRUIWC) H2-U600-60 GRUEIK) 2.60030 (AU OUR) 29 R319 TOK ‘SH2-U600-14 2 snzvoor1s Can _ sh2-ue00-12 CAI) INT 10 sH2ueoo11 Can) int 9 24 INTS SH2-U600-10 Cat) ! iNT 4 172), INTS SHS I/O PORT 4 CEXTINDD iT 1 vo 18 int 6 5 3| on sh2-u601-7 (33) 19 SH2-U507-11 5 23 +5V 0 40 R412, 120K 300 9 Dow 16 30 R413 2.2K = 400 4 2 craoz 4558 4 Vv = Poise2 ae 27 29 R402 C407 56K 6.8K “001 Rago naot ca03 200 cn sHieuo11-9 CNET bl c410 022 CR = cara TR R48 wv = 001 10K 7 R405 2417 = 10K {9.1K 400 cats, 12K Tise2 (hia 01 === page p-65 JOYSTICK PORT KEYBOARD CAS CNTRLT TI-99/4A § === page p-66 01 GROM PORT ~ sve 15v of 1500 pay -8V0 a vol ca 7 an——-- 15 D2 6 C2 12 mux 2 Gos) D4 4 SH2 Ci 9 Ci i; Cr | 3 = | cr 3 P| 20 R516 3.3K Jo [DBIN 2 P12 | $ r a04 4.7K | 4,[GR 9 | 15 | 45V gnsor 7520 psaie| R502 R522g | 31 worn 10 160 IN914B 360 7 R502 7 ese fo | uso4 +e R518 7 2.2K} 5, sue? Con 2 TSo# = Ce see BK PACK nci7ianx] fat | ~ || |, [a] rargoa 8518 Lea / Tis92 J sslvss| | tT Ty se] a) ° = +6 1 3 FMCO430 W500 B SH1-U100-37 (GAMCLK) RESET O---0 % 4 R501¢ CR500 sad R514 36 270 3 pG1992 SHG UBOO 12 Alte) Ub04 769 I f= | 2 = TALS 138 7 R527 = SH2-U600-22 (az) 18138 _1f vec 15 ROM EN - SH2.U600 24 C70 > 13_—MBE | +51, ABI5 1K 2_-ROMG vl? 0508 3 MEMEN T1_—Me (4) LN | 741804 7ALS244 $SH2-U605.3 CMEMEN)— + us08 2 7ALEOS SH5-U503-3 (Asa _) SH5-U503-5 (“ass SH5-U503-7 Case _) $H2-U6028 (Tale > 4 +810 R508 | 47K U505_J 7418138 => SH2-U602-10 (pain) OBIN $H2-U606-3 L501 Vv FERRITE 508 ; oT 62 === page p-67 501 a ORT +5V 0 “evo 1/0 PORT bo 3 (mse) ool, re) a Pe joo os] foe a a) | po 3 jo7 eT be [oan a * i SOUND IN CHET sH3.ra17 [sn 44 T (SPEECH) tH R510 [10] oo 100n jal] eT) SH1-201-3 ifvss{_] | 9 16 502 We roy *3.58 MHZ CLOCK i — i 4JReaDy| " wi04 cix [49 3.5MHZ S == = SGETIN) sH1-U100-38 ' CROWEN) sH2-U606-13/ 611.20 4 [> 8 72 |us08 3 i| A 7ALS04 7ALs244 21 CH sH2.us07.9 1)-5V] | ° us08 | 9 W502, a 8 Rey] We 7ALS04 a 7 -memen | | 3) | | CSVDPR SH1-U100-15 = : stb t+—5 6 cs voP Ww ! (C=W) sH1.U100-14 fT US07_74LS32 SBE to , lo | ,U506 | +510 Bg 1 471 No mK READV/FOLD "4, SH2-U607-12 J4L503 8 1s 2n3_ 6 OBIN 74804 1/0 PORT L501 . c508 . 01 *SN76489 USES 3.58 MHZ CLOCK SUPPLIED THRU W104 COAX 'SN94624 USES 447 KHZ SUPPLIED THRU W502 T1-99/4A SCHEMATIC DIAGRA === page p-68 SH4-US00-11 ‘SH2-U600-10 SH2-U600-21 SH2-U612-11 600-22 600-23 600-24 601-7 U606-3 SH2-U602-12 SH4-U505-1, U506-5 SH4-U505-2 SH4-U505-3 SH3-U300-4 SH2-U6004 SH2-U6056 SHZ-UD08-6 SH3-U300-17 Cia ~~ vec ~ GROM PORT LsB ti, Se rc vec Gio nee eee ai ry ain CA) 2 ; Ng “4 Tvs00 | ISD . = 16 74LS367 up3 Ca) 8 [> == m= bie? 2 ASS U503 26 6h? 74LS367 = 5, a A ROT Ne ca 30 . | t +> 24 MSB. — BR] Ca G_ vss G vss _j 8 a fs Gaeta —AIS/CRU OUT a = qr —>—— Ci (MSB) —CRU CLK aD—__—_-> eD—___<«—________. 63 === page p-69 1/0 PORT Ala ee ; aia 1OoFs,9 A12 14K13 > . (LSB) A10 > (MsB) ‘AQ Ag U503 AT 74LS367 AG. 2K 3 SN? Eb G vss y 8 62 7 R507 —CRU CLK 10 62 +51 = Lys_ ves fs 931 o45 R509 R300 4.7K 4.7K R525 CRUIN ce 1 a ae 100 R526 . HOLD/AAQ R528 -EXT INT 100 VO PORT TI-99/4A SCHEMATIC DIAGRAM === page p-70 P1 99/4 (a) VO BUS 9 - DBIN 32 20 a ‘A02 30 A01 31 ae 10 AM 7 A04 5 AOS 2 AS bad AQT 4 as 18 A09. : ‘A10 H AN " ne " ANS % Ala 6 SET . A15/CRU OUT 28 WE 2 CRUG 33 4 24 4a AUDIO IN 21 23 ca 3 GROUND 2 READY 28 MBE 4 AAG 2 TOAB 2 SBE 9 43 -5V ; 1 +5v 10 70 NOTE: ALL RESISTORS ARE 47S2 = c3 1 64 === page p-71 13 po nis 7 3 | 01 Ria ° 16 | 4 | 2 Ris 3 30 16 | 5 | 03 BIZ 5 31 14 a ry RIT 13 D6 Rio O 33 12 [8 | 06 Re. O34 11 9 | 7 AS O35 7 RDBENAA O36 O43 R28 R27 ° " = 12 " OO ae nae 0 13 ae BS 14 R22 6 ee R21 16 - RZ 7 R3 % at 19 av, 20 ere 2 ng Nene an ot 20 23 R? 24 To a) 33 oO 26 7 2 4 UNREGULATED +8 L2bos Pz FLEX CABLE CONNECTOR FLEX CABLE SCHEMATIC DIAGRAM (CONSOLE END OF CABLE) === page p-72 RS 1-8 ARE 472 28 $s 20, $B $90, $$ 39, rn 38, 0 R7 oe Sa s Re D7 9 OA 98 ar 120 99 200 ‘A10 210 AN 2, P2 290 Ala FLEX CABLE CONNECTOR Al4 —_—_—— A16/CRUOUT 246 26 4 Lr ne eee 43 38 8 1 CRUIN a EXTINT (INTA) s AUDIO IN 3 7 9 25 GROUND 27 +5 32 37 R19 10K READY UNREGULATED +8 65 === page p-73 RDBENA.B P3 DIA ec 4 D2A 26 es a 3 ee Z DS.A 2 ee 8 DEA 2 ee Ey D7.A 19 |] DBIN.A 52 |e | pia ft | =a 1s] = a Ps [17] za . 1L ji Q2 2N3904 R18 WOOSL 2 18 = A06.A 37 a 16 ‘A07A 38 [| 14 ANA 3 | 8 12 ‘A09.A, 38 Pt | 9 A10.A 33 [13] 7 ANA 34 P15 | 5 AlZ.A 31 rm 2 alae 3 1L_ die AIGA 29 our pie AB CRUOUT A Sy A A 9 54 z a ’ 71 PHA TCLKOUTAD > .° Cour] 6 50 R17 R16 a7 1K —— ROBENA " 55 intal 8s 4 10 3 5 1 7 20 27 47 = 49 53 4 LATED +8 1 2 RS 9 ~ 15 ARE 472. 12 13 15 +5 16 a 46 438 R15 4 8 —~ 3 > oy) 18 UNREGULATED +16 59 60 UNREGULATED ~16 57 se Pt PERIPHERAL EXPANSION BUS FLEX CABLE SCHEMATIC DIAGRAM (PERIPHERAL EXPANSION UNIT END OF CAE === page p-74 1. *SYMBOL FOR FERRITE 3 ol Oe | L Ie 50V D2 1N4002 *L2 > c2 D3 Apt iN5401 50V (MR501) > Da IN5491 (MR501) c3 lt 50V *L5 D6 IN4002 3300uF 36 cs OIF 50V cé 1000uf 35V 2mH .182 13 c13 3300uf 36V c7 Olut 50V 1uH 019 “ cu 4700, 35V ca 4suunt 35V . cis 1000 35V ca oly 50V 2004 010 Lé c10 01 uF 50V ci Out 50V c12 Out 50V === page p-75 | 240 VAC | >— +8 voc | jB 115 VAC GROUND INPUT LINE GROUND VOLTAGE GROUND 2 VERSION INPUT JUMPER OPTION OUTPUT POWER CONNECTOR P2 & P3. PERIPHERAL EXPANSION UNIT POWER SUPPLY 115 VAC INPUT LINC VOLTAGE 1 —1_VERSIUN | === page p-76 IMPORTANT NOTICE REGARDING TECHNICAL DATA The following should be read and understood before purchasing and/or using this literature. TI does not warrant that the book materials will be free from error or will meet the specific requirements of the consumer. The consumer assumes complete responsibility for any decision made or actions taken based on information obtained using the book materials. Any statements made concerning the utility of the literature are not to be construed as express or implied warranties. Texas Instruments reserves the right to change any of the technical data contained hercin without notice. TEXAS INSTRUMENTS MAKES NO WARRANTY, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY TMPLTEN WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THIS LITERATURE OR ANY INFORMATION DERIVED THEREFROM AND MAKES ALL SUCH MATERIALS AVAILABLE SOLELY ON AN “AS IS" BASIS. IN NO EVENS SHALL TEXAS INSTRUMENTS BE LIABLE TO ANYONE FOR SPECIAL, COLLATERAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES IN CONNECTION WITH OR ARISING OUT OF THE PURCHASE OR USE OF THIS LITERATURE AND THE SOLE AND EXCLUSIVE LIABILITY OF TCXAS INSTRUMENTS, RCGARDLESS OF THE FORM OF ACTION, SHALL NOT EXCEED THE PURCHASE PRICE OF THIS BOOK. MOREOVER, TEXAS INSTRUMENTS SHALL NOT BE LIABLE FOR ANY CLAIM OF ANY KIND WHATSOEVER BY ANY OTHER PARTY AGAINST THE (ISFR MF THTS MATERIAL. Some states do not allow the exclusion or limitation of implied warranties or consequential damages, so the above limitations or exclusions may not apply to you in those states. === page p-77 PRINTED IN U.S.A. Texas Instruments invented the integrated circuit, the microprocessor, and the microcomputer. Being first is our tradition. ° ll TEXAS INSTRUMENTS INCORPORATED