; OS 1050 DRIVE EQUATES
; ---------------------
;
; Syntax:
; Use '=' for addresses
; and '#' for values
;
; RAM $0000 - $00FF
; TIMER,IO $0280 - $029F (6532)
; memory used by ports:
; PORT A ($0280)
;  bit 0 drive number            read
;      1     "                   read
;      2                         write
;      3 motor off               write
;      4 > track 20              write
;      5 single density          write
;      6 IRQ floppy ?            read
;      7 data request floppy NAK read
;
; PORT B ($0282)
;  bit 0 data out (to CPU)  write
;      1                    read
;      2 step motor phase 1 write
;      3 step motor phase 2 write
;      4 step motor phase 3 write
;      5 step motor phase 4 write
;      6 data in (from CPU) read
;      7 command (from CPU) read
;
READSEC  #   $52        ; read sector
WRITSEC  #   $50        ; write sector without verify
WRVESEC  #   $57        ; write sector with verify
STATREQ  #   $53        ; status request
FORMSD   #   $21        ; format single density
FORMED   #   $22        ; format enhanced density
SPECIAL  #   $23        ; special
;
; memory usage
;
; sector buffer from $0000 to $007F
;
SEKBUF   =   $00
;
; buffer for address info after READ ADRESS
; TRACK, SIDE, SEKTOR, LENGTH, CRC1, CRC2
;
ATRACK   =   $7A
ASEK     =   $7C
ALEN     =   $7D
ACRC1    =   $7E
ACRC2    =   $7F
;
; buffer for command and sector number
;
RDRIVE   =   $80
RKOMND   =   $81
RSEKL    =   $82
RSEKH    =   $83
;
FDATA    =   $85
FSNR     =   $87
FTNR     =   $89
;
MOTIML   =   $8B        ; timer for MOTOR ON
MOTIMH   =   $8C
TRACK    =   $8D        ; track #
SEKTOR   =   $8E        ; sector #
CSTAT    =   $8F        ; controller status shadow
STATUS   =   $90        ; floppy drive status
ERROR    =   $91        ; error byte
COUNT    =   $92        ; counter
DIR      =   $93        ; step direction floppy
FLAG     =   $94
HZ95     =   $95        ; aux byte for track/sector calculation
SEEKERR  =   $96
TRKERR   =   $97
KOMND    =   $98        ; command 0 - 7
JUMPL    =   $99        ; jump vector
JUMPH    =   $9A
DSTAT    =   $9B        ; drive status, to detect change of diskette
MUSTERNR =   $9C
HZ9D     =   $9D
HZ9E     =   $9E
PHASE    =   $9F        ; actual phase of step motor
FMERK    =   $A0
ERRADR   =   $A3        ; error addr for floppy test
HZA4     =   $A4
BUFFER   =   $A5        ; temp for floppy test
STEPCNT  =   $AF        ; step count
STEPS    =   $B0        ; steps to do
SBUF     =   $B1        ; write buffer and track count for floppy test
DRA      =   $0280      ; data register PORT A
DDRA     =   $0281      ; data direction register PORT A
DRB      =   $0282      ; data register PORT B
DDRB     =   $0283      ; data direction register PORT B
TIM64    =   $0296      ; timer : 64
TIM1024  =   $0297      ; timer : 1024
T1024I   =   $029F      ; timer : 1024 INTERRUPT ENABLE
FCNTRL   =   $0400      ; control register floppy controller
TRKREG   =   $0401      ; track register
SEKREG   =   $0402      ; sector register
DATREG   =   $0403      ; data register
