/home/mandrake/rpm/BUILD/sc68-2.2.1/io68/paulaemul.h File Reference


Detailed Description

Author:
Benjamin Gerard <ben@sashipa.com> Paula emulator (Amiga soundchip).

Date:
1998/07/18
Id
paulaemul.h,v 2.0 2003/08/21 04:58:35 benjihan Exp

About Amiga hardware registers
Amiga hardware registers could have a different address for read and write access. It is the case for DMA control register (DMACON).

Registers could be (B)yte or (W)ord wide.

SET/CLR bit
Some hardware registers work with a SET/CLEAR bit. When writing these registers the value is not copied as is. The operation depends on the value of S the most signifiant bit (#15).

Go to the source code of this file.

Data Structures

struct  paulav_t
 Paula voice information data structure. More...

Functions

Initialization functions.
unsigned int PL_sampling_rate (unsigned int f)
 Set/Get sampling rate.
int PL_reset (void)
 Paula hardware reset.
int PL_init (void)
 Paula first one first initialization.
Emulation functions
void PL_mix (u32 *b, u8 *mem68, int n)
 Execute Paula emulation.

Variables

Internal Paula emulation data.
u8 paula []
 Paula regiter data storage.
paulav_t paulav []
 Paula voices(channel) table (4 voices).
int paula_dmacon
 Shadow DMACON.
int paula_intena
 Shadow INTENA.
int paula_intreq
 Shadow INTREQ.
int paula_adkcon
 Shadow ADKCON.


Function Documentation

unsigned int PL_sampling_rate ( unsigned int  f  ) 

Set/Get sampling rate.

The PL_sampling_rate() function set Paula emulator sampling rate. f is given in hz. If f is 0 the current replay is return.

Parameters:
f sampling rate in hz (0 to get current value).
Returns:
new sampling rate

int PL_reset ( void   ) 

Paula hardware reset.

The PL_reset() reset function perform a Paula reset. It performs following operations :

Returns:
error-code (always success)

0 Success

int PL_init ( void   ) 

Paula first one first initialization.

The PL_init() must be call before all other PL functions. It performs following operations:

Returns:
error-code (always success)

0 Success

See also:
PL_reset()

void PL_mix ( u32 b,
u8 mem68,
int  n 
)

Execute Paula emulation.

The PL_mix() function processes sample mixing with current internal parameters for n samples. Mixed samples are stored in a large enough (at least n) 32 bit pcm buffer pointed by b. mem68 is a pointer to the 68K memory buffer. The Paula emulator assume that this buffer is at least the size of the Amiga "chip" RAM. This implies at leat 512Kb and PCM data must be in the first 512Kb.

Parameters:
b Pointer to destination 32-bit data buffer
mem68 Pointer to 68K memory buffer start address
n Number of sample to mix in b buffer


Variable Documentation

int paula_dmacon

Shadow DMACON.

int paula_intena

Shadow INTENA.

int paula_intreq

Shadow INTREQ.

int paula_adkcon

Shadow ADKCON.


Generated on Wed Jul 25 10:04:21 2007 for sc68fordevelopers by  doxygen 1.5.2