Make the Game Blaster's I/O address configurable
This commit is contained in:
@@ -163,6 +163,7 @@
|
|||||||
#define IDC_CHECK_FLOAT 1048
|
#define IDC_CHECK_FLOAT 1048
|
||||||
#define IDC_CONFIGURE_GUS 1049
|
#define IDC_CONFIGURE_GUS 1049
|
||||||
#define IDC_COMBO_MIDI_IN 1050
|
#define IDC_COMBO_MIDI_IN 1050
|
||||||
|
#define IDC_CONFIGURE_CMS 1051
|
||||||
|
|
||||||
#define IDC_COMBO_NET_TYPE 1060 /* network config */
|
#define IDC_COMBO_NET_TYPE 1060 /* network config */
|
||||||
#define IDC_COMBO_PCAP 1061
|
#define IDC_COMBO_PCAP 1061
|
||||||
|
|||||||
@@ -181,7 +181,8 @@ void *cms_init(const device_t *info)
|
|||||||
cms_t *cms = malloc(sizeof(cms_t));
|
cms_t *cms = malloc(sizeof(cms_t));
|
||||||
memset(cms, 0, sizeof(cms_t));
|
memset(cms, 0, sizeof(cms_t));
|
||||||
|
|
||||||
io_sethandler(0x0220, 0x0010, cms_read, NULL, NULL, cms_write, NULL, NULL, cms);
|
uint16_t addr = device_get_config_hex16("base");
|
||||||
|
io_sethandler(addr, 0x0010, cms_read, NULL, NULL, cms_write, NULL, NULL, cms);
|
||||||
sound_add_handler(cms_get_buffer, cms);
|
sound_add_handler(cms_get_buffer, cms);
|
||||||
return cms;
|
return cms;
|
||||||
}
|
}
|
||||||
@@ -193,11 +194,44 @@ void cms_close(void *p)
|
|||||||
free(cms);
|
free(cms);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const device_config_t cms_config[] =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
"base", "Address", CONFIG_HEX16, "", 0x220, "", { 0 },
|
||||||
|
{
|
||||||
|
{
|
||||||
|
"0x210", 0x210
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"0x220", 0x220
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"0x230", 0x230
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"0x240", 0x240
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"0x250", 0x250
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"0x260", 0x260
|
||||||
|
},
|
||||||
|
{
|
||||||
|
""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"", "", -1
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const device_t cms_device =
|
const device_t cms_device =
|
||||||
{
|
{
|
||||||
"Creative Music System / Game Blaster",
|
"Creative Music System / Game Blaster",
|
||||||
0, 0,
|
0, 0,
|
||||||
cms_init, cms_close, NULL,
|
cms_init, cms_close, NULL,
|
||||||
{ NULL }, NULL, NULL,
|
{ NULL }, NULL, NULL,
|
||||||
NULL
|
cms_config
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -517,15 +517,17 @@ BEGIN
|
|||||||
|
|
||||||
CONTROL "Innovation SSI-2001",IDC_CHECK_SSI,"Button",
|
CONTROL "Innovation SSI-2001",IDC_CHECK_SSI,"Button",
|
||||||
BS_AUTOCHECKBOX | WS_TABSTOP,7,84,95,10
|
BS_AUTOCHECKBOX | WS_TABSTOP,7,84,95,10
|
||||||
|
|
||||||
CONTROL "CMS / Game Blaster",IDC_CHECK_CMS,"Button",
|
CONTROL "CMS / Game Blaster",IDC_CHECK_CMS,"Button",
|
||||||
BS_AUTOCHECKBOX | WS_TABSTOP,147,84,95,10
|
BS_AUTOCHECKBOX | WS_TABSTOP,7,102,95,10
|
||||||
|
PUSHBUTTON "Configure",IDC_CONFIGURE_CMS,214,100,46,12
|
||||||
|
|
||||||
CONTROL "Gravis Ultrasound",IDC_CHECK_GUS,"Button",
|
CONTROL "Gravis Ultrasound",IDC_CHECK_GUS,"Button",
|
||||||
BS_AUTOCHECKBOX | WS_TABSTOP,7,101,94,10
|
BS_AUTOCHECKBOX | WS_TABSTOP,7,120,94,10
|
||||||
PUSHBUTTON "Configure",IDC_CONFIGURE_GUS,214,101,46,12
|
PUSHBUTTON "Configure",IDC_CONFIGURE_GUS,214,118,46,12
|
||||||
|
|
||||||
CONTROL "Use FLOAT32 sound",IDC_CHECK_FLOAT,"Button",
|
CONTROL "Use FLOAT32 sound",IDC_CHECK_FLOAT,"Button",
|
||||||
BS_AUTOCHECKBOX | WS_TABSTOP,7,117,94,10
|
BS_AUTOCHECKBOX | WS_TABSTOP,7,138,94,10
|
||||||
END
|
END
|
||||||
|
|
||||||
DLG_CFG_NETWORK DIALOG DISCARDABLE 107, 0, 267, 65
|
DLG_CFG_NETWORK DIALOG DISCARDABLE 107, 0, 267, 65
|
||||||
|
|||||||
@@ -1376,6 +1376,7 @@ win_settings_sound_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
|
|||||||
settings_enable_window(hdlg, IDC_CHECK_MPU401, mpu401_standalone_allow());
|
settings_enable_window(hdlg, IDC_CHECK_MPU401, mpu401_standalone_allow());
|
||||||
settings_enable_window(hdlg, IDC_CONFIGURE_MPU401, mpu401_standalone_allow() && temp_mpu401);
|
settings_enable_window(hdlg, IDC_CONFIGURE_MPU401, mpu401_standalone_allow() && temp_mpu401);
|
||||||
settings_set_check(hdlg, IDC_CHECK_CMS, temp_GAMEBLASTER);
|
settings_set_check(hdlg, IDC_CHECK_CMS, temp_GAMEBLASTER);
|
||||||
|
settings_enable_window(hdlg, IDC_CONFIGURE_CMS, temp_GAMEBLASTER);
|
||||||
settings_set_check(hdlg, IDC_CHECK_GUS, temp_GUS);
|
settings_set_check(hdlg, IDC_CHECK_GUS, temp_GUS);
|
||||||
settings_enable_window(hdlg, IDC_CONFIGURE_GUS, temp_GUS);
|
settings_enable_window(hdlg, IDC_CONFIGURE_GUS, temp_GUS);
|
||||||
settings_set_check(hdlg, IDC_CHECK_SSI, temp_SSI2001);
|
settings_set_check(hdlg, IDC_CHECK_SSI, temp_SSI2001);
|
||||||
@@ -1437,6 +1438,16 @@ win_settings_sound_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
|
|||||||
(void *)&mpu401_mca_device : (void *)&mpu401_device);
|
(void *)&mpu401_mca_device : (void *)&mpu401_device);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case IDC_CHECK_CMS:
|
||||||
|
temp_GAMEBLASTER = settings_get_check(hdlg, IDC_CHECK_CMS);
|
||||||
|
|
||||||
|
settings_enable_window(hdlg, IDC_CONFIGURE_CMS, temp_GAMEBLASTER);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case IDC_CONFIGURE_CMS:
|
||||||
|
temp_deviceconfig |= deviceconfig_open(hdlg, &cms_device);
|
||||||
|
break;
|
||||||
|
|
||||||
case IDC_CHECK_GUS:
|
case IDC_CHECK_GUS:
|
||||||
temp_GUS = settings_get_check(hdlg, IDC_CHECK_GUS);
|
temp_GUS = settings_get_check(hdlg, IDC_CHECK_GUS);
|
||||||
settings_enable_window(hdlg, IDC_CONFIGURE_GUS, temp_GUS);
|
settings_enable_window(hdlg, IDC_CONFIGURE_GUS, temp_GUS);
|
||||||
|
|||||||
Reference in New Issue
Block a user