\r
static void dac_recalculate(void)\r
{\r
- int i, dac_cnt, pos, len, lines = Pico.m.pal ? 312 : 262, mid = Pico.m.pal ? 68 : 93;\r
+ int i, dac_cnt, pos, len, lines = Pico.m.pal ? 313 : 262, mid = Pico.m.pal ? 68 : 93;\r
\r
if (PsndLen <= lines)\r
{\r
PsndClear();\r
\r
// set mixer\r
- PsndMix_32_to_16l = (PicoOpt & POPT_EN_STEREO) ? mix_32_to_16l_stereo : mix_32_to_16_mono;\r
+ PsndMix_32_to_16l = (PicoIn.opt & POPT_EN_STEREO) ? mix_32_to_16l_stereo : mix_32_to_16_mono;\r
\r
- if (PicoAHW & PAHW_PICO)\r
+ if (PicoIn.AHW & PAHW_PICO)\r
PicoReratePico();\r
}\r
\r
}\r
\r
PsndDacLine = PsndPsgLine = 0;\r
- emustatus &= ~1;\r
+ Pico.m.status &= ~1;\r
dac_info[224] = PsndLen_use;\r
}\r
\r
int dout = ym2612.dacout;\r
int line_from = PsndDacLine;\r
\r
- if (line_to >= 312)\r
- line_to = 311;\r
+ if (line_to >= 313)\r
+ line_to = 312;\r
\r
pos = dac_info[line_from];\r
pos1 = dac_info[line_to + 1];\r
if (!PsndOut)\r
return;\r
\r
- if (PicoOpt & POPT_EN_STEREO) {\r
+ if (PicoIn.opt & POPT_EN_STEREO) {\r
short *d = PsndOut + pos*2;\r
for (; len > 0; len--, d+=2) *d += dout;\r
} else {\r
int pos, pos1, len;\r
int stereo = 0;\r
\r
- if (line_to >= 312)\r
- line_to = 311;\r
+ if (line_to >= 313)\r
+ line_to = 312;\r
\r
pos = dac_info[line_from];\r
pos1 = dac_info[line_to + 1];\r
\r
PsndPsgLine = line_to + 1;\r
\r
- if (!PsndOut || !(PicoOpt & POPT_EN_PSG))\r
+ if (!PsndOut || !(PicoIn.opt & POPT_EN_PSG))\r
return;\r
\r
- if (PicoOpt & POPT_EN_STEREO) {\r
+ if (PicoIn.opt & POPT_EN_STEREO) {\r
stereo = 1;\r
pos <<= 1;\r
}\r
{\r
int len = PsndLen;\r
if (PsndLen_exc_add) len++;\r
- if (PicoOpt & POPT_EN_STEREO)\r
+ if (PicoIn.opt & POPT_EN_STEREO)\r
memset32((int *) PsndOut, 0, len); // assume PsndOut to be aligned\r
else {\r
short *out = PsndOut;\r
{\r
int buf32_updated = 0;\r
int *buf32 = PsndBuffer+offset;\r
- int stereo = (PicoOpt & 8) >> 3;\r
+ int stereo = (PicoIn.opt & 8) >> 3;\r
\r
offset <<= stereo;\r
\r
pprof_start(sound);\r
\r
- if (PicoAHW & PAHW_PICO) {\r
+ if (PicoIn.AHW & PAHW_PICO) {\r
PicoPicoPCMUpdate(PsndOut+offset, length, stereo);\r
return length;\r
}\r
\r
// Add in the stereo FM buffer\r
- if (PicoOpt & POPT_EN_FM) {\r
+ if (PicoIn.opt & POPT_EN_FM) {\r
buf32_updated = YM2612UpdateOne(buf32, length, stereo, 1);\r
} else\r
memset32(buf32, 0, length<<stereo);\r
(void)buf32_updated;\r
\r
// CD: PCM sound\r
- if (PicoAHW & PAHW_MCD) {\r
+ if (PicoIn.AHW & PAHW_MCD) {\r
pcd_pcm_update(buf32, length, stereo);\r
//buf32_updated = 1;\r
}\r
\r
// CD: CDDA audio\r
// CD mode, cdda enabled, not data track, CDC is reading\r
- if ((PicoAHW & PAHW_MCD) && (PicoOpt & POPT_EN_MCD_CDDA)\r
+ if ((PicoIn.AHW & PAHW_MCD) && (PicoIn.opt & POPT_EN_MCD_CDDA)\r
&& Pico_mcd->cdda_stream != NULL\r
&& !(Pico_mcd->s68k_regs[0x36] & 1))\r
{\r
cdda_raw_update(buf32, length);\r
}\r
\r
- if ((PicoAHW & PAHW_32X) && (PicoOpt & POPT_EN_PWM))\r
+ if ((PicoIn.AHW & PAHW_32X) && (PicoIn.opt & POPT_EN_PWM))\r
p32x_pwm_update(buf32, length, stereo);\r
\r
// convert + limit to normal 16bit output\r
\r
if (y == 224)\r
{\r
- if (emustatus & 2)\r
+ if (Pico.m.status & 2)\r
curr_pos += PsndRender(curr_pos, PsndLen-PsndLen/2);\r
else curr_pos = PsndRender(0, PsndLen_use);\r
- if (emustatus & 1)\r
- emustatus |= 2;\r
- else emustatus &= ~2;\r
+ if (Pico.m.status & 1)\r
+ Pico.m.status |= 2;\r
+ else Pico.m.status &= ~2;\r
if (PicoWriteSound)\r
- PicoWriteSound(curr_pos * ((PicoOpt & POPT_EN_STEREO) ? 4 : 2));\r
+ PicoWriteSound(curr_pos * ((PicoIn.opt & POPT_EN_STEREO) ? 4 : 2));\r
// clear sound buffer\r
PsndClear();\r
PsndDacLine = 224;\r
dac_info[224] = 0;\r
}\r
- else if (emustatus & 3) {\r
- emustatus|= 2;\r
- emustatus&=~1;\r
+ else if (Pico.m.status & 3) {\r
+ Pico.m.status |= 2;\r
+ Pico.m.status &= ~1;\r
curr_pos = PsndRender(0, PsndLen/2);\r
}\r
}\r
\r
PICO_INTERNAL void PsndGetSamplesMS(void)\r
{\r
- int stereo = (PicoOpt & 8) >> 3;\r
+ int stereo = (PicoIn.opt & 8) >> 3;\r
int length = PsndLen_use;\r
\r
// PSG\r
- if (PicoOpt & POPT_EN_PSG)\r
+ if (PicoIn.opt & POPT_EN_PSG)\r
SN76496Update(PsndOut, length, stereo);\r
\r
// upmix to "stereo" if needed\r
}\r
\r
if (PicoWriteSound != NULL)\r
- PicoWriteSound(length * ((PicoOpt & POPT_EN_STEREO) ? 4 : 2));\r
+ PicoWriteSound(length * ((PicoIn.opt & POPT_EN_STEREO) ? 4 : 2));\r
PsndClear();\r
}\r
\r