AY: fix clockSel on non-YM2149

This commit is contained in:
tildearrow 2024-03-05 05:08:42 -05:00
parent 2d48390eab
commit a200d464a6

View file

@ -818,7 +818,6 @@ void DivPlatformAY8910::setFlags(const DivConfig& flags) {
clockSel=false; clockSel=false;
dacRate=chipClock/dacRateDiv; dacRate=chipClock/dacRateDiv;
} else { } else {
clockSel=flags.getBool("halfClock",false);
switch (flags.getInt("clockSel",0)) { switch (flags.getInt("clockSel",0)) {
case 1: case 1:
chipClock=COLOR_PAL*2.0/5.0; chipClock=COLOR_PAL*2.0/5.0;
@ -883,21 +882,25 @@ void DivPlatformAY8910::setFlags(const DivConfig& flags) {
ay=new ym2149_device(rate,clockSel); ay=new ym2149_device(rate,clockSel);
sunsoft=false; sunsoft=false;
intellivision=false; intellivision=false;
clockSel=flags.getBool("halfClock",false);
break; break;
case 2: case 2:
ay=new sunsoft_5b_sound_device(rate); ay=new sunsoft_5b_sound_device(rate);
sunsoft=true; sunsoft=true;
intellivision=false; intellivision=false;
clockSel=false;
break; break;
case 3: case 3:
ay=new ay8914_device(rate); ay=new ay8914_device(rate);
sunsoft=false; sunsoft=false;
intellivision=true; intellivision=true;
clockSel=false;
break; break;
default: default:
ay=new ay8910_device(rate); ay=new ay8910_device(rate);
sunsoft=false; sunsoft=false;
intellivision=false; intellivision=false;
clockSel=false;
break; break;
} }
ay->device_start(); ay->device_start();