Mercurial > hg > Members > kono > nitros9-code
annotate defs/dgndefs @ 1971:136a4e706aa6
Fixed step rate issues on recalibrate on original Dragon 5.25" drives
author | afra |
---|---|
date | Sun, 08 Jan 2006 21:39:17 +0000 |
parents | 1e312b144f4d |
children |
rev | line source |
---|---|
1804 | 1 IFNE DGNDEFS-1 |
2 | |
3 DGNDEFS set 1 | |
4 | |
5 ******************************************************************** | |
6 * DgnDefs - Dragon I/O Definitions | |
1727
78ce0a5ffc8e
Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff
changeset
|
7 * |
1804 | 8 * $Id$ |
1727
78ce0a5ffc8e
Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff
changeset
|
9 * |
1804 | 10 * Edt/Rev YYYY/MM/DD Modified by |
11 * Comment | |
12 * ------------------------------------------------------------------ | |
13 * 2004/11/16 P.Harvey-Smith. | |
14 * Fixed the stupid error I made in the defines below that made all the | |
15 * non DPxxxxx defines equal to FF00 !!! | |
1806 | 16 * |
17 * 2005/04/14 P.Harvey-Smith | |
18 * Added non DP defines for ACIA on Dragon 64/Alpha | |
19 * | |
1819 | 20 * 2005/04/21 P.Harvey-Smith |
21 * Fixed errors in defines for WD2797 non-DP registers. | |
22 * | |
23 | |
1804 | 24 nam DgnDefs |
25 ttl Dragon I/O Definitions | |
26 | |
27 ******************** | |
1933 | 28 * VTIO Static Memory |
1728 | 29 * |
1804 | 30 * Definitions for ports on Dragon 32/64/Alpha. |
31 * | |
32 * | |
33 IO equ $ff00 IO page on Dragon | |
1727
78ce0a5ffc8e
Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff
changeset
|
34 |
78ce0a5ffc8e
Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff
changeset
|
35 * |
78ce0a5ffc8e
Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff
changeset
|
36 * Most of these symbols will be defined twice, as some |
78ce0a5ffc8e
Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff
changeset
|
37 * of the Dragon code, sets DP=$FF, and uses direct page |
78ce0a5ffc8e
Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff
changeset
|
38 * addressing to access the io ports, whilst some of it |
78ce0a5ffc8e
Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff
changeset
|
39 * uses absolute addressing. |
78ce0a5ffc8e
Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff
changeset
|
40 * The versions starting DP must be used with DP=$FF. |
78ce0a5ffc8e
Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff
changeset
|
41 * |
78ce0a5ffc8e
Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff
changeset
|
42 |
1804 | 43 * PIA 0 and 1 standard on all Dragons. |
44 DPPIA0DA EQU $00 Side A Data/DDR | |
45 DPPIA0CRA EQU $01 Side A Control. | |
46 DPPIA0DB EQU $02 Side B Data/DDR | |
47 DPPIA0CRB EQU $03 Side B Control. | |
1727
78ce0a5ffc8e
Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff
changeset
|
48 |
1804 | 49 PIA0DA EQU DPPIA0DA+IO Side A Data/DDR |
50 PIA0CRA EQU DPPIA0CRA+IO Side A Control. | |
51 PIA0DB EQU DPPIA0DB+IO Side A Data/DDR | |
52 PIA0CRB EQU DPPIA0CRB+IO Side A Control. | |
1727
78ce0a5ffc8e
Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff
changeset
|
53 |
1804 | 54 DPPIA1DA EQU $20 Side A Data/DDR |
55 DPPIA1CRA EQU $21 Side A Control. | |
56 DPPIA1DB EQU $22 Side B Data/DDR | |
57 DPPIA1CRB EQU $23 Side B Control. | |
1727
78ce0a5ffc8e
Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff
changeset
|
58 |
1804 | 59 PIA1DA EQU DPPIA1DA+IO Side A Data/DDR |
60 PIA1CRA EQU DPPIA1CRA+IO Side A Control. | |
61 PIA1DB EQU DPPIA1DB+IO Side A Data/DDR | |
62 PIA1CRB EQU DPPIA1CRB+IO Side A Control. | |
1727
78ce0a5ffc8e
Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff
changeset
|
63 |
1804 | 64 * Dragon Alpha has a third PIA at $FF24. |
65 DPPIA2DA EQU $24 Side A Data/DDR | |
66 DPPIA2CRA EQU $25 Side A Control. | |
67 DPPIA2DB EQU $26 Side B Data/DDR | |
68 DPPIA2CRB EQU $27 Side B Control. | |
1727
78ce0a5ffc8e
Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff
changeset
|
69 |
1804 | 70 PIA2DA EQU DPPIA2DA+IO Side A Data/DDR |
71 PIA2CRA EQU DPPIA2CRA+IO Side A Control. | |
72 PIA2DB EQU DPPIA2DB+IO Side A Data/DDR | |
73 PIA2CRB EQU DPPIA2CRB+IO Side A Control. | |
1727
78ce0a5ffc8e
Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff
changeset
|
74 |
1804 | 75 * WD2797 Floppy disk controler, used in Alpha Note registers in reverse order ! |
76 DPCmdRegA EQU $2F command/status | |
77 DPTrkRegA EQU $2E Track register | |
78 DPSecRegA EQU $2D Sector register | |
79 DPDataRegA EQU $2C Data register | |
1727
78ce0a5ffc8e
Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff
changeset
|
80 |
1819 | 81 CmdRegA EQU DPCMDREGA+IO command/status |
82 TrkRegA EQU DPTRKREGA+IO Track register | |
83 SecRegA EQU DPSECREGA+IO Sector register | |
84 DataRegA EQU DPDATAREGA+IO Data register | |
1727
78ce0a5ffc8e
Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff
changeset
|
85 |
1804 | 86 * Constants for Alpha AY-8912 sound chip, which is used to control |
87 * Drive select and motor on the Alpha | |
88 AYIOREG EQU $0E AY-8912, IO Register number. | |
89 AYIdle EQU $00 Make AY Idle. | |
90 AYWriteReg EQU $01 Write AY Register | |
91 AYReadReg EQU $02 Read AY Register | |
92 AYREGLatch EQU $03 Latch register into AY | |
1727
78ce0a5ffc8e
Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff
changeset
|
93 |
1804 | 94 DSMask EQU $03 Drive select mask. |
95 MotorMask EQU $04 Motor enable mask | |
96 DDENMask EQU $08 DDEN Mask | |
97 ENPMask EQU $10 Enable Precomp mask | |
98 NMIMask EQU $20 NMI enable Mask | |
1727
78ce0a5ffc8e
Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff
changeset
|
99 |
1804 | 100 * Dragon 64/Alpha Serial port. |
101 DPAciaData EQU $04 ACIA Rx/Tx Register | |
102 DPAciaStat EQU $05 ACIA status register | |
103 DPAciaCmd EQU $06 ACIA command register | |
104 DPAciaCtrl EQU $07 ACIA control register | |
1727
78ce0a5ffc8e
Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff
changeset
|
105 |
1806 | 106 AciaData EQU DPAciaData+IO ACIA Rx/Tx Register |
107 AciaStat EQU DPAciaStat+IO ACIA status register | |
108 AciaCmd EQU DPAciaCmd+IO ACIA command register | |
109 AciaCtrl EQU DPAciaCtrl+IO ACIA control register | |
110 | |
1804 | 111 * DragonDos Cartrage IO for WD2797 |
112 * WD2797 Floppy disk controler, used in DragonDos. | |
113 DPCmdRegD EQU $40 command/status | |
114 DPTrkRegD EQU $41 Track register | |
115 DPSecRegD EQU $42 Sector register | |
116 DPDataRegD EQU $43 Data register | |
1727
78ce0a5ffc8e
Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff
changeset
|
117 |
1819 | 118 CmdRegD EQU DPCMDREGD+IO command/status |
119 TrkRegD EQU DPTRKREGD+IO Track register | |
120 SecRegD EQU DPSECREGD+IO Sector register | |
121 DataRegD EQU DPDATAREGD+IO Data register | |
1727
78ce0a5ffc8e
Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff
changeset
|
122 |
1804 | 123 DPDSKCTL EQU $48 Disk DS/motor control reg |
1727
78ce0a5ffc8e
Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff
changeset
|
124 DSKCTL EQU DPDSKCTL+IO |
1728 | 125 |
1804 | 126 * Disk IO bitmasks (DragonDos). |
1728 | 127 NMIEnD EQU %00100000 |
1806 | 128 WPCEnD EQU %00010000 |
129 SDensEnD EQU %00001000 | |
130 MotorOnD EQU %00000100 | |
1728 | 131 Drive0D EQU %00000000 |
132 Drive1D EQU %00000001 | |
133 Drive2D EQU %00000010 | |
134 Drive3D EQU %00000011 | |
1898 | 135 DDosDriveMask EQU %00000011 Mask out all non drive select bits |
136 DDosCtrlMask EQU %11111100 Mask in all non drive select bits | |
1728 | 137 |
138 | |
1804 | 139 * Disk IO bitmasks (Dragon Alpha). |
1898 | 140 PIANMIEnA EQU %00001000 PIA2, CA2, used to enable/disable NMI |
141 PIANMIDisA EQU %11110111 Bitmask to force CA2 off, and disable NMI | |
142 | |
143 NMIEnA EQU %10000000 Flag to enable disable NMI, passed to AlphaDskCtl | |
1806 | 144 WPCEnA EQU %01000000 According to circuit trace by R.Harding. |
1831 | 145 SDensEnA EQU %00100000 DDen, from circuit trace on R.Harding's machine. |
1806 | 146 MotorOnA EQU %00010000 |
1728 | 147 Drive0A EQU %00000001 |
148 Drive1A EQU %00000010 | |
149 Drive2A EQU %00000100 | |
150 Drive3A EQU %00001000 | |
1898 | 151 AlphaDrvMask EQU %00001111 Mask out all non drive select bits |
152 AlphaCtrlMask EQU %11110000 Mask in all non drive select bits | |
1733 | 153 |
1831 | 154 Mask58 EQU %01111111 And mask to make sure 5.25" clock selected by WD2797 |
155 | |
1843 | 156 NMICA2En EQU $3C Value for PIA CRA to enable NMI |
157 NMICA2Dis EQU $34 Value for PIA CRA to disable NMI | |
158 | |
1733 | 159 * Disk Commands |
160 FrcInt EQU %11010000 | |
161 ReadCmnd EQU %10001000 | |
162 RestCmnd EQU %00000000 | |
163 SeekCmnd EQU %00010000 | |
164 StpICmnd EQU %01000000 | |
165 WritCmnd EQU %10101000 | |
166 WtTkCmnd EQU %11110000 | |
167 Sid2Sel EQU %00000010 | |
168 | |
169 * Disk Status Bits | |
170 BusyMask EQU %00000001 | |
171 LostMask EQU %00000100 | |
172 ErrMask EQU %11111000 | |
173 CRCMask EQU %00001000 | |
174 RNFMask EQU %00010000 | |
175 RTypMask EQU %00100000 | |
176 WPMask EQU %01000000 | |
177 NotRMask EQU %10000000 | |
178 | |
179 DensMask EQU %00000001 | |
180 T80Mask EQU %00000010 | |
181 | |
1804 | 182 ENDC |