From: K.Ohta Date: Sun, 9 Oct 2016 13:50:26 +0000 (+0900) Subject: [Qt][CONFIG][UI] Add config entries for pseudo-sounds (i.e. FDD,Relay). X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=c3080d958a21890699495269075cfeb037aeb297;p=csp-qt%2Fcommon_source_project-fm7.git [Qt][CONFIG][UI] Add config entries for pseudo-sounds (i.e. FDD,Relay). --- diff --git a/source/src/config.cpp b/source/src/config.cpp index 6dd9efd60..44358d5ca 100644 --- a/source/src/config.cpp +++ b/source/src/config.cpp @@ -165,6 +165,10 @@ void initialize_config() config.log_to_syslog = false; config.log_to_console = true; + + config.sound_fdd = 1; + config.sound_relay = 0; + config.sound_buttons = 0; #endif } @@ -432,6 +436,10 @@ void load_config(const _TCHAR *config_path) #endif #if defined(_USE_QT) + config.sound_fdd = MyGetPrivateProfileInt(_T("Emulator"), _T("SoundFDD"), config.sound_fdd, config_path); + config.sound_relay = MyGetPrivateProfileInt(_T("Emulator"), _T("SoundRelay"), config.sound_relay, config_path); + config.sound_buttons = MyGetPrivateProfileInt(_T("Emulator"), _T("SoundButtons"), config.sound_buttons, config_path); + config.log_to_syslog = MyGetPrivateProfileBool(_T("Emulator"), _T("WriteToSyslog"), config.log_to_syslog, config_path); config.log_to_console = MyGetPrivateProfileBool(_T("Emulator"), _T("WriteToConsole"), config.log_to_console, config_path); for(int ii = 0; ii < (CSP_LOG_TYPE_VM_DEVICE_END - CSP_LOG_TYPE_VM_DEVICE_0 + 1); ii++) { @@ -679,6 +687,10 @@ void save_config(const _TCHAR *config_path) MyWritePrivateProfileInt(_T("Video"), _T("VideoFramerate"), config.video_frame_rate, config_path); #endif #if defined(_USE_QT) + MyWritePrivateProfileInt(_T("Emulator"), _T("SoundFDD"), config.sound_fdd, config_path); + MyWritePrivateProfileInt(_T("Emulator"), _T("SoundRelay"), config.sound_relay, config_path); + MyWritePrivateProfileInt(_T("Emulator"), _T("SoundButtons"), config.sound_buttons, config_path); + MyWritePrivateProfileBool(_T("Emulator"), _T("WriteToSyslog"), config.log_to_syslog, config_path); MyWritePrivateProfileBool(_T("Emulator"), _T("WriteToConsole"), config.log_to_console, config_path); @@ -709,8 +721,6 @@ void save_config(const _TCHAR *config_path) #if defined(_USE_QT) && !defined(Q_OS_WIN) csp_logger->debug_log(CSP_LOG_INFO, CSP_LOG_TYPE_GENERAL, "Write config done."); #endif - - } #define STATE_VERSION 5 diff --git a/source/src/config.h b/source/src/config.h index 76f54eba9..7a10e8acf 100644 --- a/source/src/config.h +++ b/source/src/config.h @@ -172,6 +172,10 @@ typedef struct { bool dev_log_to_syslog[CSP_LOG_TYPE_VM_DEVICE_END - CSP_LOG_TYPE_VM_DEVICE_0 + 1][8]; bool dev_log_to_console[CSP_LOG_TYPE_VM_DEVICE_END - CSP_LOG_TYPE_VM_DEVICE_0 + 1][8]; bool dev_log_recording[CSP_LOG_TYPE_VM_DEVICE_END - CSP_LOG_TYPE_VM_DEVICE_0 + 1][8]; + + int sound_fdd; + int sound_relay; + int sound_buttons; #endif } config_t; diff --git a/source/src/qt/common/menu_flags.cpp b/source/src/qt/common/menu_flags.cpp index c906c2661..6b3793620 100644 --- a/source/src/qt/common/menu_flags.cpp +++ b/source/src/qt/common/menu_flags.cpp @@ -80,6 +80,11 @@ USING_FLAGS::USING_FLAGS(config_t *cfg) use_sound_device_type = 0; use_sound_volume = 0; without_sound = false; + use_sound_files = false; + use_sound_files_fdd = false; + use_sound_files_relay = false; + use_sound_files_buttons = false; + use_special_reset = false; use_state = false; @@ -420,6 +425,24 @@ USING_FLAGS::USING_FLAGS(config_t *cfg) #if defined(WITHOUT_SOUND) without_sound = true; #endif +#if defined(USE_SOUND_FILES) + use_sound_files = true; +# if !defined(USE_SOUND_FILES_FDD) && !defined(USE_SOUND_FILES_RELAY) && !defined(USE_SOUND_FILES_BUTTONS) + use_sound_files_fdd = true; + use_sound_files_relay = true; + use_sound_files_buttons = true; +# else +# if defined(USE_SOUND_FILES_FDD) + use_sound_files_fdd = true; +# endif +# if defined(USE_SOUND_FILES_RELAY) + use_sound_files_relay = true; +# endif +# if defined(USE_SOUND_FILES_BUTTONS) + use_sound_files_buttons = true; +# endif +# endif +#endif #if defined(USE_SPECIAL_RESET) use_special_reset = true; #endif diff --git a/source/src/qt/common/menu_flags.h b/source/src/qt/common/menu_flags.h index d0a8d7812..9add49f82 100644 --- a/source/src/qt/common/menu_flags.h +++ b/source/src/qt/common/menu_flags.h @@ -102,7 +102,11 @@ private: int use_sound_device_type; int use_sound_volume; bool without_sound; - + bool use_sound_files; + bool use_sound_files_fdd; + bool use_sound_files_relay; + bool use_sound_files_buttons; + bool use_special_reset; bool use_state; @@ -232,6 +236,10 @@ public: int get_use_sound_device_type() { return use_sound_device_type; } int get_use_sound_volume() { return use_sound_volume; } bool is_without_sound() { return without_sound; } + bool is_use_sound_files() { return use_sound_files; } + bool is_use_sound_files_fdd() { return use_sound_files_fdd; } + bool is_use_sound_files_relay() { return use_sound_files_relay; } + bool is_use_sound_files_buttons() { return use_sound_files_buttons; } bool is_use_special_reset() { return use_special_reset; } diff --git a/source/src/qt/gui/CMakeLists.txt b/source/src/qt/gui/CMakeLists.txt index d0a48250d..4d523915b 100644 --- a/source/src/qt/gui/CMakeLists.txt +++ b/source/src/qt/gui/CMakeLists.txt @@ -154,8 +154,8 @@ target_link_libraries(CSPgui PUBLIC ) set_target_properties(CSPgui PROPERTIES - SOVERSION 2.3.1 - VERSION 2.3.1 + SOVERSION 2.3.2 + VERSION 2.3.2 ) INSTALL(TARGETS CSPgui DESTINATION ${LIBCSP_INSTALL_DIR}) endif() diff --git a/source/src/qt/gui/mainwidget_base.h b/source/src/qt/gui/mainwidget_base.h index 41d081bd7..fab8fa905 100644 --- a/source/src/qt/gui/mainwidget_base.h +++ b/source/src/qt/gui/mainwidget_base.h @@ -302,6 +302,9 @@ class DLL_PREFIX Ui_MainWindowBase : public QMainWindow class Action_Control *action_SetupKeyboard; class Action_Control *action_LogView; + class Action_Control *action_SoundFilesFDD; + class Action_Control *action_SoundFilesRelay; + class Action_Control *action_SoundFilesButtons; QMenu *menuLogToConsole; QMenu *menuLogToSyslog; QMenu *menuDevLogToConsole; @@ -596,11 +599,14 @@ public slots: void set_printer_device(int); void do_show_about(void); void do_browse_document(QString); + + void do_set_sound_files_fdd(bool f); + void do_set_sound_files_relay(bool f); + void do_set_sound_files_buttons(bool f); void do_set_conslog(bool); void do_set_syslog(bool); void do_update_device_node_name(int id, const _TCHAR *name); void do_set_dev_log_to_console(int id, bool f); - signals: int message_changed(QString); int quit_emu_thread(); diff --git a/source/src/qt/gui/menu_main.cpp b/source/src/qt/gui/menu_main.cpp index a9ea635e0..5bdf172c9 100644 --- a/source/src/qt/gui/menu_main.cpp +++ b/source/src/qt/gui/menu_main.cpp @@ -89,6 +89,34 @@ void Ui_MainWindowBase::do_browse_document(QString fname) dlg->show(); } +void Ui_MainWindowBase::do_set_sound_files_fdd(bool f) +{ + if(f) { + using_flags->get_config_ptr()->sound_fdd = 1; + } else { + using_flags->get_config_ptr()->sound_fdd = 0; + } +} + +void Ui_MainWindowBase::do_set_sound_files_relay(bool f) +{ + if(f) { + using_flags->get_config_ptr()->sound_relay = 1; + } else { + using_flags->get_config_ptr()->sound_relay = 0; + } +} + +void Ui_MainWindowBase::do_set_sound_files_buttons(bool f) +{ + if(f) { + using_flags->get_config_ptr()->sound_buttons = 1; + } else { + using_flags->get_config_ptr()->sound_buttons = 0; + } +} + + void Ui_MainWindowBase::do_set_conslog(bool f) { using_flags->get_config_ptr()->log_to_console = f; @@ -507,6 +535,18 @@ void Ui_MainWindowBase::setupUi(void) if(using_flags->is_use_joystick()) { connect(action_SetupJoystick, SIGNAL(triggered()), this, SLOT(rise_joystick_dialog())); } + + if(using_flags->is_use_sound_files()) { + if(using_flags->is_use_sound_files_fdd()) { + connect(action_SoundFilesFDD, SIGNAL(toggled(bool)), this, SLOT(do_set_sound_files_fdd(bool))); + } + if(using_flags->is_use_sound_files_relay()) { + connect(action_SoundFilesRelay, SIGNAL(toggled(bool)), this, SLOT(do_set_sound_files_relay(bool))); + } + if(using_flags->is_use_sound_files_buttons()) { + connect(action_SoundFilesButtons, SIGNAL(toggled(bool)), this, SLOT(do_set_sound_files_buttons(bool))); + } + } connect(action_SetupKeyboard, SIGNAL(triggered()), this, SLOT(rise_keyboard_dialog())); connect(action_LogToSyslog, SIGNAL(toggled(bool)), this, SLOT(do_set_syslog(bool))); connect(action_LogToConsole, SIGNAL(toggled(bool)), this, SLOT(do_set_conslog(bool))); @@ -555,6 +595,17 @@ void Ui_MainWindowBase::retranslateEmulatorMenu(void) action_LogToConsole->setText(QApplication::translate("MainWindow", "Log to Console", 0)); action_LogToSyslog->setText(QApplication::translate("MainWindow", "Log to Syslog", 0)); //action_LogRecord->setText(QApplication::translate("MainWindow", "Recording Log", 0)); + if(using_flags->is_use_sound_files()) { + if(using_flags->is_use_sound_files_fdd()) { + action_SoundFilesFDD->setText(QApplication::translate("MainWindow", "Sound FDD Seek", 0)); + } + if(using_flags->is_use_sound_files_relay()) { + action_SoundFilesRelay->setText(QApplication::translate("MainWindow", "Sound CMT Relay", 0)); + } + if(using_flags->is_use_sound_files_buttons()) { + action_SoundFilesButtons->setText(QApplication::translate("MainWindow", "Sound CMT Buttons", 0)); + } + } menuDevLogToConsole->setTitle(QApplication::translate("MainWindow", "Per Device", 0)); @@ -581,6 +632,12 @@ void Ui_MainWindowBase::CreateEmulatorMenu(void) menuEmulator->addSeparator(); menuEmulator->addAction(action_LogView); menuEmulator->addSeparator(); + if(using_flags->is_use_sound_files()) { + if(using_flags->is_use_sound_files_fdd()) menuEmulator->addAction(action_SoundFilesFDD); + if(using_flags->is_use_sound_files_relay()) menuEmulator->addAction(action_SoundFilesRelay); + if(using_flags->is_use_sound_files_buttons()) menuEmulator->addAction(action_SoundFilesButtons); + menuEmulator->addSeparator(); + } if(using_flags->is_use_joystick()) { menuEmulator->addAction(action_SetupJoystick); } @@ -595,6 +652,35 @@ void Ui_MainWindowBase::ConfigEmulatorMenu(void) if(using_flags->is_use_joystick()) { action_SetupJoystick = new Action_Control(this, using_flags); } + if(using_flags->is_use_sound_files()) { + if(using_flags->is_use_sound_files_fdd()) { + action_SoundFilesFDD = new Action_Control(this, using_flags); + action_SoundFilesFDD->setCheckable(true); + action_SoundFilesFDD->setEnabled(true); + action_SoundFilesFDD->setChecked(false); + if(using_flags->get_config_ptr()->sound_fdd != 0) { + action_SoundFilesFDD->setChecked(true); + } + } + if(using_flags->is_use_sound_files_relay()) { + action_SoundFilesRelay = new Action_Control(this, using_flags); + action_SoundFilesRelay->setCheckable(true); + action_SoundFilesRelay->setEnabled(true); + action_SoundFilesRelay->setChecked(false); + if(using_flags->get_config_ptr()->sound_relay != 0) { + action_SoundFilesRelay->setChecked(true); + } + } + if(using_flags->is_use_sound_files_buttons()) { + action_SoundFilesButtons = new Action_Control(this, using_flags); + action_SoundFilesButtons->setCheckable(true); + action_SoundFilesButtons->setEnabled(true); + action_SoundFilesButtons->setChecked(false); + if(using_flags->get_config_ptr()->sound_buttons != 0) { + action_SoundFilesButtons->setChecked(true); + } + } + } action_LogToSyslog = new Action_Control(this, using_flags); action_LogToSyslog->setCheckable(true); action_LogToSyslog->setEnabled(true); diff --git a/source/src/vm/bmjr/bmjr.h b/source/src/vm/bmjr/bmjr.h index 26c18b136..8eb2c0218 100644 --- a/source/src/vm/bmjr/bmjr.h +++ b/source/src/vm/bmjr/bmjr.h @@ -32,6 +32,8 @@ //#define USE_CRT_FILTER //#define USE_SCANLINE #define USE_SOUND_FILES 2 +//#define USE_SOUND_FILES_FDD +#define USE_SOUND_FILES_RELAY #if defined(USE_SOUND_FILES) #define USE_SOUND_VOLUME 3 #else diff --git a/source/src/vm/datarec.cpp b/source/src/vm/datarec.cpp index fb28bc870..16444c4ce 100644 --- a/source/src/vm/datarec.cpp +++ b/source/src/vm/datarec.cpp @@ -1542,7 +1542,7 @@ void DATAREC::mix_sndfiles(int ch, int32_t *dst, int cnt, int16_t *src, int samp ptr = table[i]; if(ptr >= 0) { if(ptr < samples) { - if(!snd_mute[ch]) { + if(!snd_mute[ch] && ((config.sound_relay != 0) || (config.sound_buttons != 0))) { pp = ptr << 1; dst_tmp = dst; k = 0; diff --git a/source/src/vm/fm16pi/fm16pi.h b/source/src/vm/fm16pi/fm16pi.h index ced3c3389..e90446c78 100644 --- a/source/src/vm/fm16pi/fm16pi.h +++ b/source/src/vm/fm16pi/fm16pi.h @@ -38,6 +38,8 @@ #define USE_NOTIFY_POWER_OFF #define USE_ACCESS_LAMP #define USE_SOUND_FILES 1 +#define USE_SOUND_FILES_FDD +//#define USE_SOUND_FILES_RELAY #if defined(USE_SOUND_FILES) #define USE_SOUND_VOLUME 2 #else diff --git a/source/src/vm/fm7/fm7.h b/source/src/vm/fm7/fm7.h index cd188cb3e..c057704f4 100644 --- a/source/src/vm/fm7/fm7.h +++ b/source/src/vm/fm7/fm7.h @@ -40,6 +40,8 @@ #define USE_DIG_RESOLUTION #if defined(_USE_QT) #define USE_SOUND_FILES 3 +#define USE_SOUND_FILES_FDD +#define USE_SOUND_FILES_RELAY #endif #if defined(_FM8) #define DEVICE_NAME "FUJITSU FM-8" diff --git a/source/src/vm/fmr30/fmr30.h b/source/src/vm/fmr30/fmr30.h index 8221134fd..338310d85 100644 --- a/source/src/vm/fmr30/fmr30.h +++ b/source/src/vm/fmr30/fmr30.h @@ -43,6 +43,7 @@ #define USE_AUTO_KEY_RELEASE 6 #define USE_ACCESS_LAMP #define USE_SOUND_FILES 1 +#define USE_SOUND_FILES_FDD #if defined(USE_SOUND_FILES) #define USE_SOUND_VOLUME 2 #else diff --git a/source/src/vm/fmr50/fmr50.h b/source/src/vm/fmr50/fmr50.h index a35e58d16..6722d036b 100644 --- a/source/src/vm/fmr50/fmr50.h +++ b/source/src/vm/fmr50/fmr50.h @@ -89,6 +89,7 @@ #define USE_CRT_FILTER #define USE_ACCESS_LAMP #define USE_SOUND_FILES 1 +#define USE_SOUND_FILES_FDD #if defined(USE_SOUND_FILES) #define USE_SOUND_VOLUME 2 #else diff --git a/source/src/vm/fp1100/fp1100.h b/source/src/vm/fp1100/fp1100.h index ded6b9d2c..b60ce5e5c 100644 --- a/source/src/vm/fp1100/fp1100.h +++ b/source/src/vm/fp1100/fp1100.h @@ -33,9 +33,11 @@ #define USE_TAPE_BAUD #define USE_FD1 #define USE_FD2 -#define USE_SOUND_FILES 3 //#define USE_FD3 //#define USE_FD4 +#define USE_SOUND_FILES 3 +#define USE_SOUND_FILES_FDD +#define USE_SOUND_FILES_RELAY #define NOTIFY_KEY_DOWN #define USE_SHIFT_NUMPAD_KEY #define USE_ALT_F10_KEY diff --git a/source/src/vm/fp200/fp200.h b/source/src/vm/fp200/fp200.h index a15d54e7e..178bb61e2 100644 --- a/source/src/vm/fp200/fp200.h +++ b/source/src/vm/fp200/fp200.h @@ -24,6 +24,7 @@ #define MEMORY_ADDR_MAX 0x10000 #define MEMORY_BANK_SIZE 0x2000 #define USE_SOUND_FILES 3 +#define USE_SOUND_FILES_RELAY // device informations for win32 #define WINDOW_MODE_BASE 2 diff --git a/source/src/vm/gamegear/gamegear.h b/source/src/vm/gamegear/gamegear.h index 89bc02997..2e164e424 100644 --- a/source/src/vm/gamegear/gamegear.h +++ b/source/src/vm/gamegear/gamegear.h @@ -25,6 +25,8 @@ // device informations for win32 #define USE_SOUND_FILES 3 +#define USE_SOUND_FILES_FDD +#define USE_SOUND_FILES_RELAY #define USE_CART1 #define USE_FD1 #define USE_TAPE diff --git a/source/src/vm/hc20/hc20.h b/source/src/vm/hc20/hc20.h index 5ae085587..19b4c0e2e 100644 --- a/source/src/vm/hc20/hc20.h +++ b/source/src/vm/hc20/hc20.h @@ -40,6 +40,7 @@ #define USE_NOTIFY_POWER_OFF #define USE_ACCESS_LAMP #define USE_SOUND_FILES 1 +#define USE_SOUND_FILES_FDD #if defined(USE_SOUND_FILES) #define USE_SOUND_VOLUME 2 #else diff --git a/source/src/vm/hc40/hc40.h b/source/src/vm/hc40/hc40.h index ffcaeda2e..d0793a765 100644 --- a/source/src/vm/hc40/hc40.h +++ b/source/src/vm/hc40/hc40.h @@ -35,6 +35,8 @@ #define USE_AUTO_KEY_RELEASE 10 #define USE_ACCESS_LAMP #define USE_SOUND_FILES 5 +#define USE_SOUND_FILES_FDD +#define USE_SOUND_FILES_RELAY #if defined(USE_SOUND_FILES) #define USE_SOUND_VOLUME 3 #else diff --git a/source/src/vm/hc80/hc80.h b/source/src/vm/hc80/hc80.h index 6d3a82672..20c1231c2 100644 --- a/source/src/vm/hc80/hc80.h +++ b/source/src/vm/hc80/hc80.h @@ -36,6 +36,7 @@ #define USE_AUTO_KEY_RELEASE 10 #define USE_ACCESS_LAMP #define USE_SOUND_FILES 2 +//#define USE_SOUND_FILES_FDD //#if defined(USE_SOUND_FILES) //#define USE_SOUND_VOLUME 2 //#else diff --git a/source/src/vm/j3100/j3100.h b/source/src/vm/j3100/j3100.h index 30e15c9df..5f924fcde 100644 --- a/source/src/vm/j3100/j3100.h +++ b/source/src/vm/j3100/j3100.h @@ -58,6 +58,7 @@ #define USE_AUTO_KEY_RELEASE 6 #define USE_ACCESS_LAMP #define USE_SOUND_FILES 2 +#define USE_SOUND_FILES_FDD #if defined(USE_SOUND_FILES) #define USE_SOUND_VOLUME 2 #else diff --git a/source/src/vm/jr100/jr100.h b/source/src/vm/jr100/jr100.h index a1dcc56bc..d00c7bc0e 100644 --- a/source/src/vm/jr100/jr100.h +++ b/source/src/vm/jr100/jr100.h @@ -31,6 +31,7 @@ //#define USE_CRT_FILTER //#define USE_SCANLINE #define USE_SOUND_FILES 2 +#define USE_SOUND_FILES_RELAY #if defined(USE_SOUND_FILES) #define USE_SOUND_VOLUME 3 #else diff --git a/source/src/vm/jx/jx.h b/source/src/vm/jx/jx.h index f6ff151c8..a5fdb9114 100644 --- a/source/src/vm/jx/jx.h +++ b/source/src/vm/jx/jx.h @@ -43,6 +43,7 @@ #define USE_SCANLINE #define USE_ACCESS_LAMP #define USE_SOUND_FILES 2 +#define USE_SOUND_FILES_FDD #if defined(USE_SOUND_FILES) #define USE_SOUND_VOLUME 2 #else diff --git a/source/src/vm/m5/m5.h b/source/src/vm/m5/m5.h index f41595c98..55b4d0952 100644 --- a/source/src/vm/m5/m5.h +++ b/source/src/vm/m5/m5.h @@ -31,6 +31,7 @@ #define USE_AUTO_KEY 5 #define USE_AUTO_KEY_RELEASE 8 #define USE_SOUND_FILES 2 +#define USE_SOUND_FILES_RELAY #if defined(USE_SOUND_FILES) #define USE_SOUND_VOLUME 3 #else diff --git a/source/src/vm/mb8877.cpp b/source/src/vm/mb8877.cpp index 7137a1665..d906b013f 100644 --- a/source/src/vm/mb8877.cpp +++ b/source/src/vm/mb8877.cpp @@ -1676,7 +1676,7 @@ void MB8877::mix_main(int32_t *dst, int count, int16_t *src, int *table, int sam ptr = table[i]; if(ptr >= 0) { if(ptr < samples) { - if(!snd_mute) { + if(!snd_mute && (config.sound_fdd != 0)) { pp = ptr << 1; dst_tmp = dst; k = 0; diff --git a/source/src/vm/msx/msx.h b/source/src/vm/msx/msx.h index bb12db751..fd90f9fd2 100644 --- a/source/src/vm/msx/msx.h +++ b/source/src/vm/msx/msx.h @@ -69,6 +69,8 @@ #else #define USE_SOUND_FILES 3 #endif +#define USE_SOUND_FILES_FDD +#define USE_SOUND_FILES_RELAY #if defined(USE_SOUND_FILES) #if defined(_PX7) #define USE_SOUND_VOLUME 5 diff --git a/source/src/vm/multi8/multi8.h b/source/src/vm/multi8/multi8.h index 8d11dbd63..004b9be03 100644 --- a/source/src/vm/multi8/multi8.h +++ b/source/src/vm/multi8/multi8.h @@ -44,6 +44,8 @@ #define USE_SCANLINE #define USE_ACCESS_LAMP #define USE_SOUND_FILES 2 +#define USE_SOUND_FILES_FDD +//#define USE_SOUND_FILES_RELAY #if defined(USE_SOUND_FILES) #define USE_SOUND_VOLUME 3 #else diff --git a/source/src/vm/mycomz80a/mycomz80a.h b/source/src/vm/mycomz80a/mycomz80a.h index e628563d1..cad46962a 100644 --- a/source/src/vm/mycomz80a/mycomz80a.h +++ b/source/src/vm/mycomz80a/mycomz80a.h @@ -36,6 +36,8 @@ #define USE_CRT_FILTER #define USE_SCANLINE #define USE_SOUND_FILES 2 +//#define USE_SOUND_FILES_FDD +#define USE_SOUND_FILES_RELAY #if defined(USE_SOUND_FILES) #define USE_SOUND_VOLUME 3 #else diff --git a/source/src/vm/mz2500/mz2500.h b/source/src/vm/mz2500/mz2500.h index b33db628a..703ab16b4 100644 --- a/source/src/vm/mz2500/mz2500.h +++ b/source/src/vm/mz2500/mz2500.h @@ -37,6 +37,8 @@ // device informations for win32 #define USE_SOUND_FILES 4 +#define USE_SOUND_FILES_FDD +#define USE_SOUND_FILES_BUTTONS #define USE_SPECIAL_RESET #define USE_FD1 #define USE_FD2 diff --git a/source/src/vm/mz2500/mz80b.h b/source/src/vm/mz2500/mz80b.h index bcbf405d6..56a26c52e 100644 --- a/source/src/vm/mz2500/mz80b.h +++ b/source/src/vm/mz2500/mz80b.h @@ -50,6 +50,8 @@ // device informations for win32 #define USE_SOUND_FILES 4 +#define USE_SOUND_FILES_FDD +#define USE_SOUND_FILES_BUTTONS #define USE_SPECIAL_RESET #define USE_FD1 #define USE_FD2 diff --git a/source/src/vm/mz2800/mz2800.h b/source/src/vm/mz2800/mz2800.h index c68e9d5f0..67c0de9a8 100644 --- a/source/src/vm/mz2800/mz2800.h +++ b/source/src/vm/mz2800/mz2800.h @@ -40,6 +40,7 @@ #define USE_CRT_FILTER #define USE_ACCESS_LAMP #define USE_SOUND_FILES 2 +#define USE_SOUND_FILES_FDD #if defined(USE_SOUND_FILES) #define USE_SOUND_VOLUME 4 #else diff --git a/source/src/vm/mz3500/mz3500.h b/source/src/vm/mz3500/mz3500.h index 7fc08ced5..60a8512c7 100644 --- a/source/src/vm/mz3500/mz3500.h +++ b/source/src/vm/mz3500/mz3500.h @@ -46,6 +46,7 @@ #define USE_SCANLINE #define USE_ACCESS_LAMP #define USE_SOUND_FILES 2 +#define USE_SOUND_FILES_FDD #if defined(USE_SOUND_FILES) #define USE_SOUND_VOLUME 2 #else diff --git a/source/src/vm/mz5500/mz5500.h b/source/src/vm/mz5500/mz5500.h index 4432a8e06..1a2b9399a 100644 --- a/source/src/vm/mz5500/mz5500.h +++ b/source/src/vm/mz5500/mz5500.h @@ -62,6 +62,7 @@ #define USE_SCANLINE #define USE_ACCESS_LAMP #define USE_SOUND_FILES 2 +#define USE_SOUND_FILES_FDD #if defined(USE_SOUND_FILES) #define USE_SOUND_VOLUME 2 #else diff --git a/source/src/vm/mz700/mz700.h b/source/src/vm/mz700/mz700.h index d7dda60e5..354884ead 100644 --- a/source/src/vm/mz700/mz700.h +++ b/source/src/vm/mz700/mz700.h @@ -83,10 +83,16 @@ #if defined(USE_SOUND_FILES) #if defined(_MZ700) #define USE_SOUND_VOLUME 3 +#define USE_SOUND_FILES_BUTTONS #elif defined(_MZ800) #define USE_SOUND_VOLUME 5 +#define USE_SOUND_FILES_BUTTONS +#define USE_SOUND_FILES_FDD +//#define USE_SOUND_FILES_QD #elif defined(_MZ1500) #define USE_SOUND_VOLUME 6 +#define USE_SOUND_FILES_BUTTONS +#define USE_SOUND_FILES_FDD #endif #else #if defined(_MZ700) diff --git a/source/src/vm/mz80k/mz80k.h b/source/src/vm/mz80k/mz80k.h index babc2269f..5918886e4 100644 --- a/source/src/vm/mz80k/mz80k.h +++ b/source/src/vm/mz80k/mz80k.h @@ -50,6 +50,8 @@ // device informations for win32 #define USE_SOUND_FILES 4 +#define USE_SOUND_FILES_FDD +#define USE_SOUND_FILES_BUTTONS #define USE_DIPSWITCH #define USE_TAPE #define USE_TAPE_BUTTON diff --git a/source/src/vm/n5200/n5200.h b/source/src/vm/n5200/n5200.h index d6e226951..6a4c97fc3 100644 --- a/source/src/vm/n5200/n5200.h +++ b/source/src/vm/n5200/n5200.h @@ -36,6 +36,7 @@ #define USE_CRT_FILTER #define USE_ACCESS_LAMP #define USE_SOUND_FILES 2 +#define USE_SOUND_FILES_FDD #if defined(USE_SOUND_FILES) #define USE_SOUND_VOLUME 2 #else diff --git a/source/src/vm/pasopia/pasopia.h b/source/src/vm/pasopia/pasopia.h index 4a7dceea5..1f94dbe7f 100644 --- a/source/src/vm/pasopia/pasopia.h +++ b/source/src/vm/pasopia/pasopia.h @@ -75,6 +75,12 @@ #endif #if defined(USE_SOUND_FILES) #define USE_SOUND_VOLUME 4 +#define USE_SOUND_FILES_FDD +#ifdef _LCD +#define USE_SOUND_FILES_BUTTONS +#else +#define USE_SOUND_FILES_RELAY +#endif #else #define USE_SOUND_VOLUME 2 #endif diff --git a/source/src/vm/pasopia7/pasopia7.h b/source/src/vm/pasopia7/pasopia7.h index 9decfa8b0..26bbf61fe 100644 --- a/source/src/vm/pasopia7/pasopia7.h +++ b/source/src/vm/pasopia7/pasopia7.h @@ -63,6 +63,12 @@ #else #define USE_SOUND_FILES 5 #endif +#define USE_SOUND_FILES_FDD +#ifdef _LCD +#define USE_SOUND_FILES_BUTTONS +#else +#define USE_SOUND_FILES_RELAY +#endif #if defined(USE_SOUND_FILES) #define USE_SOUND_VOLUME 6 #else diff --git a/source/src/vm/pc100/pc100.h b/source/src/vm/pc100/pc100.h index a3b930fed..dab38f8ae 100644 --- a/source/src/vm/pc100/pc100.h +++ b/source/src/vm/pc100/pc100.h @@ -44,6 +44,7 @@ #define USE_SCREEN_ROTATE #define USE_ACCESS_LAMP #define USE_SOUND_FILES 2 +#define USE_SOUND_FILES_FDD #if defined(USE_SOUND_FILES) #define USE_SOUND_VOLUME 3 #else diff --git a/source/src/vm/pc2001/pc2001.h b/source/src/vm/pc2001/pc2001.h index ce7d61bbe..53dd3d600 100644 --- a/source/src/vm/pc2001/pc2001.h +++ b/source/src/vm/pc2001/pc2001.h @@ -33,6 +33,7 @@ #define USE_AUTO_KEY_CAPS_LOCK (0xf2 | 0x100) #define DONT_KEEEP_KEY_PRESSED #define USE_SOUND_FILES 3 +#define USE_SOUND_FILES_BUTTONS #if defined(USE_SOUND_FILES) #define USE_SOUND_VOLUME 3 #else diff --git a/source/src/vm/pc6001/pc6001.h b/source/src/vm/pc6001/pc6001.h index 58ffde66f..2fa173ad6 100644 --- a/source/src/vm/pc6001/pc6001.h +++ b/source/src/vm/pc6001/pc6001.h @@ -97,11 +97,13 @@ #endif #define USE_ACCESS_LAMP #define USE_SOUND_FILES 3 +#define USE_SOUND_FILES_RELAY #if defined(USE_SOUND_FILES) #if defined(_PC6001) #define USE_SOUND_VOLUME 3 #else #define USE_SOUND_VOLUME 4 +#define USE_SOUND_FILES_FDD #endif #else #if defined(_PC6001) diff --git a/source/src/vm/pc8201/pc8201.h b/source/src/vm/pc8201/pc8201.h index 3a3bbd942..4d55b690d 100644 --- a/source/src/vm/pc8201/pc8201.h +++ b/source/src/vm/pc8201/pc8201.h @@ -34,6 +34,7 @@ #define USE_AUTO_KEY_RELEASE 6 #define USE_AUTO_KEY_CAPS #define USE_SOUND_FILES 3 +#define USE_SOUND_FILES_BUTTONS #if defined(USE_SOUND_FILES) #define USE_SOUND_VOLUME 3 #else diff --git a/source/src/vm/pc8801/pc8801.h b/source/src/vm/pc8801/pc8801.h index 40e886710..6740aaca9 100644 --- a/source/src/vm/pc8801/pc8801.h +++ b/source/src/vm/pc8801/pc8801.h @@ -98,6 +98,8 @@ #endif #endif #define USE_SOUND_FILES 3 +#define USE_SOUND_FILES_FDD +//#define USE_SOUND_FILES_RELAY #if defined(USE_SOUND_FILES) #if defined(SUPPORT_PC88_OPNA) && defined(SUPPORT_PC88_SB2) && defined(SUPPORT_PC88_PCG8100) diff --git a/source/src/vm/pc9801/pc9801.h b/source/src/vm/pc9801/pc9801.h index c70934c76..49e0c1bef 100644 --- a/source/src/vm/pc9801/pc9801.h +++ b/source/src/vm/pc9801/pc9801.h @@ -175,7 +175,10 @@ #define USE_ACCESS_LAMP #define USE_SOUND_DEVICE_TYPE 5 #define USE_SOUND_FILES 3 - +#define USE_SOUND_FILES_FDD +#if defined(USE_TAPE) +#define USE_SOUND_FILES_RELAY +#endif #if defined(USE_SOUND_FILES) #if defined(_PC98DO) || defined(_PC98DOPLUS) #if defined(SUPPORT_PC98_OPNA) && defined(SUPPORT_PC88_OPNA) diff --git a/source/src/vm/pc98ha/pc98ha.h b/source/src/vm/pc98ha/pc98ha.h index c239fd02b..20db89494 100644 --- a/source/src/vm/pc98ha/pc98ha.h +++ b/source/src/vm/pc98ha/pc98ha.h @@ -49,6 +49,7 @@ #define USE_AUTO_KEY_RELEASE 6 #define USE_ACCESS_LAMP #define USE_SOUND_FILES 2 +#define USE_SOUND_FILES_FDD #if defined(USE_SOUND_FILES) #define USE_SOUND_VOLUME 2 #else diff --git a/source/src/vm/phc20/phc20.h b/source/src/vm/phc20/phc20.h index dfaccfa3c..c95474360 100644 --- a/source/src/vm/phc20/phc20.h +++ b/source/src/vm/phc20/phc20.h @@ -29,6 +29,7 @@ #define USE_AUTO_KEY_RELEASE 10 #define USE_AUTO_KEY_NO_CAPS #define USE_SOUND_FILES 2 +#define USE_SOUND_FILES_RELAY #if defined(USE_SOUND_FILES) #define USE_SOUND_VOLUME 2 #else diff --git a/source/src/vm/phc25/phc25.h b/source/src/vm/phc25/phc25.h index ddee99230..b563881b2 100644 --- a/source/src/vm/phc25/phc25.h +++ b/source/src/vm/phc25/phc25.h @@ -39,6 +39,7 @@ #define USE_AUTO_KEY_RELEASE 10 #define USE_AUTO_KEY_CAPS #define USE_SOUND_FILES 2 +#define USE_SOUND_FILES_RELAY #if defined(USE_SOUND_FILES) #define USE_SOUND_VOLUME 3 #else diff --git a/source/src/vm/pyuta/pyuta.h b/source/src/vm/pyuta/pyuta.h index 7a8a9621c..5544e64f3 100644 --- a/source/src/vm/pyuta/pyuta.h +++ b/source/src/vm/pyuta/pyuta.h @@ -30,6 +30,7 @@ #define USE_AUTO_KEY_RELEASE 6 #define USE_AUTO_KEY_CAPS #define USE_SOUND_FILES 2 +#define USE_SOUND_FILES_RELAY #if defined(USE_SOUND_FILES) #define USE_SOUND_VOLUME 3 #else diff --git a/source/src/vm/qc10/qc10.h b/source/src/vm/qc10/qc10.h index 0851bd301..2658c1969 100644 --- a/source/src/vm/qc10/qc10.h +++ b/source/src/vm/qc10/qc10.h @@ -53,6 +53,7 @@ #endif #define USE_SOUND_FILES 2 #define USE_ACCESS_LAMP +#define USE_SOUND_FILES_FDD #if defined(USE_SOUND_FILES) #define USE_SOUND_VOLUME 2 #else diff --git a/source/src/vm/rx78/rx78.h b/source/src/vm/rx78/rx78.h index 896b2363e..197b4f396 100644 --- a/source/src/vm/rx78/rx78.h +++ b/source/src/vm/rx78/rx78.h @@ -29,6 +29,7 @@ #define USE_AUTO_KEY_RELEASE 10 #define USE_AUTO_KEY_CAPS #define USE_SOUND_FILES 2 +#define USE_SOUND_FILES_RELAY #if defined(USE_SOUND_FILES) #define USE_SOUND_VOLUME 3 #else diff --git a/source/src/vm/sc3000/sc3000.h b/source/src/vm/sc3000/sc3000.h index e6fa6cb5f..309e06bcb 100644 --- a/source/src/vm/sc3000/sc3000.h +++ b/source/src/vm/sc3000/sc3000.h @@ -33,6 +33,8 @@ #define USE_AUTO_KEY_CAPS #define USE_ACCESS_LAMP #define USE_SOUND_FILES 3 +#define USE_SOUND_FILES_FDD +#define USE_SOUND_FILES_RELAY #if defined(USE_SOUND_FILES) #define USE_SOUND_VOLUME 4 #else diff --git a/source/src/vm/smc777/smc777.h b/source/src/vm/smc777/smc777.h index 47f3dd9b3..2b343c0e1 100644 --- a/source/src/vm/smc777/smc777.h +++ b/source/src/vm/smc777/smc777.h @@ -55,6 +55,8 @@ #define USE_SCANLINE #define USE_ACCESS_LAMP #define USE_SOUND_FILES 4 +#define USE_SOUND_FILES_FDD +#define USE_SOUND_FILES_RELAY #if defined(USE_SOUND_FILES) #if defined(_SMC777) #define USE_SOUND_VOLUME 5 diff --git a/source/src/vm/t3444a.cpp b/source/src/vm/t3444a.cpp index cf1763725..0b55a4721 100644 --- a/source/src/vm/t3444a.cpp +++ b/source/src/vm/t3444a.cpp @@ -861,7 +861,7 @@ void T3444A::mix_main(int32_t *dst, int count, int16_t *src, int *table, int sam ptr = table[i]; if(ptr >= 0) { if(ptr < samples) { - if(!snd_mute) { + if(!snd_mute && (config.sound_fdd != 0)) { pp = ptr << 1; dst_tmp = dst; k = 0; diff --git a/source/src/vm/upd765a.cpp b/source/src/vm/upd765a.cpp index f139c5f43..8b6e542ec 100644 --- a/source/src/vm/upd765a.cpp +++ b/source/src/vm/upd765a.cpp @@ -1743,7 +1743,7 @@ void UPD765A::mix_main(int32_t *dst, int count, int16_t *src, int *table, int sa ptr = table[i]; if(ptr >= 0) { if(ptr < samples) { - if(!snd_mute) { + if(!snd_mute && (config.sound_fdd != 0)) { pp = ptr << 1; dst_tmp = dst; k = 0; diff --git a/source/src/vm/x1/x1.h b/source/src/vm/x1/x1.h index 892c2d2fe..2c20d7c07 100644 --- a/source/src/vm/x1/x1.h +++ b/source/src/vm/x1/x1.h @@ -111,6 +111,8 @@ // ToDo #define DATAREC_SOUND #define USE_SOUND_FILES 5 +#define USE_SOUND_FILES_FDD +#define USE_SOUND_FILES_BUTTONS // CZ-8BS1 x1 #define SOUND_DEVICE_TYPE_DEFAULT 1 #if defined(USE_SOUND_FILES) diff --git a/source/src/vm/yalky/yalky.h b/source/src/vm/yalky/yalky.h index 793d07ee4..fd1f54601 100644 --- a/source/src/vm/yalky/yalky.h +++ b/source/src/vm/yalky/yalky.h @@ -37,6 +37,7 @@ #define USE_AUTO_KEY_RELEASE 6 #define USE_AUTO_KEY_CAPS #define USE_SOUND_FILES 5 +#define USE_SOUND_FILES_BUTTONS #if defined(USE_SOUND_FILES) #define USE_SOUND_VOLUME 2 #else diff --git a/source/tool/installer_unix.sh b/source/tool/installer_unix.sh index fc88389bb..00d994532 100755 --- a/source/tool/installer_unix.sh +++ b/source/tool/installer_unix.sh @@ -7,7 +7,7 @@ LDCONFIG=/sbin/ldconfig CSP_ARCH="x86_64-linux-gnu" MULTIARCH="Yes" CSP_PREFIX=/usr/local -CSP_GUILIB="libCSPgui.so.2.3.1 libCSPosd.so.2.5.0 libCSPemu_utils.so.2.2.0 libCSPavio.2.5.0" +CSP_GUILIB="libCSPgui.so.2.3.2 libCSPosd.so.2.5.0 libCSPemu_utils.so.2.2.0 libCSPavio.2.5.0" for i in "$@"; do case "$1" in