diff --git a/src/game/gameport.c b/src/game/gameport.c index 366e35d01..3d02167bc 100644 --- a/src/game/gameport.c +++ b/src/game/gameport.c @@ -489,9 +489,9 @@ gameport_close(void *priv) free(dev); } -const device_t gameport_device = { - .name = "Game port", - .internal_name = "gameport", +const device_t gameport_200_device = { + .name = "Game port (Port 200h-207h)", + .internal_name = "gameport_200", .flags = 0, .local = GAMEPORT_8ADDR | 0x0200, .init = gameport_init, @@ -743,7 +743,7 @@ const device_t gameport_sio_device = { const device_t gameport_sio_1io_device = { .name = "Game port (Super I/O, 1 I/O port)", - .internal_name = "gameport_sio", + .internal_name = "gameport_sio_1io", .flags = 0, .local = GAMEPORT_SIO | GAMEPORT_1ADDR, .init = gameport_init, @@ -758,7 +758,7 @@ const device_t gameport_sio_1io_device = { static const GAMEPORT gameports[] = { { &device_none }, { &device_internal }, - { &gameport_device }, + { &gameport_200_device }, { &gameport_208_device }, { &gameport_pnp_device }, { &gameport_tm_acm_device }, diff --git a/src/include/86box/gameport.h b/src/include/86box/gameport.h index 88730dbd4..ac0ea2d58 100644 --- a/src/include/86box/gameport.h +++ b/src/include/86box/gameport.h @@ -125,7 +125,7 @@ extern const char *gameport_get_internal_name(int port); extern int gameport_get_from_internal_name(const char *str); #ifdef EMU_DEVICE_H -extern const device_t gameport_device; +extern const device_t gameport_200_device; extern const device_t gameport_201_device; extern const device_t gameport_203_device; extern const device_t gameport_205_device; diff --git a/src/machine/m_amstrad.c b/src/machine/m_amstrad.c index d42807b4d..fdad13df7 100644 --- a/src/machine/m_amstrad.c +++ b/src/machine/m_amstrad.c @@ -2997,7 +2997,7 @@ machine_amstrad_init(const machine_t *model, int type) mouse_set_poll(ms_poll, ams); } - standalone_gameport_type = &gameport_device; + standalone_gameport_type = &gameport_200_device; } int diff --git a/src/machine/m_at.c b/src/machine/m_at.c index d2c4b99a2..b30951140 100644 --- a/src/machine/m_at.c +++ b/src/machine/m_at.c @@ -81,7 +81,7 @@ machine_at_common_init_ex(const machine_t *model, int type) else if (type == 0) device_add(&at_nvr_device); - standalone_gameport_type = &gameport_device; + standalone_gameport_type = &gameport_200_device; } void diff --git a/src/machine/m_tandy.c b/src/machine/m_tandy.c index 69200febe..d69694c44 100644 --- a/src/machine/m_tandy.c +++ b/src/machine/m_tandy.c @@ -995,7 +995,7 @@ machine_tandy1k_init(const machine_t *model, int type) break; } - standalone_gameport_type = &gameport_device; + standalone_gameport_type = &gameport_200_device; eep_data_out = 0x0000; } diff --git a/src/machine/m_xt.c b/src/machine/m_xt.c index c94549463..04cddbbd0 100644 --- a/src/machine/m_xt.c +++ b/src/machine/m_xt.c @@ -57,7 +57,7 @@ machine_xt_common_init(const machine_t *model, int fixed_floppy) pit_devs[0].set_out_func(pit_devs[0].data, 1, pit_refresh_timer_xt); nmi_init(); - standalone_gameport_type = &gameport_device; + standalone_gameport_type = &gameport_200_device; } static const device_config_t ibmpc_config[] = { @@ -690,7 +690,7 @@ machine_xt_tuliptc8_init(const machine_t *model) pit_devs[0].set_out_func(pit_devs[0].data, 1, pit_refresh_timer_xt); nmi_init(); - standalone_gameport_type = &gameport_device; + standalone_gameport_type = &gameport_200_device; device_add(&amstrad_megapc_nvr_device); diff --git a/src/machine/m_xt_compaq.c b/src/machine/m_xt_compaq.c index f8c0b6a19..eaae251d1 100644 --- a/src/machine/m_xt_compaq.c +++ b/src/machine/m_xt_compaq.c @@ -56,7 +56,7 @@ machine_xt_compaq_deskpro_init(const machine_t *model) if (fdc_current[0] == FDC_INTERNAL) device_add(&fdc_xt_device); nmi_init(); - standalone_gameport_type = &gameport_device; + standalone_gameport_type = &gameport_200_device; lpt1_remove(); lpt1_setup(LPT_MDA_ADDR); @@ -84,7 +84,7 @@ machine_xt_compaq_portable_init(const machine_t *model) device_add(&fdc_xt_device); nmi_init(); if (joystick_type) - device_add(&gameport_device); + device_add(&gameport_200_device); lpt1_remove(); lpt1_setup(LPT_MDA_ADDR); diff --git a/src/machine/m_xt_laserxt.c b/src/machine/m_xt_laserxt.c index 7a6cab5e3..9a7dfc255 100644 --- a/src/machine/m_xt_laserxt.c +++ b/src/machine/m_xt_laserxt.c @@ -464,7 +464,7 @@ machine_xt_laserxt_common_init(const machine_t *model,int is_lxt3) device_add(&fdc_xt_device); nmi_init(); - standalone_gameport_type = &gameport_device; + standalone_gameport_type = &gameport_200_device; device_add(is_lxt3 ? &lxt3_device : &laserxt_device); diff --git a/src/machine/m_xt_olivetti.c b/src/machine/m_xt_olivetti.c index 8e37dce1f..b18aeedff 100644 --- a/src/machine/m_xt_olivetti.c +++ b/src/machine/m_xt_olivetti.c @@ -2325,7 +2325,7 @@ machine_xt_m24_init(const machine_t *model) /* Address 66-67 = mainboard dip-switch settings */ io_sethandler(0x0065, 3, m24_read, NULL, NULL, NULL, NULL, NULL, NULL); - standalone_gameport_type = &gameport_device; + standalone_gameport_type = &gameport_200_device; nmi_init(); @@ -2397,7 +2397,7 @@ machine_xt_m240_init(const machine_t *model) device_add(&fdc_at_device); /* io.c logs clearly show it using port 3F7 */ if (joystick_type) - device_add(&gameport_device); + device_add(&gameport_200_device); nmi_init(); diff --git a/src/machine/m_xt_philips.c b/src/machine/m_xt_philips.c index eed54e07f..92a33391d 100644 --- a/src/machine/m_xt_philips.c +++ b/src/machine/m_xt_philips.c @@ -158,7 +158,7 @@ machine_xt_philips_common_init(const machine_t *model) nmi_init(); - standalone_gameport_type = &gameport_device; + standalone_gameport_type = &gameport_200_device; device_add(&keyboard_pc_device); diff --git a/src/machine/m_xt_xi8088.c b/src/machine/m_xt_xi8088.c index 886c1be6e..2e155a833 100644 --- a/src/machine/m_xt_xi8088.c +++ b/src/machine/m_xt_xi8088.c @@ -209,7 +209,7 @@ machine_xt_xi8088_init(const machine_t *model) nmi_init(); device_add(&ibmat_nvr_device); pic2_init(); - standalone_gameport_type = &gameport_device; + standalone_gameport_type = &gameport_200_device; device_add(&sst_flash_39sf010_device); return ret; diff --git a/src/sound/snd_sb.c b/src/sound/snd_sb.c index 4c73abf21..f32ad0c59 100644 --- a/src/sound/snd_sb.c +++ b/src/sound/snd_sb.c @@ -2874,7 +2874,7 @@ sb_init(UNUSED(const device_t *info)) sb_ct1335_mixer_reset(sb); if (device_get_config_int("gameport")) { - sb->gameport = gameport_add(&gameport_device); + sb->gameport = gameport_add(&gameport_200_device); sb->gameport_addr = 0x200; gameport_remap(sb->gameport, sb->gameport_addr); } @@ -2959,7 +2959,7 @@ sb_mcv_init(UNUSED(const device_t *info)) midi_in_handler(1, sb_dsp_input_msg, sb_dsp_input_sysex, &sb->dsp); if (device_get_config_int("gameport")) { - sb->gameport = gameport_add(&gameport_device); + sb->gameport = gameport_add(&gameport_200_device); sb->gameport_addr = 0x200; gameport_remap(sb->gameport, sb->gameport_addr); } @@ -3047,7 +3047,7 @@ sb_pro_v1_init(UNUSED(const device_t *info)) midi_in_handler(1, sb_dsp_input_msg, sb_dsp_input_sysex, &sb->dsp); if (device_get_config_int("gameport")) { - sb->gameport = gameport_add(&gameport_device); + sb->gameport = gameport_add(&gameport_200_device); sb->gameport_addr = 0x200; gameport_remap(sb->gameport, sb->gameport_addr); } @@ -3107,7 +3107,7 @@ sb_pro_v2_init(UNUSED(const device_t *info)) midi_in_handler(1, sb_dsp_input_msg, sb_dsp_input_sysex, &sb->dsp); if (device_get_config_int("gameport")) { - sb->gameport = gameport_add(&gameport_device); + sb->gameport = gameport_add(&gameport_200_device); sb->gameport_addr = 0x200; gameport_remap(sb->gameport, sb->gameport_addr); } @@ -3146,7 +3146,7 @@ sb_pro_mcv_init(UNUSED(const device_t *info)) midi_in_handler(1, sb_dsp_input_msg, sb_dsp_input_sysex, &sb->dsp); if (device_get_config_int("gameport")) { - sb->gameport = gameport_add(&gameport_device); + sb->gameport = gameport_add(&gameport_200_device); sb->gameport_addr = 0x200; gameport_remap(sb->gameport, sb->gameport_addr); } @@ -3241,7 +3241,7 @@ sb_16_init(UNUSED(const device_t *info)) gameport_remap(sb->gameport, sb->gameport_addr); } else { if (device_get_config_int("gameport")) { - sb->gameport = gameport_add(&gameport_device); + sb->gameport = gameport_add(&gameport_200_device); sb->gameport_addr = 0x200; gameport_remap(sb->gameport, sb->gameport_addr); } @@ -3279,7 +3279,7 @@ sb_16_reply_mca_init(UNUSED(const device_t *info)) if (device_get_config_int("receive_input")) midi_in_handler(1, sb_dsp_input_msg, sb_dsp_input_sysex, &sb->dsp); - sb->gameport = gameport_add(&gameport_device); + sb->gameport = gameport_add(&gameport_200_device); /* I/O handlers activated in sb_pro_mcv_write */ mca_add(sb_16_reply_mca_read, sb_16_reply_mca_write, sb_mcv_feedb, NULL, sb); @@ -3645,7 +3645,7 @@ sb_awe32_init(UNUSED(const device_t *info)) midi_in_handler(1, sb_dsp_input_msg, sb_dsp_input_sysex, &sb->dsp); if (device_get_config_int("gameport")) { - sb->gameport = gameport_add(&gameport_device); + sb->gameport = gameport_add(&gameport_200_device); sb->gameport_addr = 0x200; gameport_remap(sb->gameport, sb->gameport_addr); } @@ -3911,7 +3911,7 @@ ess_x688_init(UNUSED(const device_t *info)) } if (device_get_config_int("gameport")) { - ess->gameport = gameport_add(&gameport_device); + ess->gameport = gameport_add(&gameport_200_device); ess->gameport_addr = 0x200; gameport_remap(ess->gameport, ess->gameport_addr); } @@ -4060,7 +4060,7 @@ ess_x688_mca_init(UNUSED(const device_t *info)) sb_dsp_set_mpu(&ess->dsp, ess->mpu); } - ess->gameport = gameport_add(&gameport_device); + ess->gameport = gameport_add(&gameport_200_device); mpu401_change_addr(ess->mpu, 0);