Have OPN* platforms set the correct YM2149 chip type.

They were setting the Sunsoft type, which doubled the frequency division since c5c612c354.
This commit is contained in:
Laurens Holst 2022-05-15 20:35:21 +02:00
parent c5c612c354
commit a292bc109d
4 changed files with 9 additions and 9 deletions

View file

@ -1057,19 +1057,19 @@ void DivPlatformYM2203::setSkipRegisterWrites(bool value) {
} }
void DivPlatformYM2203::setFlags(unsigned int flags) { void DivPlatformYM2203::setFlags(unsigned int flags) {
unsigned char ayFlags=32; unsigned char ayFlags=16;
if (flags==3) { if (flags==3) {
chipClock=3000000.0; chipClock=3000000.0;
ayFlags=36; ayFlags=20;
} else if (flags==2) { } else if (flags==2) {
chipClock=4000000.0; chipClock=4000000.0;
ayFlags=35; ayFlags=19;
} else if (flags==1) { } else if (flags==1) {
chipClock=COLOR_PAL*4.0/5.0; chipClock=COLOR_PAL*4.0/5.0;
ayFlags=33; ayFlags=17;
} else { } else {
chipClock=COLOR_NTSC; chipClock=COLOR_NTSC;
ayFlags=32; ayFlags=16;
} }
ay->setFlags(ayFlags); ay->setFlags(ayFlags);
rate=fm->sample_rate(chipClock); rate=fm->sample_rate(chipClock);
@ -1090,7 +1090,7 @@ int DivPlatformYM2203::init(DivEngine* p, int channels, int sugRate, unsigned in
fm->set_fidelity(ymfm::OPN_FIDELITY_MIN); fm->set_fidelity(ymfm::OPN_FIDELITY_MIN);
// YM2149, 2MHz // YM2149, 2MHz
ay=new DivPlatformAY8910; ay=new DivPlatformAY8910;
ay->init(p,3,sugRate,35); ay->init(p,3,sugRate,19);
ay->toggleRegisterDump(true); ay->toggleRegisterDump(true);
setFlags(flags); setFlags(flags);

View file

@ -1459,7 +1459,7 @@ int DivPlatformYM2608::init(DivEngine* p, int channels, int sugRate, unsigned in
} }
// YM2149, 2MHz // YM2149, 2MHz
ay=new DivPlatformAY8910; ay=new DivPlatformAY8910;
ay->init(p,3,sugRate,35); ay->init(p,3,sugRate,19);
ay->toggleRegisterDump(true); ay->toggleRegisterDump(true);
reset(); reset();
return 16; return 16;

View file

@ -1454,7 +1454,7 @@ int DivPlatformYM2610::init(DivEngine* p, int channels, int sugRate, unsigned in
fm=new ymfm::ym2610(iface); fm=new ymfm::ym2610(iface);
// YM2149, 2MHz // YM2149, 2MHz
ay=new DivPlatformAY8910; ay=new DivPlatformAY8910;
ay->init(p,3,sugRate,35); ay->init(p,3,sugRate,19);
ay->toggleRegisterDump(true); ay->toggleRegisterDump(true);
reset(); reset();
return 14; return 14;

View file

@ -1432,7 +1432,7 @@ int DivPlatformYM2610B::init(DivEngine* p, int channels, int sugRate, unsigned i
fm=new ymfm::ym2610b(iface); fm=new ymfm::ym2610b(iface);
// YM2149, 2MHz // YM2149, 2MHz
ay=new DivPlatformAY8910; ay=new DivPlatformAY8910;
ay->init(p,3,sugRate,35); ay->init(p,3,sugRate,19);
ay->toggleRegisterDump(true); ay->toggleRegisterDump(true);
reset(); reset();
return 16; return 16;