summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/machine
diff options
context:
space:
mode:
author Wilbert Pol <wilbertpol@users.noreply.github.com>2015-08-14 10:44:25 +0200
committer Wilbert Pol <wilbertpol@users.noreply.github.com>2015-08-14 10:45:19 +0200
commit792a6c3b1197b153cc44711d89c40bb1f80269a1 (patch)
treeea6ffa741699e60dc0142655c3ca66edf96c99c9 /src/emu/machine
parenteee4cc6a373400cf26ef8a4154cb9ba06d0f0f2b (diff)
naomi: reduce tagmap lookups (nw)
Diffstat (limited to 'src/emu/machine')
-rw-r--r--src/emu/machine/jvsdev.c7
-rw-r--r--src/emu/machine/jvsdev.h2
2 files changed, 6 insertions, 3 deletions
diff --git a/src/emu/machine/jvsdev.c b/src/emu/machine/jvsdev.c
index 204d874ca9a..3357ce90f55 100644
--- a/src/emu/machine/jvsdev.c
+++ b/src/emu/machine/jvsdev.c
@@ -244,7 +244,7 @@ bool jvs_device::swoutputs(UINT8 id, UINT8 val)
return false;
}
-void jvs_device::handle_output(const char *tag, UINT8 id, UINT8 val)
+void jvs_device::handle_output(ioport_port *port, UINT8 id, UINT8 val)
{
UINT32 m = 1 << id;
switch(val) {
@@ -253,5 +253,8 @@ void jvs_device::handle_output(const char *tag, UINT8 id, UINT8 val)
case 2: jvs_outputs ^= m; break;
}
- machine().root_device().ioport(tag)->write_safe(jvs_outputs, m);
+ if (port)
+ {
+ port->write(jvs_outputs, m);
+ }
}
diff --git a/src/emu/machine/jvsdev.h b/src/emu/machine/jvsdev.h
index fcbb8c08926..97382ea1655 100644
--- a/src/emu/machine/jvsdev.h
+++ b/src/emu/machine/jvsdev.h
@@ -23,7 +23,7 @@ public:
protected:
UINT32 jvs_outputs;
- void handle_output(const char *tag, UINT8 id, UINT8 val);
+ void handle_output(ioport_port *port, UINT8 id, UINT8 val);
// device-level overrides
virtual void device_start();