let's go
Atari Lynx Support
This commit is contained in:
commit
8ca32aa2d6
19 changed files with 1212 additions and 26 deletions
|
|
@ -1156,6 +1156,10 @@ void FurnaceGUI::drawInsList() {
|
|||
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_INSTR_SWAN]);
|
||||
name=fmt::sprintf(ICON_FA_GAMEPAD " %.2X: %s##_INS%d\n",i,ins->name,i);
|
||||
break;
|
||||
case DIV_INS_MIKEY:
|
||||
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_INSTR_MIKEY]);
|
||||
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);
|
||||
|
|
@ -4477,6 +4481,7 @@ bool FurnaceGUI::loop() {
|
|||
sysAddOption(DIV_SYSTEM_TIA);
|
||||
sysAddOption(DIV_SYSTEM_SAA1099);
|
||||
sysAddOption(DIV_SYSTEM_AY8930);
|
||||
sysAddOption(DIV_SYSTEM_LYNX);
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
if (ImGui::BeginMenu("configure system...")) {
|
||||
|
|
@ -4684,6 +4689,7 @@ bool FurnaceGUI::loop() {
|
|||
sysChangeOption(i,DIV_SYSTEM_TIA);
|
||||
sysChangeOption(i,DIV_SYSTEM_SAA1099);
|
||||
sysChangeOption(i,DIV_SYSTEM_AY8930);
|
||||
sysChangeOption(i,DIV_SYSTEM_LYNX);
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
}
|
||||
|
|
@ -5225,6 +5231,7 @@ void FurnaceGUI::applyUISettings() {
|
|||
GET_UI_COLOR(GUI_COLOR_INSTR_POKEY,ImVec4(0.5f,1.0f,0.3f,1.0f));
|
||||
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_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));
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ enum FurnaceGUIColors {
|
|||
GUI_COLOR_INSTR_POKEY,
|
||||
GUI_COLOR_INSTR_BEEPER,
|
||||
GUI_COLOR_INSTR_SWAN,
|
||||
GUI_COLOR_INSTR_MIKEY,
|
||||
GUI_COLOR_INSTR_UNKNOWN,
|
||||
GUI_COLOR_CHANNEL_FM,
|
||||
GUI_COLOR_CHANNEL_PULSE,
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
#include <fmt/printf.h>
|
||||
#include "plot_nolerp.h"
|
||||
|
||||
const char* insTypes[23]={
|
||||
const char* insTypes[24]={
|
||||
"Standard",
|
||||
"FM (4-operator)",
|
||||
"Game Boy",
|
||||
|
|
@ -49,7 +49,8 @@ const char* insTypes[23]={
|
|||
"FM (OPZ)",
|
||||
"POKEY",
|
||||
"PC Beeper",
|
||||
"WonderSwan"
|
||||
"WonderSwan",
|
||||
"Atari Lynx"
|
||||
};
|
||||
|
||||
const char* ssgEnvTypes[8]={
|
||||
|
|
@ -131,6 +132,10 @@ const char* c64SpecialBits[3]={
|
|||
"sync", "ring", NULL
|
||||
};
|
||||
|
||||
const char* mikeyFeedbackBits[11] = {
|
||||
"0", "1", "2", "3", "4", "5", "7", "10", "11", "int", NULL
|
||||
};
|
||||
|
||||
const int orderedOps[4]={
|
||||
0, 2, 1, 3
|
||||
};
|
||||
|
|
@ -691,10 +696,9 @@ void FurnaceGUI::drawInsEdit() {
|
|||
} else {
|
||||
DivInstrument* ins=e->song.ins[curIns];
|
||||
ImGui::InputText("Name",&ins->name);
|
||||
if (ins->type<0 || ins->type>22) ins->type=DIV_INS_FM;
|
||||
if (ins->type<0 || ins->type>23) ins->type=DIV_INS_FM;
|
||||
int insType=ins->type;
|
||||
// TODO: set to 23 for 0.6
|
||||
if (ImGui::Combo("Type",&insType,insTypes,10)) {
|
||||
if (ImGui::Combo("Type",&insType,insTypes,24)) {
|
||||
ins->type=(DivInstrumentType)insType;
|
||||
}
|
||||
|
||||
|
|
@ -950,7 +954,7 @@ void FurnaceGUI::drawInsEdit() {
|
|||
if (ins->type==DIV_INS_AMIGA) {
|
||||
volMax=64;
|
||||
}
|
||||
if (ins->type==DIV_INS_FM) {
|
||||
if (ins->type==DIV_INS_FM || ins->type == DIV_INS_MIKEY) {
|
||||
volMax=127;
|
||||
}
|
||||
if (ins->type==DIV_INS_GB) {
|
||||
|
|
@ -975,6 +979,10 @@ void FurnaceGUI::drawInsEdit() {
|
|||
if (ins->type==DIV_INS_AY || ins->type==DIV_INS_AY8930 || ins->type==DIV_INS_FM) {
|
||||
dutyLabel="Noise Freq";
|
||||
}
|
||||
if (ins->type == DIV_INS_MIKEY) {
|
||||
dutyLabel = "Duty/Int";
|
||||
dutyMax = 10;
|
||||
}
|
||||
if (ins->type==DIV_INS_AY8930) {
|
||||
dutyMax=255;
|
||||
}
|
||||
|
|
@ -993,6 +1001,7 @@ void FurnaceGUI::drawInsEdit() {
|
|||
if (ins->type==DIV_INS_C64) waveMax=4;
|
||||
if (ins->type==DIV_INS_SAA1099) waveMax=2;
|
||||
if (ins->type==DIV_INS_FM) waveMax=0;
|
||||
if (ins->type==DIV_INS_MIKEY) waveMax=0;
|
||||
|
||||
const char** waveNames=ayShapeBits;
|
||||
if (ins->type==DIV_INS_C64) waveNames=c64ShapeBits;
|
||||
|
|
@ -1013,7 +1022,12 @@ void FurnaceGUI::drawInsEdit() {
|
|||
}
|
||||
NORMAL_MACRO(ins->std.arpMacro,ins->std.arpMacroLen,ins->std.arpMacroLoop,ins->std.arpMacroRel,arpMacroScroll,arpMacroScroll+24,"arp","Arpeggio",160,ins->std.arpMacroOpen,false,NULL,true,&arpMacroScroll,(arpMode?0:-80),0,0,&ins->std.arpMacroMode,uiColors[GUI_COLOR_MACRO_PITCH],mmlString[1],-92,94,(ins->std.arpMacroMode?(¯oHoverNote):NULL),true);
|
||||
if (dutyMax>0) {
|
||||
NORMAL_MACRO(ins->std.dutyMacro,ins->std.dutyMacroLen,ins->std.dutyMacroLoop,ins->std.dutyMacroRel,0,dutyMax,"duty",dutyLabel,160,ins->std.dutyMacroOpen,false,NULL,false,NULL,0,0,0,NULL,uiColors[GUI_COLOR_MACRO_OTHER],mmlString[2],0,dutyMax,NULL,false);
|
||||
if (ins->type == DIV_INS_MIKEY) {
|
||||
NORMAL_MACRO(ins->std.dutyMacro,ins->std.dutyMacroLen,ins->std.dutyMacroLoop,ins->std.dutyMacroRel,0,dutyMax,"duty",dutyLabel,160,ins->std.dutyMacroOpen,true,mikeyFeedbackBits,false,NULL,0,0,0,NULL,uiColors[GUI_COLOR_MACRO_OTHER],mmlString[2],0,dutyMax,NULL,false);
|
||||
}
|
||||
else {
|
||||
NORMAL_MACRO(ins->std.dutyMacro,ins->std.dutyMacroLen,ins->std.dutyMacroLoop,ins->std.dutyMacroRel,0,dutyMax,"duty",dutyLabel,160,ins->std.dutyMacroOpen,false,NULL,false,NULL,0,0,0,NULL,uiColors[GUI_COLOR_MACRO_OTHER],mmlString[2],0,dutyMax,NULL,false);
|
||||
}
|
||||
}
|
||||
if (waveMax>0) {
|
||||
NORMAL_MACRO(ins->std.waveMacro,ins->std.waveMacroLen,ins->std.waveMacroLoop,ins->std.waveMacroRel,0,waveMax,"wave","Waveform",bitMode?64:160,ins->std.waveMacroOpen,bitMode,waveNames,false,NULL,0,0,((ins->type==DIV_INS_AY || ins->type==DIV_INS_AY8930)?1:0),NULL,uiColors[GUI_COLOR_MACRO_WAVE],mmlString[3],0,waveMax,NULL,false);
|
||||
|
|
|
|||
|
|
@ -474,6 +474,7 @@ void FurnaceGUI::drawSettings() {
|
|||
UI_COLOR_CONFIG(GUI_COLOR_INSTR_POKEY,"POKEY");
|
||||
UI_COLOR_CONFIG(GUI_COLOR_INSTR_BEEPER,"PC Beeper");
|
||||
UI_COLOR_CONFIG(GUI_COLOR_INSTR_SWAN,"WonderSwan");
|
||||
UI_COLOR_CONFIG(GUI_COLOR_INSTR_MIKEY,"Lynx");
|
||||
UI_COLOR_CONFIG(GUI_COLOR_INSTR_UNKNOWN,"Other/Unknown");
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue