Correct gameport device usage

This commit is contained in:
Jasmine Iwanek
2025-07-11 11:33:39 -04:00
parent 67e7136ff9
commit 6a43be5b0d
12 changed files with 28 additions and 28 deletions

View File

@@ -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 },

View File

@@ -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;

View File

@@ -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

View File

@@ -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

View File

@@ -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;
}

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);

View File

@@ -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();

View File

@@ -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);

View File

@@ -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;

View File

@@ -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);