]> git.sur5r.net Git - cc65/blob - include/_pokey.h
a6a0338f8e5ef44742ce6a302cb2ef7f34fd65b7
[cc65] / include / _pokey.h
1 /*****************************************************************************/
2 /*                                                                           */
3 /*                                 _pokey.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
33 #ifndef __POKEY_H
34 #define __POKEY_H
35
36
37
38 /* Define a structure with the pokey register offsets */
39 struct __pokey_write {
40     unsigned char   audf1;  /* audio channel #1 frequency */
41     unsigned char   audc1;  /* audio channel #1 control */
42     unsigned char   audf2;  /* audio channel #2 frequency */
43     unsigned char   audc2;  /* audio channel #2 control */
44     unsigned char   audf3;  /* audio channel #3 frequency */
45     unsigned char   audc3;  /* audio channel #3 control */
46     unsigned char   audf4;  /* audio channel #4 frequency */
47     unsigned char   audc4;  /* audio channel #4 control */
48     unsigned char   audctl; /* audio control */
49     unsigned char   stimer; /* start pokey timers */
50     unsigned char   skrest; /* reset serial port status reg. */
51     unsigned char   potgo;  /* start paddle scan sequence */
52     unsigned char   unuse1; /* unused */
53     unsigned char   serout; /* serial port data output */
54     unsigned char   irqen;  /* interrupt request enable */
55     unsigned char   skctl;  /* serial port control */
56 };
57 struct __pokey_read {
58     unsigned char   pot0;   /* paddle 0 value */
59     unsigned char   pot1;   /* paddle 1 value */
60     unsigned char   pot2;   /* paddle 2 value */
61     unsigned char   pot3;   /* paddle 3 value */
62     unsigned char   pot4;   /* paddle 4 value */
63     unsigned char   pot5;   /* paddle 5 value */
64     unsigned char   pot6;   /* paddle 6 value */
65     unsigned char   pot7;   /* paddle 7 value */
66     unsigned char   allpot; /* eight paddle port status */
67     unsigned char   kbcode; /* keyboard code */
68     unsigned char   random; /* random number generator */
69     unsigned char   unuse2; /* unused */
70     unsigned char   unuse3; /* unused */
71     unsigned char   serin;  /* serial port input */
72     unsigned char   irqst;  /* interrupt request status */
73     unsigned char   skstat; /* serial port status */
74 };
75
76 /* End of _pokey.h */
77 #endif /* #ifndef __POKEY_H */
78