Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1 | - | 1 | ;---------------------------------------------------------- |
2 | ; CHIPS.INC |
||
3 | ; PROGETTO: B1601 |
||
4 | ; |
||
5 | ; CHIPS I/O |
||
6 | ;---------------------------------------------------------- |
||
7 | |||
8 | ; il file puo' essere incluso solo all'interno di GLOBAL.INC |
||
9 | .IFNDEF _GLOBAL_INC_ |
||
10 | .EXIT "ERROR: This file cannot be included." |
||
11 | .ENDIF |
||
12 | |||
13 | ;---------------------------------------------------------- |
||
14 | |||
15 | ; registro di controllo |
||
16 | CRBIT0 .EQU $00FC00 |
||
17 | CR0OFF .EQU $00FC00 |
||
18 | CR0ON .EQU $00FC01 |
||
19 | CRBIT1 .EQU $00FC02 |
||
20 | CR1OFF .EQU $00FC02 |
||
21 | CR1ON .EQU $00FC03 |
||
22 | CRBIT2 .EQU $00FC04 |
||
23 | CR2OFF .EQU $00FC04 |
||
24 | CR2ON .EQU $00FC05 |
||
25 | CRFWE .EQU $00FC06 |
||
26 | CRFWEOFF .EQU $00FC06 |
||
27 | CRFWEON .EQU $00FC07 |
||
28 | CRXFE .EQU $00FC08 |
||
29 | CRXFEOFF .EQU $00FC08 |
||
30 | CRXFEON .EQU $00FC09 |
||
31 | CRXME .EQU $00FC0A |
||
32 | CRXMEOFF .EQU $00FC0A |
||
33 | CRXMEON .EQU $00FC0B |
||
34 | CREME .EQU $00FC0C |
||
35 | CREMEOFF .EQU $00FC0C |
||
36 | CREMEON .EQU $00FC0D |
||
37 | CRHIM .EQU $00FC0E |
||
38 | CRHIMOFF .EQU $00FC0E |
||
39 | CRHIMON .EQU $00FC0F |
||
40 | |||
41 | |||
42 | ; registri VIA 65C22 |
||
43 | VIA0 .EQU $00FD00 ; IRQ 2 |
||
44 | VIA1 .EQU $00FD10 ; NMI |
||
45 | |||
46 | ; bit I/O VIA 0 - IRQ 2 |
||
47 | ; PA0 -> XM16 - linea A16 memoria DMA con DMA attivo |
||
48 | ; PA1 -> /DME - enable DMA |
||
49 | ; PA2 -> DMA direction: 1->to mem, 0-> from mem |
||
50 | ; PA3 -> |
||
51 | ; PA4 -> /XTC - impulso TC DMA/FDC (impulso negativo) |
||
52 | ; PA5 -> /FFSR - set flip flop reset (impulso negativo) - vedere PIA0-PB4 |
||
53 | ; PA6 -> RSTRM - enable terminazione RS485 120 ohm su linee RX/TX |
||
54 | ; PA7 -> /CLRX - reset macchina (impulso negativo) |
||
55 | ; PB0 -> /WD - enable wait chip DMA |
||
56 | ; PB1 -> /WF - enable wait chip FDC |
||
57 | ; PB2 -> /WS - enable wait chip ACIA |
||
58 | ; PB3 -> /WA0 - enable wait slot ATA 0 |
||
59 | ; PB4 -> /WA1 - enable wait slot ATA 1 |
||
60 | ; PB5 -> /WV - enable wait chip VDC |
||
61 | ; PB6 <- onda quadra 1KHZ per timer T2 |
||
62 | ; PB7 -> /WT - enable wait chip CTC |
||
63 | ; CA1 <- TMF1 (da CTC) fronte negativo - vedere anche PIA0-PB6 |
||
64 | ; CA2 <- INT da controller tastiera - fronte negativo |
||
65 | ; CB1 <- INT da controller FDC - fronte positivo - vedere anche PIA0-PB7 |
||
66 | ; CB2 <- TMF0 (da CTC) fronte negativo - vedere anche PIA0-PB5 |
||
67 | |||
68 | ; bit I/O VIA 1 - NMI |
||
69 | ; PA0 -> /VDE - enable output RGB da chip VDC |
||
70 | ; PA1 -> /S16M - enable dot clock VDC a 16MHZ (CGA) |
||
71 | ; PA2 -> HPOL - HSYNC VDC positivo |
||
72 | ; PA3 -> VPOL - VSYNC VDC positivo |
||
73 | ; PA4 -> /KBRES - reset controller tastiera (impulso negativo) |
||
74 | ; PA5 -> PCTS1 - inversione livello /CTS1 su ACIA |
||
75 | ; PA6 -> PCTS2 - inversione livello /CTS2 su ACIA |
||
76 | ; PA7 -> /RS485 - enable RS485 su canale 2 ACIA |
||
77 | ; PB0 -> /KFRW0 - enable write file register KFR sincronizzato con PHI0 |
||
78 | ; PB1 -> DMA clock select: 0->4MHz - 1->5MHz |
||
79 | ; PB2 -> /VDCSX - abilita impulso di selezione su /CS0 o CS1 VDC |
||
80 | ; altrimenti /CS0 a livello 0 oppure CS1 a livello 1 |
||
81 | ; PB3 -> /VDCS0 - sincronizza write registri VDC con PHI0 invece di PHI2 |
||
82 | ; PB4 <- TRIGGER POWER - impulso negativo da pulsante ON/OFF |
||
83 | ; PB5 -> /MW0 - enable write RAM/FLASH sincronizzato con PHI0 |
||
84 | ; PB6 <- onda quadra 1KHZ per timer T2 |
||
85 | ; PB7 -> onda quadra 1KHZ da timer T1 |
||
86 | ; CA1 <- impulso ATA 0 INT - fronte positivo (non genera NMI) |
||
87 | ; CA2 <- impulso NMI da controller tastiera - fronte negativo |
||
88 | ; CB1 <- impulso ATA 1 INT - fronte positivo (non genera NMI) |
||
89 | ; CB2 <- TRIGGER POWER - impulso negativo da pulsante ON/OFF |
||
90 | |||
91 | VIAPRB .EQU $0 |
||
92 | VIAPRA .EQU $1 |
||
93 | VIADDRB .EQU $2 |
||
94 | VIADDRA .EQU $3 |
||
95 | VIAT1CL .EQU $4 |
||
96 | VIAT1CH .EQU $5 |
||
97 | VIAT1LL .EQU $6 |
||
98 | VIAT1LH .EQU $7 |
||
99 | VIAT2CL .EQU $8 |
||
100 | VIAT2CH .EQU $9 |
||
101 | VIASR .EQU $A |
||
102 | VIAACR .EQU $B |
||
103 | VIAPCR .EQU $C |
||
104 | VIAIFR .EQU $D |
||
105 | VIAIER .EQU $E |
||
106 | VIAPRANH .EQU $F |
||
107 | |||
108 | ; bit IER/IFR |
||
109 | SETFRB .EQU 10000000B |
||
110 | T1IFRB .EQU 01000000B |
||
111 | T2IFRB .EQU 00100000B |
||
112 | CB1IFRB .EQU 00010000B |
||
113 | CB2IFRB .EQU 00001000B |
||
114 | SRIFRB .EQU 00000100B |
||
115 | CA1IFRB .EQU 00000010B |
||
116 | CA2IFRB .EQU 00000001B |
||
117 | |||
118 | |||
119 | VIA4 .EQU $00FC60 ; IRQ 5 |
||
120 | |||
121 | ; VIA4 - IRQ5 |
||
122 | ; PB0..PB7 (OUT) high address emulator (256 banks x 2K) |
||
123 | |||
124 | ; New FDC/DMA/BOARD |
||
125 | VIA3 .EQU $00FDC0 ; IRQ 3 |
||
126 | |||
127 | ; VIA3 - IRQ3 |
||
128 | ; PA0, PA1, PA2 (OUT) MA17..MA19 1MB banked ram (cpu accesss) |
||
129 | ; PA3..PA7 (input) PA3 not used |
||
130 | ; PA4 <- HRQ1 |
||
131 | ; PA5 <- HRQ0 |
||
132 | ; PA6 <- DMRQ1 |
||
133 | ; PA7 <- DMRQ0 |
||
134 | ; |
||
135 | ; PB0..PB6 out, PB7 input |
||
136 | ; PB0..PB2 -> MA16..MA18 1Mb ram (DMA access) |
||
137 | ; PB3 -> /S1M enable ram 1Mb |
||
138 | ; PB4 -> ATA (select ATA port while DMA) |
||
139 | ; PB5 -> /FDC (select FDC DMA) |
||
140 | ; PB6 -> /ALT enable 1Mb ram while FDC DMA |
||
141 | ; PB7, CB2 <- CH365/376 interrupt line (negative edge) |
||
142 | ; |
||
143 | ; CA1 <- negative edge ATA 0 interrupt |
||
144 | ; CA2 <- negative edge ATA 1 interrupt |
||
145 | ; CB1 <- negative edge /EOP DMA 0 (ATA) |
||
146 | ; CB2 <- negative edge CH375/6 interrupt |
||
147 | |||
148 | .IFDEF _CH375_INC_ |
||
149 | ; ch375/376 usb host chip |
||
150 | |||
151 | usb0dat .EQU $00FDD0 |
||
152 | usb0cmd .EQU $00FDD1 |
||
153 | |||
154 | CMD_GET_IC_VER .EQU $01 ; get chip version |
||
155 | CMD_RESET_ALL .EQU $05 ; reset ch375/ch376 |
||
156 | CMD_CHECK_EXIST .EQU $06 ; check for chip |
||
157 | |||
158 | CMD_READ_VAR8 .EQU $0A ; ch376 only |
||
159 | VAR_DISK_STATUS .EQU $2B |
||
160 | |||
161 | CMD_PREFIX .EQU $0B ; command need one more byte |
||
162 | PFX_SET_PKT_P_SEC .EQU $39 |
||
163 | |||
164 | CMD_SET_USB_MODE .EQU $15 ; set chip usb mode |
||
165 | SET_USB_HOST .EQU $06 ; set usb host mode |
||
166 | SET_USB_RES .EQU $07 ; reset usb bus host mode |
||
167 | |||
168 | CMD_GET_STATUS .EQU $22 ; get interrupt status |
||
169 | |||
170 | CMD_RD_USB_DATA .EQU $28 ; read data block |
||
171 | |||
172 | CMD_DISK_MOUNT .EQU $31 ; init disk (ch376 only) |
||
173 | CMD_DISK_CAPACITY .EQU $3E ; get disk size (ch376 only) |
||
174 | |||
175 | CMD_DISK_INIT .EQU $51 ; init disk (ch375) |
||
176 | CMD_DISK_SIZE .EQU $53 ; get disk size (ch375) |
||
177 | CMD_DISK_READ .EQU $54 |
||
178 | CMD_DISK_RD_GO .EQU $55 |
||
179 | |||
180 | CMD_RET_SUCCESS .EQU $51 ; return data for some command's |
||
181 | |||
182 | CMD_DISK_INQUIRY .EQU $58 ; device string |
||
183 | CMD_DISK_READY .EQU $59 |
||
184 | CMD_DISK_R_SENSE .EQU $5A |
||
185 | |||
186 | ; ch375/ch376 interrupt status |
||
187 | USB_INT_SUCCESS .EQU $14 |
||
188 | USB_INT_CONNECT .EQU $15 |
||
189 | USB_INT_DISCONNECT .EQU $16 |
||
190 | USB_INT_BUF_OVER .EQU $17 |
||
191 | USB_INT_DISK_READ .EQU $1D |
||
192 | USB_INT_DISK_ERR .EQU $1F |
||
193 | |||
194 | ; ch376 only status |
||
195 | ERR_DISK_DISCON .EQU $82 |
||
196 | ERR_LARGE_SECTOR .EQU $84 |
||
197 | ERR_TYPE_ERROR .EQU $92 |
||
198 | ERR_BPB_ERROR .EQU $A1 |
||
199 | ERR_DISK_FULL .EQU $B1 |
||
200 | ERR_FDT_OVER .EQU $B2 |
||
201 | ERR_FILE_CLOSE .EQU $B4 |
||
202 | ERR_OPEN_DIR .EQU $41 |
||
203 | ERR_MISS_FILE .EQU $42 |
||
204 | ERR_FOUND_NAME .EQU $43 |
||
205 | |||
206 | ERR_MISS_DIR .EQU $B3 |
||
207 | ERR_LONG_BUF_OVER .EQU $48 |
||
208 | ERR_LONG_NAME_ERR .EQU $49 |
||
209 | ERR_NAME_EXIST .EQU $4A |
||
210 | |||
211 | ; ch376: VAR_DISK_STATUS values |
||
212 | DEF_DISK_UNKNOWN .EQU $00 |
||
213 | DEF_DISK_DISCONN .EQU $01 |
||
214 | DEF_DISK_CONNECT .EQU $02 |
||
215 | DEF_DISK_MOUNTED .EQU $03 |
||
216 | DEF_DISK_READY .EQU $10 |
||
217 | DEF_DISK_OPEN_ROOT .EQU $12 |
||
218 | DEF_DISK_OPEN_DIR .EQU $13 |
||
219 | DEF_DISK_OPEN_FILE .EQU $14 |
||
220 | |||
221 | .ENDIF |
||
222 | |||
223 | ; addon serial test board |
||
224 | .IFDEF _ADDSER_INC_ |
||
225 | |||
226 | VIA2 .EQU $00FC10 ; IRQ 3 |
||
227 | |||
228 | ; VIA2 - IRQ3 |
||
229 | ; PA0, PA1 (OUT) baude-rate 65C51 |
||
230 | ; 00 -> 19200 |
||
231 | ; 01 -> 38400 |
||
232 | ; 10 -> 57600 |
||
233 | ; 11 -> 115200 |
||
234 | ; PA2 (OUT) /RTS for 65C51 |
||
235 | ; PA3, CB2 (IN) /CTS input (65C51) |
||
236 | ; PA4, CB1 (IN) BUSY from emulator |
||
237 | ; PA5 (IN) Sense interrupt to PIC |
||
238 | ; PA6 (IN) /TXE from UM245R |
||
239 | ; PA7, CA2 (IN) /RXF from UM245R (negative edge) |
||
240 | ; PB0..PB7 (OUT) high address emulator (256 banks x 2K) |
||
241 | ; CA1 (IN) interrupt from PIC (negative edge) |
||
242 | |||
243 | ; ACIA R65C51 at $FC28 (INT 4) |
||
244 | |||
245 | ACIADR .EQU $00FC28 ; ACIA TX/RX data register |
||
246 | ACIASR .EQU $00FC29 ; ACIA Status |
||
247 | ACIACMD .EQU $00FC2A ; ACIA Command register |
||
248 | ACIACTRL .EQU $00FC2B ; ACIA Control register |
||
249 | |||
250 | ACIADSR .EQU 01000000B |
||
251 | ACIADCD .EQU 00100000B |
||
252 | ACIATDRE .EQU 00010000B |
||
253 | ACIARDRF .EQU 00001000B |
||
254 | |||
255 | ACIACMDTIC .EQU 11110011B |
||
256 | ACIACMDTXEI .EQU 00000100B |
||
257 | ACIACMDTXDI .EQU 00001000B |
||
258 | ACIACMDRXDI .EQU 00000010B |
||
259 | ;ACIACMDDTR .EQU 00000001B |
||
260 | |||
261 | ACIAENABLE .EQU 00001001B |
||
262 | ACIACMDOFF .EQU 00000010B |
||
263 | |||
264 | ;ACIASRMASK .EQU (.NOT.(ACIATDRE .OR. ACIARDRF)) |
||
265 | ;ACIASRDSRDCD .EQU (ACIASRDSR .OR. ACIASRDCD) |
||
266 | |||
267 | ; UM245R data port at $FC2F |
||
268 | UM245R .EQU $00FC2F |
||
269 | |||
270 | ; uart 16C550 at $FF20 |
||
271 | UART_RXTX .EQU $00FC20 ; DLAB=0 |
||
272 | UART_IER .EQU $00FC21 ; DLAB=0 |
||
273 | UART_DLL .EQU $00FC20 ; divisor latch low, DLAB=1 |
||
274 | UART_DLH .EQU $00FC21 ; divisor latch high, DLAB=1 |
||
275 | UART_IIR .EQU $00FC22 ; Int. Ident. Reg., read only |
||
276 | UART_FCR .EQU $00FC22 ; FIFO Ctrl Reg., write only |
||
277 | UART_LCR .EQU $00FC23 ; Line Ctrl Reg. |
||
278 | UART_MCR .EQU $00FC24 ; Modem Ctrl Reg. |
||
279 | UART_LSR .EQU $00FC25 ; Line Status Reg. |
||
280 | UART_MSR .EQU $00FC26 ; Modem Status Reg. |
||
281 | UART_SCP .EQU $00FC27 ; scratchpad reg. |
||
282 | |||
283 | .ENDIF |
||
284 | |||
285 | ;---------------------------------------------------------- |
||
286 | |||
287 | .IFDEF _ATA_INC_ |
||
288 | |||
289 | ; register address for ata #0 |
||
290 | ATAERROR .EQU $FDA1 ; error reg. READ |
||
291 | ATAFEAT .EQU $FDA1 ; feature reg. WRITE |
||
292 | ATASCTCNT .EQU $FDA2 ; sector count |
||
293 | ATALBAL .EQU $FDA3 ; LBA LOW |
||
294 | ATALBAM .EQU $FDA4 ; LBA MID |
||
295 | ATALBAH .EQU $FDA5 ; LBA HIGH |
||
296 | ATADEV .EQU $FDA6 ; device reg. |
||
297 | ATAST .EQU $FDA7 ; status reg. READ |
||
298 | ATACMD .EQU $FDA7 ; command reg. WRITE |
||
299 | ATADATA .EQU $FDA8 ; dummy data register latch (16 bit) |
||
300 | ATAPORT .EQU $FDAA ; data register latch (16 bit access) |
||
301 | ; high byte at $FDAB |
||
302 | ATAALTST .EQU $FDAE ; alt. status reg. READ |
||
303 | ATACTRL .EQU $FDAE ; device control reg. WRITE |
||
304 | |||
305 | ATAOFS .EQU $10 ; offset ata #1 address |
||
306 | |||
307 | ; bit registro di stato |
||
308 | ATABSY .EQU 10000000B ; busy bit |
||
309 | ATADRDY .EQU 01000000B ; ready bit |
||
310 | ATADFB .EQU 00100000B ; device fault bit |
||
311 | ATADRQ .EQU 00001000B ; data request bit |
||
312 | ATAERRB .EQU 00000001B ; error bit |
||
313 | |||
314 | ; bit registro di errore |
||
315 | ATA_ABRT .EQU 00000100B ; flag ABORT |
||
316 | |||
317 | ; bit registro $0E - device control (ATACTRL) |
||
318 | CTRLSRST .EQU 00000100B ; software reset (ATACTRL) |
||
319 | |||
320 | .ENDIF |
||
321 | |||
322 | ;---------------------------------------------------------- |
||
323 | |||
324 | ; registri PIA, PIA 1 |
||
325 | PIA0 .EQU $00FD28 |
||
326 | PIA1 .EQU $00FD38 ; LCD |
||
327 | |||
328 | ; bit I/O PIA 0 |
||
329 | ; PA0-PA7 -> MA13-MA20 linee indirizzo memoria estesa (256 pagine di 8K) |
||
330 | ; PB0-PB3 -> SA13-SA16 linee indirizzo buffer DMA per macchina 65C02 |
||
331 | ; PB4 <- /FSR livello 0 al reset (Flip Flop) |
||
332 | ; PB5 <- TMF0 (da CTC) fronte negativo |
||
333 | ; PB6 <- TMF1 (da CTC) fronte negativo |
||
334 | ; PB7 <- INT da FDC fronte negativo |
||
335 | ; CA2 -> /ENQ0 - enable buzzer |
||
336 | ; CB2 -> /SMODE - enable mode one shot per buzzer |
||
337 | |||
338 | ; bit I/O PIA 1 - controller LCD |
||
339 | ; PA0 -> RS |
||
340 | ; PA1 -> R/W |
||
341 | ; PA2 -> E |
||
342 | ; PB0-PB7 -> DB0 - DB7 |
||
343 | |||
344 | PIAPRA .EQU $0 |
||
345 | PIADDRA .EQU $0 |
||
346 | PIACRA .EQU $1 |
||
347 | PIAPRB .EQU $2 |
||
348 | PIADDRB .EQU $2 |
||
349 | PIACRB .EQU $3 |
||
350 | |||
351 | ; NOTA: inizializzare CRA, CRB -> 00000000 |
||
352 | ; Accesso a porta: CRA, CRB -> 00000100 |
||
353 | |||
354 | ;---------------------------------------------------------- |
||
355 | |||
356 | .IFDEF _KFR_INC_ |
||
357 | ; registri controller tastiera |
||
358 | KBFR .EQU $00FD40 ; KB file register |
||
359 | KBSTATUS .EQU $00FD44 ; KB status - read |
||
360 | KBDRQ .EQU $00FD44 ; write - richiesta servizio |
||
361 | KBCLRNMI .EQU $00FD45 ; write - azzera flag NMI |
||
362 | KBCLRIRQ .EQU $00FD46 ; write - azzera flag INT |
||
363 | |||
364 | ; bit di KBSTATUS |
||
365 | ; 7: DRQ attivo - controller busy |
||
366 | ; 6: RA5 da controller |
||
367 | ; 5: flag NMI da controller |
||
368 | ; 4: flag IRQ da controller |
||
369 | ; 3, 2 e 1: 0 |
||
370 | ; 0; RA4 da controller |
||
371 | |||
372 | .ENDIF |
||
373 | |||
374 | ;---------------------------------------------------------- |
||
375 | |||
376 | IRQVECTR .EQU $00FD47 ; registro vettore IRQ (sola lettura) |
||
377 | |||
378 | ;---------------------------------------------------------- |
||
379 | |||
380 | ; registri CTC 82C54 |
||
381 | CTC0 .EQU $00FD48 |
||
382 | |||
383 | CTCCNT0 .EQU 0 |
||
384 | CTCCNT1 .EQU 1 |
||
385 | CTCCNT2 .EQU 2 |
||
386 | CTCCTRL .EQU 3 |
||
387 | |||
388 | ;---------------------------------------------------------- |
||
389 | |||
390 | .IFDEF _RTC_INC_ |
||
391 | ; registri RTC DS1687 |
||
392 | RTCALE .EQU $00FD4C ; registro address (senza /CS) |
||
393 | RTCDATA .EQU $00FD4D ; registro data |
||
394 | |||
395 | RTCCTRLA .EQU $0A ; registro controllo A |
||
396 | RTCEXTCTRLA .EQU $4A ; registro controllo esteso 4A (banco 1) |
||
397 | RTCCTRLB .EQU $0B ; registro controllo B |
||
398 | RTCEXTCTRLB .EQU $4B ; registro controllo esteso 4B (banco 1) |
||
399 | RTCSTATUS .EQU $0C ; registro di stato principale |
||
400 | RTCSTATUS2 .EQU $0D ; registro di stato secondario |
||
401 | |||
402 | RTCSECS .EQU $00 ; registro secondi |
||
403 | RTCMIN .EQU $02 ; registro minuti |
||
404 | RTCHOURS .EQU $04 ; registro ore |
||
405 | RTCDAY .EQU $06 ; registro giorno |
||
406 | RTCDDATE .EQU $07 ; registro data |
||
407 | RTCMONTH .EQU $08 ; registro mese |
||
408 | RTCYEAR .EQU $09 ; registro anno |
||
409 | RTCCENTURY .EQU $48 ; registro secolo (banco 1) |
||
410 | |||
411 | RTCALMSECS .EQU $01 ; registro allarme secondi |
||
412 | RTCALMMIN .EQU $03 ; registro allarme minuti |
||
413 | RTCALMHOURS .EQU $05 ; registro allarme ore |
||
414 | RTCALMDATE .EQU $49 ; registro allarme data (banco 1) |
||
415 | |||
416 | RTCRAM0E .EQU $0E ; registro RAM $0E |
||
417 | RTCRAM0F .EQU $0F ; registro RAM $0F |
||
418 | |||
419 | RTCURAM .EQU $10 ; user RAM da $10 a $3F (48 bytes) |
||
420 | RTCURAMLAST .EQU $3F |
||
421 | |||
422 | ; saved configuration in RTC ram bank 0 & 1 |
||
423 | RTCSHID .EQU $3B ; default hidden sector's (for fdisk) |
||
424 | RTCHUSE .EQU $3C ; flag use hash in fat driver |
||
425 | RTCHLOG2 .EQU $3D ; hash hlog2 value (how much sector's) |
||
426 | |||
427 | RTCRDFG .EQU $3E ; flag ram disk valid configuration ($55) |
||
428 | ; new device or after clear mem = $FF |
||
429 | RTCRD .EQU $3F ; saved configuration for ram disk |
||
430 | |||
431 | RTCURAM0 .EQU $40 ; user RAM da $40 a $7F (64 bytes) |
||
432 | RTCURAM0LAST .EQU $7F ; solo banco 0 |
||
433 | |||
434 | RTCEXTRAMADDR .EQU $50 ; registro address EXT RAM (128 bytes) banco 1 |
||
435 | RTCEXTRAMDATA .EQU $53 ; registro data EXT RAM (128 bytes) banco 1 |
||
436 | |||
437 | RTCSMI2 .EQU $4E ; SMI recovery stack ADDR - 2 |
||
438 | RTCSMI3 .EQU $4F ; SMI recovery stack ADDR - 3 |
||
439 | |||
440 | RTCTYPE .EQU $40 ; RTC MODEL ($47 per DS1687) - banco 1 |
||
441 | RTCSERIAL .EQU $41 ; S/N RTC - 6 bytes da $41 a $46 - banco 1 |
||
442 | RTCCRC .EQU $47 ; CRC del serial number |
||
443 | |||
444 | ; bit di RTCFlag |
||
445 | RTC_TVAL .EQU 10000000B ; bit time valido |
||
446 | RTC_VBAT .EQU 01000000B |
||
447 | RTC_VBAUX .EQU 00100000B |
||
448 | |||
449 | .ENDIF |
||
450 | |||
451 | ;---------------------------------------------------------- |
||
452 | |||
453 | ; registri MOS8563 |
||
454 | VDCAddr .EQU $00FD4E |
||
455 | VDCStatus .EQU $00FD4E |
||
456 | VDCData .EQU $00FD4F |
||
457 | |||
458 | ;---------------------------------------------------------- |
||
459 | |||
460 | .IFDEF _ACIA_INC_ |
||
461 | ; registri ACIA R65C52 |
||
462 | ACIA .EQU $00FD50 |
||
463 | |||
464 | ACIAIER .EQU $FD50 ; INT enable reg. 1 (write) |
||
465 | ACIAISR .EQU $FD50 ; INT status reg. 1 (read) |
||
466 | ACIACR .EQU $FD51 ; Control register 1 (write) |
||
467 | ACIACSR .EQU $FD51 ; Control status reg. 1 (read) |
||
468 | ACIAFR .EQU $FD51 ; Format register 1 (write) |
||
469 | ACIACDR .EQU $FD52 ; Compare data reg. 1 (write) |
||
470 | ACIAACR .EQU $FD52 ; Aux. Control reg. 1 (write) |
||
471 | ACIATDR .EQU $FD53 ; TX Data reg. (write) |
||
472 | ACIARDR .EQU $FD53 ; RX Data reg. (read) |
||
473 | |||
474 | ACIAIER1 .EQU 0 ; INT enable reg. 1 (write) |
||
475 | ACIAISR1 .EQU 0 ; INT status reg. 1 (read) |
||
476 | ACIACR1 .EQU 1 ; Control register 1 (write) |
||
477 | ACIAFR1 .EQU 1 ; Format register 1 (write) |
||
478 | ACIACSR1 .EQU 1 ; Control status reg. 1 (read) |
||
479 | ACIACDR1 .EQU 2 ; Compare data reg. 1 (write) |
||
480 | ACIAACR1 .EQU 2 ; Aux. Control reg. 1 (write) |
||
481 | ACIATDR1 .EQU 3 ; TX Data reg. 1 (write) |
||
482 | ACIARDR1 .EQU 3 ; RX Data reg. 1 (read) |
||
483 | ACIAIER2 .EQU 4 ; INT enable reg. 2 (write) |
||
484 | ACIAISR2 .EQU 4 ; INT status reg. 2 (read) |
||
485 | ACIACR2 .EQU 5 ; Control register 2 (write) |
||
486 | ACIAFR2 .EQU 5 ; Format register 2 (write) |
||
487 | ACIACSR2 .EQU 5 ; Control status reg. 2 (read) |
||
488 | ACIACDR2 .EQU 6 ; Compare data reg. 2 (write) |
||
489 | ACIAACR2 .EQU 6 ; Aux. Control reg. 2 (write) |
||
490 | ACIATDR2 .EQU 7 ; TX Data reg. 2 (write) |
||
491 | ACIARDR2 .EQU 7 ; RX Data reg. 2 (read) |
||
492 | |||
493 | .ENDIF |
||
494 | |||
495 | ;---------------------------------------------------------- |
||
496 | |||
497 | .IFDEF _DMA_INC_ |
||
498 | |||
499 | ; registri UM8388 |
||
500 | FDCC .EQU $00FD58 |
||
501 | |||
502 | ; NOTA - INT azzerato con una operazione IO sul CHIP |
||
503 | FDCDOR .EQU $00FDDA ; (solo scrittura) |
||
504 | FDCMSR .EQU $00FDDC ; (solo lettura) |
||
505 | FDCDATA .EQU $00FDDD |
||
506 | FDCDIR .EQU $00FDDF ; (solo lettura) |
||
507 | FDCCCR .EQU $00FDDF ; (solo scrittura) |
||
508 | |||
509 | ; registri 82C37 - DMA 1 (FDC) |
||
510 | DMAC .EQU $00FD90 |
||
511 | DMAADDR0 .EQU 0 |
||
512 | DMACNT0 .EQU 1 |
||
513 | DMAADDR1 .EQU 2 |
||
514 | DMACNT1 .EQU 3 |
||
515 | DMAADDR2 .EQU 4 |
||
516 | DMACNT2 .EQU 5 |
||
517 | DMAADDR3 .EQU 6 |
||
518 | DMACNT3 .EQU 7 |
||
519 | DMASR .EQU $00FD98 ; read STATUS REG |
||
520 | DMAWCMD .EQU $00FD98 ; write COMMAND REG. |
||
521 | DMARQR .EQU $00FD99 ; read/write REQUEST REG |
||
522 | DMAWMSKB .EQU $00FD9A ; write MASK BIT REG |
||
523 | DMARCMD .EQU $00FD9A ; read COMMAND REG. |
||
524 | DMAMODE .EQU $00FD9B ; read/write MODE REG. |
||
525 | DMARSETFF .EQU $00FD9C ; read - set FF (no data) |
||
526 | DMAWCLRFF .EQU $00FD9C ; write - clear FF (no data) |
||
527 | DMARTMP .EQU $00FD9D ; read - read temp. register |
||
528 | DMAWMCLR .EQU $00FD9D ; write - MASTER CLEAR (no data) |
||
529 | DMARCNT .EQU $00FD9E ; read - clr mode reg. cnt. (no data) |
||
530 | DMAWMASKOFF .EQU $00FD9E ; write - clr mask register (no data) |
||
531 | DMAMASK .EQU $00FD9F ; read/write - mask register |
||
532 | |||
533 | DMAC0 .EQU $00FD80 |
||
534 | DMA0SR .EQU $00FD88 ; read STATUS REG |
||
535 | DMA0WCMD .EQU $00FD88 ; write COMMAND REG. |
||
536 | DMA0RQR .EQU $00FD89 ; read/write REQUEST REG |
||
537 | DMA0WMSKB .EQU $00FD8A ; write MASK BIT REG |
||
538 | DMA0RCMD .EQU $00FD8A ; read COMMAND REG. |
||
539 | DMA0MODE .EQU $00FD8B ; read/write MODE REG. |
||
540 | DMA0RSETFF .EQU $00FD8C ; read - set FF (no data) |
||
541 | DMA0WCLRFF .EQU $00FD8C ; write - clear FF (no data) |
||
542 | DMA0RTMP .EQU $00FD8D ; read - read temp. register |
||
543 | DMA0WMCLR .EQU $00FD8D ; write - MASTER CLEAR (no data) |
||
544 | DMA0RCNT .EQU $00FD8E ; read - clr mode reg. cnt. (no data) |
||
545 | DMA0WMASKOFF .EQU $00FD8E ; write - clr mask register (no data) |
||
546 | DMA0MASK .EQU $00FD8F ; read/write - mask register |
||
547 | |||
548 | .ENDIF |
||
549 | |||
550 | ;---------------------------------------------------------- |
||
551 | |||
552 | .IFDEF _VBB_INC_ |
||
553 | |||
554 | ; registri R6545 / HD6445 |
||
555 | CRTAddr .EQU $00FC70 |
||
556 | CRTStatus .EQU $00FC70 |
||
557 | CRTData .EQU $00FC71 |
||
558 | |||
559 | PIAVBB .EQU $00FC74 ; PIA VIDEO BOARD |
||
560 | |||
561 | URLVBB .EQU $00FC72 ; registro underline write only 4 bit |
||
562 | |||
563 | .ENDIF |