summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/bzone.c
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2008-06-12 16:44:33 +0000
committer Aaron Giles <aaron@aarongiles.com>2008-06-12 16:44:33 +0000
commit863a28e92909f9aff07d0e4d8627415e71f458c3 (patch)
treed3af408c13cf8804d3fb5b3262362ee4679a40e1 /src/mame/drivers/bzone.c
parentb171ca8111d35f1d76ef1d82a44558c25d5703a7 (diff)
From: Fabio Priuli [mailto:doge.fabio@gmail.com]
Subject: a few more read_indexed removed Hi Aaron, attached please find a few more patches to remove input_port_read_indexed, following the approach you suggested. Once again, each patch covers 5/6 drivers to more easily avoid failures while applying them. Let me know if any patch fails to apply. Also, I would like to ask some of you to take a look at bbusters.c: the behavior of the handler 'control_3_r' seems strange to me but I was not able to understand exactly which is its role in the driver. Currently, it reads one of the inputs "IN5", "IN6", "IN7" (because gun_select assumes values 0,1,2). If it's used to select the gun among the 3, shouldn't it read "IN5", "IN7" and "IN9"? anyway the current code works, so I only added a comment about this and I hope some of you can review this part of the driver to remove the remaining input_port_read_indexed. A couple of additional notes (tag names refer to the ones I added in the patch): * in bnstars.c, the input port tagged as "IN6" is never read. probably this is well known to the driver author but... I think there was no harm in pointing it out :) * in bsktball.c, Start is mapped to both the start & p1 buttons (but it is hidden behind an hack, check src/mame/machine/bsktball.c). since you were removing a few of these duplications recently, maybe this one could go as well... * in bwing.c, the input port tagged as "EXTRA" seems an hack, and maybe it could be removed Regards, Fabio
Diffstat (limited to 'src/mame/drivers/bzone.c')
-rw-r--r--src/mame/drivers/bzone.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mame/drivers/bzone.c b/src/mame/drivers/bzone.c
index a87c2a8d52b..9389d0a51a0 100644
--- a/src/mame/drivers/bzone.c
+++ b/src/mame/drivers/bzone.c
@@ -252,7 +252,7 @@ static MACHINE_START( redbaron )
static INTERRUPT_GEN( bzone_interrupt )
{
- if (input_port_read_indexed(machine, 0) & 0x10)
+ if (input_port_read(machine, "IN0") & 0x10)
cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, PULSE_LINE);
}
@@ -299,7 +299,7 @@ static WRITE8_HANDLER( bzone_coin_counter_w )
static READ8_HANDLER( redbaron_joy_r )
{
- return input_port_read_indexed(machine, rb_input_select ? 5 : 6);
+ return input_port_read(machine, rb_input_select ? "FAKE1" : "FAKE2");
}
@@ -806,8 +806,10 @@ static READ8_HANDLER( analog_data_r )
static WRITE8_HANDLER( analog_select_w )
{
+ static const char *analog_port[] = { "AN0", "AN1", "AN2" };
+
if (offset <= 2)
- analog_data = input_port_read_indexed(machine, 6 + offset);
+ analog_data = input_port_read(machine, analog_port[offset]);
}