sc68fordevelopers  2.2.1
paulaemul.h
Go to the documentation of this file.
1 
27 /*
28  *
29  * @par Register map
30  *
31  * @code {
32  *
33  * // NAME SZ ADDR
34  *
35  * VHPOSR (B) DFF006 [xxxxxxxx] Vertical/Horizontal electron bean position.
36  *
37  * INTREQR (W) DFF01E [-M---DCBA--------] Interrupt request read (M=Master).
38  * INTREQW (W) DFF09C [-M---DCBA--------] Interrupt request write (M=Master).
39  *
40  * INTENAR (W) DFF01C Interrupt enable read.
41  * INTENAW (W) DFF09A Interrupt enable write.
42  *
43  * DMACONW (W) DFF096 [S00000E00000DBCA] DMA control register write (E=Enable).
44  * DMACONR (W) DFF002 [000000E00000DBCA] DMA control register read (E=Enable).
45  *
46  * VOICEA DFF0A0
47  * VOICEB DFF0B0
48  * VOICEC DFF0C0
49  * VOICED DFF0D0
50  *
51  * VOICEX
52  * +0 (L) START [00000000 00000xxx xxxxxxxx xxxxxxx0] start address (even).
53  * +4 (W) LENGHT [xxxxxxxx xxxxxxxx] Length in word (0=010000).
54  * +6 (W) PERIOD [0000xxxx xxxxxxxx] Period (in paula cycle).
55  * +8 (B) VOLUME [0xxxxxxx] Volume [0-64] (presume value > 64 => 64).
56  * }
57  */
58 
59 /* Copyright (C) 1998-2001 Ben(jamin) Gerard */
60 
61 #ifndef _PAULA_EMUL_H_
62 #define _PAULA_EMUL_H_
63 
64 #ifdef __cplusplus
65 extern "C" {
66 #endif
67 
68 #include "emu68/struct68.h"
69 
71 #define PAULA_VHPOSR 0x06
72 
86 #define PAULA_INTREQR 0x1E
87 #define PAULA_INTREQRH 0x1E
88 #define PAULA_INTREQRL 0x1F
90 #define PAULA_INTREQ 0x9C
91 #define PAULA_INTREQH 0x9C
92 #define PAULA_INTREQL 0x9D
94 #define PAULA_INTENAR 0x1C
95 #define PAULA_INTENARH 0x1C
96 #define PAULA_INTENARL 0x1D
98 #define PAULA_INTENA 0x9A
99 #define PAULA_INTENAH 0x9A
100 #define PAULA_INTENAL 0x9B
116 #define PAULA_DMACONR 0x02
117 #define PAULA_DMACONRH 0x02
118 #define PAULA_DMACONRL 0x03
120 #define PAULA_DMACON 0x96
121 #define PAULA_DMACONH 0x96
122 #define PAULA_DMACONL 0x97
145 #define PAULA_ADKCON 0x9E
146 #define PAULA_ADKCONR 0x10
147 #define PAULA_ADKCONRH 0x10
148 #define PAULA_ADKCONRL 0x11
149 
155 #define PAULA_VOICE(I) ((0xA+(I))<<4)
156 #define PAULA_VOICEA 0xA0
157 #define PAULA_VOICEB 0xB0
158 #define PAULA_VOICEC 0xC0
159 #define PAULA_VOICED 0xD0
166 #define PAULA_PER 2.79365E-7
167 #define PAULA_FRQ 3579610.53837
172 #define PAULA_CT_FIX 13
173 
179 typedef struct
180 {
185 /* int v[16]; //$$$ */
186 
187 } paulav_t;
188 
189 extern u8 paula[];
190 extern paulav_t paulav[];
191 extern int paula_dmacon;
192 extern int paula_intena;
193 extern int paula_intreq;
194 extern int paula_adkcon;
212 unsigned int PL_sampling_rate(unsigned int f);
213 
228 int PL_reset(void);
229 
243 int PL_init(void);
244 
266 void PL_mix(u32 *b, u8 *mem68, int n);
267 
271 #ifdef __cplusplus
272 }
273 #endif
274 
275 #endif /* #ifndef _PAULA_EMUL_H_ */
int paula_intena
Shadow INTENA.
Struture definitions.
void PL_mix(u32 *b, u8 *mem68, int n)
Execute Paula emulation.
unsigned int u32
Must be an unsigned 32 bit integer.
Definition: type68.h:37
u32 end
end address (<
Definition: paulaemul.h:183
int PL_init(void)
Paula first one first initialization.
u32 start
loop address
Definition: paulaemul.h:182
unsigned char u8
Must be an unsigned 8 bit integer.
Definition: type68.h:31
Paula voice information data structure.
Definition: paulaemul.h:179
int PL_reset(void)
Paula hardware reset.
int paula_dmacon
Shadow DMACON.
u32 adr
current sample counter (<
Definition: paulaemul.h:181
int paula_intreq
Shadow INTREQ.
paulav_t paulav[]
Paula voices(channel) table (4 voices)
int paula_adkcon
Shadow ADKCON.
unsigned int PL_sampling_rate(unsigned int f)
Set/Get sampling rate.
u8 paula[]
Paula regiter data storage.