]> git.sur5r.net Git - cc65/blob - asminc/cbm510.inc
Moved the 'graph' files from 'geos-cbm' to 'geos-common' which are believed to work...
[cc65] / asminc / cbm510.inc
1 ;
2 ; Zero page variables and I/O definitions for the CBM 510
3 ;
4 ; Taken from a kernal disassembly done by myself in 2000/2001.
5 ;
6 ; Ullrich von Bassewitz, 13.09.2001
7
8
9 ;-----------------------------------------------------------------------------
10 ; Zeropage stuff
11
12 ExecReg         = $00
13 IndReg          = $01
14
15 ; ---------------------------------------------------------------------------
16 ; Screen size
17
18 XSIZE           = 40
19 YSIZE           = 25
20
21 ;-----------------------------------------------------------------------------
22 ; I/O Definitions
23
24 ; I/O  $d800: VIC
25
26 VIC_SPR0_X      = $00
27 VIC_SPR0_Y      = $01
28 VIC_SPR1_X      = $02
29 VIC_SPR1_Y      = $03
30 VIC_SPR2_X      = $04
31 VIC_SPR2_Y      = $05
32 VIC_SPR3_X      = $06
33 VIC_SPR3_Y      = $07
34 VIC_SPR4_X      = $08
35 VIC_SPR4_Y      = $09
36 VIC_SPR5_X      = $0A
37 VIC_SPR5_Y      = $0B
38 VIC_SPR6_X      = $0C
39 VIC_SPR6_Y      = $0D
40 VIC_SPR7_X      = $0E
41 VIC_SPR7_Y      = $0F
42 VIC_SPR_HI_X    = $10
43 VIC_SPR_ENA     = $15
44 VIC_SPR_EXP_Y   = $17
45 VIC_SPR_EXP_X   = $1D
46 VIC_SPR_MCOLOR  = $1C
47 VIC_SPR_BG_PRIO = $1B
48
49 VIC_SPR_MCOLOR0 = $25
50 VIC_SPR_MCOLOR1 = $26
51
52 VIC_SPR0_COLOR  = $27
53 VIC_SPR1_COLOR  = $28
54 VIC_SPR2_COLOR  = $29
55 VIC_SPR3_COLOR  = $2A
56 VIC_SPR4_COLOR  = $2B
57 VIC_SPR5_COLOR  = $2C
58 VIC_SPR6_COLOR  = $2D
59 VIC_SPR7_COLOR  = $2E
60
61 VIC_CTRL1       = $11
62 VIC_CTRL2       = $16
63
64 VIC_HLINE       = $12
65
66 VIC_VIDEO_ADR   = $18
67
68 VIC_IRR         = $19           ; Interrupt request register
69 VIC_IMR         = $1A           ; Interrupt mask register
70
71 VIC_BORDERCOLOR = $20
72 VIC_BG_COLOR0   = $21
73 VIC_BG_COLOR1   = $22
74 VIC_BG_COLOR2   = $23
75 VIC_BG_COLOR3   = $24
76
77
78
79 ; I/O  $da00: SID 6581
80
81 SID_S1Lo        = $00
82 SID_S1Hi        = $01
83 SID_PB1Lo       = $02
84 SID_PB1Hi       = $03
85 SID_Ctl1        = $04
86 SID_AD1         = $05
87 SID_SUR1        = $06
88
89 SID_S2Lo        = $07
90 SID_S2Hi        = $08
91 SID_PB2Lo       = $09
92 SID_PB2Hi       = $0A
93 SID_Ctl2        = $0B
94 SID_AD2         = $0C
95 SID_SUR2        = $0D
96
97 SID_S3Lo        = $0E
98 SID_S3Hi        = $0F
99 SID_PB3Lo       = $10
100 SID_PB3Hi       = $11
101 SID_Ctl3        = $12
102 SID_AD3         = $13
103 SID_SUR3        = $14
104
105 SID_FltLo       = $15
106 SID_FltHi       = $16
107 SID_FltCtl      = $17
108 SID_Amp         = $18
109 SID_ADConv1     = $19
110 SID_ADConv2     = $1A
111 SID_Noise       = $1B
112 SID_Read3       = $1C
113
114
115 ; I/O  $db00: CIA 6526 Inter Process Communication
116 ; I/O  $dc00: CIA 6526
117
118 .struct CIA
119         PRA     .byte
120         PRB     .byte
121         DDRA    .byte
122         DDRB    .byte
123         .union
124             .struct
125                 TALO    .byte
126                 TAHI    .byte
127             .endstruct
128             TA          .word
129         .endunion
130         .union
131             .struct
132                 TBLO    .byte
133                 TBHI    .byte
134             .endstruct
135             TB          .word
136         .endunion
137         TOD10   .byte
138         TODSEC  .byte
139         TODMIN  .byte
140         TODHR   .byte
141         SDR     .byte
142         ICR     .byte
143         CRA     .byte
144         CRB     .byte
145 .endstruct
146
147
148 ; I/O  $dd00: ACIA 6551
149
150 .struct ACIA
151         DATA    .byte
152         STATUS  .byte
153         CMD     .byte
154         CTRL    .BYTE
155 .endstruct
156
157
158 ; I/O  $de00: Triport #1 6525
159 ; I/O  $df00: Triport #2 6525
160
161 .struct TPI
162         PRA     .byte
163         PRB     .byte
164         .union
165                 PRC     .byte
166                 INT     .byte
167         .endunion
168         DDRA    .byte
169         DDRB    .byte
170         .union
171                 DDRC    .byte
172                 IMR     .byte
173         .endunion
174         CR      .byte
175         AIR     .byte
176 .endstruct
177
178
179 ; Out video memory address
180
181 COLOR_RAM   = $D400                     ; System bank
182