X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Pico%2Fsound%2Fym2612.h;h=a1124de4df2b618d40713f335ed3a48ca856d150;hb=4936aac1cac5db9c8a0bec2d743d05be5c799f1f;hp=e87cbc1b94805a0bdd717fe1fe04fe49630a0621;hpb=b542be4686241c9e0722ff8e452980f9ac2b4d7c;p=picodrive.git diff --git a/Pico/sound/ym2612.h b/Pico/sound/ym2612.h index e87cbc1..a1124de 100644 --- a/Pico/sound/ym2612.h +++ b/Pico/sound/ym2612.h @@ -141,35 +141,16 @@ typedef struct } YM2612; #endif -extern int *ym2612_dacen; -extern INT32 *ym2612_dacout; -extern FM_ST *ym2612_st; - - -#define YM2612Read() ym2612_st->status - -#define YM2612PicoTick(n) \ -{ \ - /* timer A */ \ - if(ym2612_st->mode & 0x01 && (ym2612_st->TAT+=64*n) >= ym2612_st->TAC) { \ - ym2612_st->TAT -= ym2612_st->TAC; \ - if(ym2612_st->mode & 0x04) ym2612_st->status |= 1; \ - } \ - \ - /* timer B */ \ - if(ym2612_st->mode & 0x02 && (ym2612_st->TBT+=64*n) >= ym2612_st->TBC) { \ - ym2612_st->TBT -= ym2612_st->TBC; \ - if(ym2612_st->mode & 0x08) ym2612_st->status |= 2; \ - } \ -} - +#ifndef EXTERNAL_YM2612 +extern YM2612 ym2612; +#endif void YM2612Init_(int baseclock, int rate); void YM2612ResetChip_(void); int YM2612UpdateOne_(int *buffer, int length, int stereo, int is_buf_empty); int YM2612Write_(unsigned int a, unsigned int v); -unsigned char YM2612Read_(void); +//unsigned char YM2612Read_(void); int YM2612PicoTick_(int n); void YM2612PicoStateLoad_(void); @@ -180,7 +161,6 @@ void *YM2612GetRegs(void); #define YM2612Init YM2612Init_ #define YM2612ResetChip YM2612ResetChip_ #define YM2612UpdateOne YM2612UpdateOne_ -#define YM2612Write YM2612Write_ #define YM2612PicoStateLoad YM2612PicoStateLoad_ #else /* GP2X specific */ @@ -197,8 +177,6 @@ extern int PicoOpt; #define YM2612UpdateOne(buffer,length,stereo,is_buf_empty) \ (PicoOpt&0x200) ? YM2612UpdateOne_940(buffer, length, stereo, is_buf_empty) : \ YM2612UpdateOne_(buffer, length, stereo, is_buf_empty); -#define YM2612Write(a,v) \ - (PicoOpt&0x200) ? YM2612Write_940(a, v) : YM2612Write_(a, v) #define YM2612PicoStateLoad() { \ if (PicoOpt&0x200) YM2612PicoStateLoad_940(); \ else YM2612PicoStateLoad_(); \