mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 07:17:45 -04:00
clean up dac code a bit
This commit is contained in:
parent
e23f4494fb
commit
4f2cdbf551
7 changed files with 62 additions and 81 deletions
|
@ -932,7 +932,7 @@ static int ym2612_write_local(u32 a, u32 d, int is_from_z80)
|
|||
int scanline = get_scanline(is_from_z80);
|
||||
//elprintf(EL_STATUS, "%03i -> %03i dac w %08x z80 %i", PsndDacLine, scanline, d, is_from_z80);
|
||||
ym2612.dacout = ((int)d - 0x80) << 6;
|
||||
if (PsndOut && ym2612.dacen && scanline >= PsndDacLine)
|
||||
if (ym2612.dacen)
|
||||
PsndDoDAC(scanline);
|
||||
return 0;
|
||||
}
|
||||
|
@ -1016,8 +1016,10 @@ static int ym2612_write_local(u32 a, u32 d, int is_from_z80)
|
|||
}
|
||||
case 0x2b: { /* DAC Sel (YM2612) */
|
||||
int scanline = get_scanline(is_from_z80);
|
||||
ym2612.dacen = d & 0x80;
|
||||
if (d & 0x80) PsndDacLine = scanline;
|
||||
if (ym2612.dacen != (d & 0x80)) {
|
||||
ym2612.dacen = d & 0x80;
|
||||
PsndDacLine = scanline;
|
||||
}
|
||||
#ifdef __GP2X__
|
||||
if (PicoOpt & POPT_EXT_FM) YM2612Write_940(a, d, scanline);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue