remove Namco 163 name setting

This commit is contained in:
tildearrow 2023-07-20 16:50:19 -05:00
parent 08bd036193
commit b087b28325
8 changed files with 9 additions and 43 deletions

View file

@ -64,9 +64,6 @@
#define DIV_VERSION_S3M 0xff03
#define DIV_VERSION_FTM 0xff04
// "Namco C163"
#define DIV_C163_DEFAULT_NAME "Namco 163"
enum DivStatusView {
DIV_STATUS_NOTHING=0,
DIV_STATUS_PATTERN,
@ -465,7 +462,6 @@ class DivEngine {
int reversePitchTable[4096];
int pitchTable[4096];
short effectSlotMap[4096];
char c163NameCS[1024];
int midiBaseChan;
bool midiPoly;
size_t midiAgeCounter;

View file

@ -166,7 +166,7 @@ void DivPlatformN163::updateWave(int ch, int wave, int pos, int len) {
void DivPlatformN163::updateWaveCh(int ch) {
if (ch<=chanMax) {
logV("updateWave with pos %d and len %d",chan[ch].wavePos,chan[ch].waveLen);
//logV("updateWave with pos %d and len %d",chan[ch].wavePos,chan[ch].waveLen);
updateWave(ch,-1,chan[ch].wavePos,chan[ch].waveLen);
if (chan[ch].active && !isMuted[ch]) {
chan[ch].volumeChanged=true;

View file

@ -200,9 +200,7 @@ String DivEngine::getSongSystemLegacyName(DivSong& ds, bool isMultiSystemAccepta
return "Famicom Disk System";
}
if (ds.system[0]==DIV_SYSTEM_NES && ds.system[1]==DIV_SYSTEM_N163) {
String ret="Famicom + ";
ret+=getConfString("c163Name",DIV_C163_DEFAULT_NAME);
return ret;
return "Famicom + Namco 163";
}
if (ds.system[0]==DIV_SYSTEM_NES && ds.system[1]==DIV_SYSTEM_MMC5) {
return "Famicom + MMC5";
@ -230,11 +228,7 @@ String DivEngine::getSongSystemLegacyName(DivSong& ds, bool isMultiSystemAccepta
String ret="";
for (int i=0; i<ds.systemLen; i++) {
if (i>0) ret+=" + ";
if (ds.system[i]==DIV_SYSTEM_N163) {
ret+=getConfString("c163Name",DIV_C163_DEFAULT_NAME);
} else {
ret+=getSystemName(ds.system[i]);
}
ret+=getSystemName(ds.system[i]);
}
return ret;
@ -242,11 +236,6 @@ String DivEngine::getSongSystemLegacyName(DivSong& ds, bool isMultiSystemAccepta
const char* DivEngine::getSystemName(DivSystem sys) {
if (sysDefs[sys]==NULL) return "Unknown";
if (sys==DIV_SYSTEM_N163) {
String c1=getConfString("c163Name",DIV_C163_DEFAULT_NAME);
strncpy(c163NameCS,c1.c_str(),1023);
return c163NameCS;
}
return sysDefs[sys]->name;
}
@ -998,7 +987,7 @@ void DivEngine::registerSystems() {
);
sysDefs[DIV_SYSTEM_N163]=new DivSysDef(
"Namco 163/C163/129/160/106/whatever", NULL, 0x8c, 0, 8, false, true, 0, false, 0,
"Namco 163", NULL, 0x8c, 0, 8, false, true, 0, false, 0,
"an expansion chip for the Famicom, with full wavetable.",
{"Channel 1", "Channel 2", "Channel 3", "Channel 4", "Channel 5", "Channel 6", "Channel 7", "Channel 8"},
{"CH1", "CH2", "CH3", "CH4", "CH5", "CH6", "CH7", "CH8"},

View file

@ -77,7 +77,6 @@ void FurnaceGUI::insListItem(int i, int dir, int asset) {
if (i>=0 && i<e->song.insLen) {
DivInstrument* ins=e->song.ins[i];
insType=(ins->type>DIV_INS_MAX)?"Unknown":insTypes[ins->type];
if (ins->type==DIV_INS_N163) insType=settings.c163Name.c_str();
switch (ins->type) {
case DIV_INS_FM:
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_INSTR_FM]);

View file

@ -682,11 +682,7 @@ void FurnaceGUI::autoDetectSystem() {
if (k.second>1) {
e->song.systemName+=fmt::sprintf("%d×",k.second);
}
if (k.first==DIV_SYSTEM_N163) {
e->song.systemName+=settings.c163Name;
} else {
e->song.systemName+=e->getSystemName(k.first);
}
e->song.systemName+=e->getSystemName(k.first);
isFirst=false;
}
}

View file

@ -1527,7 +1527,6 @@ class FurnaceGUI {
String audioDevice;
String midiInDevice;
String midiOutDevice;
String c163Name;
String renderBackend;
String renderDriver;
String initialSysName;
@ -1681,7 +1680,6 @@ class FurnaceGUI {
audioDevice(""),
midiInDevice(""),
midiOutDevice(""),
c163Name(""),
renderBackend(""),
renderDriver(""),
initialSysName("Sega Genesis/Mega Drive"),

View file

@ -2305,7 +2305,7 @@ void FurnaceGUI::drawInsEdit() {
ins->type=(DivInstrumentType)insType;
}
*/
if (ImGui::BeginCombo("##Type",insType==DIV_INS_N163?settings.c163Name.c_str():insTypes[insType])) {
if (ImGui::BeginCombo("##Type",insTypes[insType])) {
std::vector<DivInstrumentType> insTypeList;
if (settings.displayAllInsTypes) {
for (int i=0; insTypes[i]; i++) {
@ -2315,7 +2315,7 @@ void FurnaceGUI::drawInsEdit() {
insTypeList=e->getPossibleInsTypes();
}
for (DivInstrumentType i: insTypeList) {
if (ImGui::Selectable(i==DIV_INS_N163?settings.c163Name.c_str():insTypes[i],insType==i)) {
if (ImGui::Selectable(insTypes[i],insType==i)) {
ins->type=i;
// reset macro zoom
@ -4665,7 +4665,7 @@ void FurnaceGUI::drawInsEdit() {
sampleMapFocused=false;
}
}
if (ins->type==DIV_INS_N163) if (ImGui::BeginTabItem(settings.c163Name.c_str())) {
if (ins->type==DIV_INS_N163) if (ImGui::BeginTabItem("Namco 163")) {
if (ImGui::InputInt("Waveform##WAVE",&ins->n163.wave,1,10)) { PARAMETER
if (ins->n163.wave<0) ins->n163.wave=0;
if (ins->n163.wave>=e->song.waveLen) ins->n163.wave=e->song.waveLen-1;

View file

@ -1638,12 +1638,6 @@ void FurnaceGUI::drawSettings() {
ImGui::Separator();
ImGui::Text("Namco 163 chip name");
ImGui::SameLine();
ImGui::InputTextWithHint("##C163Name",DIV_C163_DEFAULT_NAME,&settings.c163Name);
ImGui::Separator();
ImGui::Text("Channel colors:");
if (ImGui::RadioButton("Single##CHC0",settings.channelColors==0)) {
settings.channelColors=0;
@ -2067,11 +2061,7 @@ void FurnaceGUI::drawSettings() {
UI_COLOR_CONFIG(GUI_COLOR_INSTR_OPL,"FM (OPL)");
UI_COLOR_CONFIG(GUI_COLOR_INSTR_FDS,"FDS");
UI_COLOR_CONFIG(GUI_COLOR_INSTR_VBOY,"Virtual Boy");
// special case
String c163Label=fmt::sprintf("%s##CC_GUI_COLOR_INSTR_N163",settings.c163Name);
if (ImGui::ColorEdit4(c163Label.c_str(),(float*)&uiColors[GUI_COLOR_INSTR_N163])) {
applyUISettings(false);
}
UI_COLOR_CONFIG(GUI_COLOR_INSTR_N163,"Namco 163");
UI_COLOR_CONFIG(GUI_COLOR_INSTR_SCC,"Konami SCC");
UI_COLOR_CONFIG(GUI_COLOR_INSTR_OPZ,"FM (OPZ)");
UI_COLOR_CONFIG(GUI_COLOR_INSTR_POKEY,"POKEY");
@ -2662,7 +2652,6 @@ void FurnaceGUI::syncSettings() {
settings.audioChans=e->getConfInt("audioChans",2);
settings.midiInDevice=e->getConfString("midiInDevice","");
settings.midiOutDevice=e->getConfString("midiOutDevice","");
settings.c163Name=e->getConfString("c163Name",DIV_C163_DEFAULT_NAME);
settings.renderDriver=e->getConfString("renderDriver","");
settings.sdlAudioDriver=e->getConfString("sdlAudioDriver","");
settings.audioQuality=e->getConfInt("audioQuality",0);
@ -3011,7 +3000,6 @@ void FurnaceGUI::commitSettings() {
e->setConf("audioDevice",settings.audioDevice);
e->setConf("midiInDevice",settings.midiInDevice);
e->setConf("midiOutDevice",settings.midiOutDevice);
e->setConf("c163Name",settings.c163Name);
e->setConf("renderDriver",settings.renderDriver);
e->setConf("sdlAudioDriver",settings.sdlAudioDriver);
e->setConf("audioQuality",settings.audioQuality);