mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
cd: rewrite pcm
This commit is contained in:
parent
d0132772f7
commit
33be04ca5f
7 changed files with 171 additions and 160 deletions
|
@ -378,13 +378,15 @@ struct PicoSRAM
|
|||
#include "cd/LC89510.h"
|
||||
#include "cd/gfx_cd.h"
|
||||
|
||||
#define PCM_MIXBUF_LEN ((12500000 / 384) / 50 + 1)
|
||||
|
||||
struct mcd_pcm
|
||||
{
|
||||
unsigned char control; // reg7
|
||||
unsigned char enabled; // reg8
|
||||
unsigned char cur_ch;
|
||||
unsigned char bank;
|
||||
int pad1;
|
||||
unsigned int update_cycles;
|
||||
|
||||
struct pcm_chan // 08, size 0x10
|
||||
{
|
||||
|
@ -445,6 +447,9 @@ typedef struct
|
|||
CDC cdc;
|
||||
_scd scd;
|
||||
Rot_Comp rot_comp;
|
||||
int pcm_mixbuf[PCM_MIXBUF_LEN * 2];
|
||||
int pcm_mixpos;
|
||||
int pcm_mixbuf_dirty;
|
||||
} mcd_state;
|
||||
|
||||
// XXX: this will need to be reworked for cart+cd support.
|
||||
|
@ -656,6 +661,12 @@ void pcd_run_cpus(int m68k_cycles);
|
|||
void pcd_soft_reset(void);
|
||||
void pcd_state_loaded(void);
|
||||
|
||||
// cd/pcm.c
|
||||
void pcd_pcm_sync(unsigned int to);
|
||||
void pcd_pcm_update(int *buffer, int length, int stereo);
|
||||
void pcd_pcm_write(unsigned int a, unsigned int d);
|
||||
unsigned int pcd_pcm_read(unsigned int a);
|
||||
|
||||
// pico/pico.c
|
||||
PICO_INTERNAL void PicoInitPico(void);
|
||||
PICO_INTERNAL void PicoReratePico(void);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue