mirror of
https://github.com/holub/mame
synced 2025-04-21 07:52:35 +03:00
Software list items promoted to working
----------------------------------- vsmile_cart: V.Smile Tanz Mit Center (Germany), V.Smile Défi Gym (France), Gimnasio Interactivo V.Smile (Spain) -vsmile: Added support for the Jammin' Gym Class dance mat. [bmx, Ryan Holtz]
This commit is contained in:
parent
7db4326663
commit
dbea17a536
@ -1982,8 +1982,7 @@ V.Smile Smartbook Smartidges (need a Smartbook touch tablet connected to a regul
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<!-- No inputs, uses a dance mat controller -->
|
||||
<software name="jamgymg" supported="no"> <!-- Will be clone of "jamgym" once found and dumped. -->
|
||||
<software name="jamgymg" supported="yes"> <!-- Will be clone of "jamgym" once found and dumped. -->
|
||||
<description>V.Smile Tanz Mit Center (Germany)</description>
|
||||
<year>200?</year>
|
||||
<publisher>VTech</publisher>
|
||||
@ -2000,8 +1999,7 @@ V.Smile Smartbook Smartidges (need a Smartbook touch tablet connected to a regul
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<!-- No inputs, uses a dance mat controller -->
|
||||
<software name="jamgymf" cloneof="jamgymg" supported="no"> <!-- Will be clone of "jamgym" once found and dumped. -->
|
||||
<software name="jamgymf" cloneof="jamgymg" supported="yes"> <!-- Will be clone of "jamgym" once found and dumped. -->
|
||||
<description>V.Smile Défi Gym (France)</description>
|
||||
<year>200?</year>
|
||||
<publisher>VTech</publisher>
|
||||
@ -2016,8 +2014,7 @@ V.Smile Smartbook Smartidges (need a Smartbook touch tablet connected to a regul
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<!-- No inputs, uses a dance mat controller -->
|
||||
<software name="jamgyms" cloneof="jamgymg" supported="no">
|
||||
<software name="jamgyms" cloneof="jamgymg" supported="yes">
|
||||
<description>Gimnasio Interactivo V.Smile (Spain)</description>
|
||||
<year>200?</year>
|
||||
<publisher>VTech</publisher>
|
||||
|
@ -3887,6 +3887,8 @@ if (BUSES["VSMILE"]~=null) then
|
||||
MAME_DIR .. "src/devices/bus/vsmile/vsmile_ctrl.h",
|
||||
MAME_DIR .. "src/devices/bus/vsmile/pad.cpp",
|
||||
MAME_DIR .. "src/devices/bus/vsmile/pad.h",
|
||||
MAME_DIR .. "src/devices/bus/vsmile/mat.cpp",
|
||||
MAME_DIR .. "src/devices/bus/vsmile/mat.h",
|
||||
MAME_DIR .. "src/devices/bus/vsmile/vsmile_slot.cpp",
|
||||
MAME_DIR .. "src/devices/bus/vsmile/vsmile_slot.h",
|
||||
MAME_DIR .. "src/devices/bus/vsmile/rom.cpp",
|
||||
|
198
src/devices/bus/vsmile/mat.cpp
Normal file
198
src/devices/bus/vsmile/mat.cpp
Normal file
@ -0,0 +1,198 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Ryan Holtz, Vas Crabb
|
||||
|
||||
#include "emu.h"
|
||||
#include "mat.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
//#define VERBOSE 1
|
||||
#include "logmacro.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// GLOBAL VARIABLES
|
||||
//**************************************************************************
|
||||
|
||||
DEFINE_DEVICE_TYPE(VSMILE_MAT, vsmile_mat_device, "vsmile_mat", "V.Smile Gym Mat")
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// V.Smile gym mat
|
||||
//**************************************************************************
|
||||
|
||||
vsmile_mat_device::vsmile_mat_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock)
|
||||
: vsmile_pad_device(mconfig, VSMILE_MAT, tag, owner, clock)
|
||||
, m_io_joy(*this, "JOY")
|
||||
, m_io_colors(*this, "COLORS")
|
||||
, m_io_buttons(*this, "BUTTONS")
|
||||
{
|
||||
}
|
||||
|
||||
vsmile_mat_device::~vsmile_mat_device()
|
||||
{
|
||||
}
|
||||
|
||||
void vsmile_mat_device::tx_complete()
|
||||
{
|
||||
// update "joystick"-mapped mat pads
|
||||
if ((m_stale & STALE_JOY) != STALE_NONE)
|
||||
{
|
||||
m_sent_joy = m_io_joy->read();
|
||||
if ((m_stale & STALE_YELLOW_RIGHT) != STALE_NONE)
|
||||
{
|
||||
if (BIT(m_sent_joy, 0))
|
||||
uart_tx_fifo_push(0xcb); // yellow
|
||||
else if (BIT(m_sent_joy, 1))
|
||||
uart_tx_fifo_push(0xcd); // right
|
||||
else
|
||||
uart_tx_fifo_push(0xc0);
|
||||
}
|
||||
if ((m_stale & STALE_RED_LEFT) != STALE_NONE)
|
||||
{
|
||||
if (BIT(m_sent_joy, 2))
|
||||
uart_tx_fifo_push(0x8b); // red
|
||||
else if (BIT(m_sent_joy, 3))
|
||||
uart_tx_fifo_push(0x8d); // left
|
||||
else
|
||||
uart_tx_fifo_push(0x80);
|
||||
}
|
||||
}
|
||||
|
||||
// update "color"-mapped mat pads
|
||||
if ((m_stale & STALE_COLORS) != STALE_NONE)
|
||||
{
|
||||
m_sent_colors = m_io_colors->read();
|
||||
uart_tx_fifo_push(0x90 | m_sent_colors);
|
||||
}
|
||||
|
||||
// update "button"-mapped mat pads
|
||||
if ((m_stale & STALE_BUTTONS) != STALE_NONE)
|
||||
{
|
||||
m_sent_buttons = m_io_buttons->read();
|
||||
if (((m_stale & STALE_OK) != STALE_NONE) && BIT(m_sent_buttons, 0))
|
||||
uart_tx_fifo_push(0xa1);
|
||||
if (((m_stale & STALE_QUIT) != STALE_NONE) && BIT(m_sent_buttons, 1))
|
||||
uart_tx_fifo_push(0xa2);
|
||||
if (((m_stale & STALE_HELP) != STALE_NONE) && BIT(m_sent_buttons, 2))
|
||||
uart_tx_fifo_push(0xa3);
|
||||
if (((m_stale & STALE_BLUE) != STALE_NONE) && BIT(m_sent_buttons, 3))
|
||||
uart_tx_fifo_push(0xa4);
|
||||
if (!m_sent_buttons)
|
||||
uart_tx_fifo_push(0xa0);
|
||||
}
|
||||
|
||||
// if nothing happens in the next second we'll queue a keep-alive
|
||||
if (!m_active)
|
||||
LOG("entered active state\n");
|
||||
m_idle_timer->adjust(attotime::from_seconds(1));
|
||||
m_active = true;
|
||||
m_stale = STALE_NONE;
|
||||
}
|
||||
|
||||
INPUT_CHANGED_MEMBER(vsmile_mat_device::mat_joy_changed)
|
||||
{
|
||||
if (m_active)
|
||||
{
|
||||
if (!is_tx_empty())
|
||||
{
|
||||
LOG("joy changed while transmission in progress, marking stale\n");
|
||||
m_stale |= stale_mat_inputs(param);
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t const joy = m_io_joy->read();
|
||||
if ((joy ^ m_sent_joy) & 0x03)
|
||||
{
|
||||
if (BIT(joy, 0))
|
||||
uart_tx_fifo_push(0xcb); // yellow
|
||||
else if (BIT(joy, 1))
|
||||
uart_tx_fifo_push(0xcd); // right
|
||||
else
|
||||
uart_tx_fifo_push(0xc0);
|
||||
}
|
||||
if ((joy ^ m_sent_joy) & 0x0c)
|
||||
{
|
||||
if (BIT(joy, 2))
|
||||
uart_tx_fifo_push(0x8b); // red
|
||||
else if (BIT(joy, 3))
|
||||
uart_tx_fifo_push(0x8d); // left
|
||||
else
|
||||
uart_tx_fifo_push(0x80);
|
||||
}
|
||||
m_sent_joy = joy;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
INPUT_CHANGED_MEMBER(vsmile_mat_device::mat_color_changed)
|
||||
{
|
||||
if (m_active)
|
||||
{
|
||||
if (!is_tx_empty())
|
||||
{
|
||||
LOG("colors changed while transmission in progress, marking stale\n");
|
||||
m_stale |= STALE_COLORS;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_sent_colors = m_io_colors->read();
|
||||
uart_tx_fifo_push(0x90 | m_sent_colors);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
INPUT_CHANGED_MEMBER(vsmile_mat_device::mat_button_changed)
|
||||
{
|
||||
if (m_active)
|
||||
{
|
||||
if (!is_tx_empty())
|
||||
{
|
||||
LOG("buttons changed while transmission in progress, marking stale\n");
|
||||
m_stale |= stale_mat_inputs(param);
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t const buttons = m_io_buttons->read();
|
||||
if (BIT((m_sent_buttons ^ buttons) & buttons, 0))
|
||||
uart_tx_fifo_push(0xa1);
|
||||
if (BIT((m_sent_buttons ^ buttons) & buttons, 1))
|
||||
uart_tx_fifo_push(0xa2);
|
||||
if (BIT((m_sent_buttons ^ buttons) & buttons, 2))
|
||||
uart_tx_fifo_push(0xa3);
|
||||
if (BIT((m_sent_buttons ^ buttons) & buttons, 3))
|
||||
uart_tx_fifo_push(0xa4);
|
||||
if (!buttons)
|
||||
uart_tx_fifo_push(0xa0);
|
||||
m_sent_buttons = buttons;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static INPUT_PORTS_START( vsmile_mat )
|
||||
PORT_START("JOY")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CODE(KEYCODE_9_PAD) PORT_CODE(JOYCODE_BUTTON1) PORT_CHANGED_MEMBER(DEVICE_SELF, vsmile_mat_device, mat_joy_changed, vsmile_mat_device::STALE_YELLOW_RIGHT) PORT_NAME("Yellow")
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_CODE(KEYCODE_6_PAD) PORT_CODE(JOYCODE_BUTTON2) PORT_CHANGED_MEMBER(DEVICE_SELF, vsmile_mat_device, mat_joy_changed, vsmile_mat_device::STALE_YELLOW_RIGHT) PORT_NAME("Right")
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_CODE(KEYCODE_7_PAD) PORT_CODE(JOYCODE_BUTTON3) PORT_CHANGED_MEMBER(DEVICE_SELF, vsmile_mat_device, mat_joy_changed, vsmile_mat_device::STALE_RED_LEFT) PORT_NAME("Red")
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_CODE(KEYCODE_4_PAD) PORT_CODE(JOYCODE_BUTTON4) PORT_CHANGED_MEMBER(DEVICE_SELF, vsmile_mat_device, mat_joy_changed, vsmile_mat_device::STALE_RED_LEFT) PORT_NAME("Left")
|
||||
PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
|
||||
PORT_START("COLORS")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_CODE(KEYCODE_5_PAD) PORT_CODE(JOYCODE_BUTTON5) PORT_CHANGED_MEMBER(DEVICE_SELF, vsmile_mat_device, mat_color_changed, vsmile_mat_device::STALE_COLORS) PORT_NAME("Center")
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_CODE(KEYCODE_8_PAD) PORT_CODE(JOYCODE_BUTTON6) PORT_CHANGED_MEMBER(DEVICE_SELF, vsmile_mat_device, mat_color_changed, vsmile_mat_device::STALE_COLORS) PORT_NAME("Up")
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON7 ) PORT_CODE(KEYCODE_2_PAD) PORT_CODE(JOYCODE_BUTTON7) PORT_CHANGED_MEMBER(DEVICE_SELF, vsmile_mat_device, mat_color_changed, vsmile_mat_device::STALE_COLORS) PORT_NAME("Down")
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON8 ) PORT_CODE(KEYCODE_3_PAD) PORT_CODE(JOYCODE_BUTTON8) PORT_CHANGED_MEMBER(DEVICE_SELF, vsmile_mat_device, mat_color_changed, vsmile_mat_device::STALE_COLORS) PORT_NAME("Green")
|
||||
PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
|
||||
PORT_START("BUTTONS")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON9 ) PORT_CODE(KEYCODE_ENTER_PAD) PORT_CODE(JOYCODE_BUTTON9) PORT_CHANGED_MEMBER(DEVICE_SELF, vsmile_mat_device, mat_button_changed, vsmile_mat_device::STALE_OK) PORT_NAME("OK")
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON10 ) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(JOYCODE_BUTTON10) PORT_CHANGED_MEMBER(DEVICE_SELF, vsmile_mat_device, mat_button_changed, vsmile_mat_device::STALE_QUIT) PORT_NAME("Quit")
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON11 ) PORT_CODE(KEYCODE_MINUS_PAD) PORT_CODE(JOYCODE_BUTTON11) PORT_CHANGED_MEMBER(DEVICE_SELF, vsmile_mat_device, mat_button_changed, vsmile_mat_device::STALE_HELP) PORT_NAME("Help")
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON12 ) PORT_CODE(KEYCODE_1_PAD) PORT_CODE(JOYCODE_BUTTON12) PORT_CHANGED_MEMBER(DEVICE_SELF, vsmile_mat_device, mat_button_changed, vsmile_mat_device::STALE_BLUE) PORT_NAME("Blue")
|
||||
PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
INPUT_PORTS_END
|
||||
|
||||
ioport_constructor vsmile_mat_device::device_input_ports() const
|
||||
{
|
||||
return INPUT_PORTS_NAME( vsmile_mat );
|
||||
}
|
69
src/devices/bus/vsmile/mat.h
Normal file
69
src/devices/bus/vsmile/mat.h
Normal file
@ -0,0 +1,69 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Ryan Holtz, Vas Crabb
|
||||
#ifndef MAME_BUS_VSMILE_MAT_H
|
||||
#define MAME_BUS_VSMILE_MAT_H
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "pad.h"
|
||||
|
||||
/***************************************************************************
|
||||
TYPE DEFINITIONS
|
||||
***************************************************************************/
|
||||
|
||||
// ======================> vsmile_mat_device
|
||||
|
||||
class vsmile_mat_device : public vsmile_pad_device
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
vsmile_mat_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock = 0U);
|
||||
virtual ~vsmile_mat_device();
|
||||
|
||||
// input handlers
|
||||
DECLARE_INPUT_CHANGED_MEMBER(mat_joy_changed);
|
||||
DECLARE_INPUT_CHANGED_MEMBER(mat_color_changed);
|
||||
DECLARE_INPUT_CHANGED_MEMBER(mat_button_changed);
|
||||
|
||||
enum stale_mat_inputs : uint16_t
|
||||
{
|
||||
STALE_NONE = 0U,
|
||||
STALE_YELLOW_RIGHT = 1U << 0,
|
||||
STALE_RED_LEFT = 1U << 1,
|
||||
STALE_CENTER = 1U << 2,
|
||||
STALE_UP = 1U << 3,
|
||||
STALE_DOWN = 1U << 4,
|
||||
STALE_GREEN = 1U << 5,
|
||||
STALE_OK = 1U << 6,
|
||||
STALE_QUIT = 1U << 7,
|
||||
STALE_HELP = 1U << 8,
|
||||
STALE_BLUE = 1U << 9,
|
||||
|
||||
STALE_JOY = STALE_YELLOW_RIGHT | STALE_RED_LEFT,
|
||||
STALE_COLORS = STALE_CENTER | STALE_UP | STALE_DOWN | STALE_GREEN,
|
||||
STALE_BUTTONS = STALE_OK | STALE_QUIT | STALE_HELP | STALE_BLUE,
|
||||
STALE_ALL = STALE_JOY | STALE_COLORS | STALE_BUTTONS
|
||||
};
|
||||
|
||||
protected:
|
||||
// device_t implementation
|
||||
virtual ioport_constructor device_input_ports() const override;
|
||||
|
||||
// vsmile_pad_device implementation
|
||||
virtual void tx_complete() override;
|
||||
virtual uint16_t stale_all() override { return STALE_ALL; }
|
||||
|
||||
private:
|
||||
required_ioport m_io_joy;
|
||||
required_ioport m_io_colors;
|
||||
required_ioport m_io_buttons;
|
||||
};
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
DEVICE TYPES
|
||||
***************************************************************************/
|
||||
|
||||
DECLARE_DEVICE_TYPE(VSMILE_MAT, vsmile_mat_device)
|
||||
|
||||
#endif // MAME_BUS_VSMILE_MAT_H
|
@ -21,22 +21,24 @@ DEFINE_DEVICE_TYPE(VSMILE_PAD, vsmile_pad_device, "vsmile_pad", "V.Smile Joystic
|
||||
// V.Smile control pad
|
||||
//**************************************************************************
|
||||
|
||||
DECLARE_ENUM_BITWISE_OPERATORS(vsmile_pad_device::stale_inputs)
|
||||
ALLOW_SAVE_TYPE(vsmile_pad_device::stale_inputs);
|
||||
|
||||
vsmile_pad_device::vsmile_pad_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock)
|
||||
: vsmile_ctrl_device_base(mconfig, VSMILE_PAD, tag, owner, clock)
|
||||
: vsmile_pad_device(mconfig, VSMILE_PAD, tag, owner, clock)
|
||||
{
|
||||
}
|
||||
|
||||
vsmile_pad_device::vsmile_pad_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, uint32_t clock)
|
||||
: vsmile_ctrl_device_base(mconfig, type, tag, owner, clock)
|
||||
, m_io_joy(*this, "JOY")
|
||||
, m_io_colors(*this, "COLORS")
|
||||
, m_io_buttons(*this, "BUTTONS")
|
||||
, m_idle_timer(nullptr)
|
||||
, m_sent_joy(0x00U)
|
||||
, m_sent_colors(0x00U)
|
||||
, m_sent_buttons(0x00U)
|
||||
, m_stale(STALE_ALL)
|
||||
, m_sent_joy(0x0000U)
|
||||
, m_sent_colors(0x0000U)
|
||||
, m_sent_buttons(0x0000U)
|
||||
, m_active(false)
|
||||
, m_idle_timer(nullptr)
|
||||
{
|
||||
std::fill(std::begin(m_ctrl_probe_history), std::end(m_ctrl_probe_history), 0U);
|
||||
m_stale = stale_all();
|
||||
}
|
||||
|
||||
vsmile_pad_device::~vsmile_pad_device()
|
||||
@ -51,10 +53,10 @@ void vsmile_pad_device::device_start()
|
||||
timer_expired_delegate(FUNC(vsmile_pad_device::handle_idle), this));
|
||||
m_idle_timer->adjust(attotime::from_seconds(1));
|
||||
|
||||
m_sent_joy = 0x00U;
|
||||
m_sent_colors = 0x00U;
|
||||
m_sent_buttons = 0x00U;
|
||||
m_stale = STALE_ALL;
|
||||
m_sent_joy = 0x0000U;
|
||||
m_sent_colors = 0x0000U;
|
||||
m_sent_buttons = 0x0000U;
|
||||
m_stale = stale_all();
|
||||
m_active = false;
|
||||
|
||||
save_item(NAME(m_sent_joy));
|
||||
@ -128,7 +130,7 @@ void vsmile_pad_device::tx_timeout()
|
||||
{
|
||||
m_idle_timer->reset();
|
||||
m_active = false;
|
||||
m_stale = STALE_ALL;
|
||||
m_stale = stale_all();
|
||||
std::fill(std::begin(m_ctrl_probe_history), std::end(m_ctrl_probe_history), 0U);
|
||||
LOG("left active state\n");
|
||||
}
|
||||
@ -174,7 +176,7 @@ INPUT_CHANGED_MEMBER(vsmile_pad_device::pad_joy_changed)
|
||||
if (!is_tx_empty())
|
||||
{
|
||||
LOG("joy changed while transmission in progress, marking stale\n");
|
||||
m_stale |= stale_inputs(param);
|
||||
m_stale |= stale_pad_inputs(param);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -226,7 +228,7 @@ INPUT_CHANGED_MEMBER(vsmile_pad_device::pad_button_changed)
|
||||
if (!is_tx_empty())
|
||||
{
|
||||
LOG("buttons changed while transmission in progress, marking stale\n");
|
||||
m_stale |= stale_inputs(param);
|
||||
m_stale |= stale_pad_inputs(param);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -16,7 +16,16 @@
|
||||
class vsmile_pad_device : public vsmile_ctrl_device_base
|
||||
{
|
||||
public:
|
||||
enum stale_inputs : uint8_t
|
||||
// construction/destruction
|
||||
vsmile_pad_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock = 0U);
|
||||
virtual ~vsmile_pad_device();
|
||||
|
||||
// input handlers
|
||||
DECLARE_INPUT_CHANGED_MEMBER(pad_joy_changed);
|
||||
DECLARE_INPUT_CHANGED_MEMBER(pad_color_changed);
|
||||
DECLARE_INPUT_CHANGED_MEMBER(pad_button_changed);
|
||||
|
||||
enum stale_pad_inputs : uint16_t
|
||||
{
|
||||
STALE_NONE = 0U,
|
||||
STALE_LEFT_RIGHT = 1U << 0,
|
||||
@ -32,16 +41,9 @@ public:
|
||||
STALE_ALL = STALE_JOY | STALE_COLORS | STALE_BUTTONS
|
||||
};
|
||||
|
||||
// construction/destruction
|
||||
vsmile_pad_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock = 0U);
|
||||
virtual ~vsmile_pad_device();
|
||||
|
||||
// input handlers
|
||||
DECLARE_INPUT_CHANGED_MEMBER(pad_joy_changed);
|
||||
DECLARE_INPUT_CHANGED_MEMBER(pad_color_changed);
|
||||
DECLARE_INPUT_CHANGED_MEMBER(pad_button_changed);
|
||||
|
||||
protected:
|
||||
vsmile_pad_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, uint32_t clock = 0U);
|
||||
|
||||
// device_t implementation
|
||||
virtual ioport_constructor device_input_ports() const override;
|
||||
virtual void device_start() override;
|
||||
@ -50,21 +52,23 @@ protected:
|
||||
virtual void tx_complete() override;
|
||||
virtual void tx_timeout() override;
|
||||
virtual void rx_complete(uint8_t data, bool cts) override;
|
||||
virtual uint16_t stale_all() { return STALE_ALL; }
|
||||
|
||||
private:
|
||||
void uart_tx_fifo_push(uint8_t data);
|
||||
|
||||
TIMER_CALLBACK_MEMBER(handle_idle);
|
||||
|
||||
required_ioport m_io_joy;
|
||||
required_ioport m_io_colors;
|
||||
required_ioport m_io_buttons;
|
||||
|
||||
uint16_t m_sent_joy, m_sent_colors, m_sent_buttons;
|
||||
|
||||
uint16_t m_stale;
|
||||
bool m_active;
|
||||
emu_timer *m_idle_timer;
|
||||
|
||||
uint8_t m_sent_joy, m_sent_colors, m_sent_buttons;
|
||||
stale_inputs m_stale;
|
||||
bool m_active;
|
||||
private:
|
||||
TIMER_CALLBACK_MEMBER(handle_idle);
|
||||
|
||||
uint8_t m_ctrl_probe_history[2];
|
||||
};
|
||||
|
||||
|
@ -277,8 +277,10 @@ TIMER_CALLBACK_MEMBER(vsmile_ctrl_device_base::rts_timer_expired)
|
||||
|
||||
|
||||
#include "pad.h"
|
||||
#include "mat.h"
|
||||
|
||||
void vsmile_controllers(device_slot_interface &device)
|
||||
{
|
||||
device.option_add("joy", VSMILE_PAD);
|
||||
device.option_add("mat", VSMILE_MAT);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user