Go to file
Aaron Giles 2a88e54278 ioport.c C++ conversion. Mostly internal changes, with no
intended differences from previous behavior. For drivers,
the main change is that input_port_read() no longer exists.
Instead, the port must be fetched from the appropriate device,
and then read() is called.

For member functions, this is actually simpler/cleaner:

  value = ioport("tag")->read()

For legacy functions which have a driver_data state, it goes:

  value = state->ioport("tag")->read()

For other legacy functions, they need to fetch the root device:

  value = machine.root_device().ioport("tag")->read()

The other big change for drivers is that IPT_VBLANK is gone.
Instead, it has been replaced by a device line callback on the
screen device. There's a new macro PORT_VBLANK("tag") which
automatically points things to the right spot.

Here's a set of imperfect search & replace strings to convert
the input_port_read calls and fix up IPT_VBLANK:

input_port_read( *\( *)(machine\(\)) *, *([^)]+ *\))
ioport\1\3->read\(\)

input_port_read( *\( *)(.*machine[()]*) *, *([^)]+ *\))
\2\.root_device\(\)\.ioport\1\3->read\(\)

(state = .*driver_data[^}]+)space->machine\(\)\.root_device\(\)\.
\1state->

(state = .*driver_data[^}]+)device->machine\(\)\.root_device\(\)\.
\1state->

input_port_read_safe( *\( *)(machine\(\)) *, *([^,]+), *([^)]+\))
ioport\1\3->read_safe\(\4\)

IPT_VBLANK( *\))
IPT_CUSTOM\1 PORT_VBLANK("screen")
2012-05-03 09:00:08 +00:00
artwork HLSL Updates: [Ryan Holtz, Bat Country Entertainment, austere] 2011-06-06 21:25:38 +00:00
docs Refactored the hlsl.txt documentation file to match current MAME commands (nw) 2011-11-13 03:54:52 +00:00
hash Assorted changes from Johnboy related to Neo-Geo (nw) 2012-04-02 16:50:54 +00:00
hlsl HLSL "Hurricain't Keep A Good Dev Down" Bugfix Extravaganza: [Ryan Holtz, Bat 2011-08-28 09:10:53 +00:00
src ioport.c C++ conversion. Mostly internal changes, with no 2012-05-03 09:00:08 +00:00
.gitattributes added robbiestyle button lamps to gldarrow (same as wldarrow) 2012-04-30 23:31:32 +00:00
makefile ioport.c C++ conversion. Mostly internal changes, with no 2012-05-03 09:00:08 +00:00