atariforge.org INTERNALS The authoritative insider's guide By K. Gerits, L. Englisch, R. Bruckmann A Data Becker Book Published by Abacus Software Third Printing, July 1986 Printed in U.S.A. Copyright © 1985 Data Becker GmbH Merowingerstr.30 4000 Dusseldorf, West Germany Copyright © 1985 Abacus Software, Inc. P.O. Box 7219 Grand Rapids, MI 49510 This book is copyrighted. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording or otherwise without the prior written permission of Abacus Software or Data Becker, GmbH. Every effort has been made to insure complete and accurate information concerning the material presented in this book. However Abacus Software can neither guarantee nor be held legally responsible for any mistakes in printing or faulty instructions contained in this book. The authors will always appreciate receiving notice of subsequent mistakes. ATARI, 520ST, ST, TOS, ST BASIC and ST LOGO are trademarks or registered trademarks of Atari Corp. GEM, GEM Draw and GEM Write are trademarks or registered trademarks of Digital Research Inc. IBM is a registered trademark of International Business Machines. ISBN 0-916439-46-1 Table of Contents 1 The Integerated Circuits 1 1.1 The 68000 Processor 3 1.1.1 The 68000 Registers 4 1.1.2 Exceptions on the 68000 7 1.1.3 The 68000 Connections 7 1.2 The Custom Chips 13 1.3 The WD 1772 Floppy Disk Controller 20 1.3.1 1772 Pins 20 1.3.2 1772 Registers 24 1.3.3 Programming the FDC 25 1.4 The MFP 68901 28 1.4.1 68901 Connections 28 1.4.2 The MFP Registers 32 1.5 The 6850 ACIAs 41 1.5.1 The Pins of the 6850 41 1.5.2 The Registers of the 6850 44 1.6 The YM-2149 Sound Generator 48 1.6.1 Sound Chip Pins 50 1.6.2 The 2149 Registers and their Functions 52 1.7 I/O Register Layout of the ST 55 2 The Interfaces 65 2.1 The Keyboard . 67 2.1.1 The mouse 71 2.1.2 Keyboard commands 74 2.2 The Video Connection 85 2.3 The Centronics Interface 88 2.4 The RS-232 Interface 90 2.5 The MIDI Connections 93 2.6 The Cartridge Slot 96 2.7 The Floppy Disk Interface 97 2.8 The DMA Interface 99 3 The ST Operating System 101 3.1 The GEMDOS 104 3.1.1 GEMDOS error codes and their meaning 139 3.2 The BIOS Functions of the Atari ST 140 3.3 The XBIOS 155 3.4 The Graphics 206 3.4.1 An overview of the "line-A" variables 226 3.4.2 Examples for using line-A opcodes 229 3.5 The Exception Vectors 234 3.5.1 The interrupt structure of theST 236 3.6 The STVT52 Emulator 242 3.7 The ST System Variables 247 3.8 The 68000 Instruction Set 255 3.8.1 Addressing modes 256 3.8.2 The instructions 260 3.9 The BIOS listing 268 4 Appendix - The System Fonts 443 4.1 The System Fonts 445 4.2 Alpahbetical listing of GEMDOS functions 447 11 List of Figures 1.1-1 68000 Registers 5 1.2-1 GLUE 14 1.2-2 MMU 16 1.2-3 SHIFTER 17 1.2-4 DMA 19 1.3-1 FDC1772 21 1.4-1 MFP 68901 29 1.5-1 ACIA6850 42 1.6-1 Sound Chip YM-2149 49 1.6-2 Envelopes of the PSG 53 2.1-1 6850 Interface to 68000 68 2.1 -2 Block Diagram of Keyboard Circuit 70 2.1.1-1 The Mouse 72 2.1.1-2 Mouse control port 74 2.1.2-1 Atari ST Key Assignments 84 2.2-1 Diagram of Video Interface 86 2.2-2 Monitor Connector 87 2.3-1 Printer Port Pins 88 2.3-2 Centronics Connection 89 2.4-1 RS-232 Connection 92 2.5-1 MIDI System Connection 95 2.6-1 The Cartridge Slot 96 2.7-1 Disk Connection 98 2.8-1 DMA Port 100 2.8-2 DMA Connections 100 3.4-1 Lo-Res-Mode 208 3.4-2 Medium-Res-Mode 210 3.4-3 Hi-Res-Mode 212 111 Chapter One The Integrated Circuits 1.1 The 68000 Processor 1.1.1 The 68000 Registers 1.1.2 Exceptions on the 68000 1.1.3 The 68000 Connections 1.2 The Custom Chips 1.3 The WD 1772 Floppy Disk Controller 1.3.1 1772 Pins 1.3.2 1772 Registers 1.3.3 Programming the FDC 1.4 The MFP 68901 1.4.1 68901 Connections 1.4.2 The MFP Registers 1.5 The 6850 ACIAs 1.5.1 The Pins of the 6850 1.5.2 The Registers of the 6850 1.6 The YM-2149 Sound Generator 1.6.1 Sound Chip Pins 1.6.2 The 2149 Registers and their Functions 1.7 I/O Register Layout of the ST Abacus Software Atari ST Internals The Integrated Circuits 1.1 The 68000 Processor The 68000 microprocessor is the heart of the entire Atari ST system. This 16-bit chip is in a class by itself; programmers and hardware designers alike find the chip very easy to handle. From its initial development by Motorola in 1977 to its appearance on the market in 1979, the chip was to be a competitor to the INTEL 8086/8088 (the processor used in the IBM-PC and its many clones). Before the Atari ST's arrival on the marketplace, there were no affordable 68000 machines available to the home user. Now, though, with 16-bit computers becoming more affordable to the common man, the 8-bit machines won't be around much longer. What does the 68000 have that's so special? Here's a very incomplete list of features: 16 data bits 24 address bits (16-megabyte address range!!) all signals directly accessible without multiplexer hassle-free operation of "old" 8-bit peripherals powerful machine language commands easy-to-learn assembler syntax 14 different types of addressing 17 registers each having 32-bit widths These specifications (and many yet to be mentioned here) make the 68000 an incredibly good microprocessor for home and personal computers. In fact, as the price of memory drops, you'll soon be seeing 68000-based 64K machines for the same price as present-day 8-bit computers with the same amount of memory.
Description: