/tmp/BUILD/sc68-2.2.1/io68/paulaemul.h

Go to the documentation of this file.
00001 
00027 /*
00028  *
00029  * @par Register map
00030  *
00031  * @code {
00032  *
00033  * // NAME SZ  ADDR    
00034  *
00035  * VHPOSR  (B) DFF006 [xxxxxxxx] Vertical/Horizontal electron bean position.
00036  *
00037  * INTREQR (W) DFF01E [-M---DCBA--------] Interrupt request read (M=Master).
00038  * INTREQW (W) DFF09C [-M---DCBA--------] Interrupt request write (M=Master).
00039  *
00040  * INTENAR (W) DFF01C Interrupt enable read.
00041  * INTENAW (W) DFF09A Interrupt enable write.
00042  *
00043  * DMACONW (W) DFF096 [S00000E00000DBCA] DMA control register write (E=Enable).
00044  * DMACONR (W) DFF002 [000000E00000DBCA] DMA control register read (E=Enable).
00045  *
00046  * VOICEA      DFF0A0
00047  * VOICEB      DFF0B0
00048  * VOICEC      DFF0C0
00049  * VOICED      DFF0D0
00050  *
00051  * VOICEX
00052  * +0 (L) START  [00000000 00000xxx xxxxxxxx xxxxxxx0] start address (even).
00053  * +4 (W) LENGHT [xxxxxxxx xxxxxxxx] Length in word (0=010000).
00054  * +6 (W) PERIOD [0000xxxx xxxxxxxx] Period (in paula cycle).
00055  * +8 (B) VOLUME [0xxxxxxx] Volume [0-64] (presume value > 64 => 64).
00056  * }
00057  */
00058 
00059 /* Copyright (C) 1998-2001 Ben(jamin) Gerard */
00060 
00061 #ifndef _PAULA_EMUL_H_
00062 #define _PAULA_EMUL_H_
00063 
00064 #ifdef __cplusplus
00065 extern "C" {
00066 #endif
00067 
00068 #include "emu68/struct68.h"
00069 
00071 #define PAULA_VHPOSR    0x06
00072 
00086 #define PAULA_INTREQR   0x1E  
00087 #define PAULA_INTREQRH  0x1E  
00088 #define PAULA_INTREQRL  0x1F  
00090 #define PAULA_INTREQ    0x9C  
00091 #define PAULA_INTREQH   0x9C  
00092 #define PAULA_INTREQL   0x9D  
00094 #define PAULA_INTENAR   0x1C  
00095 #define PAULA_INTENARH  0x1C  
00096 #define PAULA_INTENARL  0x1D  
00098 #define PAULA_INTENA    0x9A  
00099 #define PAULA_INTENAH   0x9A  
00100 #define PAULA_INTENAL   0x9B  
00116 #define PAULA_DMACONR   0x02  
00117 #define PAULA_DMACONRH  0x02  
00118 #define PAULA_DMACONRL  0x03  
00120 #define PAULA_DMACON    0x96  
00121 #define PAULA_DMACONH   0x96  
00122 #define PAULA_DMACONL   0x97  
00145 #define PAULA_ADKCON    0x9E  
00146 #define PAULA_ADKCONR   0x10  
00147 #define PAULA_ADKCONRH  0x10
00148 #define PAULA_ADKCONRL  0x11
00149 
00155 #define PAULA_VOICE(I) ((0xA+(I))<<4) 
00156 #define PAULA_VOICEA   0xA0           
00157 #define PAULA_VOICEB   0xB0           
00158 #define PAULA_VOICEC   0xC0           
00159 #define PAULA_VOICED   0xD0           
00166 #define PAULA_PER 2.79365E-7      
00167 #define PAULA_FRQ 3579610.53837   
00172 #define PAULA_CT_FIX            13
00173 
00179 typedef struct
00180 {
00181   u32 adr;   
00182   u32 start; 
00183   u32 end;   
00185 /*  int v[16]; //$$$ */
00186 
00187 } paulav_t;
00188 
00189 extern u8 paula[];        
00190 extern paulav_t paulav[]; 
00191 extern int paula_dmacon;  
00192 extern int paula_intena;  
00193 extern int paula_intreq;  
00194 extern int paula_adkcon;  
00212 unsigned int PL_sampling_rate(unsigned int f);
00213 
00228 int PL_reset(void);
00229 
00243 int PL_init(void);
00244 
00266 void PL_mix(u32 *b, u8 *mem68, int n);
00267 
00271 #ifdef __cplusplus
00272 }
00273 #endif
00274 
00275 #endif /* #ifndef _PAULA_EMUL_H_ */

Generated on Thu Jul 20 15:04:56 2006 for sc68fordevelopers by  doxygen 1.4.7