annotate defs/dgndefs @ 1727:78ce0a5ffc8e

Incorporated changes and additions made by Phill Harvey-Smith for the Dragon Computers.
author boisy
date Thu, 11 Nov 2004 22:08:01 +0000
parents
children 843c3687eabd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1727
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
1 *
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
2 * Deinitions for ports on Dragon 32/64/Alpha.
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
3 *
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
4
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
5 IO equ $ff00 ; IO page on Dragon
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
6
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
7 *
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
8 * 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
9 * 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
10 * 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
11 * uses absolute addressing.
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
12 * 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
13 *
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
14
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
15 *Pia 0 and 1 standard on all Dragons.
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
16
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
17 DPPIA0DA EQU $00 ; Side A Data/DDR
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
18 DPPIA0CRA EQU $01 ; Side A Control.
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
19 DPPIA0DB EQU $02 ; Side B Data/DDR
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
20 DPPIA0CRB EQU $03 ; Side B Control.
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
21
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
22 PIA0DA EQU DPPIADA+IO ; Side A Data/DDR
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
23 PIA0CRA EQU DPPIACRA+IO ; Side A Control.
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
24 PIA0DB EQU DPPIADB+IO ; Side A Data/DDR
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
25 PIA0CRB EQU DPPIACRB+IO ; Side A Control.
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
26
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
27 DPPIA1DA EQU $20 ; Side A Data/DDR
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
28 DPPIA1CRA EQU $21 ; Side A Control.
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
29 DPPIA1DB EQU $22 ; Side B Data/DDR
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
30 DPPIA1CRB EQU $23 ; Side B Control.
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
31
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
32 PIA1DA EQU DPPIADA+IO ; Side A Data/DDR
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
33 PIA1CRA EQU DPPIACRA+IO ; Side A Control.
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
34 PIA1DB EQU DPPIADB+IO ; Side A Data/DDR
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
35 PIA1CRB EQU DPPIACRB+IO ; Side A Control.
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
36
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
37 * Dragon Alpha has a third PIA at FF24.
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
38
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
39 DPPIA2DA EQU $24 ; Side A Data/DDR
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
40 DPPIA2CRA EQU $25 ; Side A Control.
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
41 DPPIA2DB EQU $26 ; Side B Data/DDR
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
42 DPPIA2CRB EQU $27 ; Side B Control.
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
43
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
44 PIA2DA EQU DPPIADA+IO ; Side A Data/DDR
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
45 PIA2CRA EQU DPPIACRA+IO ; Side A Control.
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
46 PIA2DB EQU DPPIADB+IO ; Side A Data/DDR
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
47 PIA2CRB EQU DPPIACRB+IO ; Side A Control.
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
48
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
49 ;WD2797 Floppy disk controler, used in Alpha Note registers in reverse order !
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
50 DPCmdRegA EQU $2F ; command/status
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
51 DPTrkRegA EQU $2E ; Track register
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
52 DPSecRegA EQU $2D ; Sector register
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
53 DPDataRegA EQU $2C ; Data register
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
54
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
55 CmdRegA EQU DPCMDREG+IO ; command/status
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
56 TrkRegA EQU DPTRKREG+IO ; Track register
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
57 SecRegA EQU DPSECREG+IO ; Sector register
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
58 DataRegA EQU DPDATAREG+IO ; Data register
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
59
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
60 ; Constants for Alpha AY-8912 sound chip, which is used to control
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
61 ; Drive select and motor on the Alpha
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
62
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
63 AYIOREG EQU $0E ; AY-8912, IO Register number.
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
64 AYIdle EQU $00 ; Make AY Idle.
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
65 AYWriteReg EQU $01 ; Write AY Register
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
66 AYReadReg EQU $02 ; Read AY Register
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
67 AYREGLatch EQU $03 ; Latch register into AY
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
68
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
69 DSMask EQU $03 ; Drive select mask.
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
70 MotorMask EQU $04 ; Motor enable mask
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
71 DDENMask EQU $08 ; DDEN Mask
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
72 ENPMask EQU $10 ; Enable Precomp mask
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
73 NMIMask EQU $20 ; NMI enable Mask
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
74
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
75 ; Dragon 64/Alpha Serial port.
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
76 DPAciaData EQU $04 ; Acia Rx/Tx Register
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
77 DPAciaStat EQU $05 ; Acia status register
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
78 DPAciaCmd EQU $06 ; Acia command register
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
79 DPAciaCtrl EQU $07 ; Acia control register
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
80
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
81 ;DragonDos Cartrage IO for WD2797
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
82
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
83 ;WD2797 Floppy disk controler, used in DragonDos.
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
84 DPCmdRegD EQU $40 ; command/status
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
85 DPTrkRegD EQU $41 ; Track register
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
86 DPSecRegD EQU $42 ; Sector register
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
87 DPDataRegD EQU $43 ; Data register
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
88
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
89 CmdRegD EQU DPCMDREG+IO ; command/status
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
90 TrkRegD EQU DPTRKREG+IO ; Track register
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
91 SecRegD EQU DPSECREG+IO ; Sector register
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
92 DataRegD EQU DPDATAREG+IO ; Data register
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
93
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
94 DPDSKCTL EQU $48 ; Disk DS/motor control reg
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents:
diff changeset
95 DSKCTL EQU DPDSKCTL+IO