86Box Specific PNP Gameport
This commit is contained in:
@@ -416,8 +416,8 @@ gameport_init(const device_t *info)
|
|||||||
dev->len = (info->local >> 16) & 0xff;
|
dev->len = (info->local >> 16) & 0xff;
|
||||||
gameport_remap(dev, info->local & 0xffff);
|
gameport_remap(dev, info->local & 0xffff);
|
||||||
|
|
||||||
/* Register ISAPnP if this is a standard game port card. */
|
/* Register ISAPnP if this is a PNP game port card. */
|
||||||
if ((info->local & 0xffff) == 0x200)
|
if (info->local & GAMEPORT_PNPROM)
|
||||||
isapnp_set_device_defaults(isapnp_add_card(gameport_pnp_rom, sizeof(gameport_pnp_rom), gameport_pnp_config_changed, NULL, NULL, NULL, dev), 0, gameport_pnp_defaults);
|
isapnp_set_device_defaults(isapnp_add_card(gameport_pnp_rom, sizeof(gameport_pnp_rom), gameport_pnp_config_changed, NULL, NULL, NULL, dev), 0, gameport_pnp_defaults);
|
||||||
|
|
||||||
return dev;
|
return dev;
|
||||||
@@ -489,6 +489,20 @@ gameport_close(void *priv)
|
|||||||
free(dev);
|
free(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const device_t gameport_device = {
|
||||||
|
.name = "86Box PNP Game port",
|
||||||
|
.internal_name = "gameport",
|
||||||
|
.flags = 0,
|
||||||
|
.local = GAMEPORT_PNPROM | GAMEPORT_8ADDR | 0x0200,
|
||||||
|
.init = gameport_init,
|
||||||
|
.close = gameport_close,
|
||||||
|
.reset = NULL,
|
||||||
|
.available = NULL,
|
||||||
|
.speed_changed = NULL,
|
||||||
|
.force_redraw = NULL,
|
||||||
|
.config = NULL
|
||||||
|
};
|
||||||
|
|
||||||
const device_t gameport_200_device = {
|
const device_t gameport_200_device = {
|
||||||
.name = "Game port (Port 200h-207h)",
|
.name = "Game port (Port 200h-207h)",
|
||||||
.internal_name = "gameport_200",
|
.internal_name = "gameport_200",
|
||||||
@@ -759,6 +773,7 @@ static const GAMEPORT gameports[] = {
|
|||||||
{ &device_none },
|
{ &device_none },
|
||||||
{ &device_internal },
|
{ &device_internal },
|
||||||
{ &gameport_200_device },
|
{ &gameport_200_device },
|
||||||
|
{ &gameport_device },
|
||||||
{ &gameport_208_device },
|
{ &gameport_208_device },
|
||||||
{ &gameport_pnp_device },
|
{ &gameport_pnp_device },
|
||||||
{ &gameport_tm_acm_device },
|
{ &gameport_tm_acm_device },
|
||||||
|
|||||||
@@ -51,6 +51,7 @@
|
|||||||
#define GAMEPORT_6ADDR 0x060000
|
#define GAMEPORT_6ADDR 0x060000
|
||||||
#define GAMEPORT_8ADDR 0x080000
|
#define GAMEPORT_8ADDR 0x080000
|
||||||
#define GAMEPORT_SIO 0x1000000
|
#define GAMEPORT_SIO 0x1000000
|
||||||
|
#define GAMEPORT_PNPROM 0x2000000
|
||||||
|
|
||||||
typedef struct joystick_t {
|
typedef struct joystick_t {
|
||||||
const char *name;
|
const char *name;
|
||||||
@@ -125,6 +126,7 @@ extern const char *gameport_get_internal_name(int port);
|
|||||||
extern int gameport_get_from_internal_name(const char *str);
|
extern int gameport_get_from_internal_name(const char *str);
|
||||||
|
|
||||||
#ifdef EMU_DEVICE_H
|
#ifdef EMU_DEVICE_H
|
||||||
|
extern const device_t gameport_device;
|
||||||
extern const device_t gameport_200_device;
|
extern const device_t gameport_200_device;
|
||||||
extern const device_t gameport_201_device;
|
extern const device_t gameport_201_device;
|
||||||
extern const device_t gameport_203_device;
|
extern const device_t gameport_203_device;
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ machine_at_common_init_ex(const machine_t *model, int type)
|
|||||||
else if (type == 0)
|
else if (type == 0)
|
||||||
device_add(&at_nvr_device);
|
device_add(&at_nvr_device);
|
||||||
|
|
||||||
standalone_gameport_type = &gameport_200_device;
|
standalone_gameport_type = &gameport_device;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
Reference in New Issue
Block a user