Merge branch 'x1_010' of https://github.com/cam900/furnace into cam900-x1_010
This commit is contained in:
commit
c6fda7a156
29 changed files with 1754 additions and 38 deletions
|
|
@ -36,6 +36,7 @@
|
|||
#include "../engine/platform/tia.h"
|
||||
#include "../engine/platform/saa.h"
|
||||
#include "../engine/platform/amiga.h"
|
||||
#include "../engine/platform/x1_010.h"
|
||||
#include "../engine/platform/dummy.h"
|
||||
|
||||
#define GENESIS_DEBUG \
|
||||
|
|
@ -232,6 +233,47 @@ void putDispatchChan(void* data, int chanNum, int type) {
|
|||
ImGui::TextColored(ch->inPorta?colorOn:colorOff,">> InPorta");
|
||||
break;
|
||||
}
|
||||
case DIV_SYSTEM_X1_010: {
|
||||
DivPlatformX1_010::Channel* ch=(DivPlatformX1_010::Channel*)data;
|
||||
ImGui::Text("> X1-010");
|
||||
ImGui::Text("* freq: %.4x",ch->freq);
|
||||
ImGui::Text(" - base: %d",ch->baseFreq);
|
||||
ImGui::Text(" - pitch: %d",ch->pitch);
|
||||
ImGui::Text("- note: %d",ch->note);
|
||||
ImGui::Text("- wave: %d",ch->wave);
|
||||
ImGui::Text("- sample: %d",ch->sample);
|
||||
ImGui::Text("- ins: %d",ch->ins);
|
||||
ImGui::Text("- pan: %d",ch->pan);
|
||||
ImGui::Text("* envelope:");
|
||||
ImGui::Text(" - shape: %d",ch->env.shape);
|
||||
ImGui::Text(" - period: %.2x",ch->env.period);
|
||||
ImGui::Text(" - slide: %.2x",ch->env.slide);
|
||||
ImGui::Text(" - slidefrac: %.2x",ch->env.slidefrac);
|
||||
ImGui::Text(" - autoEnvNum: %.2x",ch->autoEnvNum);
|
||||
ImGui::Text(" - autoEnvDen: %.2x",ch->autoEnvDen);
|
||||
ImGui::Text("- WaveBank: %d",ch->waveBank);
|
||||
ImGui::Text("- vol: %.2x",ch->vol);
|
||||
ImGui::Text("- outVol: %.2x",ch->outVol);
|
||||
ImGui::Text("- Lvol: %.2x",ch->lvol);
|
||||
ImGui::Text("- Rvol: %.2x",ch->rvol);
|
||||
ImGui::TextColored(ch->active?colorOn:colorOff,">> Active");
|
||||
ImGui::TextColored(ch->insChanged?colorOn:colorOff,">> InsChanged");
|
||||
ImGui::TextColored(ch->envChanged?colorOn:colorOff,">> EnvChanged");
|
||||
ImGui::TextColored(ch->freqChanged?colorOn:colorOff,">> FreqChanged");
|
||||
ImGui::TextColored(ch->keyOn?colorOn:colorOff,">> KeyOn");
|
||||
ImGui::TextColored(ch->keyOff?colorOn:colorOff,">> KeyOff");
|
||||
ImGui::TextColored(ch->inPorta?colorOn:colorOff,">> InPorta");
|
||||
ImGui::TextColored(ch->furnacePCM?colorOn:colorOff,">> FurnacePCM");
|
||||
ImGui::TextColored(ch->pcm?colorOn:colorOff,">> PCM");
|
||||
ImGui::TextColored(ch->env.flag.envEnable?colorOn:colorOff,">> EnvEnable");
|
||||
ImGui::TextColored(ch->env.flag.envOneshot?colorOn:colorOff,">> EnvOneshot");
|
||||
ImGui::TextColored(ch->env.flag.envSplit?colorOn:colorOff,">> EnvSplit");
|
||||
ImGui::TextColored(ch->env.flag.envHinvR?colorOn:colorOff,">> EnvHinvR");
|
||||
ImGui::TextColored(ch->env.flag.envVinvR?colorOn:colorOff,">> EnvVinvR");
|
||||
ImGui::TextColored(ch->env.flag.envHinvL?colorOn:colorOff,">> EnvHinvL");
|
||||
ImGui::TextColored(ch->env.flag.envVinvL?colorOn:colorOff,">> EnvVinvL");
|
||||
break;
|
||||
}
|
||||
default:
|
||||
ImGui::Text("Unknown system! Help!");
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -1194,6 +1194,10 @@ void FurnaceGUI::drawInsList() {
|
|||
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_INSTR_VERA]);
|
||||
name=fmt::sprintf(ICON_FA_KEYBOARD_O " %.2X: %s##_INS%d\n",i,ins->name,i);
|
||||
break;
|
||||
case DIV_INS_X1_010:
|
||||
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_INSTR_X1_010]);
|
||||
name=fmt::sprintf(ICON_FA_BAR_CHART " %.2X: %s##_INS%d\n",i,ins->name,i);
|
||||
break;
|
||||
default:
|
||||
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_INSTR_UNKNOWN]);
|
||||
name=fmt::sprintf(ICON_FA_QUESTION " %.2X: %s##_INS%d\n",i,ins->name,i);
|
||||
|
|
@ -1350,7 +1354,7 @@ void FurnaceGUI::drawSampleEdit() {
|
|||
ImGui::Text("notes:");
|
||||
if (sample->loopStart>=0) {
|
||||
considerations=true;
|
||||
ImGui::Text("- sample won't loop on Neo Geo ADPCM-A");
|
||||
ImGui::Text("- sample won't loop on Neo Geo ADPCM-A and X1-010");
|
||||
if (sample->loopStart&1) {
|
||||
ImGui::Text("- sample loop start will be aligned to the nearest even sample on Amiga");
|
||||
}
|
||||
|
|
@ -1366,10 +1370,18 @@ void FurnaceGUI::drawSampleEdit() {
|
|||
considerations=true;
|
||||
ImGui::Text("- sample length will be aligned and padded to 512 sample units on Neo Geo ADPCM.");
|
||||
}
|
||||
if (sample->samples&4095) {
|
||||
considerations=true;
|
||||
ImGui::Text("- sample length will be aligned and padded to 4096 sample units on X1-010.");
|
||||
}
|
||||
if (sample->samples>65535) {
|
||||
considerations=true;
|
||||
ImGui::Text("- maximum sample length on Sega PCM and QSound is 65536 samples");
|
||||
}
|
||||
if (sample->samples>131071) {
|
||||
considerations=true;
|
||||
ImGui::Text("- maximum sample length on X1-010 is 131072 samples");
|
||||
}
|
||||
if (sample->samples>2097151) {
|
||||
considerations=true;
|
||||
ImGui::Text("- maximum sample length on Neo Geo ADPCM is 2097152 samples");
|
||||
|
|
@ -2031,6 +2043,7 @@ void FurnaceGUI::drawStats() {
|
|||
String adpcmAUsage=fmt::sprintf("%d/16384KB",e->adpcmAMemLen/1024);
|
||||
String adpcmBUsage=fmt::sprintf("%d/16384KB",e->adpcmBMemLen/1024);
|
||||
String qsoundUsage=fmt::sprintf("%d/16384KB",e->qsoundMemLen/1024);
|
||||
String x1_010Usage=fmt::sprintf("%d/1024KB",e->x1_010MemLen/1024);
|
||||
ImGui::Text("ADPCM-A");
|
||||
ImGui::SameLine();
|
||||
ImGui::ProgressBar(((float)e->adpcmAMemLen)/16777216.0f,ImVec2(-FLT_MIN,0),adpcmAUsage.c_str());
|
||||
|
|
@ -2040,6 +2053,9 @@ void FurnaceGUI::drawStats() {
|
|||
ImGui::Text("QSound");
|
||||
ImGui::SameLine();
|
||||
ImGui::ProgressBar(((float)e->qsoundMemLen)/16777216.0f,ImVec2(-FLT_MIN,0),qsoundUsage.c_str());
|
||||
ImGui::Text("X1-010");
|
||||
ImGui::SameLine();
|
||||
ImGui::ProgressBar(((float)e->x1_010MemLen)/1048576.0f,ImVec2(-FLT_MIN,0),x1_010Usage.c_str());
|
||||
}
|
||||
if (ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows)) curWindow=GUI_WINDOW_STATS;
|
||||
ImGui::End();
|
||||
|
|
@ -4742,6 +4758,7 @@ bool FurnaceGUI::loop() {
|
|||
sysAddOption(DIV_SYSTEM_AY8930);
|
||||
sysAddOption(DIV_SYSTEM_LYNX);
|
||||
sysAddOption(DIV_SYSTEM_QSOUND);
|
||||
sysAddOption(DIV_SYSTEM_X1_010);
|
||||
sysAddOption(DIV_SYSTEM_SWAN);
|
||||
sysAddOption(DIV_SYSTEM_VERA);
|
||||
ImGui::EndMenu();
|
||||
|
|
@ -5036,6 +5053,23 @@ bool FurnaceGUI::loop() {
|
|||
} rightClickable
|
||||
break;
|
||||
}
|
||||
case DIV_SYSTEM_X1_010: {
|
||||
ImGui::Text("Clock rate:");
|
||||
if (ImGui::RadioButton("16MHz (Seta 1)",(flags&15)==0)) {
|
||||
e->setSysFlags(i,(flags&(~16))|0,restart);
|
||||
updateWindowTitle();
|
||||
}
|
||||
if (ImGui::RadioButton("16.67MHz (Seta 2)",(flags&15)==1)) {
|
||||
e->setSysFlags(i,(flags&(~16))|1,restart);
|
||||
updateWindowTitle();
|
||||
}
|
||||
bool x1_010Stereo=flags&16;
|
||||
if (ImGui::Checkbox("Stereo",&x1_010Stereo)) {
|
||||
e->setSysFlags(i,(flags&(~15))|(x1_010Stereo<<4),restart);
|
||||
updateWindowTitle();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case DIV_SYSTEM_GB:
|
||||
case DIV_SYSTEM_SWAN:
|
||||
case DIV_SYSTEM_VERA:
|
||||
|
|
@ -5097,6 +5131,7 @@ bool FurnaceGUI::loop() {
|
|||
sysChangeOption(i,DIV_SYSTEM_AY8930);
|
||||
sysChangeOption(i,DIV_SYSTEM_LYNX);
|
||||
sysChangeOption(i,DIV_SYSTEM_QSOUND);
|
||||
sysChangeOption(i,DIV_SYSTEM_X1_010);
|
||||
sysChangeOption(i,DIV_SYSTEM_SWAN);
|
||||
sysChangeOption(i,DIV_SYSTEM_VERA);
|
||||
ImGui::EndMenu();
|
||||
|
|
@ -5673,7 +5708,8 @@ void FurnaceGUI::applyUISettings() {
|
|||
GET_UI_COLOR(GUI_COLOR_INSTR_BEEPER,ImVec4(0.0f,1.0f,0.0f,1.0f));
|
||||
GET_UI_COLOR(GUI_COLOR_INSTR_SWAN,ImVec4(0.3f,0.5f,1.0f,1.0f));
|
||||
GET_UI_COLOR(GUI_COLOR_INSTR_MIKEY,ImVec4(0.5f,1.0f,0.3f,1.0f));
|
||||
GET_UI_COLOR(GUI_COLOR_INSTR_VERA,ImVec4(0.4f,0.6f,1.0f,1.0f))
|
||||
GET_UI_COLOR(GUI_COLOR_INSTR_VERA,ImVec4(0.4f,0.6f,1.0f,1.0f));
|
||||
GET_UI_COLOR(GUI_COLOR_INSTR_X1_010,ImVec4(0.3f,0.5f,1.0f,1.0f));
|
||||
GET_UI_COLOR(GUI_COLOR_INSTR_UNKNOWN,ImVec4(0.3f,0.3f,0.3f,1.0f));
|
||||
GET_UI_COLOR(GUI_COLOR_CHANNEL_FM,ImVec4(0.2f,0.8f,1.0f,1.0f));
|
||||
GET_UI_COLOR(GUI_COLOR_CHANNEL_PULSE,ImVec4(0.4f,1.0f,0.2f,1.0f));
|
||||
|
|
@ -6408,6 +6444,12 @@ FurnaceGUI::FurnaceGUI():
|
|||
0
|
||||
}
|
||||
));
|
||||
cat.systems.push_back(FurnaceGUISysDef(
|
||||
"Seta/Allumer X1-010", {
|
||||
DIV_SYSTEM_X1_010, 64, 0, 0,
|
||||
0
|
||||
}
|
||||
));
|
||||
sysCategories.push_back(cat);
|
||||
|
||||
cat=FurnaceGUISysCategory("Game consoles");
|
||||
|
|
@ -6705,6 +6747,18 @@ FurnaceGUI::FurnaceGUI():
|
|||
0
|
||||
}
|
||||
));
|
||||
cat.systems.push_back(FurnaceGUISysDef(
|
||||
"Seta 1", {
|
||||
DIV_SYSTEM_X1_010, 64, 0, 0,
|
||||
0
|
||||
}
|
||||
));
|
||||
cat.systems.push_back(FurnaceGUISysDef(
|
||||
"Seta 2", {
|
||||
DIV_SYSTEM_X1_010, 64, 0, 1,
|
||||
0
|
||||
}
|
||||
));
|
||||
sysCategories.push_back(cat);
|
||||
|
||||
cat=FurnaceGUISysCategory("DefleMask-compatible");
|
||||
|
|
|
|||
|
|
@ -74,6 +74,7 @@ enum FurnaceGUIColors {
|
|||
GUI_COLOR_INSTR_SWAN,
|
||||
GUI_COLOR_INSTR_MIKEY,
|
||||
GUI_COLOR_INSTR_VERA,
|
||||
GUI_COLOR_INSTR_X1_010,
|
||||
GUI_COLOR_INSTR_UNKNOWN,
|
||||
GUI_COLOR_CHANNEL_FM,
|
||||
GUI_COLOR_CHANNEL_PULSE,
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
#include <imgui.h>
|
||||
#include "plot_nolerp.h"
|
||||
|
||||
const char* insTypes[25]={
|
||||
const char* insTypes[DIV_INS_MAX]={
|
||||
"Standard",
|
||||
"FM (4-operator)",
|
||||
"Game Boy",
|
||||
|
|
@ -52,7 +52,8 @@ const char* insTypes[25]={
|
|||
"PC Beeper",
|
||||
"WonderSwan",
|
||||
"Atari Lynx",
|
||||
"VERA"
|
||||
"VERA",
|
||||
"X1-010"
|
||||
};
|
||||
|
||||
const char* ssgEnvTypes[8]={
|
||||
|
|
@ -157,6 +158,10 @@ const char* mikeyFeedbackBits[11] = {
|
|||
"0", "1", "2", "3", "4", "5", "7", "10", "11", "int", NULL
|
||||
};
|
||||
|
||||
const char* x1_010EnvBits[8]={
|
||||
"enable", "oneshot", "split L/R", "HinvR", "VinvR", "HinvL", "VinvL", NULL
|
||||
};
|
||||
|
||||
const char* oneBit[2]={
|
||||
"on", NULL
|
||||
};
|
||||
|
|
@ -792,9 +797,9 @@ void FurnaceGUI::drawInsEdit() {
|
|||
} else {
|
||||
DivInstrument* ins=e->song.ins[curIns];
|
||||
ImGui::InputText("Name",&ins->name);
|
||||
if (ins->type<0 || ins->type>24) ins->type=DIV_INS_FM;
|
||||
if (ins->type<0 || ins->type>=DIV_INS_MAX) ins->type=DIV_INS_FM;
|
||||
int insType=ins->type;
|
||||
if (ImGui::Combo("Type",&insType,insTypes,25,24)) {
|
||||
if (ImGui::Combo("Type",&insType,insTypes,DIV_INS_MAX,DIV_INS_MAX)) {
|
||||
ins->type=(DivInstrumentType)insType;
|
||||
}
|
||||
|
||||
|
|
@ -1449,11 +1454,18 @@ void FurnaceGUI::drawInsEdit() {
|
|||
|
||||
int ex1Max=(ins->type==DIV_INS_AY8930)?8:0;
|
||||
int ex2Max=(ins->type==DIV_INS_AY || ins->type==DIV_INS_AY8930)?4:0;
|
||||
bool ex2Bit=true;
|
||||
|
||||
if (ins->type==DIV_INS_C64) {
|
||||
ex1Max=4;
|
||||
ex2Max=15;
|
||||
}
|
||||
if (ins->type==DIV_INS_X1_010) {
|
||||
dutyMax=0;
|
||||
ex1Max=7;
|
||||
ex2Max=63;
|
||||
ex2Bit=false;
|
||||
}
|
||||
if (ins->type==DIV_INS_SAA1099) ex1Max=8;
|
||||
|
||||
if (settings.macroView==0) { // modern view
|
||||
|
|
@ -1478,6 +1490,8 @@ void FurnaceGUI::drawInsEdit() {
|
|||
NORMAL_MACRO(ins->std.ex1Macro,ins->std.ex1MacroLen,ins->std.ex1MacroLoop,ins->std.ex1MacroRel,0,ex1Max,"ex1","Filter Mode",64,ins->std.ex1MacroOpen,true,filtModeBits,false,NULL,0,0,0,NULL,uiColors[GUI_COLOR_MACRO_OTHER],mmlString[4],0,ex1Max,NULL,false);
|
||||
} else if (ins->type==DIV_INS_SAA1099) {
|
||||
NORMAL_MACRO(ins->std.ex1Macro,ins->std.ex1MacroLen,ins->std.ex1MacroLoop,ins->std.ex1MacroRel,0,ex1Max,"ex1","Envelope",160,ins->std.ex1MacroOpen,true,saaEnvBits,false,NULL,0,0,0,NULL,uiColors[GUI_COLOR_MACRO_OTHER],mmlString[4],0,ex1Max,NULL,false);
|
||||
} else if (ins->type==DIV_INS_X1_010) {
|
||||
NORMAL_MACRO(ins->std.ex1Macro,ins->std.ex1MacroLen,ins->std.ex1MacroLoop,ins->std.ex1MacroRel,0,ex1Max,"ex1","Envelope Mode",160,ins->std.ex1MacroOpen,true,x1_010EnvBits,false,NULL,0,0,0,NULL,uiColors[GUI_COLOR_MACRO_OTHER],mmlString[4],0,ex1Max,NULL,false);
|
||||
} else {
|
||||
NORMAL_MACRO(ins->std.ex1Macro,ins->std.ex1MacroLen,ins->std.ex1MacroLoop,ins->std.ex1MacroRel,0,ex1Max,"ex1","Duty",160,ins->std.ex1MacroOpen,false,NULL,false,NULL,0,0,0,NULL,uiColors[GUI_COLOR_MACRO_OTHER],mmlString[4],0,ex1Max,NULL,false);
|
||||
}
|
||||
|
|
@ -1486,13 +1500,13 @@ void FurnaceGUI::drawInsEdit() {
|
|||
if (ins->type==DIV_INS_C64) {
|
||||
NORMAL_MACRO(ins->std.ex2Macro,ins->std.ex2MacroLen,ins->std.ex2MacroLoop,ins->std.ex2MacroRel,0,ex2Max,"ex2","Resonance",64,ins->std.ex2MacroOpen,false,NULL,false,NULL,0,0,0,NULL,uiColors[GUI_COLOR_MACRO_OTHER],mmlString[5],0,ex2Max,NULL,false);
|
||||
} else {
|
||||
NORMAL_MACRO(ins->std.ex2Macro,ins->std.ex2MacroLen,ins->std.ex2MacroLoop,ins->std.ex2MacroRel,0,ex2Max,"ex2","Envelope",64,ins->std.ex2MacroOpen,true,ayEnvBits,false,NULL,0,0,0,NULL,uiColors[GUI_COLOR_MACRO_OTHER],mmlString[5],0,ex2Max,NULL,false);
|
||||
NORMAL_MACRO(ins->std.ex2Macro,ins->std.ex2MacroLen,ins->std.ex2MacroLoop,ins->std.ex2MacroRel,0,ex2Max,"ex2","Envelope",ex2Bit?64:160,ins->std.ex2MacroOpen,ex2Bit,ayEnvBits,false,NULL,0,0,0,NULL,uiColors[GUI_COLOR_MACRO_OTHER],mmlString[5],0,ex2Max,NULL,false);
|
||||
}
|
||||
}
|
||||
if (ins->type==DIV_INS_C64) {
|
||||
NORMAL_MACRO(ins->std.ex3Macro,ins->std.ex3MacroLen,ins->std.ex3MacroLoop,ins->std.ex3MacroRel,0,2,"ex3","Special",32,ins->std.ex3MacroOpen,true,c64SpecialBits,false,NULL,0,0,0,NULL,uiColors[GUI_COLOR_MACRO_OTHER],mmlString[6],0,2,NULL,false);
|
||||
}
|
||||
if (ins->type==DIV_INS_AY || ins->type==DIV_INS_AY8930) {
|
||||
if (ins->type==DIV_INS_AY || ins->type==DIV_INS_AY8930 || ins->type==DIV_INS_X1_010) {
|
||||
NORMAL_MACRO(ins->std.ex3Macro,ins->std.ex3MacroLen,ins->std.ex3MacroLoop,ins->std.ex3MacroRel,0,15,"ex3","AutoEnv Num",96,ins->std.ex3MacroOpen,false,NULL,false,NULL,0,0,0,NULL,uiColors[GUI_COLOR_MACRO_OTHER],mmlString[6],0,15,NULL,false);
|
||||
NORMAL_MACRO(ins->std.algMacro,ins->std.algMacroLen,ins->std.algMacroLoop,ins->std.algMacroRel,0,15,"alg","AutoEnv Den",96,ins->std.algMacroOpen,false,NULL,false,NULL,0,0,0,NULL,uiColors[GUI_COLOR_MACRO_OTHER],mmlString[7],0,15,NULL,false);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -493,6 +493,7 @@ void FurnaceGUI::drawSettings() {
|
|||
UI_COLOR_CONFIG(GUI_COLOR_INSTR_SWAN,"WonderSwan");
|
||||
UI_COLOR_CONFIG(GUI_COLOR_INSTR_MIKEY,"Lynx");
|
||||
UI_COLOR_CONFIG(GUI_COLOR_INSTR_VERA,"VERA");
|
||||
UI_COLOR_CONFIG(GUI_COLOR_INSTR_X1_010,"X1-010");
|
||||
UI_COLOR_CONFIG(GUI_COLOR_INSTR_UNKNOWN,"Other/Unknown");
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
|
@ -1161,6 +1162,7 @@ void FurnaceGUI::commitSettings() {
|
|||
PUT_UI_COLOR(GUI_COLOR_INSTR_SWAN);
|
||||
PUT_UI_COLOR(GUI_COLOR_INSTR_MIKEY);
|
||||
PUT_UI_COLOR(GUI_COLOR_INSTR_VERA);
|
||||
PUT_UI_COLOR(GUI_COLOR_INSTR_X1_010);
|
||||
PUT_UI_COLOR(GUI_COLOR_INSTR_UNKNOWN);
|
||||
PUT_UI_COLOR(GUI_COLOR_CHANNEL_FM);
|
||||
PUT_UI_COLOR(GUI_COLOR_CHANNEL_PULSE);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue