sc68fordevelopers
2.2.1
|
MicroWire - STE sound emulator. More...
#include "emu68/type68.h"
Go to the source code of this file.
Defines | |
Micro-Wire registers. | |
#define | MW_ACTI 0x01 |
Microwire enabled. | |
#define | MW_BASH 0x03 |
Microwire sample start address, bit 16-23. | |
#define | MW_BASM (MW_BASH+2) |
Microwire sample start address, bit 8-15. | |
#define | MW_BASL (MW_BASH+4) |
Microwire sample start address, bit 0-7. | |
#define | MW_CTH 0x09 |
Microwire sample counter, bit 16-23. | |
#define | MW_CTM (MW_CTH+2) |
Microwire sample counter, bit 8-15. | |
#define | MW_CTL (MW_CTH+4) |
Microwire sample counter, bit 0-7. | |
#define | MW_ENDH 0x0f |
Microwire sample end address, bit 16-23. | |
#define | MW_ENDM (MW_ENDH+2) |
Microwire sample end address, bit 8-15. | |
#define | MW_ENDL (MW_ENDH+4) |
Microwire sample end address, bit 0-7. | |
#define | MW_MODE 0x21 |
Microwire playing mode. | |
#define | MW_DATA 0x22 |
Microwire data register. | |
#define | MW_CTRL 0x24 |
Microwire control register. | |
Functions | |
Initialization functions. | |
unsigned int | MW_sampling_rate (unsigned int f) |
Set/Get sampling rate. | |
int | MW_reset (void) |
Micro-Wire hardware reset. | |
int | MW_init (void) |
Micro-Wire first one first initialization. | |
Emulation functions. | |
void | MW_mix (u32 *b, const u8 *mem68, int n) |
Execute Micro-Wire emulation. | |
Micro-Wire LMC control functions. | |
void | MW_set_LMC_mixer (unsigned int n) |
Set LMC mixer type. | |
void | MW_set_LMC_master (unsigned int n) |
Set LMC master volume. | |
void | MW_set_LMC_left (unsigned int n) |
Set LMC left channel volume. | |
void | MW_set_LMC_right (unsigned int n) |
Set LMC right channel volume. | |
void | MW_set_LMC_high (unsigned int n) |
Set high pass filter. | |
void | MW_set_LMC_low (unsigned int n) |
Set low pass filter. | |
Variables | |
Micro-Wire internal data. | |
u8 | mw [0x40] |
Micro-Wire register array. | |
u32 | mw_ct |
DMA current location (8 bit fixed point). | |
u32 | mw_end |
DMA end point location (8 bit fixed point). |
unsigned int MW_sampling_rate | ( | unsigned int | f | ) |
Set/Get sampling rate.
The MW_sampling_rate() function set Micro-Wire emulator sampling rate. f is given in hz. If f is 0 the current replay is return.
f | sampling rate in hz (0 to get current value). |
int MW_reset | ( | void | ) |
Micro-Wire hardware reset.
The MW_reset() reset function perform a Micro-Wire reset. It performs following operations :
0 | Success |
int MW_init | ( | void | ) |
Micro-Wire first one first initialization.
The MW_init() must be call before all other PL functions. It performs following operations.
0 | Success |
Execute Micro-Wire emulation.
The MW_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 buffer pointed by b. This buffer have to be previously filled with the YM-2149 samples. Typically it is the YM-2149 emulator output buffer. This allows Micro-Wire emulator to honnor the LMC mixer mode.iven LMC mode. This porocess include the mono to stereo expansion. The mem68 starting pointer locates the 68K memory buffer where samples are stored to allow DMA fetch emulation.
b | Pointer to YM-2149 source sample directly used for Micro-Wire output mixing. |
mem68 | Pointer to 68K memory buffer start address |
n | Number of sample to mix in b buffer |
void MW_set_LMC_mixer | ( | unsigned int | n | ) |
Set LMC mixer type.
The MW_set_LMC_mixer() function choose the mixer mode :
n | New mixer mode (see above) |
void MW_set_LMC_master | ( | unsigned int | n | ) |
Set LMC master volume.
n | New volume in range [0..40]=>[-80Db..0Db] |
void MW_set_LMC_left | ( | unsigned int | n | ) |
Set LMC left channel volume.
Set LMC left channel volume in decibel.
n | New volume in range [0..20]=>[-40Db..0Db] |
void MW_set_LMC_right | ( | unsigned int | n | ) |
Set LMC right channel volume.
n | New volume in range [0..20]=>[-40Db..0Db] |
void MW_set_LMC_high | ( | unsigned int | n | ) |
Set high pass filter.
n | New high pass filter [0..12]=>[-12Db..0Db] |
void MW_set_LMC_low | ( | unsigned int | n | ) |
Set low pass filter.
n | New low pass filter [0..12]=>[-12Db..0Db] |