Subversion Repositories svn.mios32

Compare Revisions

Ignore whitespace Rev 2491 → Rev 2492

/trunk/apps/synthesizers/midibox_quad_genesis/src/cmdeditor.c
242,9 → 242,9
}
}else if(cmd.addr <= 0xAE && cmd.addr >= 0xA8){
//Channel 3 extra frequency
if(cmd.addr == 0xAD) op = 2;
else if(cmd.addr == 0xAE) op = 3;
else if(cmd.addr == 0xAC) op = 4;
if(cmd.addr == 0xAD) op = 0;
else if(cmd.addr == 0xAE) op = 1;
else if(cmd.addr == 0xAC) op = 2;
else return;
FrontPanel_GenesisLEDSet(0, 3, 0, !clear);
FrontPanel_LEDSet(FP_LED_OPNODE_R_1 + op, !clear);
443,9 → 443,9
}
}else if(cmd.addr <= 0xAE && cmd.addr >= 0xA8){
//Channel 3 extra frequency
if(cmd.addr == 0xAD) op = 2;
else if(cmd.addr == 0xAE) op = 3;
else if(cmd.addr == 0xAC) op = 4;
if(cmd.addr == 0xAD) op = 0;
else if(cmd.addr == 0xAE) op = 1;
else if(cmd.addr == 0xAC) op = 2;
else return;
sprintf(desc, "FM3 Op%d Block:%d, Freq:%d", op+1, (cmd.data >> 3) & 7, ((u16)(cmd.data & 7) << 8) | cmd.data2);
}else if(cmd.addr <= 0xB6){
/trunk/apps/synthesizers/midibox_quad_genesis/src/capturer.c
29,7 → 29,7
FrontPanel_GenesisLEDSet(((selchan>>2)&3), (selchan&3)+8, 1, 1);
MIOS32_LCD_Clear();
MIOS32_LCD_CursorSet(0,0);
MIOS32_LCD_PrintFormattedString("Capture voice 0x%02X to port %d chn %d", cvoice, (selchan>>4)+1, (selchan&0xF)+1);
MIOS32_LCD_PrintFormattedString("Capture voice to port %d chn %d", (selchan>>4)+1, (selchan&0xF)+1);
u8 v = cvoice & 0x0F;
if(v == 0 || v == 7 || v > 11){
MIOS32_LCD_CursorSet(0,1);
75,6 → 75,9
usage.all |= (1 << (v+5));
usinglfo = 1;
}
if(v == 3 && genesis[g].opn2.ch3_mode != 0){
usage.fm3_special = 1;
}
}else if(v >= 8 && v <= 10){
usage.all |= (1 << (16+v));
}else if(v == 11){
113,6 → 116,16
VGM_SourceRAM_InsertCmd(vs, a++, (VgmChipWriteCmd){ .cmd=0x52,
.addr = 0x22, .data = genesis[g].opn2.lforeg, .data2=0});
}
if(usage.fm3_special){
if(genesis[g].opn2.ch3_mode == 2){
VGM_SourceRAM_InsertCmd(vs, a++, (VgmChipWriteCmd){ .cmd=0x52,
.addr = 0x24, .data = genesis[g].opn2.timera_high, .data2=0});
VGM_SourceRAM_InsertCmd(vs, a++, (VgmChipWriteCmd){ .cmd=0x52,
.addr = 0x25, .data = genesis[g].opn2.timeralowreg, .data2=0});
}
VGM_SourceRAM_InsertCmd(vs, a++, (VgmChipWriteCmd){ .cmd=0x52,
.addr = 0x27, .data = genesis[g].opn2.timerctrlreg, .data2=0});
}
//Operator parameters
u8 op, reg;
for(reg=0; reg<7; ++reg){
138,7 → 151,26
VGM_Source_UpdateUsage(vs);
}
//Create note-on VGM
prog->noteonsource = CreateNewVGM(1, usage);
if(usage.fm3_special){
//Capture current operator frequencies
VgmSource* vs = VGM_SourceRAM_Create();
prog->noteonsource = vs;
u32 a = 0;
VGM_SourceRAM_InsertCmd(vs, a++, (VgmChipWriteCmd){ .cmd=0x52, .addr = 0xAD,
.data = genesis[g].opn2.ch3op1_fhireg, .data2=genesis[g].opn2.ch3op1_fnum_low});
VGM_SourceRAM_InsertCmd(vs, a++, (VgmChipWriteCmd){ .cmd=0x52, .addr = 0xAE,
.data = genesis[g].opn2.ch3op2_fhireg, .data2=genesis[g].opn2.ch3op2_fnum_low});
VGM_SourceRAM_InsertCmd(vs, a++, (VgmChipWriteCmd){ .cmd=0x52, .addr = 0xAC,
.data = genesis[g].opn2.ch3op3_fhireg, .data2=genesis[g].opn2.ch3op3_fnum_low});
VGM_SourceRAM_InsertCmd(vs, a++, (VgmChipWriteCmd){ .cmd=0x52, .addr = 0xA6,
.data = genesis[g].opn2.chan[2].fhireg, .data2=genesis[g].opn2.chan[2].fnum_low});
VGM_SourceRAM_InsertCmd(vs, a++, (VgmChipWriteCmd){ .cmd=0x52, .addr = 0x28,
.data = 0xF2, .data2=0});
VGM_Source_UpdateUsage(vs);
}else{
//Normal init VGM, middle C key on
prog->noteonsource = CreateNewVGM(1, usage);
}
//Create note-off VGM
prog->noteoffsource = CreateNewVGM(2, usage);
//Update usage
/trunk/apps/synthesizers/midibox_quad_genesis/src/mode_system.c
14,6 → 14,7
#include "mode_system.h"
#include <vgm.h>
#include <genesis.h>
#include <blm_x.h>
#include "frontpanel.h"
#include "syeng.h"
 
20,9 → 21,18
static u8 submode;
static u8 test_character;
 
static u16 tick_prescaler;
static u8 counter;
static const u8 button_lut[10] = {44, 44, 45, 45, 37, 38, 37, 38, 53, 51};
 
static s8 vegastextpos;
static u32 vegascounter;
static u16 vegasprescaler;
static u8 vegasstate;
static u8 vegassub;
static const char mbx_name[29] = "AUTHENTIC QUAD GENESIS SOUND";
static const u8 mbx_name_len = 28;
 
static void DrawUsage(){
vgm_meminfo_t m = VGM_PerfMon_GetMemInfo();
u8 chipuse = VGM_PerfMon_GetTaskCPU(VGM_PERFMON_TASK_CHIP);
62,16 → 72,31
case 3:
MIOS32_LCD_Clear();
MIOS32_LCD_CursorSet(0,0);
MIOS32_LCD_PrintString("Demo mode unlocked!");
MIOS32_LCD_CursorSet(0,1);
MIOS32_LCD_PrintString("(Coming Soon)");
MIOS32_LCD_PrintFormattedString("Character %d: ", test_character);
MIOS32_LCD_PrintChar(test_character);
break;
case 4:
MIOS32_LCD_Clear();
MIOS32_LCD_CursorSet(0,0);
MIOS32_LCD_PrintFormattedString("Character %d: ", test_character);
MIOS32_LCD_PrintChar(test_character);
MIOS32_LCD_PrintString("Welcome to DEMO MODE! :)");
MIOS32_LCD_CursorSet(0,1);
MIOS32_LCD_PrintString("LED Test --Vegas-- --Tetris--");
break;
case 5:
MIOS32_LCD_Clear();
MIOS32_LCD_CursorSet(0,0);
MIOS32_LCD_PrintString("LED Test");
break;
case 6:
MIOS32_LCD_Clear();
MIOS32_LCD_CursorSet(0,0);
MIOS32_LCD_PrintString("Vegas");
break;
case 7:
MIOS32_LCD_Clear();
MIOS32_LCD_CursorSet(0,0);
MIOS32_LCD_PrintString("Tetris not implemented yet");
break;
default:
MIOS32_LCD_Clear();
MIOS32_LCD_CursorSet(0,0);
81,7 → 106,12
 
void Mode_System_Init(){
submode = 0;
tick_prescaler = 0;
test_character = 0;
vegasprescaler = 0;
vegasstate = 0;
vegascounter = 0;
vegassub = 0;
}
void Mode_System_GotFocus(){
submode = 0;
90,17 → 120,166
}
 
void Mode_System_Tick(){
static u16 prescaler = 0;
++prescaler;
if(prescaler == 500){
++tick_prescaler;
if(tick_prescaler == 500){
if(submode == 0){
DrawUsage();
}
prescaler = 0;
tick_prescaler = 0;
}
}
void Mode_System_Background(){
 
u8 i;
u16 j;
switch(submode){
case 5:
for(j=0; j<8*88; ++j){
BLM_X_LEDSet(j, 0, 1);
}
break;
case 6:
//==================================================================
//============================ VEGAS ===============================
//==================================================================
if(vegasprescaler == tick_prescaler) return;
vegasprescaler = tick_prescaler;
switch(vegasstate){
case 0:
BLM_X_LEDSet(((vegascounter & 7) * 88) + (vegascounter >> 3), 0, 1);
if(++vegascounter == 88*8){
vegascounter = 0;
vegasstate = 1;
}
break;
case 1:
BLM_X_LEDSet(((vegascounter & 7) * 88) + (vegascounter >> 3), 0, 0);
if(++vegascounter == 88*8){
vegascounter = 0;
if(++vegassub == 2){
vegassub = 0;
vegasstate = 2;
}else{
vegasstate = 0;
}
}
break;
case 2:
BLM_X_LEDSet(vegascounter, 0, 1);
if(++vegascounter == 88*8){
vegascounter = 0;
vegasstate = 3;
}
break;
case 3:
BLM_X_LEDSet(vegascounter, 0, 0);
if(++vegascounter == 88*8){
vegascounter = 0;
if(++vegassub == 2){
vegassub = 0;
vegasstate = 4;
vegastextpos = -9;
}else{
vegasstate = 2;
}
}
break;
case 4:
for(i=0; i<18; i++){
FrontPanel_LEDRingSet(i, 0, (i&1) ?
(15 - ((vegascounter >> 6) & 0xF)) : ((vegascounter >> 6) & 0xF));
}
FrontPanel_GenesisLEDSet((vegascounter >> 6) & 3,
(vegascounter & 0xF), (vegascounter >> 8) & 1, 1);
FrontPanel_GenesisLEDSet((vegascounter >> 6) & 3,
(vegascounter & 0xF), ~(vegascounter >> 8) & 1, 0);
if(++vegascounter == 0x400){
vegascounter = 0;
vegasstate = 5;
}
break;
case 5:
for(i=0; i<18; i++){
FrontPanel_LEDRingSet(i, 0, !(i&1) ?
(15 - ((vegascounter >> 6) & 0xF)) : ((vegascounter >> 6) & 0xF));
}
FrontPanel_GenesisLEDSet(3 - ((vegascounter >> 6) & 3),
(vegascounter & 0xF), (vegascounter >> 8) & 1, 1);
FrontPanel_GenesisLEDSet(3 - ((vegascounter >> 6) & 3),
(vegascounter & 0xF), ~(vegascounter >> 8) & 1, 0);
if(++vegascounter == 0x400){
vegascounter = 0;
if(++vegassub == 2){
vegassub = 0;
vegasstate = 6;
}else{
vegasstate = 4;
}
}
break;
case 6:
for(i=0; i<18; i++){
FrontPanel_LEDRingSet(i, 1, ((vegascounter >> 6) & 0xF));
}
i = ((vegascounter >> 8) & 1) ^ ((vegascounter >> 6) & 1) ^ (vegascounter & 1)
^ ((vegascounter & 0xF) == 0 || (vegascounter & 0xF) == 7);
FrontPanel_GenesisLEDSet(((vegascounter >> 6) & 3), (vegascounter & 0xF), 0, i);
FrontPanel_GenesisLEDSet(((vegascounter >> 6) & 3), (vegascounter & 0xF), 1, !i);
if(++vegascounter == 0x400){
vegascounter = 0;
vegasstate = 7;
}
break;
case 7:
for(i=0; i<18; i++){
FrontPanel_LEDRingSet(i, 1, 15 - ((vegascounter >> 6) & 0xF));
}
i = ((vegascounter >> 8) & 1) ^ ((vegascounter >> 6) & 1) ^ (vegascounter & 1)
^ ((vegascounter & 0xF) == 0 || (vegascounter & 0xF) == 7);
FrontPanel_GenesisLEDSet(((vegascounter >> 6) & 3), (vegascounter & 0xF), 0, i);
FrontPanel_GenesisLEDSet(((vegascounter >> 6) & 3), (vegascounter & 0xF), 1, !i);
if(++vegascounter == 0x400){
vegascounter = 0;
if(++vegassub == 1){
vegassub = 0;
vegasstate = 0;
}else{
vegasstate = 6;
}
}
break;
}
if(vegasstate >= 4 && vegasstate <= 7){
char k;
for(j=0; j<9; ++j){
if(vegastextpos + j < 0 || vegastextpos + j >= mbx_name_len){
k = ' ';
}else{
k = mbx_name[vegastextpos + j];
}
if(j < 4){
i = FP_LED_DIG_MAIN_1 + j;
}else if(j == 4){
i = FP_LED_DIG_OCT;
}else{
i = FP_LED_DIG_FREQ_1 + j - 5;
}
FrontPanel_DrawDigit(i, k);
}
if(!(vegascounter & 0x7F)){
++vegastextpos;
if(vegastextpos > mbx_name_len){
vegastextpos = -9;
}
}
}
//==================================================================
//========================== END VEGAS =============================
//==================================================================
break;
case 7:
break;
}
}
 
void Mode_System_BtnGVoice(u8 gvoice, u8 state){
144,11 → 323,42
DrawMenu();
break;
case 3:
submode = 4;
submode = 3;
DrawMenu();
break;
}
break;
case 3:
//nothing
break;
case 4:
switch(softkey){
case 0:
case 1:
submode = 5;
DrawMenu();
break;
case 2:
case 3:
submode = 6;
DrawMenu();
break;
case 4:
case 5:
submode = 7;
DrawMenu();
break;
}
break;
case 5:
//nothing
break;
case 6:
//TODO
break;
case 7:
//TODO
break;
default:
MIOS32_LCD_Clear();
MIOS32_LCD_CursorSet(0,0);
164,7 → 374,8
void Mode_System_BtnSystem(u8 button, u8 state){
if(!state) return;
if(button == FP_B_MENU){
submode = 0;
if(submode > 4) submode = 4;
else submode = 0;
DrawMenu();
return;
}
172,7 → 383,7
case 2:
if(button == button_lut[counter]){
if(counter == 9){
submode = 3;
submode = 4;
DrawMenu();
return;
}else{
190,7 → 401,7
 
void Mode_System_EncDatawheel(s32 incrementer){
switch(submode){
case 4:
case 3:
test_character += incrementer;
DrawMenu();
break;
/trunk/apps/synthesizers/midibox_quad_genesis/src/mode_prog.c
68,7 → 68,7
}
}
 
static void FilebrowserDone(char* filename){
static void FilebrowserDoneLoading(char* filename){
FrontPanel_LEDSet(FP_LED_LOAD, 0);
if(filename == NULL || cursor < 5 || cursor > 7){
DrawMenu();
129,6 → 129,23
Interface_ChangeToMode(MODE_VGM);
}
 
static void FilebrowserDoneSaving(char* filename){
FrontPanel_LEDSet(FP_LED_SAVE, 0);
if(filename == NULL || cursor < 5 || cursor > 7){
DrawMenu();
return;
}
VgmSource** ss = SelSource(selprogram, cursor-5);
if(*ss == NULL){
DrawMenu();
return;
}
//TODO
DrawMenu();
MIOS32_LCD_CursorSet(0,0);
MIOS32_LCD_PrintFormattedString("Saved ");
}
 
void Mode_Prog_Init(){
submode = 0;
cursor = 5;
223,10 → 240,23
MIOS32_LCD_PrintString("Delete VGM before loading a new one!");
}else{
FrontPanel_LEDSet(FP_LED_LOAD, 1);
Filebrowser_Start(NULL, "VGM", 1, &FilebrowserDone);
Filebrowser_Start(NULL, "VGM", 0, &FilebrowserDoneLoading);
}
}
break;
case FP_B_SAVE:
if(!state) return;
if(cursor >= 5 && cursor <= 7){
VgmSource** ss = SelSource(selprogram, cursor-5);
if(*ss == NULL){
MIOS32_LCD_CursorSet(0,0);
MIOS32_LCD_PrintString("No VGM to save!");
}else{
FrontPanel_LEDSet(FP_LED_SAVE, 1);
Filebrowser_Start(NULL, "VGM", 1, &FilebrowserDoneSaving);
}
}
break;
case FP_B_NEW:
if(!state) return;
if(cursor >= 5 && cursor <= 7){
/trunk/apps/synthesizers/midibox_quad_genesis/src/mode_chan.c
38,10 → 38,16
u8 v = channels[selchan].trackervoice;
MIOS32_LCD_PrintFormattedString(" Free ~Trkr G%d:%s", (v >> 4)+1, GetVoiceName(v & 0xF));
}else{
MIOS32_LCD_PrintString("~Free Trkr Edit");
synprogram_t* prog = channels[selchan].program;
MIOS32_LCD_CursorSet(20,0);
MIOS32_LCD_PrintFormattedString("Prog: %s", prog == NULL ? "<none>" : prog->name);
if(prog == NULL){
MIOS32_LCD_PrintString("~Free Trkr");
MIOS32_LCD_CursorSet(20,0);
MIOS32_LCD_PrintFormattedString("Prog: <none>");
}else{
MIOS32_LCD_PrintString("~Free Edit");
MIOS32_LCD_CursorSet(20,0);
MIOS32_LCD_PrintFormattedString("Prog: %s", prog->name);
}
}
break;
case 1:
136,6 → 142,12
break;
}
}
void EditProgram(){
if(channels[selchan].program == NULL) return;
selprogram = channels[selchan].program;
Mode_Vgm_InvalidateVgm(NULL);
Interface_ChangeToMode(MODE_PROG);
}
void Mode_Chan_BtnSoftkey(u8 softkey, u8 state){
if(!state) return;
switch(submode){
190,9 → 202,7
DrawMenu();
break;
case 4:
selprogram = channels[selchan].program;
Mode_Vgm_InvalidateVgm(NULL);
Interface_ChangeToMode(MODE_PROG);
EditProgram();
break;
}
break;
220,11 → 230,6
 
}
void Mode_Chan_BtnSystem(u8 button, u8 state){
switch(subscreen){
case SUBSCREEN_NAMEEDITOR:
NameEditor_BtnSystem(button, state);
return;
}
if(!state) return;
if(button == FP_B_MENU){
submode = 0;
263,6 → 268,9
SyEng_DeleteProgram(selchan);
DrawMenu();
break;
case FP_B_ENTER:
EditProgram();
break;
}
break;
}
/trunk/apps/synthesizers/midibox_quad_genesis/src/filebrowser.c
27,9 → 27,11
static char* cursubdir;
static char extn[4];
static u8 waserror;
static u8 saving;
static u8 save_mode;
static u8 cursor;
static u8 innameeditor;
static u8 submode;
static u8 yespos;
 
static void DrawMenu(){
//-----=====-----=====-----=====-----=====
47,21 → 49,38
}
MIOS32_LCD_Clear();
MIOS32_LCD_CursorSet(0,0);
MIOS32_LCD_PrintFormattedString("In %s%c", curpath, curpath[1] == 0 ? ' ' : '/');
MIOS32_LCD_CursorSet(0,1);
MIOS32_LCD_PrintFormattedString("Up Dir %s", cursubdir[0] == 0 ? (saving ? "[new]" : "[no dir]") : cursubdir);
MIOS32_LCD_CursorSet(21,1);
MIOS32_LCD_PrintFormattedString("File %s", curname[0] == 0 ? (saving ? "[new]" : "[none]") : curname);
MIOS32_LCD_CursorSet(cursor ? 20 : 5, 1);
MIOS32_LCD_PrintChar(0x7E);
MIOS32_LCD_CursorSet(cursor ? 38 : 18, 1);
MIOS32_LCD_PrintChar(0x7F);
switch(submode){
case 0:
MIOS32_LCD_PrintFormattedString("In %s%c", curpath, curpath[1] == 0 ? ' ' : '/');
MIOS32_LCD_CursorSet(0,1);
MIOS32_LCD_PrintFormattedString("Up Dir %s", cursubdir[0] == 0 ? (save_mode ? "[new]" : "[no dir]") : cursubdir);
MIOS32_LCD_CursorSet(21,1);
MIOS32_LCD_PrintFormattedString("File %s", curname[0] == 0 ? (save_mode ? "[new]" : "[none]") : curname);
MIOS32_LCD_CursorSet(cursor ? 20 : 5, 1);
MIOS32_LCD_PrintChar(0x7E);
MIOS32_LCD_CursorSet(cursor ? 38 : 18, 1);
MIOS32_LCD_PrintChar(0x7F);
break;
case 1:
MIOS32_LCD_PrintString("Overwrite file? (Enter=No)");
MIOS32_LCD_CursorSet(1,1);
MIOS32_LCD_PrintString("No No No No No No No No");
MIOS32_LCD_CursorSet(5*yespos+1, 1);
MIOS32_LCD_PrintString("Yes");
break;
}
}
 
static inline void GotFile(){
sprintf((char*)(curpath[1] == 0 ? curpath : curpath + strlen(curpath)), "/%s", curname);
subscreen = 0;
callback_f(curpath);
if(save_mode == 1){
submode = 1;
yespos = (u8)(VGM_Player_GetVGMTime() & 0x00000007);
DrawMenu();
}else{
sprintf((char*)(curpath[1] == 0 ? curpath : curpath + strlen(curpath)), "/%s", curname);
subscreen = 0;
callback_f(curpath);
}
}
static inline void GotDir(){
sprintf((char*)(curpath[1] == 0 ? curpath : curpath + strlen(curpath)), "/%s", cursubdir);
84,6 → 103,7
//Add extension
sprintf(curname + strlen(curname), ".%s", extn);
//Use file
save_mode = 2;
GotFile();
return;
}else{
105,10 → 125,11
void Filebrowser_Start(const char* initpath, const char* extension, u8 save, void (*callback)(char* filename)){
subscreen = SUBSCREEN_FILEBROWSER;
callback_f = callback;
saving = save;
save_mode = save;
cursor = 0;
waserror = 0;
innameeditor = 0;
submode = 0;
s32 ret = 0;
MUTEX_SDCARD_TAKE;
if(!FILE_VolumeAvailable()){
183,6 → 204,16
DrawMenu();
return;
}
if(submode == 1){
if(softkey == yespos){
save_mode = 2;
GotFile();
}else{
submode = 0;
DrawMenu();
}
return;
}
if(softkey == 0){
if(curpath[1] == 0) return; //We're at root, don't go up
//Chop off the filename and put that into cursubdir
216,6 → 247,11
return;
}
if(!state) return;
if(submode == 1){
submode = 0;
DrawMenu();
return;
}
if(button == FP_B_MENU){
subscreen = 0;
callback_f(NULL);
230,7 → 266,7
if(cursor){
//Press Enter on file
if(curname[0] == 0){
if(saving){
if(save_mode){
//Prompt for new file
innameeditor = 1;
curname[0] = 'A';
247,7 → 283,7
}else{
//Press Enter on directory
if(cursubdir[0] == 0){
if(saving){
if(save_mode){
//Prompt for new subdirectory
innameeditor = 1;
cursubdir[0] = 'A';
/trunk/apps/synthesizers/midibox_quad_genesis/src/filebrowser.h
18,6 → 18,7
#endif
 
extern void Filebrowser_Init();
//save: 0 for load, 1 for save (warn overwrite), 2 for save (don't warn overwrite)
extern void Filebrowser_Start(const char* initpath, const char* extension, u8 save, void (*callback)(char* filename));
 
extern void Filebrowser_BtnSoftkey(u8 softkey, u8 state);
/trunk/apps/synthesizers/midibox_quad_genesis/src/mode_vgm.c
332,6 → 332,8
for(v=0; v<7; ++v){
FrontPanel_VGMMatrixRow(v, 0);
}
FrontPanel_LEDSet(FP_LED_CTRL_R, 0);
FrontPanel_LEDSet(FP_LED_TIME_R, 0);
}
laststatemode = statemode;
lastsubmode = submode;
342,6 → 344,8
ClearGenesisState_DAC();
ClearGenesisState_OPN2();
ClearGenesisState_PSG();
FrontPanel_LEDSet(FP_LED_CTRL_R, 0);
FrontPanel_LEDSet(FP_LED_TIME_R, 0);
FrontPanel_LEDSet(FP_LED_SELOP_1 + selop, 0);
FrontPanel_GenesisLEDSet(0, selvoice, 1, 0);
}
373,7 → 377,6
if(a < 0 || a >= vsr->numcmds){
FrontPanel_VGMMatrixRow(r, 0);
}else{
DrawCmdLine(vsr->cmds[a], r, (a == selvgm->markstart || a == selvgm->markend));
}
++a;
418,6 → 421,8
ClearGenesisState_DAC();
ClearGenesisState_OPN2();
ClearGenesisState_PSG();
FrontPanel_LEDSet(FP_LED_CTRL_R, 0);
FrontPanel_LEDSet(FP_LED_TIME_R, 0);
lastcmddrawn.all = 0;
}else{
VgmChipWriteCmd newcmd = vsr->cmds[a];