amiga_imgv

annotate src/amiga/hwregs.h @ 1:6320a20f17c5

file formats in comments
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 25 Oct 2017 21:05:24 +0300
parents
children 3d9aaefb8ba6
rev   line source
nuclear@0 1 #ifndef HWREGS_H_
nuclear@0 2 #define HWREGS_H_
nuclear@0 3
nuclear@0 4 #include "inttypes.h"
nuclear@0 5
nuclear@0 6 #define REG_BASE_ADDR 0xdff000
nuclear@0 7
nuclear@0 8 #define REGN_BLTDDAT 0x000
nuclear@0 9 #define REGN_DMACONR 0x002
nuclear@0 10 #define REGN_VPOSR 0x004
nuclear@0 11 #define REGN_VHPOSR 0x006
nuclear@0 12 #define REGN_DSKDATR 0x008
nuclear@0 13 #define REGN_JOY0DAT 0x00a
nuclear@0 14 #define REGN_JOY1DAT 0x00c
nuclear@0 15 #define REGN_CLXDAT 0x00e
nuclear@0 16 #define REGN_ADKCONR 0x010
nuclear@0 17 #define REGN_POT0DAT 0x012
nuclear@0 18 #define REGN_POT1DAT 0x014
nuclear@0 19 #define REGN_POTGOR 0x016
nuclear@0 20 #define REGN_SERDATR 0x018
nuclear@0 21 #define REGN_DSKBYTR 0x01a
nuclear@0 22 #define REGN_INTENAR 0x01c
nuclear@0 23 #define REGN_INTREQR 0x01e
nuclear@0 24 #define REGN_DSKPTH 0x020
nuclear@0 25 #define REGN_DSKPTL 0x022
nuclear@0 26 #define REGN_DSKLEN 0x024
nuclear@0 27 #define REGN_DSKDAT 0x026
nuclear@0 28 #define REGN_REFPTR 0x028
nuclear@0 29 #define REGN_VPOSW 0x02a
nuclear@0 30 #define REGN_VHPOSW 0x02c
nuclear@0 31 #define REGN_COPCON 0x02e
nuclear@0 32 #define REGN_SERDAT 0x030
nuclear@0 33 #define REGN_SERPER 0x032
nuclear@0 34 #define REGN_POTGO 0x034
nuclear@0 35 #define REGN_JOYTEST 0x036
nuclear@0 36 #define REGN_STREQU 0x038
nuclear@0 37 #define REGN_STRVBL 0x03a
nuclear@0 38 #define REGN_STRHOR 0x03c
nuclear@0 39 #define REGN_STRLONG 0x03e
nuclear@0 40 #define REGN_BLTCON0 0x040
nuclear@0 41 #define REGN_BLTCON1 0x042
nuclear@0 42 #define REGN_BLTAFWM 0x044
nuclear@0 43 #define REGN_BLTALWM 0x046
nuclear@0 44 #define REGN_BLTCPTH 0x048
nuclear@0 45 #define REGN_BLTCPTL 0x04a
nuclear@0 46 #define REGN_BLTBPTH 0x04c
nuclear@0 47 #define REGN_BLTBPTL 0x04e
nuclear@0 48 #define REGN_BLTAPTH 0x050
nuclear@0 49 #define REGN_BLTAPTL 0x052
nuclear@0 50 #define REGN_BLTDPTH 0x054
nuclear@0 51 #define REGN_BLTDPTL 0x056
nuclear@0 52 #define REGN_BLTSIZE 0x058
nuclear@0 53 #define REGN_BLTCON0L 0x05a
nuclear@0 54 #define REGN_BLTSIZV 0x05c
nuclear@0 55 #define REGN_BLTSIZH 0x05e
nuclear@0 56 #define REGN_BLTCMOD 0x060
nuclear@0 57 #define REGN_BLTBMOD 0x062
nuclear@0 58 #define REGN_BLTAMOD 0x064
nuclear@0 59 #define REGN_BLTDMOD 0x066
nuclear@0 60 #define REGN_BLTCDAT 0x070
nuclear@0 61 #define REGN_BLTBDAT 0x072
nuclear@0 62 #define REGN_BLTADAT 0x074
nuclear@0 63 #define REGN_SPRHDAT 0x078
nuclear@0 64 #define REGN_DENISEID 0x07c
nuclear@0 65 #define REGN_DSKSYNC 0x07e
nuclear@0 66 #define REGN_COP1LCH 0x080
nuclear@0 67 #define REGN_COP1LCL 0x082
nuclear@0 68 #define REGN_COP2LCH 0x084
nuclear@0 69 #define REGN_COP2LCL 0x086
nuclear@0 70 #define REGN_CMPJMP1 0x088
nuclear@0 71 #define REGN_CMPJMP2 0x08a
nuclear@0 72 #define REGN_COPINS 0x08c
nuclear@0 73 #define REGN_DIWSTART 0x08e
nuclear@0 74 #define REGN_DIWSTOP 0x090
nuclear@0 75 #define REGN_DDFSTART 0x092
nuclear@0 76 #define REGN_DDFSTOP 0x094
nuclear@0 77 #define REGN_DMACON 0x096
nuclear@0 78 #define REGN_CLXCON 0x098
nuclear@0 79 #define REGN_INTENA 0x09a
nuclear@0 80 #define REGN_INTREQ 0x09c
nuclear@0 81 #define REGN_ADKCON 0x09e
nuclear@0 82
nuclear@0 83 #define REGN_AUDIO_LCH(c) (REGN_AUDIO0_BASE + (c) * 16 + 0)
nuclear@0 84 #define REGN_AUDIO_LCL(c) (REGN_AUDIO0_BASE + (c) * 16 + 2)
nuclear@0 85 #define REGN_AUDIO_LEN(c) (REGN_AUDIO0_BASE + (c) * 16 + 4)
nuclear@0 86 #define REGN_AUDIO_PER(c) (REGN_AUDIO0_BASE + (c) * 16 + 6)
nuclear@0 87 #define REGN_AUDIO_VOL(c) (REGN_AUDIO0_BASE + (c) * 16 + 8)
nuclear@0 88 #define REGN_AUDIO_DAT(c) (REGN_AUDIO0_BASE + (c) * 16 + 10)
nuclear@0 89
nuclear@0 90 #define REGN_AUDIO0_BASE 0x0a0
nuclear@0 91 #define REGN_AUD0LCH (REGN_AUDIO0_BASE + 0)
nuclear@0 92 #define REGN_AUD0LCL (REGN_AUDIO0_BASE + 2)
nuclear@0 93 #define REGN_AUD0LEN (REGN_AUDIO0_BASE + 4)
nuclear@0 94 #define REGN_AUD0PER (REGN_AUDIO0_BASE + 6)
nuclear@0 95 #define REGN_AUD0VOL (REGN_AUDIO0_BASE + 8)
nuclear@0 96 #define REGN_AUD0DAT (REGN_AUDIO0_BASE + 10)
nuclear@0 97 #define REGN_AUDIO1_BASE 0x0b0
nuclear@0 98 #define REGN_AUD1LCH (REGN_AUDIO1_BASE + 0)
nuclear@0 99 #define REGN_AUD1LCL (REGN_AUDIO1_BASE + 2)
nuclear@0 100 #define REGN_AUD1LEN (REGN_AUDIO1_BASE + 4)
nuclear@0 101 #define REGN_AUD1PER (REGN_AUDIO1_BASE + 6)
nuclear@0 102 #define REGN_AUD1VOL (REGN_AUDIO1_BASE + 8)
nuclear@0 103 #define REGN_AUD1DAT (REGN_AUDIO1_BASE + 10)
nuclear@0 104 #define REGN_AUDIO2_BASE 0x0c0
nuclear@0 105 #define REGN_AUD2LCH (REGN_AUDIO2_BASE + 0)
nuclear@0 106 #define REGN_AUD2LCL (REGN_AUDIO2_BASE + 2)
nuclear@0 107 #define REGN_AUD2LEN (REGN_AUDIO2_BASE + 4)
nuclear@0 108 #define REGN_AUD2PER (REGN_AUDIO2_BASE + 6)
nuclear@0 109 #define REGN_AUD2VOL (REGN_AUDIO2_BASE + 8)
nuclear@0 110 #define REGN_AUD2DAT (REGN_AUDIO2_BASE + 10)
nuclear@0 111 #define REGN_AUDIO3_BASE 0x0d0
nuclear@0 112 #define REGN_AUD3LCH (REGN_AUDIO3_BASE + 0)
nuclear@0 113 #define REGN_AUD3LCL (REGN_AUDIO3_BASE + 2)
nuclear@0 114 #define REGN_AUD3LEN (REGN_AUDIO3_BASE + 4)
nuclear@0 115 #define REGN_AUD3PER (REGN_AUDIO3_BASE + 6)
nuclear@0 116 #define REGN_AUD3VOL (REGN_AUDIO3_BASE + 8)
nuclear@0 117 #define REGN_AUD3DAT (REGN_AUDIO3_BASE + 10)
nuclear@0 118
nuclear@0 119 #define REGN_BPL1PTH 0x0e0
nuclear@0 120 #define REGN_BPL1PTL 0x0e2
nuclear@0 121 #define REGN_BPL2PTH 0x0e4
nuclear@0 122 #define REGN_BPL2PTL 0x0e6
nuclear@0 123 #define REGN_BPL3PTH 0x0e8
nuclear@0 124 #define REGN_BPL3PTL 0x0ea
nuclear@0 125 #define REGN_BPL4PTH 0x0ec
nuclear@0 126 #define REGN_BPL4PTL 0x0ee
nuclear@0 127 #define REGN_BPL5PTH 0x0f0
nuclear@0 128 #define REGN_BPL5PTL 0x0f2
nuclear@0 129 #define REGN_BPL6PTH 0x0f4
nuclear@0 130 #define REGN_BPL6PTL 0x0f6
nuclear@0 131 #define REGN_BPLCON0 0x100
nuclear@0 132 #define REGN_BPLCON1 0x102
nuclear@0 133 #define REGN_BPLCON2 0x104
nuclear@0 134 #define REGN_BPLCON3 0x106
nuclear@0 135 #define REGN_BPL1MOD 0x108
nuclear@0 136 #define REGN_BPL2MOD 0x10a
nuclear@0 137 #define REGN_BPL1DAT 0x110
nuclear@0 138 #define REGN_BPL2DAT 0x112
nuclear@0 139 #define REGN_BPL3DAT 0x114
nuclear@0 140 #define REGN_BPL4DAT 0x116
nuclear@0 141 #define REGN_BPL5DAT 0x118
nuclear@0 142 #define REGN_BPL6DAT 0x11a
nuclear@0 143
nuclear@0 144 #define REGN_SPR0PTH 0x120
nuclear@0 145 #define REGN_SPR0PTL 0x122
nuclear@0 146 #define REGN_SPR1PTH 0x124
nuclear@0 147 #define REGN_SPR1PTL 0x126
nuclear@0 148 #define REGN_SPR2PTH 0x128
nuclear@0 149 #define REGN_SPR2PTL 0x12a
nuclear@0 150 #define REGN_SPR3PTH 0x12c
nuclear@0 151 #define REGN_SPR3PTL 0x12e
nuclear@0 152 #define REGN_SPR4PTH 0x130
nuclear@0 153 #define REGN_SPR4PTL 0x132
nuclear@0 154 #define REGN_SPR5PTH 0x134
nuclear@0 155 #define REGN_SPR5PTL 0x136
nuclear@0 156 #define REGN_SPR6PTH 0x138
nuclear@0 157 #define REGN_SPR6PTL 0x13a
nuclear@0 158 #define REGN_SPR7PTH 0x13c
nuclear@0 159 #define REGN_SPR7PTL 0x13e
nuclear@0 160
nuclear@0 161 #define REGN_SPRITE_POS(s) (REGN_SPRITE0_BASE + (s) * 8 + 0)
nuclear@0 162 #define REGN_SPRITE_CTL(s) (REGN_SPRITE0_BASE + (s) * 8 + 2)
nuclear@0 163 #define REGN_SPRITE_DATA(s) (REGN_SPRITE0_BASE + (s) * 8 + 4)
nuclear@0 164 #define REGN_SPRITE_DATB(s) (REGN_SPRITE0_BASE + (s) * 8 + 6)
nuclear@0 165
nuclear@0 166 #define REGN_SPRITE0_BASE 0x140
nuclear@0 167 #define REGN_SPR0POS REGN_SPRITE_POS(0)
nuclear@0 168 #define REGN_SPR0CTL REGN_SPRITE_CTL(0)
nuclear@0 169 #define REGN_SPR0DATA REGN_SPRITE_DATA(0)
nuclear@0 170 #define REGN_SPR0DATB REGN_SPRITE_DATB(0)
nuclear@0 171 #define REGN_SPRITE1_BASE 0x148
nuclear@0 172 #define REGN_SPR1POS REGN_SPRITE_POS(1)
nuclear@0 173 #define REGN_SPR1CTL REGN_SPRITE_CTL(1)
nuclear@0 174 #define REGN_SPR1DATA REGN_SPRITE_DATA(1)
nuclear@0 175 #define REGN_SPR1DATB REGN_SPRITE_DATB(1)
nuclear@0 176 #define REGN_SPRITE2_BASE 0x150
nuclear@0 177 #define REGN_SPR2POS REGN_SPRITE_POS(2)
nuclear@0 178 #define REGN_SPR2CTL REGN_SPRITE_CTL(2)
nuclear@0 179 #define REGN_SPR2DATA REGN_SPRITE_DATA(2)
nuclear@0 180 #define REGN_SPR2DATB REGN_SPRITE_DATB(2)
nuclear@0 181 #define REGN_SPRITE3_BASE 0x158
nuclear@0 182 #define REGN_SPR3POS REGN_SPRITE_POS(3)
nuclear@0 183 #define REGN_SPR3CTL REGN_SPRITE_CTL(3)
nuclear@0 184 #define REGN_SPR3DATA REGN_SPRITE_DATA(3)
nuclear@0 185 #define REGN_SPR3DATB REGN_SPRITE_DATB(3)
nuclear@0 186 #define REGN_SPRITE4_BASE 0x160
nuclear@0 187 #define REGN_SPR4POS REGN_SPRITE_POS(4)
nuclear@0 188 #define REGN_SPR4CTL REGN_SPRITE_CTL(4)
nuclear@0 189 #define REGN_SPR4DATA REGN_SPRITE_DATA(4)
nuclear@0 190 #define REGN_SPR4DATB REGN_SPRITE_DATB(4)
nuclear@0 191 #define REGN_SPRITE5_BASE 0x168
nuclear@0 192 #define REGN_SPR5POS REGN_SPRITE_POS(5)
nuclear@0 193 #define REGN_SPR5CTL REGN_SPRITE_CTL(5)
nuclear@0 194 #define REGN_SPR5DATA REGN_SPRITE_DATA(5)
nuclear@0 195 #define REGN_SPR5DATB REGN_SPRITE_DATB(5)
nuclear@0 196 #define REGN_SPRITE6_BASE 0x170
nuclear@0 197 #define REGN_SPR6POS REGN_SPRITE_POS(6)
nuclear@0 198 #define REGN_SPR6CTL REGN_SPRITE_CTL(6)
nuclear@0 199 #define REGN_SPR6DATA REGN_SPRITE_DATA(6)
nuclear@0 200 #define REGN_SPR6DATB REGN_SPRITE_DATB(6)
nuclear@0 201 #define REGN_SPRITE7_BASE 0x178
nuclear@0 202 #define REGN_SPR7POS REGN_SPRITE_POS(7)
nuclear@0 203 #define REGN_SPR7CTL REGN_SPRITE_CTL(7)
nuclear@0 204 #define REGN_SPR7DATA REGN_SPRITE_DATA(7)
nuclear@0 205 #define REGN_SPR7DATB REGN_SPRITE_DATB(7)
nuclear@0 206
nuclear@0 207 #define REGN_COLOR_BASE 0x180
nuclear@0 208 #define REGN_COLOR(idx) (REGN_COLOR_BASE + (idx) * 2)
nuclear@0 209
nuclear@0 210 #define REGN_COLOR0 REGN_COLOR(0)
nuclear@0 211 #define REGN_COLOR1 REGN_COLOR(1)
nuclear@0 212 #define REGN_COLOR2 REGN_COLOR(2)
nuclear@0 213 #define REGN_COLOR3 REGN_COLOR(3)
nuclear@0 214 #define REGN_COLOR4 REGN_COLOR(4)
nuclear@0 215 #define REGN_COLOR5 REGN_COLOR(5)
nuclear@0 216 #define REGN_COLOR6 REGN_COLOR(6)
nuclear@0 217 #define REGN_COLOR7 REGN_COLOR(7)
nuclear@0 218 #define REGN_COLOR8 REGN_COLOR(8)
nuclear@0 219 #define REGN_COLOR9 REGN_COLOR(9)
nuclear@0 220 #define REGN_COLOR10 REGN_COLOR(10)
nuclear@0 221 #define REGN_COLOR11 REGN_COLOR(11)
nuclear@0 222 #define REGN_COLOR12 REGN_COLOR(12)
nuclear@0 223 #define REGN_COLOR13 REGN_COLOR(13)
nuclear@0 224 #define REGN_COLOR14 REGN_COLOR(14)
nuclear@0 225 #define REGN_COLOR15 REGN_COLOR(15)
nuclear@0 226 #define REGN_COLOR16 REGN_COLOR(16)
nuclear@0 227 #define REGN_COLOR17 REGN_COLOR(17)
nuclear@0 228 #define REGN_COLOR18 REGN_COLOR(18)
nuclear@0 229 #define REGN_COLOR19 REGN_COLOR(19)
nuclear@0 230 #define REGN_COLOR20 REGN_COLOR(20)
nuclear@0 231 #define REGN_COLOR21 REGN_COLOR(21)
nuclear@0 232 #define REGN_COLOR22 REGN_COLOR(22)
nuclear@0 233 #define REGN_COLOR23 REGN_COLOR(23)
nuclear@0 234 #define REGN_COLOR24 REGN_COLOR(24)
nuclear@0 235 #define REGN_COLOR25 REGN_COLOR(25)
nuclear@0 236 #define REGN_COLOR26 REGN_COLOR(26)
nuclear@0 237 #define REGN_COLOR27 REGN_COLOR(27)
nuclear@0 238 #define REGN_COLOR28 REGN_COLOR(28)
nuclear@0 239 #define REGN_COLOR29 REGN_COLOR(29)
nuclear@0 240 #define REGN_COLOR30 REGN_COLOR(30)
nuclear@0 241 #define REGN_COLOR31 REGN_COLOR(31)
nuclear@0 242
nuclear@0 243 #define REGN_HTOTAL 0x1c0
nuclear@0 244 #define REGN_HSSTOP 0x1c2
nuclear@0 245 #define REGN_HBSTART 0x1c4
nuclear@0 246 #define REGN_HBSTOP 0x1c6
nuclear@0 247 #define REGN_VTOTAL 0x1c8
nuclear@0 248 #define REGN_VSSTOP 0x1ca
nuclear@0 249 #define REGN_VBSTART 0x1cc
nuclear@0 250 #define REGN_VBSTOP 0x1ce
nuclear@0 251 #define REGN_BEAMCON0 0x1dc
nuclear@0 252 #define REGN_HSSTART 0x1de
nuclear@0 253 #define REGN_VSSTART 0x1e0
nuclear@0 254 #define REGN_HCENTER 0x1e2
nuclear@0 255 #define REGN_DIWHIGH 0x1e4
nuclear@0 256
nuclear@0 257 #define REGN_COP1LCH 0x080
nuclear@0 258 #define REGN_COP1LCL 0x082
nuclear@0 259 #define REGN_COP2LCH 0x084
nuclear@0 260 #define REGN_COP2LCL 0x086
nuclear@0 261 #define REGN_COPJMP1 0x088
nuclear@0 262 #define REGN_COPJMP2 0x08a
nuclear@0 263
nuclear@0 264 #define REG(r) (*(volatile uint16_t*)(REG_BASE_ADDR | (r)))
nuclear@0 265
nuclear@0 266 #define REG_CIAA_PORTA *(volatile uint8_t*)0xbfe001
nuclear@0 267
nuclear@0 268 #define REG_INTENA REG(REGN_INTENA)
nuclear@0 269 #define REG_INTENAR REG(REGN_INTENAR)
nuclear@0 270 #define REG_INTREQ REG(REGN_INTREQ)
nuclear@0 271 #define REG_INTREQR REG(REGN_INTREQR)
nuclear@0 272 #define REG_ADKCON REG(REGN_ADKCON)
nuclear@0 273 #define REG_ADKCONR REG(REGN_ADKCONR)
nuclear@0 274 #define REG_DMACON REG(REGN_DMACON)
nuclear@0 275 #define REG_DMACONR REG(REGN_DMACONR)
nuclear@0 276 #define REG_BPLCON0 REG(REGN_BPLCON0)
nuclear@0 277 #define REG_BPLCON1 REG(REGN_BPLCON1)
nuclear@0 278 #define REG_BPLCON2 REG(REGN_BPLCON2)
nuclear@0 279 #define REG_BPL1PTH REG(REGN_BPL1PTH)
nuclear@0 280 #define REG_BPL2PTH REG(REGN_BPL2PTH)
nuclear@0 281 #define REG_BPL3PTH REG(REGN_BPL3PTH)
nuclear@0 282 #define REG_BPL4PTH REG(REGN_BPL4PTH)
nuclear@0 283 #define REG_BPL5PTH REG(REGN_BPL5PTH)
nuclear@0 284 #define REG_BPL6PTH REG(REGN_BPL6PTH)
nuclear@0 285 #define REG_BPL1PTL REG(REGN_BPL1PTL)
nuclear@0 286 #define REG_BPL2PTL REG(REGN_BPL2PTL)
nuclear@0 287 #define REG_BPL3PTL REG(REGN_BPL3PTL)
nuclear@0 288 #define REG_BPL4PTL REG(REGN_BPL4PTL)
nuclear@0 289 #define REG_BPL5PTL REG(REGN_BPL5PTL)
nuclear@0 290 #define REG_BPL6PTL REG(REGN_BPL6PTL)
nuclear@0 291 #define REG32_BPL1PT *(volatile uint32_t*)(REG_BASE_ADDR | REGN_BPL1PTH)
nuclear@0 292 #define REG32_BPL2PT *(volatile uint32_t*)(REG_BASE_ADDR | REGN_BPL2PTH)
nuclear@0 293 #define REG32_BPL3PT *(volatile uint32_t*)(REG_BASE_ADDR | REGN_BPL3PTH)
nuclear@0 294 #define REG32_BPL4PT *(volatile uint32_t*)(REG_BASE_ADDR | REGN_BPL4PTH)
nuclear@0 295 #define REG32_BPL5PT *(volatile uint32_t*)(REG_BASE_ADDR | REGN_BPL5PTH)
nuclear@0 296 #define REG32_BPL6PT *(volatile uint32_t*)(REG_BASE_ADDR | REGN_BPL6PTH)
nuclear@0 297 #define REG_BPL1MOD REG(REGN_BPL1MOD)
nuclear@0 298 #define REG_BPL2MOD REG(REGN_BPL2MOD)
nuclear@0 299 #define REG_DIWSTART REG(REGN_DIWSTART)
nuclear@0 300 #define REG_DIWSTOP REG(REGN_DIWSTOP)
nuclear@0 301 #define REG_DDFSTART REG(REGN_DDFSTART)
nuclear@0 302 #define REG_DDFSTOP REG(REGN_DDFSTOP)
nuclear@0 303 #define REG_VPOS REG(REGN_VPOS)
nuclear@0 304 #define REG_VPOSR REG(REGN_VPOSR)
nuclear@0 305 #define REG_VHPOS REG(REGN_VHPOS)
nuclear@0 306 #define REG_VHPOSR REG(REGN_VHPOSR)
nuclear@0 307 #define REG32_VPOSR *(volatile uint32_t*)(REG_BASE_ADDR | REGN_VPOSR)
nuclear@0 308
nuclear@0 309 #define REG_COLOR_PTR ((volatile uint16_t*)(REG_BASE_ADDR | REGN_COLOR0))
nuclear@0 310 #define REG_COLOR0 REG(REGN_COLOR0)
nuclear@0 311 #define REG_COLOR1 REG(REGN_COLOR1)
nuclear@0 312 #define REG_COLOR2 REG(REGN_COLOR2)
nuclear@0 313 #define REG_COLOR3 REG(REGN_COLOR3)
nuclear@0 314 #define REG_COLOR4 REG(REGN_COLOR4)
nuclear@0 315 #define REG_COLOR5 REG(REGN_COLOR5)
nuclear@0 316 #define REG_COLOR6 REG(REGN_COLOR6)
nuclear@0 317 #define REG_COLOR7 REG(REGN_COLOR7)
nuclear@0 318 #define REG_COLOR8 REG(REGN_COLOR8)
nuclear@0 319 #define REG_COLOR9 REG(REGN_COLOR9)
nuclear@0 320 #define REG_COLOR10 REG(REGN_COLOR10)
nuclear@0 321 #define REG_COLOR11 REG(REGN_COLOR11)
nuclear@0 322 #define REG_COLOR12 REG(REGN_COLOR12)
nuclear@0 323 #define REG_COLOR13 REG(REGN_COLOR13)
nuclear@0 324 #define REG_COLOR14 REG(REGN_COLOR14)
nuclear@0 325 #define REG_COLOR15 REG(REGN_COLOR15)
nuclear@0 326 #define REG_COLOR16 REG(REGN_COLOR16)
nuclear@0 327 #define REG_COLOR17 REG(REGN_COLOR17)
nuclear@0 328 #define REG_COLOR18 REG(REGN_COLOR18)
nuclear@0 329 #define REG_COLOR19 REG(REGN_COLOR19)
nuclear@0 330 #define REG_COLOR20 REG(REGN_COLOR20)
nuclear@0 331 #define REG_COLOR21 REG(REGN_COLOR21)
nuclear@0 332 #define REG_COLOR22 REG(REGN_COLOR22)
nuclear@0 333 #define REG_COLOR23 REG(REGN_COLOR23)
nuclear@0 334 #define REG_COLOR24 REG(REGN_COLOR24)
nuclear@0 335 #define REG_COLOR25 REG(REGN_COLOR25)
nuclear@0 336 #define REG_COLOR26 REG(REGN_COLOR26)
nuclear@0 337 #define REG_COLOR27 REG(REGN_COLOR27)
nuclear@0 338 #define REG_COLOR28 REG(REGN_COLOR28)
nuclear@0 339 #define REG_COLOR29 REG(REGN_COLOR29)
nuclear@0 340 #define REG_COLOR30 REG(REGN_COLOR30)
nuclear@0 341 #define REG_COLOR31 REG(REGN_COLOR31)
nuclear@0 342
nuclear@0 343 #define REG32_COP1LC *(volatile uint32_t*)(REG_BASE_ADDR | REGN_COP1LCH)
nuclear@0 344 #define REG32_COP2LC *(volatile uint32_t*)(REG_BASE_ADDR | REGN_COP2LCH)
nuclear@0 345 #define REG_COPJMP1 REG(REGN_COPJMP1)
nuclear@0 346 #define REG_COPJMP2 REG(REGN_COPJMP2)
nuclear@0 347
nuclear@0 348 /* ------ bits ------- */
nuclear@0 349 #define SETBITS(x) ((x) | 0x8000)
nuclear@0 350 #define CLRBITS(x) (x)
nuclear@0 351
nuclear@0 352 /* interrupt enable flags */
nuclear@0 353 enum {
nuclear@0 354 INTEN_TBE = 0x0001,
nuclear@0 355 INTEN_DSKBLK = 0x0002,
nuclear@0 356 INTEN_SOFT = 0x0004,
nuclear@0 357 INTEN_PORTS = 0x0008,
nuclear@0 358 INTEN_COPPER = 0x0010,
nuclear@0 359 INTEN_VERTB = 0x0020,
nuclear@0 360 INTEN_BLITTER = 0x0040,
nuclear@0 361 INTEN_AUDIO0 = 0x0080,
nuclear@0 362 INTEN_AUDIO1 = 0x0100,
nuclear@0 363 INTEN_AUDIO2 = 0x0200,
nuclear@0 364 INTEN_AUDIO3 = 0x0400,
nuclear@0 365 INTEN_RBF = 0x0800,
nuclear@0 366 INTEN_DSKSYN = 0x1000,
nuclear@0 367 INTEN_EXTER = 0x2000,
nuclear@0 368 INTEN_MASTER = 0x4000,
nuclear@0 369
nuclear@0 370 INTEN_ALL = 0x7fff
nuclear@0 371 };
nuclear@0 372
nuclear@0 373 /* DMA control flags */
nuclear@0 374 enum {
nuclear@0 375 DMA_AUD0 = 0x0001,
nuclear@0 376 DMA_AUD1 = 0x0002,
nuclear@0 377 DMA_AUD2 = 0x0004,
nuclear@0 378 DMA_AUD3 = 0x0008,
nuclear@0 379 DMA_AUDIO = 0x000f, /* all the above */
nuclear@0 380 DMA_DISK = 0x0010,
nuclear@0 381 DMA_SPRITE = 0x0020,
nuclear@0 382 DMA_BLITTER = 0x0040,
nuclear@0 383 DMA_COPPER = 0x0080,
nuclear@0 384 DMA_BPL = 0x0100,
nuclear@0 385 DMA_MASTER = 0x0200,
nuclear@0 386
nuclear@0 387 DMA_ALL = 0x01ff
nuclear@0 388 };
nuclear@0 389
nuclear@0 390 /* Bitplane control */
nuclear@0 391 enum {
nuclear@0 392 BPLCON0_ERSY = 0x0002,
nuclear@0 393 BPLCON0_LACE = 0x0004,
nuclear@0 394 BPLCON0_LPEN = 0x0008,
nuclear@0 395 BPLCON0_GAUD = 0x0100,
nuclear@0 396 BPLCON0_COLOR = 0x0200,
nuclear@0 397 BPLCON0_DBLPF = 0x0400,
nuclear@0 398 BPLCON0_HOMOD = 0x0800,
nuclear@0 399 BPLCON0_BPU0 = 0x1000,
nuclear@0 400 BPLCON0_BPU1 = 0x2000,
nuclear@0 401 BPLCON0_BPU2 = 0x4000,
nuclear@0 402 BPLCON0_HIRES = 0x8000
nuclear@0 403 };
nuclear@0 404
nuclear@0 405 #define BPLCON0_COUNT(x) ((x) << 12)
nuclear@0 406
nuclear@0 407 #define CIAA_PA_FIR0 0x40
nuclear@0 408 #define CIAA_PA_FIR1 0x80
nuclear@0 409
nuclear@0 410 #endif /* HWREGS_H_ */