summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2021-01-23 00:55:21 +1100
committer Vas Crabb <vas@vastheman.com>2021-01-23 00:55:21 +1100
commit205511eea7e39e4d5a6f642bd05a223c023059c6 (patch)
treec379ae67a0550e4ba84344fdb7a5f11e31bd34c6 /src/mame
parent463e48a7e5db6a0c26c405fef848882faff556d8 (diff)
-getaway.cpp: Fixed steering control.
* Works fine with an analog stick/wheel, difficult to steer on the slippery "dotted" surface with keyboard/D-pad. -osd: Moved GCC intrinsics out of eminline.h so MAME_NOASM will take the pure C++ implementation with GCC (makes testing the fallback easier). -Removed a bunch of [[maybe_unused]] that aren't actually needed.
Diffstat (limited to 'src/mame')
-rw-r--r--src/mame/drivers/8080bw.cpp4
-rw-r--r--src/mame/drivers/getaway.cpp18
-rw-r--r--src/mame/drivers/ksys573.cpp6
-rw-r--r--src/mame/includes/8080bw.h4
4 files changed, 20 insertions, 12 deletions
diff --git a/src/mame/drivers/8080bw.cpp b/src/mame/drivers/8080bw.cpp
index 108fcfb3305..b18cf66a00a 100644
--- a/src/mame/drivers/8080bw.cpp
+++ b/src/mame/drivers/8080bw.cpp
@@ -3892,13 +3892,13 @@ void cane_state::cane_unknown_port0_w(u8 data)
***********************************************************************************************************************************/
-u8 orbite_state::orbite_scattered_colorram_r([[maybe_unused]] address_space &space, [[maybe_unused]] offs_t offset, [[maybe_unused]] u8 mem_mask)
+u8 orbite_state::orbite_scattered_colorram_r(address_space &space, offs_t offset, u8 mem_mask)
{
return m_scattered_colorram[(offset & 0x1f) | ((offset & 0x1f80) >> 2)];
}
-void orbite_state::orbite_scattered_colorram_w([[maybe_unused]] address_space &space, [[maybe_unused]] offs_t offset, [[maybe_unused]] u8 data, [[maybe_unused]] u8 mem_mask)
+void orbite_state::orbite_scattered_colorram_w(address_space &space, offs_t offset, u8 data, u8 mem_mask)
{
m_scattered_colorram[(offset & 0x1f) | ((offset & 0x1f80) >> 2)] = data;
}
diff --git a/src/mame/drivers/getaway.cpp b/src/mame/drivers/getaway.cpp
index cf12aecbaaf..14887e0255b 100644
--- a/src/mame/drivers/getaway.cpp
+++ b/src/mame/drivers/getaway.cpp
@@ -47,18 +47,22 @@ namespace {
class getaway_state : public driver_device
{
public:
- getaway_state(const machine_config &mconfig, device_type type, const char *tag) :
- driver_device(mconfig, type, tag)
+ getaway_state(const machine_config &mconfig, device_type type, const char *tag)
+ : driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
, m_gfxrom(*this, "gfx")
, m_screen(*this, "screen")
, m_inputs(*this, "IN.%u", 0)
, m_dsw(*this, "DSW.%u", 0)
+ , m_wheel(*this, "WHEEL")
{ }
// machine configs
void getaway(machine_config &config);
+ // input functions
+ ioport_value read_wheel() { return (m_wheel->read() - 0x08) & 0xff; }
+
protected:
virtual void machine_start() override;
@@ -69,6 +73,7 @@ private:
required_device<screen_device> m_screen;
required_ioport_array<3> m_inputs;
required_ioport_array<2> m_dsw;
+ required_ioport m_wheel;
void main_map(address_map &map);
void io_map(address_map &map);
@@ -336,9 +341,12 @@ static INPUT_PORTS_START( getaway )
PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_MINMAX(0x00,0x1f) PORT_SENSITIVITY(10) PORT_KEYDELTA(15)
PORT_START("IN.2")
- // steering wheel, 0x00 is neutral, range seems to be 0xe0-0x1f where bit 7 on goes to left dir.
- // TODO: better input type/defaults
- PORT_BIT( 0xff, 0, IPT_AD_STICK_X ) PORT_MINMAX(0x80, 0x7f) PORT_SENSITIVITY(5) PORT_KEYDELTA(5) // PORT_CENTERDELTA(0)
+ // steering wheel, signed byte, absolute values larger than 8 ignored
+ PORT_BIT( 0xff, 0x00, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(getaway_state, read_wheel)
+
+ PORT_START("WHEEL")
+ // TODO: check sensitivity and key delta
+ PORT_BIT( 0xff, 0x08, IPT_AD_STICK_X ) PORT_MINMAX(0x00, 0x10) PORT_SENSITIVITY(5) PORT_KEYDELTA(25) // PORT_CENTERDELTA(0)
// dips are two banks, a regular 8 banks one
// and a tiny 4. They are labeled, hard to read from the provided pic :=(
diff --git a/src/mame/drivers/ksys573.cpp b/src/mame/drivers/ksys573.cpp
index 0211e5744cf..4278316e09e 100644
--- a/src/mame/drivers/ksys573.cpp
+++ b/src/mame/drivers/ksys573.cpp
@@ -674,7 +674,7 @@ private:
void update_disc();
void gx700pwbf_output( int offset, uint8_t data );
- void gx700pwfbf_init( void ( ksys573_state::*output_callback_func )( [[maybe_unused]] offs_t offset, [[maybe_unused]] uint8_t data ) );
+ void gx700pwfbf_init( void ( ksys573_state::*output_callback_func )( offs_t offset, uint8_t data ) );
void gn845pwbb_do_w( int offset, int data );
void gn845pwbb_clk_w( int offset, int data );
@@ -697,7 +697,7 @@ private:
int m_h8_clk;
uint8_t m_gx700pwbf_output_data[ 4 ];
- void ( ksys573_state::*m_gx700pwfbf_output_callback )( [[maybe_unused]] offs_t offset, [[maybe_unused]] uint8_t data );
+ void ( ksys573_state::*m_gx700pwfbf_output_callback )( offs_t offset, uint8_t data );
uint32_t m_stage_mask;
struct
@@ -1238,7 +1238,7 @@ void ksys573_state::gx700pwbf_io_w(offs_t offset, uint16_t data, uint16_t mem_ma
}
}
-void ksys573_state::gx700pwfbf_init( void ( ksys573_state::*output_callback_func )( [[maybe_unused]] offs_t offset, [[maybe_unused]] uint8_t data ) )
+void ksys573_state::gx700pwfbf_init( void ( ksys573_state::*output_callback_func )( offs_t offset, uint8_t data ) )
{
std::fill_n( m_gx700pwbf_output_data, sizeof( m_gx700pwbf_output_data ), 0);
diff --git a/src/mame/includes/8080bw.h b/src/mame/includes/8080bw.h
index 85626daf548..2472bc91105 100644
--- a/src/mame/includes/8080bw.h
+++ b/src/mame/includes/8080bw.h
@@ -333,8 +333,8 @@ protected:
virtual void machine_start() override;
- u8 orbite_scattered_colorram_r([[maybe_unused]] address_space &space, [[maybe_unused]] offs_t offset, [[maybe_unused]] u8 mem_mask = 0xff);
- void orbite_scattered_colorram_w([[maybe_unused]] address_space &space, [[maybe_unused]] offs_t offset, [[maybe_unused]] u8 data, [[maybe_unused]] u8 mem_mask = 0xff);
+ u8 orbite_scattered_colorram_r(address_space &space, offs_t offset, u8 mem_mask = 0xff);
+ void orbite_scattered_colorram_w(address_space &space, offs_t offset, u8 data, u8 mem_mask = 0xff);
private:
void orbite_io_map(address_map &map);