summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author mooglyguy <therealmogminer@gmail.com>2018-04-07 13:51:20 +0200
committer mooglyguy <therealmogminer@gmail.com>2018-04-07 13:51:44 +0200
commit045476e3aa60ad6e388c59bb94fc68b73a58493b (patch)
tree303b610afe76ad8524fb75c352df637b7a208168
parentef77d3f1aa9df0151fd51e36c8a1500b64195f42 (diff)
-output: Removed remaining legacy output accesors from cinemat, and removed them from buggychl and thomson. [Ryan Holtz]
-rw-r--r--src/mame/drivers/buggychl.cpp2
-rw-r--r--src/mame/drivers/cinemat.cpp13
-rw-r--r--src/mame/includes/buggychl.h7
-rw-r--r--src/mame/includes/cinemat.h10
-rw-r--r--src/mame/includes/thomson.h5
-rw-r--r--src/mame/video/buggychl.cpp2
-rw-r--r--src/mame/video/cinemat.cpp22
-rw-r--r--src/mame/video/thomson.cpp6
8 files changed, 43 insertions, 24 deletions
diff --git a/src/mame/drivers/buggychl.cpp b/src/mame/drivers/buggychl.cpp
index 722ed00a049..56873fd31e2 100644
--- a/src/mame/drivers/buggychl.cpp
+++ b/src/mame/drivers/buggychl.cpp
@@ -437,6 +437,8 @@ void buggychl_state::machine_start()
save_item(NAME(m_sky_on));
save_item(NAME(m_sprite_color_base));
save_item(NAME(m_bg_scrollx));
+
+ m_led.resolve();
}
void buggychl_state::machine_reset()
diff --git a/src/mame/drivers/cinemat.cpp b/src/mame/drivers/cinemat.cpp
index ad0002038c5..256175aca33 100644
--- a/src/mame/drivers/cinemat.cpp
+++ b/src/mame/drivers/cinemat.cpp
@@ -59,6 +59,7 @@ void cinemat_state::machine_start()
save_item(NAME(m_coin_last_reset));
save_item(NAME(m_mux_select));
m_led.resolve();
+ m_pressed.resolve();
}
@@ -82,14 +83,14 @@ void cinemat_state::machine_reset()
READ8_MEMBER(cinemat_state::inputs_r)
{
- return (ioport("INPUTS")->read() >> offset) & 1;
+ return (m_inputs->read() >> offset) & 1;
}
READ8_MEMBER(cinemat_state::switches_r)
{
static const uint8_t switch_shuffle[8] = { 2,5,4,3,0,1,6,7 };
- return (ioport("SWITCHES")->read() >> switch_shuffle[offset]) & 1;
+ return (m_switches->read() >> switch_shuffle[offset]) & 1;
}
@@ -167,7 +168,7 @@ READ8_MEMBER(cinemat_state::speedfrk_wheel_r)
int delta_wheel;
/* the shift register is cleared once per 'frame' */
- delta_wheel = int8_t(ioport("WHEEL")->read()) / 8;
+ delta_wheel = int8_t(m_wheel->read()) / 8;
if (delta_wheel > 3)
delta_wheel = 3;
else if (delta_wheel < -3)
@@ -179,14 +180,14 @@ READ8_MEMBER(cinemat_state::speedfrk_wheel_r)
READ8_MEMBER(cinemat_state::speedfrk_gear_r)
{
- int gearval = ioport("GEAR")->read();
+ int gearval = m_gear_input->read();
/* check the fake gear input port and determine the bit settings for the gear */
if ((gearval & 0x0f) != 0x0f)
m_gear = gearval & 0x0f;
/* add the start key into the mix -- note that it overlaps 4th gear */
- if (!(ioport("INPUTS")->read() & 0x80))
+ if (!(m_inputs->read() & 0x80))
m_gear &= ~0x08;
return (m_gear >> offset) & 1;
@@ -234,7 +235,7 @@ READ8_MEMBER(cinemat_state::sundance_inputs_r)
if (sundance_port_map[offset].portname)
return (ioport(sundance_port_map[offset].portname)->read() & sundance_port_map[offset].bitmask) ? 0 : 1;
else
- return (ioport("INPUTS")->read() >> offset) & 1;
+ return (m_inputs->read() >> offset) & 1;
}
diff --git a/src/mame/includes/buggychl.h b/src/mame/includes/buggychl.h
index f95452a92f7..f0403fd50e6 100644
--- a/src/mame/includes/buggychl.h
+++ b/src/mame/includes/buggychl.h
@@ -35,8 +35,9 @@ public:
m_soundnmi(*this, "soundnmi"),
m_soundlatch(*this, "soundlatch"),
m_soundlatch2(*this, "soundlatch2"),
- m_pedal_input(*this, "PEDAL")
- { }
+ m_pedal_input(*this, "PEDAL"),
+ m_led(*this, "led%u", 0U)
+ { }
/* memory pointers */
required_shared_ptr<uint8_t> m_charram;
@@ -61,6 +62,8 @@ public:
required_device<generic_latch_8_device> m_soundlatch2;
required_ioport m_pedal_input;
+ output_finder<1> m_led;
+
DECLARE_WRITE8_MEMBER(bankswitch_w);
DECLARE_WRITE8_MEMBER(sound_enable_w);
DECLARE_READ8_MEMBER(mcu_status_r);
diff --git a/src/mame/includes/cinemat.h b/src/mame/includes/cinemat.h
index 49d1b53633e..8e43ab66ce2 100644
--- a/src/mame/includes/cinemat.h
+++ b/src/mame/includes/cinemat.h
@@ -25,9 +25,14 @@ public:
, m_vector(*this, "vector")
, m_screen(*this, "screen")
, m_rambase(*this, "rambase")
+ , m_inputs(*this, "INPUTS")
+ , m_switches(*this, "SWITCHES")
+ , m_gear_input(*this, "GEAR")
+ , m_wheel(*this, "WHEEL")
, m_analog_x(*this, "ANALOGX")
, m_analog_y(*this, "ANALOGY")
, m_led(*this, "led")
+ , m_pressed(*this, "pressed%u", 0U)
{ }
required_device<ccpu_cpu_device> m_maincpu;
@@ -38,10 +43,15 @@ public:
required_device<screen_device> m_screen;
optional_shared_ptr<uint16_t> m_rambase;
+ required_ioport m_inputs;
+ required_ioport m_switches;
+ optional_ioport m_gear_input;
+ optional_ioport m_wheel;
optional_ioport m_analog_x;
optional_ioport m_analog_y;
output_finder<> m_led;
+ output_finder<10> m_pressed;
uint32_t m_current_shift;
uint32_t m_last_shift;
diff --git a/src/mame/includes/thomson.h b/src/mame/includes/thomson.h
index b7ec5d22aa6..9a8378836f6 100644
--- a/src/mame/includes/thomson.h
+++ b/src/mame/includes/thomson.h
@@ -142,7 +142,8 @@ public:
m_datahibank(*this, TO8_DATA_HI),
m_biosbank(*this, TO8_BIOS_BANK),
m_cartlobank(*this, MO6_CART_LO),
- m_carthibank(*this, MO6_CART_HI)
+ m_carthibank(*this, MO6_CART_HI),
+ m_floppy(*this, "floppy")
{
}
@@ -417,6 +418,8 @@ protected:
optional_memory_bank m_cartlobank;
optional_memory_bank m_carthibank;
+ output_finder<> m_floppy;
+
/* bank logging and optimisations */
int m_old_cart_bank;
int m_old_cart_bank_was_read_only;
diff --git a/src/mame/video/buggychl.cpp b/src/mame/video/buggychl.cpp
index c483d803d0a..db33cbff098 100644
--- a/src/mame/video/buggychl.cpp
+++ b/src/mame/video/buggychl.cpp
@@ -64,7 +64,7 @@ WRITE8_MEMBER(buggychl_state::buggychl_ctrl_w)
m_sprite_color_base = (data & 0x10) ? 1 * 16 : 3 * 16;
machine().bookkeeping().coin_lockout_global_w((~data & 0x40) >> 6);
- output().set_led_value(0, ~data & 0x80);
+ m_led[0] = BIT(~data, 7);
}
WRITE8_MEMBER(buggychl_state::buggychl_bg_scrollx_w)
diff --git a/src/mame/video/cinemat.cpp b/src/mame/video/cinemat.cpp
index 56d5de46629..cd7e7a28793 100644
--- a/src/mame/video/cinemat.cpp
+++ b/src/mame/video/cinemat.cpp
@@ -219,20 +219,20 @@ uint32_t cinemat_state::screen_update_cinemat(screen_device &screen, bitmap_rgb3
uint32_t cinemat_state::screen_update_spacewar(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- int sw_option = ioport("INPUTS")->read();
+ int sw_option = ~m_inputs->read();
screen_update_cinemat(screen, bitmap, cliprect);
/* set the state of the artwork */
- output().set_value("pressed3", (~sw_option >> 0) & 1);
- output().set_value("pressed8", (~sw_option >> 1) & 1);
- output().set_value("pressed4", (~sw_option >> 2) & 1);
- output().set_value("pressed9", (~sw_option >> 3) & 1);
- output().set_value("pressed1", (~sw_option >> 4) & 1);
- output().set_value("pressed6", (~sw_option >> 5) & 1);
- output().set_value("pressed2", (~sw_option >> 6) & 1);
- output().set_value("pressed7", (~sw_option >> 7) & 1);
- output().set_value("pressed5", (~sw_option >> 10) & 1);
- output().set_value("pressed0", (~sw_option >> 11) & 1);
+ m_pressed[3] = BIT(sw_option, 0);
+ m_pressed[8] = BIT(sw_option, 1);
+ m_pressed[4] = BIT(sw_option, 2);
+ m_pressed[9] = BIT(sw_option, 3);
+ m_pressed[1] = BIT(sw_option, 4);
+ m_pressed[6] = BIT(sw_option, 5);
+ m_pressed[2] = BIT(sw_option, 6);
+ m_pressed[7] = BIT(sw_option, 7);
+ m_pressed[5] = BIT(sw_option, 10);
+ m_pressed[0] = BIT(sw_option, 11);
return 0;
}
diff --git a/src/mame/video/thomson.cpp b/src/mame/video/thomson.cpp
index 8dac9d2f8d8..697c4744a20 100644
--- a/src/mame/video/thomson.cpp
+++ b/src/mame/video/thomson.cpp
@@ -890,7 +890,7 @@ void thomson_state::thom_floppy_active( int write )
/* update icon */
fnew = FLOP_STATE;
if ( fold != fnew )
- output().set_value( "floppy", fnew );
+ m_floppy = fnew;
}
@@ -1041,7 +1041,7 @@ WRITE_LINE_MEMBER(thomson_state::thom_vblank)
m_thom_floppy_rcount--;
fnew = FLOP_STATE;
if ( fnew != fold )
- output().set_value( "floppy", fnew );
+ m_floppy = fnew;
/* prepare state for next frame */
for ( i = 0; i <= THOM_TOTAL_HEIGHT; i++ )
@@ -1160,7 +1160,7 @@ VIDEO_START_MEMBER( thomson_state, thom )
m_thom_floppy_wcount = 0;
save_item(NAME(m_thom_floppy_wcount));
save_item(NAME(m_thom_floppy_rcount));
- output().set_value( "floppy", 0 );
+ m_floppy.resolve();
m_thom_video_timer = machine().scheduler().timer_alloc(timer_expired_delegate());