From bcc57c8710ed58b16951af2cbc6c25936236419e Mon Sep 17 00:00:00 2001 From: Sorgelig Date: Sun, 3 Apr 2022 07:12:32 +0800 Subject: [PATCH] AtariST: add dongle bit into config. --- menu.cpp | 21 ++++++++++++++++----- support/st/st_tos.cpp | 3 --- support/st/st_tos.h | 3 ++- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/menu.cpp b/menu.cpp index a09e898..919ee49 100644 --- a/menu.cpp +++ b/menu.cpp @@ -4124,7 +4124,7 @@ void HandleUI(void) break; case MENU_ST_SYSTEM1: - menumask = 0xffff; + menumask = 0x1ffff; OsdSetTitle("Config", 0); helptext_idx = 0; @@ -4198,12 +4198,18 @@ void HandleUI(void) MenuWrite(m++, s, menusub == 13); MenuWrite(m++); - strcpy(s, " YM-Audio: "); - strcat(s, tos_stereo[(tos_system_ctrl() & TOS_CONTROL_STEREO) ? 1 : 0]); + strcpy(s, " Dongle: "); + if (tos_system_ctrl() & TOS_CONTROL_DONGLE) strcat(s, "Cubase"); + else strcat(s, "None"); MenuWrite(m++, s, menusub == 14); MenuWrite(m++); - MenuWrite(m++, STD_BACK, menusub == 15); + strcpy(s, " YM-Audio: "); + strcat(s, tos_stereo[(tos_system_ctrl() & TOS_CONTROL_STEREO) ? 1 : 0]); + MenuWrite(m++, s, menusub == 15); + MenuWrite(m++); + + MenuWrite(m++, STD_BACK, menusub == 16); if (!adjvisible) break; firstmenu += adjvisible; @@ -4362,12 +4368,17 @@ void HandleUI(void) break; case 14: + tos_update_sysctrl(tos_system_ctrl() ^ TOS_CONTROL_DONGLE); + menustate = MENU_ST_SYSTEM1; + break; + + case 15: tos_update_sysctrl(tos_system_ctrl() ^ TOS_CONTROL_STEREO); menustate = MENU_ST_SYSTEM1; break; - case 15: + case 16: menustate = MENU_ST_MAIN1; menusub = 4; if (need_reset) diff --git a/support/st/st_tos.cpp b/support/st/st_tos.cpp index 1ee1ead..d4fe352 100644 --- a/support/st/st_tos.cpp +++ b/support/st/st_tos.cpp @@ -609,9 +609,6 @@ void tos_config_load(int slot) int len = FileLoadConfig(name, 0, 0); tos_debugf("Configuration file size: %d (should be %d)", len, sizeof(tos_config_t)); FileLoadConfig(name, &config, sizeof(tos_config_t)); - - // ethernet is auto detected later - config.system_ctrl &= ~TOS_CONTROL_ETHERNET; } // save configuration diff --git a/support/st/st_tos.h b/support/st/st_tos.h index a5b46ff..e2ec652 100644 --- a/support/st/st_tos.h +++ b/support/st/st_tos.h @@ -56,7 +56,8 @@ #define TOS_CONTROL_STEREO 0x00400000 #define TOS_CONTROL_STE 0x00800000 #define TOS_CONTROL_MSTE 0x01000000 -#define TOS_CONTROL_ETHERNET 0x02000000 + +#define TOS_CONTROL_DONGLE 0x02000000 // USB redirection modes // (NONE=0, RS232=1, PARALLEL=2, MIDI=3)