mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-26 14:33:01 +00:00
core quality, part 1
PC Engine
This commit is contained in:
parent
a613cfb303
commit
a1254d5fb6
6 changed files with 204 additions and 5 deletions
|
@ -302,6 +302,11 @@ void DivDispatchContainer::init(DivSystem sys, DivEngine* eng, int chanCount, do
|
|||
break;
|
||||
case DIV_SYSTEM_PCE:
|
||||
dispatch=new DivPlatformPCE;
|
||||
if (isRender) {
|
||||
((DivPlatformPCE*)dispatch)->setCoreQuality(eng->getConfInt("pceQualityRender",3));
|
||||
} else {
|
||||
((DivPlatformPCE*)dispatch)->setCoreQuality(eng->getConfInt("pceQuality",3));
|
||||
}
|
||||
break;
|
||||
case DIV_SYSTEM_NES:
|
||||
dispatch=new DivPlatformNES;
|
||||
|
|
|
@ -96,7 +96,7 @@ void DivPlatformPCE::acquire(short** buf, size_t len) {
|
|||
}
|
||||
memset(tempL,0,24*sizeof(int));
|
||||
memset(tempR,0,24*sizeof(int));
|
||||
pce->Update(24);
|
||||
pce->Update(coreQuality);
|
||||
pce->ResetTS(0);
|
||||
|
||||
for (int i=0; i<6; i++) {
|
||||
|
@ -629,7 +629,7 @@ void DivPlatformPCE::setFlags(const DivConfig& flags) {
|
|||
}
|
||||
CHECK_CUSTOM_CLOCK;
|
||||
antiClickEnabled=!flags.getBool("noAntiClick",false);
|
||||
rate=chipClock/12;
|
||||
rate=chipClock/(coreQuality>>1);
|
||||
for (int i=0; i<6; i++) {
|
||||
oscBuf[i]->rate=rate;
|
||||
}
|
||||
|
@ -649,6 +649,32 @@ void DivPlatformPCE::poke(std::vector<DivRegWrite>& wlist) {
|
|||
for (DivRegWrite& i: wlist) rWrite(i.addr,i.val);
|
||||
}
|
||||
|
||||
void DivPlatformPCE::setCoreQuality(unsigned char q) {
|
||||
switch (q) {
|
||||
case 0:
|
||||
coreQuality=192;
|
||||
break;
|
||||
case 1:
|
||||
coreQuality=96;
|
||||
break;
|
||||
case 2:
|
||||
coreQuality=48;
|
||||
break;
|
||||
case 3:
|
||||
coreQuality=24;
|
||||
break;
|
||||
case 4:
|
||||
coreQuality=6;
|
||||
break;
|
||||
case 5:
|
||||
coreQuality=2;
|
||||
break;
|
||||
default:
|
||||
coreQuality=24;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int DivPlatformPCE::init(DivEngine* p, int channels, int sugRate, const DivConfig& flags) {
|
||||
parent=p;
|
||||
dumpWrites=false;
|
||||
|
|
|
@ -72,6 +72,7 @@ class DivPlatformPCE: public DivDispatch {
|
|||
int tempL[32];
|
||||
int tempR[32];
|
||||
unsigned char sampleBank, lfoMode, lfoSpeed;
|
||||
int coreQuality;
|
||||
PCE_PSG* pce;
|
||||
unsigned char regPool[128];
|
||||
void updateWave(int ch);
|
||||
|
@ -96,6 +97,7 @@ class DivPlatformPCE: public DivDispatch {
|
|||
void muteChannel(int ch, bool mute);
|
||||
int getOutputCount();
|
||||
bool keyOffAffectsArp(int ch);
|
||||
void setCoreQuality(unsigned char q);
|
||||
void setFlags(const DivConfig& flags);
|
||||
void notifyWaveChange(int wave);
|
||||
void notifyInsDeletion(void* ins);
|
||||
|
|
|
@ -70,6 +70,7 @@ static const int scale_tab[] =
|
|||
|
||||
inline void PCE_PSG::UpdateOutputSub(const int32_t timestamp, psg_channel *ch, const int32_t samp0, const int32_t samp1)
|
||||
{
|
||||
if (timestamp>0) return;
|
||||
HRBufs[0][timestamp]+=samp0;
|
||||
HRBufs[1][timestamp]+=samp1;
|
||||
/*
|
||||
|
|
|
@ -1863,6 +1863,17 @@ class FurnaceGUI {
|
|||
opl3Core(0),
|
||||
esfmCore(0),
|
||||
opllCore(0),
|
||||
bubsysQuality(3),
|
||||
dsidQuality(3),
|
||||
gbQuality(3),
|
||||
ndsQuality(3),
|
||||
pceQuality(3),
|
||||
pnQuality(3),
|
||||
saaQuality(3),
|
||||
sccQuality(3),
|
||||
smQuality(3),
|
||||
swanQuality(3),
|
||||
vbQuality(3),
|
||||
arcadeCoreRender(1),
|
||||
ym2612CoreRender(0),
|
||||
snCoreRender(0),
|
||||
|
@ -1875,6 +1886,17 @@ class FurnaceGUI {
|
|||
opl3CoreRender(0),
|
||||
esfmCoreRender(0),
|
||||
opllCoreRender(0),
|
||||
bubsysQualityRender(3),
|
||||
dsidQualityRender(3),
|
||||
gbQualityRender(3),
|
||||
ndsQualityRender(3),
|
||||
pceQualityRender(3),
|
||||
pnQualityRender(3),
|
||||
saaQualityRender(3),
|
||||
sccQualityRender(3),
|
||||
smQualityRender(3),
|
||||
swanQualityRender(3),
|
||||
vbQualityRender(3),
|
||||
pcSpeakerOutMethod(0),
|
||||
yrw801Path(""),
|
||||
tg100Path(""),
|
||||
|
|
|
@ -180,7 +180,7 @@ const char* opllCores[]={
|
|||
};
|
||||
|
||||
const char* coreQualities[]={
|
||||
"Horrible",
|
||||
"Lower",
|
||||
"Low",
|
||||
"Medium",
|
||||
"High",
|
||||
|
@ -321,6 +321,18 @@ const char* specificControls[18]={
|
|||
ImGui::EndChild(); \
|
||||
ImGui::EndTabItem();
|
||||
|
||||
#define CORE_QUALITY(_name,_play,_render) \
|
||||
ImGui::TableNextRow(); \
|
||||
ImGui::TableNextColumn(); \
|
||||
ImGui::AlignTextToFramePadding(); \
|
||||
ImGui::Text(_name); \
|
||||
ImGui::TableNextColumn(); \
|
||||
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); \
|
||||
if (ImGui::Combo("##" _name "Q",&settings._play,coreQualities,6)) settingsChanged=true; \
|
||||
ImGui::TableNextColumn(); \
|
||||
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); \
|
||||
if (ImGui::Combo("##" _name "QR",&settings._render,coreQualities,6)) settingsChanged=true;
|
||||
|
||||
String stripName(String what) {
|
||||
String ret;
|
||||
for (char& i: what) {
|
||||
|
@ -1536,7 +1548,7 @@ void FurnaceGUI::drawSettings() {
|
|||
END_SECTION;
|
||||
}
|
||||
CONFIG_SECTION("Emulation") {
|
||||
// SUBSECTION LAYOUT
|
||||
// SUBSECTION CORES
|
||||
CONFIG_SUBSECTION("Cores");
|
||||
if (ImGui::BeginTable("##Cores",3)) {
|
||||
ImGui::TableSetupColumn("##System",ImGuiTableColumnFlags_WidthFixed);
|
||||
|
@ -1690,7 +1702,44 @@ void FurnaceGUI::drawSettings() {
|
|||
|
||||
ImGui::EndTable();
|
||||
}
|
||||
ImGui::Separator();
|
||||
|
||||
// SUBSECTION OTHER
|
||||
CONFIG_SUBSECTION("Quality");
|
||||
if (ImGui::BeginTable("##CoreQual",3)) {
|
||||
ImGui::TableSetupColumn("##System",ImGuiTableColumnFlags_WidthFixed);
|
||||
ImGui::TableSetupColumn("##PlaybackCores",ImGuiTableColumnFlags_WidthStretch);
|
||||
ImGui::TableSetupColumn("##RenderCores",ImGuiTableColumnFlags_WidthStretch);
|
||||
ImGui::TableNextRow(ImGuiTableRowFlags_Headers);
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::Text("System");
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::Text("Playback");
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("used for playback");
|
||||
}
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::Text("Render");
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("used in audio export");
|
||||
}
|
||||
|
||||
CORE_QUALITY("Bubble System WSG",bubsysQuality,bubsysQualityRender);
|
||||
CORE_QUALITY("Game Boy",gbQuality,gbQualityRender);
|
||||
CORE_QUALITY("Nintendo DS",ndsQuality,ndsQualityRender);
|
||||
CORE_QUALITY("PC Engine",pceQuality,pceQualityRender);
|
||||
CORE_QUALITY("PowerNoise",pnQuality,pnQualityRender);
|
||||
CORE_QUALITY("SAA1099",saaQuality,saaQualityRender);
|
||||
CORE_QUALITY("SCC",sccQuality,sccQualityRender);
|
||||
CORE_QUALITY("SID (dSID)",dsidQuality,dsidQualityRender);
|
||||
CORE_QUALITY("SM8521",smQuality,smQualityRender);
|
||||
CORE_QUALITY("Virtual Boy",vbQuality,vbQualityRender);
|
||||
CORE_QUALITY("WonderSwan",swanQuality,swanQualityRender);
|
||||
|
||||
ImGui::EndTable();
|
||||
}
|
||||
|
||||
// SUBSECTION OTHER
|
||||
CONFIG_SUBSECTION("Other");
|
||||
|
||||
ImGui::AlignTextToFramePadding();
|
||||
ImGui::Text("PC Speaker strategy");
|
||||
|
@ -4191,6 +4240,19 @@ void FurnaceGUI::readConfig(DivConfig& conf, FurnaceGUISettingGroups groups) {
|
|||
settings.opl3Core=conf.getInt("opl3Core",0);
|
||||
settings.esfmCore=conf.getInt("esfmCore",0);
|
||||
settings.opllCore=conf.getInt("opllCore",0);
|
||||
|
||||
settings.bubsysQuality=conf.getInt("bubsysQuality",3);
|
||||
settings.dsidQuality=conf.getInt("dsidQuality",3);
|
||||
settings.gbQuality=conf.getInt("gbQuality",3);
|
||||
settings.ndsQuality=conf.getInt("ndsQuality",3);
|
||||
settings.pceQuality=conf.getInt("pceQuality",3);
|
||||
settings.pnQuality=conf.getInt("pnQuality",3);
|
||||
settings.saaQuality=conf.getInt("saaQuality",3);
|
||||
settings.sccQuality=conf.getInt("sccQuality",3);
|
||||
settings.smQuality=conf.getInt("smQuality",3);
|
||||
settings.swanQuality=conf.getInt("swanQuality",3);
|
||||
settings.vbQuality=conf.getInt("vbQuality",3);
|
||||
|
||||
settings.arcadeCoreRender=conf.getInt("arcadeCoreRender",1);
|
||||
settings.ym2612CoreRender=conf.getInt("ym2612CoreRender",0);
|
||||
settings.snCoreRender=conf.getInt("snCoreRender",0);
|
||||
|
@ -4204,6 +4266,18 @@ void FurnaceGUI::readConfig(DivConfig& conf, FurnaceGUISettingGroups groups) {
|
|||
settings.esfmCoreRender=conf.getInt("esfmCoreRender",0);
|
||||
settings.opllCoreRender=conf.getInt("opllCoreRender",0);
|
||||
|
||||
settings.bubsysQualityRender=conf.getInt("bubsysQualityRender",3);
|
||||
settings.dsidQualityRender=conf.getInt("dsidQualityRender",3);
|
||||
settings.gbQualityRender=conf.getInt("gbQualityRender",3);
|
||||
settings.ndsQualityRender=conf.getInt("ndsQualityRender",3);
|
||||
settings.pceQualityRender=conf.getInt("pceQualityRender",3);
|
||||
settings.pnQualityRender=conf.getInt("pnQualityRender",3);
|
||||
settings.saaQualityRender=conf.getInt("saaQualityRender",3);
|
||||
settings.sccQualityRender=conf.getInt("sccQualityRender",3);
|
||||
settings.smQualityRender=conf.getInt("smQualityRender",3);
|
||||
settings.swanQualityRender=conf.getInt("swanQualityRender",3);
|
||||
settings.vbQualityRender=conf.getInt("vbQualityRender",3);
|
||||
|
||||
settings.pcSpeakerOutMethod=conf.getInt("pcSpeakerOutMethod",0);
|
||||
|
||||
settings.yrw801Path=conf.getString("yrw801Path","");
|
||||
|
@ -4233,6 +4307,17 @@ void FurnaceGUI::readConfig(DivConfig& conf, FurnaceGUISettingGroups groups) {
|
|||
clampSetting(settings.opl3Core,0,2);
|
||||
clampSetting(settings.esfmCore,0,1);
|
||||
clampSetting(settings.opllCore,0,1);
|
||||
clampSetting(settings.bubsysQuality,0,5);
|
||||
clampSetting(settings.dsidQuality,0,5);
|
||||
clampSetting(settings.gbQuality,0,5);
|
||||
clampSetting(settings.ndsQuality,0,5);
|
||||
clampSetting(settings.pceQuality,0,5);
|
||||
clampSetting(settings.pnQuality,0,5);
|
||||
clampSetting(settings.saaQuality,0,5);
|
||||
clampSetting(settings.sccQuality,0,5);
|
||||
clampSetting(settings.smQuality,0,5);
|
||||
clampSetting(settings.swanQuality,0,5);
|
||||
clampSetting(settings.vbQuality,0,5);
|
||||
clampSetting(settings.arcadeCoreRender,0,1);
|
||||
clampSetting(settings.ym2612CoreRender,0,2);
|
||||
clampSetting(settings.snCoreRender,0,1);
|
||||
|
@ -4245,6 +4330,17 @@ void FurnaceGUI::readConfig(DivConfig& conf, FurnaceGUISettingGroups groups) {
|
|||
clampSetting(settings.opl3CoreRender,0,2);
|
||||
clampSetting(settings.esfmCoreRender,0,1);
|
||||
clampSetting(settings.opllCoreRender,0,1);
|
||||
clampSetting(settings.bubsysQualityRender,0,5);
|
||||
clampSetting(settings.dsidQualityRender,0,5);
|
||||
clampSetting(settings.gbQualityRender,0,5);
|
||||
clampSetting(settings.ndsQualityRender,0,5);
|
||||
clampSetting(settings.pceQualityRender,0,5);
|
||||
clampSetting(settings.pnQualityRender,0,5);
|
||||
clampSetting(settings.saaQualityRender,0,5);
|
||||
clampSetting(settings.sccQualityRender,0,5);
|
||||
clampSetting(settings.smQualityRender,0,5);
|
||||
clampSetting(settings.swanQualityRender,0,5);
|
||||
clampSetting(settings.vbQualityRender,0,5);
|
||||
clampSetting(settings.pcSpeakerOutMethod,0,4);
|
||||
clampSetting(settings.mainFont,0,6);
|
||||
clampSetting(settings.patFont,0,6);
|
||||
|
@ -4677,6 +4773,19 @@ void FurnaceGUI::writeConfig(DivConfig& conf, FurnaceGUISettingGroups groups) {
|
|||
conf.set("opl3Core",settings.opl3Core);
|
||||
conf.set("esfmCore",settings.esfmCore);
|
||||
conf.set("opllCore",settings.opllCore);
|
||||
|
||||
conf.set("bubsysQuality",settings.bubsysQuality);
|
||||
conf.set("dsidQuality",settings.dsidQuality);
|
||||
conf.set("gbQuality",settings.gbQuality);
|
||||
conf.set("ndsQuality",settings.ndsQuality);
|
||||
conf.set("pceQuality",settings.pceQuality);
|
||||
conf.set("pnQuality",settings.pnQuality);
|
||||
conf.set("saaQuality",settings.saaQuality);
|
||||
conf.set("sccQuality",settings.sccQuality);
|
||||
conf.set("smQuality",settings.smQuality);
|
||||
conf.set("swanQuality",settings.swanQuality);
|
||||
conf.set("vbQuality",settings.vbQuality);
|
||||
|
||||
conf.set("arcadeCoreRender",settings.arcadeCoreRender);
|
||||
conf.set("ym2612CoreRender",settings.ym2612CoreRender);
|
||||
conf.set("snCoreRender",settings.snCoreRender);
|
||||
|
@ -4690,6 +4799,18 @@ void FurnaceGUI::writeConfig(DivConfig& conf, FurnaceGUISettingGroups groups) {
|
|||
conf.set("esfmCoreRender",settings.esfmCoreRender);
|
||||
conf.set("opllCoreRender",settings.opllCoreRender);
|
||||
|
||||
conf.set("bubsysQualityRender",settings.bubsysQualityRender);
|
||||
conf.set("dsidQualityRender",settings.dsidQualityRender);
|
||||
conf.set("gbQualityRender",settings.gbQualityRender);
|
||||
conf.set("ndsQualityRender",settings.ndsQualityRender);
|
||||
conf.set("pceQualityRender",settings.pceQualityRender);
|
||||
conf.set("pnQualityRender",settings.pnQualityRender);
|
||||
conf.set("saaQualityRender",settings.saaQualityRender);
|
||||
conf.set("sccQualityRender",settings.sccQualityRender);
|
||||
conf.set("smQualityRender",settings.smQualityRender);
|
||||
conf.set("swanQualityRender",settings.swanQualityRender);
|
||||
conf.set("vbQualityRender",settings.vbQualityRender);
|
||||
|
||||
conf.set("pcSpeakerOutMethod",settings.pcSpeakerOutMethod);
|
||||
|
||||
conf.set("yrw801Path",settings.yrw801Path);
|
||||
|
@ -4735,6 +4856,17 @@ void FurnaceGUI::commitSettings() {
|
|||
settings.opl3Core!=e->getConfInt("opl3Core",0) ||
|
||||
settings.esfmCore!=e->getConfInt("esfmCore",0) ||
|
||||
settings.opllCore!=e->getConfInt("opllCore",0) ||
|
||||
settings.bubsysQuality!=e->getConfInt("bubsysQuality",3) ||
|
||||
settings.dsidQuality!=e->getConfInt("dsidQuality",3) ||
|
||||
settings.gbQuality!=e->getConfInt("gbQuality",3) ||
|
||||
settings.ndsQuality!=e->getConfInt("ndsQuality",3) ||
|
||||
settings.pceQuality!=e->getConfInt("pceQuality",3) ||
|
||||
settings.pnQuality!=e->getConfInt("pnQuality",3) ||
|
||||
settings.saaQuality!=e->getConfInt("saaQuality",3) ||
|
||||
settings.sccQuality!=e->getConfInt("sccQuality",3) ||
|
||||
settings.smQuality!=e->getConfInt("smQuality",3) ||
|
||||
settings.swanQuality!=e->getConfInt("swanQuality",3) ||
|
||||
settings.vbQuality!=e->getConfInt("vbQuality",3) ||
|
||||
settings.arcadeCoreRender!=e->getConfInt("arcadeCoreRender",0) ||
|
||||
settings.ym2612CoreRender!=e->getConfInt("ym2612CoreRender",0) ||
|
||||
settings.snCoreRender!=e->getConfInt("snCoreRender",0) ||
|
||||
|
@ -4747,6 +4879,17 @@ void FurnaceGUI::commitSettings() {
|
|||
settings.opl3CoreRender!=e->getConfInt("opl3CoreRender",0) ||
|
||||
settings.esfmCoreRender!=e->getConfInt("esfmCoreRender",0) ||
|
||||
settings.opllCoreRender!=e->getConfInt("opllCoreRender",0) ||
|
||||
settings.bubsysQualityRender!=e->getConfInt("bubsysQualityRender",3) ||
|
||||
settings.dsidQualityRender!=e->getConfInt("dsidQualityRender",3) ||
|
||||
settings.gbQualityRender!=e->getConfInt("gbQualityRender",3) ||
|
||||
settings.ndsQualityRender!=e->getConfInt("ndsQualityRender",3) ||
|
||||
settings.pceQualityRender!=e->getConfInt("pceQualityRender",3) ||
|
||||
settings.pnQualityRender!=e->getConfInt("pnQualityRender",3) ||
|
||||
settings.saaQualityRender!=e->getConfInt("saaQualityRender",3) ||
|
||||
settings.sccQualityRender!=e->getConfInt("sccQualityRender",3) ||
|
||||
settings.smQualityRender!=e->getConfInt("smQualityRender",3) ||
|
||||
settings.swanQualityRender!=e->getConfInt("swanQualityRender",3) ||
|
||||
settings.vbQualityRender!=e->getConfInt("vbQualityRender",3) ||
|
||||
settings.audioQuality!=e->getConfInt("audioQuality",0) ||
|
||||
settings.audioHiPass!=e->getConfInt("audioHiPass",1)
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue