OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rc203soc/] [sw/] [uClinux/] [include/] [asm-m68k/] [amigahw.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1633 jcastillo
/*
2
** asm-m68k/amigahw.h -- This header defines some macros and pointers for
3
**                    the various Amiga custom hardware registers.
4
**                    The naming conventions used here conform to those
5
**                    used in the Amiga Hardware Reference Manual, 3rd Edition
6
**
7
** Copyright 1992 by Greg Harp
8
**
9
** This file is subject to the terms and conditions of the GNU General Public
10
** License.  See the file COPYING in the main directory of this archive
11
** for more details.
12
**
13
** Created: 9/24/92 by Greg Harp
14
*/
15
 
16
#ifndef _ASMm68k_AMIGAHW_H_
17
#define _ASMm68k_AMIGAHW_H_
18
 
19
struct CUSTOM {
20
    u_short bltddat;
21
    u_short dmaconr;
22
    u_short vposr;
23
    u_short vhposr;
24
    u_short dskdatr;
25
    u_short joy0dat;
26
    u_short joy1dat;
27
    u_short clxdat;
28
    u_short adkconr;
29
    u_short pot0dat;
30
    u_short pot1dat;
31
    u_short potgor;
32
    u_short serdatr;
33
    u_short dskbytr;
34
    u_short intenar;
35
    u_short intreqr;
36
    u_char  *dskptr;
37
    u_short dsklen;
38
    u_short dskdat;
39
    u_short refptr;
40
    u_short vposw;
41
    u_short vhposw;
42
    u_short copcon;
43
    u_short serdat;
44
    u_short serper;
45
    u_short potgo;
46
    u_short joytest;
47
    u_short strequ;
48
    u_short strvbl;
49
    u_short strhor;
50
    u_short strlong;
51
    u_short bltcon0;
52
    u_short bltcon1;
53
    u_short bltafwm;
54
    u_short bltalwm;
55
    u_char  *bltcpt;
56
    u_char  *bltbpt;
57
    u_char  *bltapt;
58
    u_char  *bltdpt;
59
    u_short bltsize;
60
    u_char  pad2d;
61
    u_char  bltcon0l;
62
    u_short bltsizv;
63
    u_short bltsizh;
64
    u_short bltcmod;
65
    u_short bltbmod;
66
    u_short bltamod;
67
    u_short bltdmod;
68
    u_short spare2[4];
69
    u_short bltcdat;
70
    u_short bltbdat;
71
    u_short bltadat;
72
    u_short spare3[3];
73
    u_short deniseid;
74
    u_short dsksync;
75
    u_short *cop1lc;
76
    u_short *cop2lc;
77
    u_short copjmp1;
78
    u_short copjmp2;
79
    u_short copins;
80
    u_short diwstrt;
81
    u_short diwstop;
82
    u_short ddfstrt;
83
    u_short ddfstop;
84
    u_short dmacon;
85
    u_short clxcon;
86
    u_short intena;
87
    u_short intreq;
88
    u_short adkcon;
89
    struct {
90
        u_short *audlc;
91
        u_short audlen;
92
        u_short audper;
93
        u_short audvol;
94
        u_short auddat;
95
        u_short audspare[2];
96
    } aud[4];
97
    u_char  *bplpt[8];
98
    u_short bplcon0;
99
    u_short bplcon1;
100
    u_short bplcon2;
101
    u_short bplcon3;
102
    u_short bpl1mod;
103
    u_short bpl2mod;
104
    u_short bplcon4;
105
    u_short clxcon2;
106
    u_short bpldat[8];
107
    u_char  *sprpt[8];
108
    struct {
109
        u_short pos;
110
        u_short ctl;
111
        u_short dataa;
112
        u_short datab;
113
    } spr[8];
114
    u_short color[32];
115
    u_short htotal;
116
    u_short hsstop;
117
    u_short hbstrt;
118
    u_short hbstop;
119
    u_short vtotal;
120
    u_short vsstop;
121
    u_short vbstrt;
122
    u_short vbstop;
123
    u_short sprhstrt;
124
    u_short sprhstop;
125
    u_short bplhstrt;
126
    u_short bplhstop;
127
    u_short hhposw;
128
    u_short hhposr;
129
    u_short beamcon0;
130
    u_short hsstrt;
131
    u_short vsstrt;
132
    u_short hcenter;
133
    u_short diwhigh;
134
    u_short spare4[11];
135
    u_short fmode;
136
};
137
 
138
/*
139
 * DMA register bits
140
 */
141
#define DMAF_SETCLR             (0x8000)
142
#define DMAF_AUD0               (0x0001)
143
#define DMAF_AUD1               (0x0002)
144
#define DMAF_AUD2               (0x0004)
145
#define DMAF_AUD3               (0x0008)
146
#define DMAF_DISK               (0x0010)
147
#define DMAF_SPRITE             (0x0020)
148
#define DMAF_BLITTER            (0x0040)
149
#define DMAF_COPPER             (0x0080)
150
#define DMAF_RASTER             (0x0100)
151
#define DMAF_MASTER             (0x0200)
152
#define DMAF_BLITHOG            (0x0400)
153
#define DMAF_BLTNZERO           (0x2000)
154
#define DMAF_BLTDONE            (0x4000)
155
#define DMAF_ALL                (0x01FF)
156
 
157
struct CIA {
158
    u_char pra;                 char pad0[0xff];
159
    u_char prb;                 char pad1[0xff];
160
    u_char ddra;                char pad2[0xff];
161
    u_char ddrb;                char pad3[0xff];
162
    u_char talo;                char pad4[0xff];
163
    u_char tahi;                char pad5[0xff];
164
    u_char tblo;                char pad6[0xff];
165
    u_char tbhi;                char pad7[0xff];
166
    u_char todlo;               char pad8[0xff];
167
    u_char todmid;              char pad9[0xff];
168
    u_char todhi;               char pada[0x1ff];
169
    u_char sdr;                 char padb[0xff];
170
    u_char icr;                 char padc[0xff];
171
    u_char cra;                 char padd[0xff];
172
    u_char crb;                 char pade[0xff];
173
};
174
 
175
#if 1
176
#define zTwoBase (0x80000000)
177
#define ZTWO_PADDR(x) (((unsigned long)(x))-zTwoBase)
178
#define ZTWO_VADDR(x) (((unsigned long)(x))+zTwoBase)
179
#else
180
#define zTwoBase 0
181
#define ZTWO_PADDR(x) (x)
182
#define ZTWO_VADDR(x) (x)
183
#endif
184
 
185
#define CUSTOM_PHYSADDR     (0xdff000)
186
#define custom ((*(volatile struct CUSTOM *)(zTwoBase+CUSTOM_PHYSADDR)))
187
 
188
#define CIAA_PHYSADDR     (0xbfe001)
189
#define CIAB_PHYSADDR     (0xbfd000)
190
#define ciaa   ((*(volatile struct CIA *)(zTwoBase + CIAA_PHYSADDR)))
191
#define ciab   ((*(volatile struct CIA *)(zTwoBase + CIAB_PHYSADDR)))
192
 
193
#define CHIP_PHYSADDR       (0x000000)
194
#define chipaddr ((unsigned long)(zTwoBase + CHIP_PHYSADDR))
195
void amiga_chip_init (void);
196
void *amiga_chip_alloc (long size);
197
void amiga_chip_free (void *);
198
 
199
struct tod3000 {
200
  unsigned int  :28, second2:4; /* lower digit */
201
  unsigned int  :28, second1:4; /* upper digit */
202
  unsigned int  :28, minute2:4; /* lower digit */
203
  unsigned int  :28, minute1:4; /* upper digit */
204
  unsigned int  :28, hour2:4;   /* lower digit */
205
  unsigned int  :28, hour1:4;   /* upper digit */
206
  unsigned int  :28, weekday:4;
207
  unsigned int  :28, day2:4;    /* lower digit */
208
  unsigned int  :28, day1:4;    /* upper digit */
209
  unsigned int  :28, month2:4;  /* lower digit */
210
  unsigned int  :28, month1:4;  /* upper digit */
211
  unsigned int  :28, year2:4;   /* lower digit */
212
  unsigned int  :28, year1:4;   /* upper digit */
213
  unsigned int  :28, cntrl1:4;  /* control-byte 1 */
214
  unsigned int  :28, cntrl2:4;  /* control-byte 2 */
215
  unsigned int  :28, cntrl3:4;  /* control-byte 3 */
216
};
217
#define TOD3000_CNTRL1_HOLD     0
218
#define TOD3000_CNTRL1_FREE     9
219
#define TOD_3000 ((struct tod3000 *)(zTwoBase+0xDC0000))
220
 
221
struct tod2000 {
222
  unsigned int  :28, second2:4; /* lower digit */
223
  unsigned int  :28, second1:4; /* upper digit */
224
  unsigned int  :28, minute2:4; /* lower digit */
225
  unsigned int  :28, minute1:4; /* upper digit */
226
  unsigned int  :28, hour2:4;   /* lower digit */
227
  unsigned int  :28, hour1:4;   /* upper digit */
228
  unsigned int  :28, day2:4;    /* lower digit */
229
  unsigned int  :28, day1:4;    /* upper digit */
230
  unsigned int  :28, month2:4;  /* lower digit */
231
  unsigned int  :28, month1:4;  /* upper digit */
232
  unsigned int  :28, year2:4;   /* lower digit */
233
  unsigned int  :28, year1:4;   /* upper digit */
234
  unsigned int  :28, weekday:4;
235
  unsigned int  :28, cntrl1:4;  /* control-byte 1 */
236
  unsigned int  :28, cntrl2:4;  /* control-byte 2 */
237
  unsigned int  :28, cntrl3:4;  /* control-byte 3 */
238
};
239
 
240
#define TOD2000_CNTRL1_HOLD     (1<<0)
241
#define TOD2000_CNTRL1_BUSY     (1<<1)
242
#define TOD2000_CNTRL3_24HMODE  (1<<2)
243
#define TOD2000_HOUR1_PM        (1<<2)
244
#define TOD_2000 ((struct tod2000 *)(zTwoBase+0xDC0000))
245
 
246
#endif /* asm-m68k/amigahw.h */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.