diff options
Diffstat (limited to 'src/mame/drivers/stv.cpp')
-rw-r--r-- | src/mame/drivers/stv.cpp | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/src/mame/drivers/stv.cpp b/src/mame/drivers/stv.cpp index 63d55cfcf82..639aeaf3273 100644 --- a/src/mame/drivers/stv.cpp +++ b/src/mame/drivers/stv.cpp @@ -94,7 +94,7 @@ offsets: 0x001f PORT-AD (8ch, write: bits 0-2 - set channel, read: channel data with autoinc channel number) */ -READ8_MEMBER(stv_state::stv_ioga_r) +uint8_t stv_state::stv_ioga_r(offs_t offset) { const char *const portg[] = { "PORTG.0", "PORTG.1", "PORTG.2", "PORTG.3" }; @@ -130,7 +130,7 @@ READ8_MEMBER(stv_state::stv_ioga_r) return res; } -WRITE8_MEMBER(stv_state::stv_ioga_w) +void stv_state::stv_ioga_w(offs_t offset, uint8_t data) { if(offset & 0x10 && !machine().side_effects_disabled()) printf("Writing to mirror %08x %02x?\n",offset * 2 + 1,data); @@ -162,7 +162,7 @@ WRITE8_MEMBER(stv_state::stv_ioga_w) } } -READ8_MEMBER(stv_state::critcrsh_ioga_r) +uint8_t stv_state::critcrsh_ioga_r(offs_t offset) { uint8_t res; const char *const lgnames[] = { "LIGHTX", "LIGHTY" }; @@ -177,13 +177,13 @@ READ8_MEMBER(stv_state::critcrsh_ioga_r) res = bitswap<8>(res, 2, 3, 0, 1, 6, 7, 5, 4) & 0xf3; res |= (ioport("PORTC")->read() & 0x10) ? 0x0 : 0x4; // x/y hit latch actually break; - default: res = stv_ioga_r(space,offset); break; + default: res = stv_ioga_r(offset); break; } return res; } -READ8_MEMBER(stv_state::magzun_ioga_r) +uint8_t stv_state::magzun_ioga_r(offs_t offset) { uint8_t res; @@ -199,23 +199,23 @@ READ8_MEMBER(stv_state::magzun_ioga_r) case 0x19: res = 0; break; - default: res = stv_ioga_r(space,offset); break; + default: res = stv_ioga_r(offset); break; } return res; } -WRITE8_MEMBER(stv_state::magzun_ioga_w) +void stv_state::magzun_ioga_w(offs_t offset, uint8_t data) { switch(offset * 2 + 1) { case 0x13: m_serial_tx = (data << 8) | (m_serial_tx & 0xff); break; case 0x15: m_serial_tx = (data & 0xff) | (m_serial_tx & 0xff00); break; - default: stv_ioga_w(space,offset,data); break; + default: stv_ioga_w(offset,data); break; } } -READ8_MEMBER(stv_state::stvmp_ioga_r) +uint8_t stv_state::stvmp_ioga_r(offs_t offset) { const char *const mpnames[2][5] = { {"P1_KEY0", "P1_KEY1", "P1_KEY2", "P1_KEY3", "P1_KEY4"}, @@ -229,7 +229,7 @@ READ8_MEMBER(stv_state::stvmp_ioga_r) case 0x01: case 0x03: if(m_port_sel & 0x10) // joystick select <<< this is obviously wrong, this bit only select PORTE direction - res = stv_ioga_r(space,offset); + res = stv_ioga_r(offset); else // mahjong panel select { int i; @@ -241,27 +241,27 @@ READ8_MEMBER(stv_state::stvmp_ioga_r) } } break; - default: res = stv_ioga_r(space,offset); break; + default: res = stv_ioga_r(offset); break; } return res; } -WRITE8_MEMBER(stv_state::stvmp_ioga_w) +void stv_state::stvmp_ioga_w(offs_t offset, uint8_t data) { switch(offset * 2 + 1) { case 0x09: m_mux_data = data ^ 0xff; break; case 0x11: m_port_sel = data; break; - default: stv_ioga_w(space,offset,data); break; + default: stv_ioga_w(offset,data); break; } } -WRITE8_MEMBER(stv_state::hop_ioga_w) +void stv_state::hop_ioga_w(offs_t offset, uint8_t data) { if ((offset * 2 + 1) == 7) m_hopper->motor_w(data & 0x80); - stv_ioga_w(space, offset, data); + stv_ioga_w(offset, data); } /* @@ -332,7 +332,7 @@ void stv_state::init_stv() TODO: game doesn't work if not in debugger? */ -READ32_MEMBER(stv_state::magzun_hef_hack_r) +uint32 stv_state::magzun_hef_hack_r() { if(m_maincpu->pc()==0x604bf20) return 0x00000001; //HWEF @@ -341,7 +341,7 @@ READ32_MEMBER(stv_state::magzun_hef_hack_r) return m_workram_h[0x08e830/4]; } -READ32_MEMBER(stv_state::magzun_rx_hack_r) +uint32_t stv_state::magzun_rx_hack_r() { if(m_maincpu->pc()==0x604c006) return 0x40; @@ -356,8 +356,8 @@ void stv_state::init_magzun() init_stv(); - m_maincpu->space(AS_PROGRAM).install_read_handler(0x608e830, 0x608e833, read32_delegate(*this, FUNC(stv_state::magzun_hef_hack_r))); - m_maincpu->space(AS_PROGRAM).install_read_handler(0x60ff3b4, 0x60ff3b7, read32_delegate(*this, FUNC(stv_state::magzun_rx_hack_r))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x608e830, 0x608e833, read32smo_delegate(*this, FUNC(stv_state::magzun_hef_hack_r))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x60ff3b4, 0x60ff3b7, read32smo_delegate(*this, FUNC(stv_state::magzun_rx_hack_r))); /* Program ROM patches, don't understand how to avoid these two checks ... */ { @@ -619,8 +619,8 @@ void stv_state::init_batmanfr() init_stv(); - m_maincpu->space(AS_PROGRAM).install_write_handler(0x04800000, 0x04800003, write32_delegate(*this, FUNC(stv_state::batmanfr_sound_comms_w))); - m_slave->space(AS_PROGRAM).install_write_handler(0x04800000, 0x04800003, write32_delegate(*this, FUNC(stv_state::batmanfr_sound_comms_w))); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x04800000, 0x04800003, write32s_delegate(*this, FUNC(stv_state::batmanfr_sound_comms_w))); + m_slave->space(AS_PROGRAM).install_write_handler(0x04800000, 0x04800003, write32s_delegate(*this, FUNC(stv_state::batmanfr_sound_comms_w))); m_minit_boost = m_sinit_boost = 0; m_minit_boost_timeslice = m_sinit_boost_timeslice = attotime::from_usec(50); @@ -815,7 +815,7 @@ void stv_state::init_ffreveng() } -READ32_MEMBER(stv_state::decathlt_prot_r) +uint32_t stv_state::decathlt_prot_r(offs_t offset, uint32_t mem_mask) { // needs to be a way to indicate if device is enabled and fall through to cartridge data if not? if (m_newprotection_element) @@ -830,7 +830,7 @@ READ32_MEMBER(stv_state::decathlt_prot_r) return ret; } -WRITE32_MEMBER(stv_state::decathlt_prot_srcaddr_w) +void stv_state::decathlt_prot_srcaddr_w(offs_t offset, uint32_t data, uint32_t mem_mask) { int offs = offset * 4; @@ -850,12 +850,12 @@ WRITE32_MEMBER(stv_state::decathlt_prot_srcaddr_w) void stv_state::init_decathlt() { - m_maincpu->space(AS_PROGRAM).install_write_handler(0x2000000, 0x37fffff, write32_delegate(*this, FUNC(stv_state::decathlt_prot_srcaddr_w))); // set compressed data source address, write data + m_maincpu->space(AS_PROGRAM).install_write_handler(0x2000000, 0x37fffff, write32s_delegate(*this, FUNC(stv_state::decathlt_prot_srcaddr_w))); // set compressed data source address, write data // really needs installing over the whole range, with fallbacks to read rom if device is disabled or isn't accessed on given address - m_maincpu->space(AS_PROGRAM).install_read_handler(0x27ffff8, 0x27ffffb, read32_delegate(*this, FUNC(stv_state::decathlt_prot_r))); // read decompressed data - m_maincpu->space(AS_PROGRAM).install_read_handler(0x2fffff8, 0x2fffffb, read32_delegate(*this, FUNC(stv_state::decathlt_prot_r))); // ^ - m_maincpu->space(AS_PROGRAM).install_read_handler(0x37ffff8, 0x37ffffb, read32_delegate(*this, FUNC(stv_state::decathlt_prot_r))); // ^ + m_maincpu->space(AS_PROGRAM).install_read_handler(0x27ffff8, 0x27ffffb, read32s_delegate(*this, FUNC(stv_state::decathlt_prot_r))); // read decompressed data + m_maincpu->space(AS_PROGRAM).install_read_handler(0x2fffff8, 0x2fffffb, read32s_delegate(*this, FUNC(stv_state::decathlt_prot_r))); // ^ + m_maincpu->space(AS_PROGRAM).install_read_handler(0x37ffff8, 0x37ffffb, read32s_delegate(*this, FUNC(stv_state::decathlt_prot_r))); // ^ m_protbank->configure_entry(0, memregion("cart")->base() + 0x0000000); m_protbank->configure_entry(1, memregion("cart")->base() + 0x0800000); @@ -1131,7 +1131,7 @@ void stv_state::stv_5838(machine_config &config) Similar if not the same as Magic the Gathering, probably needs merging. */ -WRITE32_MEMBER( stv_state::batmanfr_sound_comms_w ) +void stv_state::batmanfr_sound_comms_w(offs_t offset, uint32_t data, uint32_t mem_mask) { // FIXME if(ACCESSING_BITS_16_31) |