Atari ST FD / HD Programming

Atari ST FD / HD Programming

Atari ST FD/HD Programming Jean Louis-Guerin (DrCoolZic) V1.2 – November 2019 Atari ST Floppy Drives Programming Table of Content Table of Content .............................................................................................................................................. 2 Introduction...................................................................................................................................................... 3 Description of the Atari Disk Drive Hardware Interface .............................................................................. 3 Memory / DC Data Transfers ........................................................................................................................ 4 Read Transfers from FDC to Memory ...................................................................................................... 4 Write Transfers from Memory to FDC ...................................................................................................... 5 Transfer Chronogram .................................................................................................................................... 5 DMA Programming .......................................................................................................................................... 6 General Atari ST DMA Connection Block Diagram ...................................................................................... 6 DMA Registers Address Map ........................................................................................................................ 6 DMA Registers detail .................................................................................................................................... 7 DMA Block Diagram ...................................................................................................................................... 9 DMA Mode Control Register Values for the FDC ......................................................................................... 9 DMA Mode Control Register Values for the HDC ......................................................................................... 9 DMA Programming Tips and idiosyncrasies: .............................................................................................. 10 PSG Programming ........................................................................................................................................ 12 PSG Registers Address Map ...................................................................................................................... 12 PSG Registers detail ................................................................................................................................... 12 PSG Programming Tips: ............................................................................................................................. 12 MFP 68901 Programming ............................................................................................................................. 14 MFP Registers Address Map ...................................................................................................................... 14 MFP Registers detail ................................................................................................................................... 14 FDC WD1772 Programming.......................................................................................................................... 16 Accessing FDC Registers ........................................................................................................................... 16 FDC Registers detail ................................................................................................................................... 16 FDC General Disk Read Operations ........................................................................................................... 16 FDC General Disk Write Operation ............................................................................................................. 17 FDC Command Summary ........................................................................................................................... 17 Flag Summary ........................................................................................................................................ 18 FDC Type I Commands .............................................................................................................................. 19 Restore (Seek Track 0) .......................................................................................................................... 20 Seek ........................................................................................................................................................ 20 FDC Type II Commands ............................................................................................................................. 20 Read Sector ............................................................................................................................................ 20 Write Sector ............................................................................................................................................ 21 FDC Type III Commands ............................................................................................................................ 23 Read Address ......................................................................................................................................... 23 Read Track ............................................................................................................................................. 23 Write Track Formatting the Disk ............................................................................................................. 23 FDC Type IV Commands ............................................................................................................................ 25 Status Register ............................................................................................................................................ 26 Status Register Description .................................................................................................................... 26 Status Register Summary ....................................................................................................................... 27 Floppy Disk Programming ............................................................................................................................ 28 General information / Tips ........................................................................................................................... 28 Typical Floppy Disk Operations .................................................................................................................. 29 Enter Supervisor mode ........................................................................................................................... 29 Drive Select ............................................................................................................................................ 29 Seek to Track .......................................................................................................................................... 29 Multiple sectors read .............................................................................................................................. 30 Multiple sectors write .............................................................................................................................. 31 Read Address ......................................................................................................................................... 32 Read Track ............................................................................................................................................. 33 Write Track ............................................................................................................................................. 33 Measurement of FDC bytes time-width .................................................................................................. 34 References ..................................................................................................................................................... 35 Revision .......................................................................................................................................................... 35 Copyleft Jean Louis-Guerin V1.2 - November 2019 2/35 Atari ST Floppy Drives Programming Introduction The goal of this document is to provide the information necessary to write programs to access directly, at the hardware level, the Atari ST hard disk drives and floppy disk drives1. Therefore, I do not cover any of the BIOS/XBIOS and GEMDOS calls as I am bypassing completely the TOS environment. I first describe the Atari hardware involved in connecting disk drives, then I look at the programming of the Atari chips involved, and finally I provide a detail description of the steps required to access floppy drives and hard drives. Description of the Atari Disk Drive Hardware Interface Accessing of Atari disk drives involves many chips. Mainly: the DMA, the MMU, the Glue, the FDC, the MFP, and the PSG chips. The following diagram shows a simplified

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    35 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us