YM2612: YMF276-LLE, part 1
This commit is contained in:
parent
c6a0d0e93e
commit
0c727ff6b7
|
@ -491,6 +491,7 @@ extern/Nuked-OPLL/opll.c
|
||||||
extern/opl/opl3.c
|
extern/opl/opl3.c
|
||||||
extern/YM3812-LLE/fmopl2.c
|
extern/YM3812-LLE/fmopl2.c
|
||||||
extern/YMF262-LLE/fmopl3.c
|
extern/YMF262-LLE/fmopl3.c
|
||||||
|
extern/YMF276-LLE/fmopn2.c
|
||||||
|
|
||||||
src/pch.cpp
|
src/pch.cpp
|
||||||
|
|
||||||
|
|
|
@ -289,8 +289,14 @@ void DivPlatformGenesis::acquire_ymfm(short** buf, size_t len) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DivPlatformGenesis::acquire_nuked276(short** buf, size_t len) {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
void DivPlatformGenesis::acquire(short** buf, size_t len) {
|
void DivPlatformGenesis::acquire(short** buf, size_t len) {
|
||||||
if (useYMFM) {
|
if (useYMFM==2) {
|
||||||
|
acquire_nuked276(buf,len);
|
||||||
|
} else if (useYMFM==1) {
|
||||||
acquire_ymfm(buf,len);
|
acquire_ymfm(buf,len);
|
||||||
} else {
|
} else {
|
||||||
acquire_nuked(buf,len);
|
acquire_nuked(buf,len);
|
||||||
|
@ -1309,7 +1315,9 @@ float DivPlatformGenesis::getPostAmp() {
|
||||||
void DivPlatformGenesis::reset() {
|
void DivPlatformGenesis::reset() {
|
||||||
writes.clear();
|
writes.clear();
|
||||||
memset(regPool,0,512);
|
memset(regPool,0,512);
|
||||||
if (useYMFM) {
|
if (useYMFM==2) {
|
||||||
|
memset(&fm_276,0,sizeof(fmopn2_t));
|
||||||
|
} else if (useYMFM==1) {
|
||||||
fm_ymfm->reset();
|
fm_ymfm->reset();
|
||||||
}
|
}
|
||||||
OPN2_Reset(&fm);
|
OPN2_Reset(&fm);
|
||||||
|
@ -1396,7 +1404,7 @@ int DivPlatformGenesis::getPortaFloor(int ch) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DivPlatformGenesis::setYMFM(bool use) {
|
void DivPlatformGenesis::setYMFM(unsigned char use) {
|
||||||
useYMFM=use;
|
useYMFM=use;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1441,7 +1449,7 @@ void DivPlatformGenesis::setFlags(const DivConfig& flags) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
CHECK_CUSTOM_CLOCK;
|
CHECK_CUSTOM_CLOCK;
|
||||||
if (useYMFM) {
|
if (useYMFM==1) {
|
||||||
if (fm_ymfm!=NULL) delete fm_ymfm;
|
if (fm_ymfm!=NULL) delete fm_ymfm;
|
||||||
if (chipType==1) {
|
if (chipType==1) {
|
||||||
fm_ymfm=new ymfm::ym2612(iface);
|
fm_ymfm=new ymfm::ym2612(iface);
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
#include "fmshared_OPN.h"
|
#include "fmshared_OPN.h"
|
||||||
#include "sound/ymfm/ymfm_opn.h"
|
#include "sound/ymfm/ymfm_opn.h"
|
||||||
|
#include "../../../extern/YMF276-LLE/fmopn2.h"
|
||||||
|
|
||||||
class DivYM2612Interface: public ymfm::ymfm_interface {
|
class DivYM2612Interface: public ymfm::ymfm_interface {
|
||||||
int setA, setB;
|
int setA, setB;
|
||||||
|
@ -77,6 +77,7 @@ class DivPlatformGenesis: public DivPlatformOPN {
|
||||||
DivDispatchOscBuffer* oscBuf[10];
|
DivDispatchOscBuffer* oscBuf[10];
|
||||||
bool isMuted[10];
|
bool isMuted[10];
|
||||||
ym3438_t fm;
|
ym3438_t fm;
|
||||||
|
fmopn2_t fm_276;
|
||||||
|
|
||||||
ymfm::ym2612* fm_ymfm;
|
ymfm::ym2612* fm_ymfm;
|
||||||
ymfm::ym2612::output_data out_ymfm;
|
ymfm::ym2612::output_data out_ymfm;
|
||||||
|
@ -84,7 +85,8 @@ class DivPlatformGenesis: public DivPlatformOPN {
|
||||||
|
|
||||||
int softPCMTimer;
|
int softPCMTimer;
|
||||||
|
|
||||||
bool extMode, softPCM, noExtMacros, useYMFM, canWriteDAC;
|
bool extMode, softPCM, noExtMacros, canWriteDAC;
|
||||||
|
unsigned char useYMFM;
|
||||||
unsigned char chipType;
|
unsigned char chipType;
|
||||||
short dacWrite;
|
short dacWrite;
|
||||||
|
|
||||||
|
@ -96,6 +98,7 @@ class DivPlatformGenesis: public DivPlatformOPN {
|
||||||
inline void processDAC(int iRate);
|
inline void processDAC(int iRate);
|
||||||
inline void commitState(int ch, DivInstrument* ins);
|
inline void commitState(int ch, DivInstrument* ins);
|
||||||
void acquire_nuked(short** buf, size_t len);
|
void acquire_nuked(short** buf, size_t len);
|
||||||
|
void acquire_nuked276(short** buf, size_t len);
|
||||||
void acquire_ymfm(short** buf, size_t len);
|
void acquire_ymfm(short** buf, size_t len);
|
||||||
|
|
||||||
friend void putDispatchChip(void*,int);
|
friend void putDispatchChip(void*,int);
|
||||||
|
@ -116,7 +119,7 @@ class DivPlatformGenesis: public DivPlatformOPN {
|
||||||
void tick(bool sysTick=true);
|
void tick(bool sysTick=true);
|
||||||
void muteChannel(int ch, bool mute);
|
void muteChannel(int ch, bool mute);
|
||||||
int getOutputCount();
|
int getOutputCount();
|
||||||
void setYMFM(bool use);
|
void setYMFM(unsigned char use);
|
||||||
bool keyOffAffectsArp(int ch);
|
bool keyOffAffectsArp(int ch);
|
||||||
bool keyOffAffectsPorta(int ch);
|
bool keyOffAffectsPorta(int ch);
|
||||||
float getPostAmp();
|
float getPostAmp();
|
||||||
|
|
|
@ -127,7 +127,8 @@ const char* arcadeCores[]={
|
||||||
|
|
||||||
const char* ym2612Cores[]={
|
const char* ym2612Cores[]={
|
||||||
"Nuked-OPN2",
|
"Nuked-OPN2",
|
||||||
"ymfm"
|
"ymfm",
|
||||||
|
"YMF276-LLE"
|
||||||
};
|
};
|
||||||
|
|
||||||
const char* snCores[]={
|
const char* snCores[]={
|
||||||
|
@ -1499,10 +1500,10 @@ void FurnaceGUI::drawSettings() {
|
||||||
ImGui::Text("YM2612");
|
ImGui::Text("YM2612");
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
|
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
|
||||||
if (ImGui::Combo("##YM2612Core",&settings.ym2612Core,ym2612Cores,2)) settingsChanged=true;
|
if (ImGui::Combo("##YM2612Core",&settings.ym2612Core,ym2612Cores,3)) settingsChanged=true;
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
|
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
|
||||||
if (ImGui::Combo("##YM2612CoreRender",&settings.ym2612CoreRender,ym2612Cores,2)) settingsChanged=true;
|
if (ImGui::Combo("##YM2612CoreRender",&settings.ym2612CoreRender,ym2612Cores,3)) settingsChanged=true;
|
||||||
|
|
||||||
ImGui::TableNextRow();
|
ImGui::TableNextRow();
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
|
@ -3810,7 +3811,7 @@ void FurnaceGUI::syncSettings() {
|
||||||
clampSetting(settings.audioRate,8000,384000);
|
clampSetting(settings.audioRate,8000,384000);
|
||||||
clampSetting(settings.audioChans,1,16);
|
clampSetting(settings.audioChans,1,16);
|
||||||
clampSetting(settings.arcadeCore,0,1);
|
clampSetting(settings.arcadeCore,0,1);
|
||||||
clampSetting(settings.ym2612Core,0,1);
|
clampSetting(settings.ym2612Core,0,2);
|
||||||
clampSetting(settings.snCore,0,1);
|
clampSetting(settings.snCore,0,1);
|
||||||
clampSetting(settings.nesCore,0,1);
|
clampSetting(settings.nesCore,0,1);
|
||||||
clampSetting(settings.fdsCore,0,1);
|
clampSetting(settings.fdsCore,0,1);
|
||||||
|
@ -3820,7 +3821,7 @@ void FurnaceGUI::syncSettings() {
|
||||||
clampSetting(settings.opl2Core,0,2);
|
clampSetting(settings.opl2Core,0,2);
|
||||||
clampSetting(settings.opl3Core,0,2);
|
clampSetting(settings.opl3Core,0,2);
|
||||||
clampSetting(settings.arcadeCoreRender,0,1);
|
clampSetting(settings.arcadeCoreRender,0,1);
|
||||||
clampSetting(settings.ym2612CoreRender,0,1);
|
clampSetting(settings.ym2612CoreRender,0,2);
|
||||||
clampSetting(settings.snCoreRender,0,1);
|
clampSetting(settings.snCoreRender,0,1);
|
||||||
clampSetting(settings.nesCoreRender,0,1);
|
clampSetting(settings.nesCoreRender,0,1);
|
||||||
clampSetting(settings.fdsCoreRender,0,1);
|
clampSetting(settings.fdsCoreRender,0,1);
|
||||||
|
|
Loading…
Reference in a new issue