From 6a8ffd5ff46d756a7967d8292c1d8a7f7235e449 Mon Sep 17 00:00:00 2001 From: yz70s Date: Sun, 24 Nov 2019 17:47:45 +0100 Subject: nforcepc: small update to it8703f, more to come (nw) --- src/mame/drivers/nforcepc.cpp | 20 ++++++++++++++++++++ src/mame/includes/nforcepc.h | 24 +++++++++++++----------- 2 files changed, 33 insertions(+), 11 deletions(-) diff --git a/src/mame/drivers/nforcepc.cpp b/src/mame/drivers/nforcepc.cpp index 24e1ed32eeb..b1018aa5cdc 100644 --- a/src/mame/drivers/nforcepc.cpp +++ b/src/mame/drivers/nforcepc.cpp @@ -362,9 +362,14 @@ it8703f_device::it8703f_device(const machine_config &mconfig, const char *tag, d , pin_reset_callback(*this) , pin_gatea20_callback(*this) , m_kbdc(*this, "pc_kbdc") + , enabled_game_port(false) + , enabled_midi_port(false) { memset(global_configuration_registers, 0, sizeof(global_configuration_registers)); memset(configuration_registers, 0, sizeof(configuration_registers)); + global_configuration_registers[0x20] = 0x87; // identifies it8703f + global_configuration_registers[0x21] = 1; + global_configuration_registers[0x24] = 4; for (int n = 0; n < 13; n++) enabled_logical[n] = false; } @@ -500,6 +505,21 @@ void it8703f_device::write_logical_configuration_register(int index, int data) } } break; + case LogicalDevice::Serial1: + break; + case LogicalDevice::Serial2: + break; + case LogicalDevice::Parallel: + break; + case LogicalDevice::Gpio1: + if (index == 0x30) + { + if (data & 1) + enabled_game_port = true; + if (data & 2) + enabled_midi_port = true; + } + break; } } diff --git a/src/mame/includes/nforcepc.h b/src/mame/includes/nforcepc.h index 002824319dd..60c72776159 100644 --- a/src/mame/includes/nforcepc.h +++ b/src/mame/includes/nforcepc.h @@ -209,17 +209,17 @@ private: } mode; enum LogicalDevice { - FDC = 0, - Parallel, - Serial1, - Serial2, - Keyboard = 5, - ConsumerIR, - Gpio1, - Gpio2, - Gpio34, - ACPI, - Gpio567 = 12 + FDC = 0, // Floppy disk controller + Parallel, // Parallel port + Serial1, // Serial port 1 + Serial2, // Serial port 2 + Keyboard = 5, // Keyboard controller + ConsumerIR, // Consumer IR + Gpio1, // Game port, MIDI, GPIO set 1 + Gpio2, // GPIO set 2 + Gpio34, // GPIO set 3 and 4 + ACPI, // ACPI + Gpio567 = 12 // GPIO set 5, 6 and 7 }; int config_key_step; int config_index; @@ -230,6 +230,8 @@ private: devcb_write_line pin_gatea20_callback; required_device m_kbdc; bool enabled_logical[13]; + bool enabled_game_port; + bool enabled_midi_port; lpcbus_host_interface *lpchost; int lpcindex; -- cgit v1.2.3