]> cloudbase.mooo.com Git - ddt180.git/blob - z180reg.inc
Add CSIO interface.
[ddt180.git] / z180reg.inc
1 .xlist
2
3 ;;
4 ;; HD64180/Z180 Register Definitions
5 ;;
6
7
8 b2m macro name,nr
9 name equ nr
10 M_&name equ 1 shl nr
11 endm
12
13 ; ifndef IOBASE
14 IOBASE equ 0
15 ; endif
16
17 cntla0 equ IOBASE+00h ;ASCI Control Register A Channel 0
18 cntla1 equ IOBASE+01h ;ASCI Control Register A Channel 1
19 b2m MPE, 7 ;Multi-Processor Mode Enable
20 b2m RE, 6 ;Receiver Enable
21 b2m TE, 5 ;Transmitter Enable
22 b2m RTS0, 4 ;Request to Send Channel 0
23 b2m CKA1D, 4 ;CKA1 disable (Enable DREQ0)
24 b2m MPBR, 3 ;Multiprocessor Bit Receive (Read)
25 b2m EFR, 3 ;Error Flag Reset (Write)
26 b2m MOD2, 2 ;Data Format Mode 1 = 8-Bit data
27 b2m MOD1, 1 ;1 = Parity enabled
28 b2m MOD0, 0 ;1 = 2 stop bits
29
30 cntlb0 equ IOBASE+02h ;ASCI Control Register B Channel 0
31 cntlb1 equ IOBASE+03h ;ASCI Control Register B Channel 1
32 b2m MPBT,7 ;Multiprocessor Bit Transmit
33 b2m MP,6 ;Multiprocessor Mode
34 b2m CTS,5 ;Clear to Send
35 b2m PS,5 ;Prescale
36 b2m PEO,4 ;Parity Even Odd
37 b2m DR,3 ;Divide Ratio
38 b2m SS2,2 ;Source/Speed Select 2,1,0
39 b2m SS1,1 ;
40 b2m SS0,0 ;
41
42 stat0 equ IOBASE+04h ;ASCI Status Channel 0
43 stat1 equ IOBASE+05h ;ASCI Status Channel 1
44 b2m RDRF,7 ;Receive Data Register Full
45 b2m OVRN,6 ;Overrun Error
46 b2m PERR,5 ;Parity Error (M80: PE conflicts with JP/CALL cc)
47 b2m FE,4 ;Framing Error
48 b2m RIE,3 ;Receive Interrupt Enable
49 b2m DCD0,2 ;Data Carrier Detect (Ch 0)
50 b2m CTS1E,2 ;Clear To Send Enable (Ch 1)
51 b2m TDRE,1 ;Transmit Data Register Empty
52 b2m TIE,0 ;Transmit Interrupt Enable
53
54 tdr0 equ IOBASE+06h ;ASCI Transmit Data
55 tdr1 equ IOBASE+07h ;ASCI Transmit Data
56 rdr0 equ IOBASE+08h ;ASCI Receive Data
57 rdr1 equ IOBASE+09h ;ASCI Receive Data
58
59 cntr equ IOBASE+0Ah ;CSI/O Control Register
60 b2m CSIO_EF,7 ;End Flag
61 b2m CSIO_EIE,6 ;End Interrupt Enable
62 b2m CSIO_RE,5 ;Receive Enable
63 b2m CSIO_TE,4 ;Transmit Enable
64 b2m CSIO_SS2,2 ;Speed Select
65 b2m CSIO_SS1,1 ;
66 b2m CSIO_SS0,0 ;
67 M_SS equ M_SS2+M_SS1+M_SS0 ;
68
69 trdr equ IOBASE+0Bh ;CSI/O Transmit/Receive Data Register
70
71 tmdr0l equ IOBASE+0Ch ;Timer Data Register Channel 0
72 tmdr0h equ IOBASE+0Dh ;
73 rldr0l equ IOBASE+0Eh ;Timer Reload Register Channel 0
74 rldr0h equ IOBASE+0Fh ;
75 tcr equ IOBASE+10h ;Timer Control Register
76 b2m TIF1,7 ;Timer Interrupt Flag
77 b2m TIF0,6 ;
78 b2m TIE1,5 ;Timer Interrupt Enable
79 b2m TIE0,4 ;
80 b2m TOC1,3 ;Timer Output Control
81 b2m TOC0,2 ;
82 b2m TDE1,1 ;Timer Down Count Enable
83 b2m TDE0,0 ;
84
85
86 asext0 equ IOBASE+12h ;ASCI Extension Control Register
87 asext1 equ IOBASE+13h ;ASCI Extension Control Register
88 b2m DCD0DIS,6 ;DCD0 Disable
89 b2m CTS0DIS,5 ;CTS0 Disable
90 b2m X1,4 ;CKA * 1 Clock/Samle Rate Divider
91 b2m BRGMOD,3 ;BRG Mode (Baud rate generator)
92 b2m BREAKEN,2 ;Break Enable
93 b2m BREAK,1 ;Break detected
94 b2m SENDBREAK,0 ;Send Break
95
96 tmdr1l equ IOBASE+14h ;Timer Data Register Channel 1
97 tmdr1h equ IOBASE+15h ;
98 rldr1l equ IOBASE+16h ;Timer Reload Register Channel 1
99 rldr1h equ IOBASE+17h ;
100
101 frc equ IOBASE+18h ;Free Running Counter
102
103 astc0l equ IOBASE+1Ah ;ASCI Time Constant Register 0
104 astc0h equ IOBASE+1Bh ;
105 astc1l equ IOBASE+1Ch ;ASCI Time Constant Register 1
106 astc1h equ IOBASE+1Dh ;
107
108 cmr equ IOBASE+1Eh ;Clock Mutiplier Register
109 b2m X2CM,7 ;X2 Clock Multiplier
110 b2m LNC,6 ;Low Noise Crystal
111
112 ccr equ IOBASE+1Fh ;CPU Control Register
113 b2m NCD 7 ;No Clock Divide
114
115 sar0l equ IOBASE+20h ;DMA Src Adr Register Channel 0
116 sar0h equ IOBASE+21h ;
117 sar0b equ IOBASE+22h ;
118 dar0l equ IOBASE+23h ;DMA Dst Adr Register Channel 0
119 dar0h equ IOBASE+24h ;
120 dar0b equ IOBASE+25h ;
121 bcr0l equ IOBASE+26h ;DMA Byte Count Register Channel 0
122 bcr0h equ IOBASE+27h ;
123
124 mar1l equ IOBASE+28h ;DMA Memory Address Register Channel 1
125 mar1h equ IOBASE+29h ;
126 mar1b equ IOBASE+2Ah ;
127 iar1l equ IOBASE+2Bh ;DMA I/O Address Register Channel 1
128 iar1h equ IOBASE+2Ch ;
129 iar1b equ IOBASE+2Dh ;
130 b2m ALTE,7 ;Alternating Chnnels
131 b2m ALTC,6 ;Currently selected DMA Channel when Bit7=1
132 b2m REQ1SEL2,2 ;
133 b2m REQ1SEL1,1 ;
134 b2m REQ1SEL0,0 ;
135
136 bcr1l equ IOBASE+2Eh ;DMA Byte Count Register Channel 1
137 bcr1h equ IOBASE+2Fh ;
138
139 dstat equ IOBASE+30h ;DMA Status Register
140 b2m DE1,7 ;DMA enable ch 1,0
141 b2m DE0,6 ;
142 b2m NDWE1,5 ;DMA Enable Bit Write Enable 1,0
143 b2m NDWE0,4 ;
144 b2m DIE1,3 ;DMA Interrupt Enable 1,0
145 b2m DIE0,2 ;
146 b2m DME,0 ;DMA Master enable
147
148 dmode equ IOBASE+31h ;DMA Mode Register
149 b2m DM1,5 ;Ch 0 Destination Mode 1,0
150 b2m DM0,4 ;
151 b2m SM1,3 ;Ch 0 Source Mode 1,0
152 b2m SM0,2 ;
153 b2m MMOD,1 ;Memory MODE select (0=cycle steel/1=burst)
154
155 dcntl equ IOBASE+32h ;DMA/WAIT Control
156 b2m MWI1,7 ;Memory Wait Insertion
157 b2m MWI0,6 ;
158 b2m IWI1,5 ;I/O Wait Insertion
159 b2m IWI0,4 ;
160 b2m DMS1,3 ;DREQi Select (Edge/Level)
161 b2m DMS0,2 ;
162 b2m DIM1,1 ;DMA Ch1 I/O Memory Mode Select
163 b2m DIM0,0
164 M_MWI equ M_MWI1 + M_MWI0
165 M_IWI equ M_IWI1 + M_IWI0
166
167 il equ IOBASE+33h ;Interrupt Vector Low Register
168 itc equ IOBASE+34h ;INT/TRAP Control Register
169 b2m TRAP,7 ;Trap
170 b2m UFO,6 ;Unidentified Fetch Object
171 b2m ITE2,2 ;/INT Enable 2,1,0
172 b2m ITE1,1 ;
173 b2m ITE0,0 ;
174
175 rcr equ IOBASE+36h ;Refresh Control Register
176 b2m REFE,7 ;Refresh Enable
177 b2m REFW,6 ;Refresh Wait State
178 b2m CYC1,1 ;Cycle select
179 b2m CYC0,0 ;
180
181 cbr equ IOBASE+38h ;MMU Common Base Register
182 bbr equ IOBASE+39h ;MMU Bank Base Register
183 cbar equ IOBASE+3Ah ;MMU Common/Bank Register
184
185 omcr equ IOBASE+3Eh ;Operation Mode Control Register
186 b2m M1E,7 ;M1 Enable
187 b2m M1TE,6 ;M1 Temporary Enable
188 b2m IOC,5 ;I/O Compatibility
189
190 icr equ IOBASE+3Fh ;I/O Control Register
191 b2m IOSTP,5 ;I/O Stop
192 ;
193 ; Interrupt Vectors
194 ;
195
196 IV$INT1 equ 0 ;/INT1 (highest priority)
197 IV$INT2 equ 2 ;/INT2
198 IV$PRT0 equ 4 ;PRT channel 0
199 IV$PRT1 equ 6 ;PRT channel 1
200 IV$DMA0 equ 8 ;DMA channel 0
201 IV$DMA1 equ 10 ;DMA channel 1
202 IV$CSIO equ 12 ;CSI/O
203 IV$ASCI0 equ 14 ;ASCI channel 0
204 IV$ASCI1 equ 16 ;ASCI channel 1 (lowest priority)
205
206 .list