#include <stdint.h>
#include <string.h>
#include "system.h"
#include "sn76496.h"
#include "sn76496u.c"
Classes | |
struct | SN76496 |
Macros | |
#define | MAX_OUTPUT 0x7fff |
#define | AUDIO_CONV(A) (A) |
#define | STEP 0x10000 |
#define | FB_WNOISE 0x12000 /* bit15.d(16bits) = bit0(out) ^ bit2 */ |
#define | FB_PNOISE 0x08000 /* JH 981127 - fixes Do Run Run */ |
#define | NG_PRESET 0x0f35 |
#define | DATATYPE unsigned char |
#define | DATACONV(A) AUDIO_CONV((A) / (STEP * 256)) |
#define | DATATYPE unsigned short |
#define | DATACONV(A) ((A) / STEP) |
Functions | |
void | SN76496_dump (int chip, uint8_t buf[16]) |
void | SN76496_restore (int chip, uint8_t buf[16]) |
void | SN76496Write (int chip, int data) |
void | SN76496_0_w (int offset, int data) |
void | SN76496_1_w (int offset, int data) |
void | SN76496_2_w (int offset, int data) |
void | SN76496_3_w (int offset, int data) |
void | SN76496Update_8_2 (int chip, void *buffer, int length) |
void | SN76496Update_16_2 (int chip, void *buffer, int length) |
void | SN76496_set_clock (int chip, int clock) |
static void | SN76496_set_volume (int chip, int volume, int gain) |
int | SN76496_init (int chip, int clock, int sample_rate, int sample_bits) |
int | SN76496_sh_start () |
Variables | |
static struct SN76496 | sn [MAX_76496] |
#define AUDIO_CONV | ( | A | ) | (A) |
#define DATACONV | ( | A | ) | AUDIO_CONV((A) / (STEP * 256)) |
#define DATACONV | ( | A | ) | ((A) / STEP) |
#define DATATYPE unsigned char |
#define DATATYPE unsigned short |
#define FB_PNOISE 0x08000 /* JH 981127 - fixes Do Run Run */ |
#define FB_WNOISE 0x12000 /* bit15.d(16bits) = bit0(out) ^ bit2 */ |
#define MAX_OUTPUT 0x7fff |
#define NG_PRESET 0x0f35 |
#define STEP 0x10000 |
void SN76496_0_w | ( | int | offset, |
int | data | ||
) |
void SN76496_1_w | ( | int | offset, |
int | data | ||
) |
void SN76496_2_w | ( | int | offset, |
int | data | ||
) |
void SN76496_3_w | ( | int | offset, |
int | data | ||
) |
void SN76496_dump | ( | int | chip, |
uint8_t | buf[16] | ||
) |
int SN76496_init | ( | int | chip, |
int | clock, | ||
int | sample_rate, | ||
int | sample_bits | ||
) |
void SN76496_restore | ( | int | chip, |
uint8_t | buf[16] | ||
) |
void SN76496_set_clock | ( | int | chip, |
int | clock | ||
) |
|
static |
int SN76496_sh_start | ( | ) |
void SN76496Update_16_2 | ( | int | chip, |
void * | buffer, | ||
int | length | ||
) |
void SN76496Update_8_2 | ( | int | chip, |
void * | buffer, | ||
int | length | ||
) |
void SN76496Write | ( | int | chip, |
int | data | ||
) |