summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/segag80r.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/segag80r.cpp')
-rw-r--r--src/mame/drivers/segag80r.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/src/mame/drivers/segag80r.cpp b/src/mame/drivers/segag80r.cpp
index b73b75e57fc..2a4092247ee 100644
--- a/src/mame/drivers/segag80r.cpp
+++ b/src/mame/drivers/segag80r.cpp
@@ -169,7 +169,7 @@ void segag80r_state::machine_start()
*
*************************************/
-READ8_MEMBER(segag80r_state::g80r_opcode_r)
+uint8_t segag80r_state::g80r_opcode_r(offs_t offset)
{
// opcodes themselves are not scrambled
uint8_t op = m_maincpu->space(AS_PROGRAM).read_byte(offset);
@@ -193,16 +193,16 @@ offs_t segag80r_state::decrypt_offset(offs_t offset)
return (offset & 0xff00) | (*m_decrypt)(pc, offset & 0xff);
}
-WRITE8_MEMBER(segag80r_state::mainram_w)
+void segag80r_state::mainram_w(offs_t offset, uint8_t data)
{
m_mainram[decrypt_offset(offset)] = data;
}
-WRITE8_MEMBER(segag80r_state::vidram_w){ segag80r_videoram_w(space, decrypt_offset(offset), data); }
-WRITE8_MEMBER(segag80r_state::monsterb_vidram_w){ monsterb_videoram_w(space, decrypt_offset(offset), data); }
-WRITE8_MEMBER(segag80r_state::pignewt_vidram_w){ pignewt_videoram_w(space, decrypt_offset(offset), data); }
-WRITE8_MEMBER(segag80r_state::sindbadm_vidram_w){ sindbadm_videoram_w(space, decrypt_offset(offset), data); }
-WRITE8_MEMBER(segag80r_state::usb_ram_w){ m_usbsnd->ram_w(decrypt_offset(offset), data); }
+void segag80r_state::vidram_w(offs_t offset, uint8_t data){ segag80r_videoram_w(decrypt_offset(offset), data); }
+void segag80r_state::monsterb_vidram_w(offs_t offset, uint8_t data){ monsterb_videoram_w(decrypt_offset(offset), data); }
+void segag80r_state::pignewt_vidram_w(offs_t offset, uint8_t data){ pignewt_videoram_w(decrypt_offset(offset), data); }
+void segag80r_state::sindbadm_vidram_w(offs_t offset, uint8_t data){ sindbadm_videoram_w(decrypt_offset(offset), data); }
+void segag80r_state::usb_ram_w(offs_t offset, uint8_t data){ m_usbsnd->ram_w(decrypt_offset(offset), data); }
@@ -221,7 +221,7 @@ inline uint8_t segag80r_state::demangle(uint8_t d7d6, uint8_t d5d4, uint8_t d3d2
}
-READ8_MEMBER(segag80r_state::mangled_ports_r)
+uint8_t segag80r_state::mangled_ports_r(offs_t offset)
{
/* The input ports are odd. Neighboring lines are read via a mux chip */
/* one bit at a time. This means that one bank of DIP switches will be */
@@ -237,7 +237,7 @@ READ8_MEMBER(segag80r_state::mangled_ports_r)
}
-READ8_MEMBER(segag80r_state::spaceod_mangled_ports_r)
+uint8_t segag80r_state::spaceod_mangled_ports_r(offs_t offset)
{
/* Space Odyssey has different (and conflicting) wiring for upright */
/* versus cocktail cabinets; we fix this here. The input ports are */
@@ -265,7 +265,7 @@ READ8_MEMBER(segag80r_state::spaceod_mangled_ports_r)
}
-READ8_MEMBER(segag80r_state::spaceod_port_fc_r)
+uint8_t segag80r_state::spaceod_port_fc_r()
{
uint8_t upright = ioport("D3D2")->read() & 0x04;
uint8_t fc = ioport("FC")->read();
@@ -282,7 +282,7 @@ READ8_MEMBER(segag80r_state::spaceod_port_fc_r)
}
-WRITE8_MEMBER(segag80r_state::coin_count_w)
+void segag80r_state::coin_count_w(uint8_t data)
{
machine().bookkeeping().coin_counter_w(0, (data >> 7) & 1);
machine().bookkeeping().coin_counter_w(1, (data >> 6) & 1);
@@ -306,11 +306,11 @@ void segag80r_state::sindbadm_misc_w(uint8_t data)
/* the data lines are flipped */
-WRITE8_MEMBER(segag80r_state::sindbadm_sn1_SN76496_w)
+void segag80r_state::sindbadm_sn1_SN76496_w(uint8_t data)
{
m_sn1->write(bitswap<8>(data, 0,1,2,3,4,5,6,7));
}
-WRITE8_MEMBER(segag80r_state::sindbadm_sn2_SN76496_w)
+void segag80r_state::sindbadm_sn2_SN76496_w(uint8_t data)
{
m_sn2->write(bitswap<8>(data, 0,1,2,3,4,5,6,7));
}
@@ -1541,7 +1541,7 @@ void segag80r_state::init_astrob()
iospace.install_write_handler(0x3b, 0x3b, write8smo_delegate(*m_speech, FUNC(speech_sound_device::control_w)));
/* install Astro Blaster sound board */
- iospace.install_write_handler(0x3e, 0x3f, write8_delegate(*this, FUNC(segag80r_state::astrob_sound_w)));
+ iospace.install_write_handler(0x3e, 0x3f, write8sm_delegate(*this, FUNC(segag80r_state::astrob_sound_w)));
save_item(NAME(m_sound_state));
save_item(NAME(m_sound_rate));
@@ -1575,14 +1575,14 @@ void segag80r_state::init_spaceod()
m_background_pcb = G80_BACKGROUND_SPACEOD;
/* configure ports for the background board */
- iospace.install_readwrite_handler(0x08, 0x0f, read8_delegate(*this, FUNC(segag80r_state::spaceod_back_port_r)), write8_delegate(*this, FUNC(segag80r_state::spaceod_back_port_w)));
+ iospace.install_readwrite_handler(0x08, 0x0f, read8sm_delegate(*this, FUNC(segag80r_state::spaceod_back_port_r)), write8sm_delegate(*this, FUNC(segag80r_state::spaceod_back_port_w)));
/* install Space Odyssey sound board */
- iospace.install_write_handler(0x0e, 0x0f, write8_delegate(*this, FUNC(segag80r_state::spaceod_sound_w)));
+ iospace.install_write_handler(0x0e, 0x0f, write8sm_delegate(*this, FUNC(segag80r_state::spaceod_sound_w)));
/* install our wacky mangled ports */
- iospace.install_read_handler(0xf8, 0xfb, read8_delegate(*this, FUNC(segag80r_state::spaceod_mangled_ports_r)));
- iospace.install_read_handler(0xfc, 0xfc, read8_delegate(*this, FUNC(segag80r_state::spaceod_port_fc_r)));
+ iospace.install_read_handler(0xf8, 0xfb, read8sm_delegate(*this, FUNC(segag80r_state::spaceod_mangled_ports_r)));
+ iospace.install_read_handler(0xfc, 0xfc, read8smo_delegate(*this, FUNC(segag80r_state::spaceod_port_fc_r)));
save_item(NAME(m_sound_state));
}
@@ -1601,8 +1601,8 @@ void segag80r_state::init_monsterb()
monsterb_expand_gfx("gfx1");
/* install background board handlers */
- iospace.install_write_handler(0xb8, 0xbd, write8_delegate(*this, FUNC(segag80r_state::monsterb_back_port_w)));
- pgmspace.install_write_handler(0xe000, 0xffff, write8_delegate(*this, FUNC(segag80r_state::monsterb_vidram_w)));
+ iospace.install_write_handler(0xb8, 0xbd, write8sm_delegate(*this, FUNC(segag80r_state::monsterb_back_port_w)));
+ pgmspace.install_write_handler(0xe000, 0xffff, write8sm_delegate(*this, FUNC(segag80r_state::monsterb_vidram_w)));
save_item(NAME(m_sound_state));
save_item(NAME(m_sound_addr));
@@ -1622,9 +1622,9 @@ void segag80r_state::init_monster2()
monsterb_expand_gfx("gfx1");
/* install background board handlers */
- iospace.install_write_handler(0xb4, 0xb5, write8_delegate(*this, FUNC(segag80r_state::pignewt_back_color_w)));
- iospace.install_write_handler(0xb8, 0xbd, write8_delegate(*this, FUNC(segag80r_state::pignewt_back_port_w)));
- pgmspace.install_write_handler(0xe000, 0xffff, write8_delegate(*this, FUNC(segag80r_state::pignewt_vidram_w)));
+ iospace.install_write_handler(0xb4, 0xb5, write8sm_delegate(*this, FUNC(segag80r_state::pignewt_back_color_w)));
+ iospace.install_write_handler(0xb8, 0xbd, write8sm_delegate(*this, FUNC(segag80r_state::pignewt_back_port_w)));
+ pgmspace.install_write_handler(0xe000, 0xffff, write8sm_delegate(*this, FUNC(segag80r_state::pignewt_vidram_w)));
save_item(NAME(m_sound_state));
save_item(NAME(m_sound_addr));
@@ -1644,14 +1644,14 @@ void segag80r_state::init_pignewt()
monsterb_expand_gfx("gfx1");
/* install background board handlers */
- iospace.install_write_handler(0xb4, 0xb5, write8_delegate(*this, FUNC(segag80r_state::pignewt_back_color_w)));
- iospace.install_write_handler(0xb8, 0xbd, write8_delegate(*this, FUNC(segag80r_state::pignewt_back_port_w)));
- pgmspace.install_write_handler(0xe000, 0xffff, write8_delegate(*this, FUNC(segag80r_state::pignewt_vidram_w)));
+ iospace.install_write_handler(0xb4, 0xb5, write8sm_delegate(*this, FUNC(segag80r_state::pignewt_back_color_w)));
+ iospace.install_write_handler(0xb8, 0xbd, write8sm_delegate(*this, FUNC(segag80r_state::pignewt_back_port_w)));
+ pgmspace.install_write_handler(0xe000, 0xffff, write8sm_delegate(*this, FUNC(segag80r_state::pignewt_vidram_w)));
/* install Universal sound board */
iospace.install_readwrite_handler(0x3f, 0x3f, read8smo_delegate(*m_usbsnd, FUNC(usb_sound_device::status_r)), write8smo_delegate(*m_usbsnd, FUNC(usb_sound_device::data_w)));
pgmspace.install_read_handler(0xd000, 0xdfff, read8sm_delegate(*m_usbsnd, FUNC(usb_sound_device::ram_r)));
- pgmspace.install_write_handler(0xd000, 0xdfff, write8_delegate(*this, FUNC(segag80r_state::usb_ram_w)));
+ pgmspace.install_write_handler(0xd000, 0xdfff, write8sm_delegate(*this, FUNC(segag80r_state::usb_ram_w)));
}
@@ -1667,8 +1667,8 @@ void segag80r_state::init_sindbadm()
m_background_pcb = G80_BACKGROUND_SINDBADM;
/* install background board handlers */
- iospace.install_write_handler(0x40, 0x41, write8_delegate(*this, FUNC(segag80r_state::sindbadm_back_port_w)));
- pgmspace.install_write_handler(0xe000, 0xffff, write8_delegate(*this, FUNC(segag80r_state::sindbadm_vidram_w)));
+ iospace.install_write_handler(0x40, 0x41, write8sm_delegate(*this, FUNC(segag80r_state::sindbadm_back_port_w)));
+ pgmspace.install_write_handler(0xe000, 0xffff, write8sm_delegate(*this, FUNC(segag80r_state::sindbadm_vidram_w)));
}