]> git.sur5r.net Git - cc65/blob - include/_gtia.h
Merge pull request #706 from xlar54/master
[cc65] / include / _gtia.h
1 /*****************************************************************************/
2 /*                                                                           */
3 /*                                 _gtia.h                                   */
4 /*                                                                           */
5 /*                  Internal include file, do not use directly               */
6 /*                                                                           */
7 /*                                                                           */
8 /*                                                                           */
9 /* (C) 2000 Freddy Offenga <taf_offenga@yahoo.com>                           */
10 /*                                                                           */
11 /*                                                                           */
12 /* This software is provided 'as-is', without any expressed or implied       */
13 /* warranty.  In no event will the authors be held liable for any damages    */
14 /* arising from the use of this software.                                    */
15 /*                                                                           */
16 /* Permission is granted to anyone to use this software for any purpose,     */
17 /* including commercial applications, and to alter it and redistribute it    */
18 /* freely, subject to the following restrictions:                            */
19 /*                                                                           */
20 /* 1. The origin of this software must not be misrepresented; you must not   */
21 /*    claim that you wrote the original software. If you use this software   */
22 /*    in a product, an acknowledgment in the product documentation would be  */
23 /*    appreciated but is not required.                                       */
24 /* 2. Altered source versions must be plainly marked as such, and must not   */
25 /*    be misrepresented as being the original software.                      */
26 /* 3. This notice may not be removed or altered from any source              */
27 /*    distribution.                                                          */
28 /*                                                                           */
29 /*****************************************************************************/
30
31
32 #ifndef __GTIA_H
33 #define __GTIA_H
34
35 /* Define a structure with the gtia register offsets */
36 struct __gtia_write {
37     unsigned char   hposp0; /* 0x00: horizontal position player 0 */
38     unsigned char   hposp1; /* 0x01: horizontal position player 1 */
39     unsigned char   hposp2; /* 0x02: horizontal position player 2 */
40     unsigned char   hposp3; /* 0x03: horizontal position player 3 */
41     unsigned char   hposm0; /* 0x04: horizontal position missile 0 */
42     unsigned char   hposm1; /* 0x05: horizontal position missile 1 */
43     unsigned char   hposm2; /* 0x06: horizontal position missile 2 */
44     unsigned char   hposm3; /* 0x07: horizontal position missile 3 */
45     unsigned char   sizep0; /* 0x08: size of player 0 */
46     unsigned char   sizep1; /* 0x09: size of player 1 */
47     unsigned char   sizep2; /* 0x0A: size of player 2 */
48     unsigned char   sizep3; /* 0x0B: size of player 3 */
49     unsigned char   sizem;  /* 0x0C: size of missiles */
50     unsigned char   grafp0; /* 0x0D: graphics shape player 0 */
51     unsigned char   grafp1; /* 0x0E: graphics shape player 1 */
52     unsigned char   grafp2; /* 0x0F: graphics shape player 2 */
53     unsigned char   grafp3; /* 0x10: graphics shape player 3 */
54     unsigned char   grafm;  /* 0x11: graphics shape missiles */
55     unsigned char   colpm0; /* 0x12: color player and missile 0 */
56     unsigned char   colpm1; /* 0x13: color player and missile 1 */
57     unsigned char   colpm2; /* 0x14: color player and missile 2 */
58     unsigned char   colpm3; /* 0x15: color player and missile 3 */
59     unsigned char   colpf0; /* 0x16: color playfield 0 */
60     unsigned char   colpf1; /* 0x17: color playfield 1 */
61     unsigned char   colpf2; /* 0x18: color playfield 2 */
62     unsigned char   colpf3; /* 0x19: color playfield 3 */
63     unsigned char   colbk;  /* 0x1A: color background */
64     unsigned char   prior;  /* 0x1B: priority selection */
65     unsigned char   vdelay; /* 0x1C: vertical delay */
66     unsigned char   gractl; /* 0x1D: stick/paddle latch, p/m control */
67     unsigned char   hitclr; /* 0x1E: clear p/m collision */
68     unsigned char   consol; /* 0x1F: builtin speaker */
69 };
70
71 /* Define a structure with the gtia register offsets */
72 struct __gtia_read {
73     unsigned char   m0pf;       /* 0x00: missile 0 to playfield collision */
74     unsigned char   m1pf;       /* 0x01: missile 1 to playfield collision */
75     unsigned char   m2pf;       /* 0x02: missile 2 to playfield collision */
76     unsigned char   m3pf;       /* 0x03: missile 3 to playfield collision */
77     unsigned char   p0pf;       /* 0x04: player 0 to playfield collision */
78     unsigned char   p1pf;       /* 0x05: player 1 to playfield collision */
79     unsigned char   p2pf;       /* 0x06: player 2 to playfield collision */
80     unsigned char   p3pf;       /* 0x07: player 3 to playfield collision */
81     unsigned char   m0pl;       /* 0x08: missile 0 to player collision */
82     unsigned char   m1pl;       /* 0x09: missile 1 to player collision */
83     unsigned char   m2pl;       /* 0x0A: missile 2 to player collision */
84     unsigned char   m3pl;       /* 0x0B: missile 3 to player collision */
85     unsigned char   p0pl;       /* 0x0C: player 0 to player collision */
86     unsigned char   p1pl;       /* 0x0D: player 1 to player collision */
87     unsigned char   p2pl;       /* 0x0E: player 2 to player collision */
88     unsigned char   p3pl;       /* 0x0F: player 3 to player collision */
89     unsigned char   trig0;      /* 0x10: joystick trigger 0 */
90     unsigned char   trig1;      /* 0x11: joystick trigger 1 */
91     unsigned char   trig2;      /* 0x12: joystick trigger 2 */
92     unsigned char   trig3;      /* 0x13: joystick trigger 3 */
93     unsigned char   pal;        /* 0x14: pal/ntsc flag */
94     unsigned char   unused[10];
95     unsigned char   consol;     /* 0x1F: console buttons */
96 };
97
98 /* End of _gtia.h */
99 #endif /* #ifndef __GTIA_H */
100