YM2612: CSM without DualPCM

This commit is contained in:
tildearrow 2022-12-23 19:26:42 -05:00
parent dff3ddeb3a
commit 37dbc52a68
5 changed files with 15 additions and 2 deletions

View file

@ -201,6 +201,12 @@ void DivDispatchContainer::init(DivSystem sys, DivEngine* eng, int chanCount, do
((DivPlatformGenesisExt*)dispatch)->setYMFM(eng->getConfInt("ym2612Core",0));
((DivPlatformGenesisExt*)dispatch)->setSoftPCM(false);
break;
case DIV_SYSTEM_YM2612_CSM:
dispatch=new DivPlatformGenesisExt;
((DivPlatformGenesisExt*)dispatch)->setYMFM(eng->getConfInt("ym2612Core",0));
((DivPlatformGenesisExt*)dispatch)->setSoftPCM(false);
((DivPlatformGenesisExt*)dispatch)->setCSMChannel(6);
break;
case DIV_SYSTEM_YM2612_DUALPCM:
dispatch=new DivPlatformGenesis;
((DivPlatformGenesis*)dispatch)->setYMFM(eng->getConfInt("ym2612Core",0));

View file

@ -479,7 +479,7 @@ void DivPlatformGenesis::tick(bool sysTick) {
}
}
for (int i=0; i<7; i++) {
for (int i=0; i<csmChan; i++) {
if (i==2 && extMode) continue;
if (chan[i].freqChanged) {
if (parent->song.linearPitch==2) {
@ -1217,7 +1217,7 @@ void DivPlatformGenesis::poke(std::vector<DivRegWrite>& wlist) {
}
int DivPlatformGenesis::getPortaFloor(int ch) {
return (ch>5)?12:0;
return 0;
}
void DivPlatformGenesis::setYMFM(bool use) {

View file

@ -746,6 +746,10 @@ int DivPlatformGenesisExt::getPortaFloor(int ch) {
return (ch>8)?12:0;
}
void DivPlatformGenesisExt::setCSMChannel(unsigned char ch) {
csmChan=ch;
}
int DivPlatformGenesisExt::init(DivEngine* parent, int channels, int sugRate, const DivConfig& flags) {
DivPlatformGenesis::init(parent,channels,sugRate,flags);
for (int i=0; i<4; i++) {

View file

@ -42,6 +42,7 @@ class DivPlatformGenesisExt: public DivPlatformGenesis {
bool keyOffAffectsPorta(int ch);
void notifyInsChange(int ins);
int getPortaFloor(int ch);
void setCSMChannel(unsigned char ch);
int init(DivEngine* parent, int channels, int sugRate, const DivConfig& flags);
void quit();
~DivPlatformGenesisExt();

View file

@ -913,6 +913,7 @@ const FurnaceGUIColorDef guiColors[GUI_COLOR_MAX]={
const int availableSystems[]={
DIV_SYSTEM_YM2612,
DIV_SYSTEM_YM2612_EXT,
DIV_SYSTEM_YM2612_CSM,
DIV_SYSTEM_YM2612_DUALPCM,
DIV_SYSTEM_YM2612_DUALPCM_EXT,
DIV_SYSTEM_SMS,
@ -994,6 +995,7 @@ const int availableSystems[]={
const int chipsFM[]={
DIV_SYSTEM_YM2612,
DIV_SYSTEM_YM2612_EXT,
DIV_SYSTEM_YM2612_CSM,
DIV_SYSTEM_YM2612_DUALPCM,
DIV_SYSTEM_YM2612_DUALPCM_EXT,
DIV_SYSTEM_YM2151,