diff options
author | David Haywood <28625134+DavidHaywood@users.noreply.github.com> | 2020-11-02 15:51:04 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-03 02:51:04 +1100 |
commit | 06832489551c6cb6bb8defe83b4f8cf85d2936b8 (patch) | |
tree | 21d983dbc7923489a32491b938155d86bc3ddd02 | |
parent | 24a281741a2428fc96fefde39a2cbf430b328418 (diff) |
- weclemans.cpp cleaned up MACHINE_START_OVERRIDE / MACHINE_RESET_OVERRIDE / VIDEO_START [David Haywood] (#7423)
- tsamurai.cpp cleaned up MACHINE_START_OVERRIDE / MACHINE_RESET_OVERRIDE / VIDEO_START [David Haywood]
- tubep.cpp cleaned up MACHINE_START_OVERRIDE / MACHINE_RESET_OVERRIDE / VIDEO_START [David Haywood]
- segac2.cpp cleaned up MACHINE_START_OVERRIDE / MACHINE_RESET_OVERRIDE / VIDEO_START [David Haywood]
new WORKING machines
------
Street Fighter II: Special Champion Edition (MSI Plug & Play) (Europe) [Team Europe]
new WORKING software list entries
-----
ekara_pal.xml:
uk_vol4 e-kara UK / Europe Volume 4 (UK-E004) [David Haywood. Team Europe]
uk_vol5 e-kara UK / Europe Volume 5 (UK-E005) [David Haywood. Team Europe]
-rw-r--r-- | hash/ekara_pal.xml | 26 | ||||
-rw-r--r-- | src/mame/drivers/megadriv_rad.cpp | 31 | ||||
-rw-r--r-- | src/mame/drivers/segac2.cpp | 23 | ||||
-rw-r--r-- | src/mame/drivers/tsamurai.cpp | 176 | ||||
-rw-r--r-- | src/mame/drivers/tubep.cpp | 95 | ||||
-rw-r--r-- | src/mame/drivers/wecleman.cpp | 85 | ||||
-rw-r--r-- | src/mame/includes/megadriv.h | 3 | ||||
-rw-r--r-- | src/mame/includes/tsamurai.h | 128 | ||||
-rw-r--r-- | src/mame/includes/tubep.h | 73 | ||||
-rw-r--r-- | src/mame/includes/wecleman.h | 74 | ||||
-rw-r--r-- | src/mame/machine/megadriv.cpp | 7 | ||||
-rw-r--r-- | src/mame/mame.lst | 1 | ||||
-rw-r--r-- | src/mame/video/tsamurai.cpp | 64 | ||||
-rw-r--r-- | src/mame/video/tubep.cpp | 8 | ||||
-rw-r--r-- | src/mame/video/wecleman.cpp | 14 |
15 files changed, 460 insertions, 348 deletions
diff --git a/hash/ekara_pal.xml b/hash/ekara_pal.xml index 3bb5d628bd3..3a16bfba2d7 100644 --- a/hash/ekara_pal.xml +++ b/hash/ekara_pal.xml @@ -6,7 +6,7 @@ license:CC0 <softwarelist name="ekara_pal" description="Takara e-kara (UK/Europe, PAL) cartridges"> <!-- cartridges contain the ROM only, the XaviX CPU and BIOS are in the base unit --> - <!-- UK / Europe cartridges - these have 'UK' part codes, but multiple languages on the case suggesting they were used for the whole of Europe --> + <!-- UK / Europe cartridges - these have 'UK' part codes, but multiple languages on the case (except for Vol4/5) suggesting they were used for the whole of Europe --> <!-- e-kara UK / Europe Volume 1 (UK-E001) 1. "Oops!...I Did It Again" Britney Spears @@ -77,7 +77,7 @@ license:CC0 </part> </software> - <!-- e-kara UK / Europe Volume 4 (UK-E004) (not dumped) (this is the same tracklist as US-E004, but the code on the UK/EU one would be different as they use a different timing method) + <!-- e-kara UK / Europe Volume 4 (UK-E004) 1. "Can't Buy Me Love" The Beatles 2. "A Hard Day's Night" The Beatles 3. "Ticket To Ride" The Beatles @@ -89,8 +89,18 @@ license:CC0 9. "Drive My Car" The Beatles 10. "We Can Work It Out" The Beatles --> + <software name="uk_vol4"> + <description>e-kara UK / Europe Volume 4 (UK-E004)</description> + <year>2002</year> + <publisher>Takara</publisher> + <part name="cart" interface="ekara_cart"> + <dataarea name="rom" size="0x100000"> + <rom name="uk-e004.bin" size="0x100000" crc="d3739137" sha1="e3c404bc916cac4acccc46b8345defd9495431fa"/> + </dataarea> + </part> + </software> - <!-- e-kara UK / Europe Volume 5 (UK-E005) (not dumped) (this is the same tracklist as US-E005, but the code on the UK/EU one would be different as they use a different timing method) + <!-- e-kara UK / Europe Volume 5 (UK-E005) 1. "Lucy In the Sky With Diamonds" The Beatles 2. "All You Need Is Love" The Beatles 3. "Hello Goodbye" The Beatles @@ -102,6 +112,16 @@ license:CC0 9. "Let It Be" The Beatles 10. "The Long And Winding Road" The Beatles --> + <software name="uk_vol5"> + <description>e-kara UK / Europe Volume 5 (UK-E005)</description> + <year>2002</year> + <publisher>Takara</publisher> + <part name="cart" interface="ekara_cart"> + <dataarea name="rom" size="0x100000"> + <rom name="uk-e005.bin" size="0x100000" crc="e8e2c9cd" sha1="d1bdcfe88bb28012e52e51dc1b39c20284d30b26"/> + </dataarea> + </part> + </software> <!-- e-kara UK / Europe Volume 6 (UK-E006) 1. "Genie In A Bottle" Christina Aguilera diff --git a/src/mame/drivers/megadriv_rad.cpp b/src/mame/drivers/megadriv_rad.cpp index b3e1f3ccbfe..6350c9bfcf8 100644 --- a/src/mame/drivers/megadriv_rad.cpp +++ b/src/mame/drivers/megadriv_rad.cpp @@ -101,6 +101,24 @@ static INPUT_PORTS_START( megadriv_radica_6button ) PORT_START("UNK") INPUT_PORTS_END +static INPUT_PORTS_START( megadriv_msi_6button ) + PORT_INCLUDE( megadriv_radica_3button ) + + PORT_START("EXTRA1") /* Extra buttons for Joypad 1 (6 button + start + mode) NOT READ DIRECTLY */ + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1) + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1) + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("EXTRA2") // no 2nd pad + PORT_BIT( 0x000f, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_MODIFY("PAD2") // no 2nd pad + PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("IN0") + PORT_START("UNK") +INPUT_PORTS_END void megadriv_radica_6button_state::machine_start() { @@ -209,6 +227,15 @@ ROM_START( rad_orun ) ROM_LOAD16_WORD_SWAP( "outrun.bin", 0x000000, 0x100000, CRC(4fd6d653) SHA1(57f0e4550ff883e4bb7857caef2c893c21f80b42) ) ROM_END +ROM_START( msi_sf2 ) + ROM_REGION( 0x400000, "maincpu", 0 ) + // The first part of the ROM seems to be a boot ROM for the enhanced MD clone menus, even if it does nothing here + // and is probably leftover from one of the multigame systems, hacked to only launch one game. We should emulate it... + // .. but the game ROM starts at 0xc8000 so we can cheat for now + ROM_LOAD16_WORD_SWAP( "29lv320.bin", 0x000000, 0xc8000, CRC(465b12f0) SHA1(7a058f6feb4f08f56ae0f7369c2ca9a9fe2ed40e) ) + ROM_CONTINUE(0x00000,0x338000) +ROM_END + void megadriv_radica_6button_state::init_megadriv_radica_6button_pal() { @@ -254,3 +281,7 @@ CONS( 2004, rad_ssoc, 0, 0, megadriv_radica_3button_pal, megadriv_radic // not region locked, no Radica logos, uncertain if other regions would differ CONS( 2004, rad_orun, 0, 0, megadriv_radica_3button_pal, megadriv_radica_3button_1player, megadriv_radica_3button_state, init_megadrie, "Radica / Sega", "Out Run 2019 (Radica Plug & Play, UK)", 0) + +// From a European unit but NTSC? - code is hacked from original USA Genesis game with region check still intact? (does the clone hardware always identify as such? or does the bypassed boot code skip the check?) +// TODO: move out of here eventually once the enhanced MD part is emulated rather than bypassed (it's probably the same as the 145-in-1 multigame unit, but modified to only include this single game) +CONS( 2018, msi_sf2, 0, 0, megadriv_radica_6button_ntsc, megadriv_msi_6button, megadriv_radica_6button_state, init_megadriv_radica_6button_ntsc, "MSI / Capcom / Sega", "Street Fighter II: Special Champion Edition (MSI Plug & Play) (Europe)", 0) diff --git a/src/mame/drivers/segac2.cpp b/src/mame/drivers/segac2.cpp index 240c4ed41cd..232723b5c7a 100644 --- a/src/mame/drivers/segac2.cpp +++ b/src/mame/drivers/segac2.cpp @@ -101,6 +101,7 @@ namespace { typedef device_delegate<int (int in)> segac2_prot_delegate; +// does this need to inherit from md_base? really we only need the VDP and some basics like the maincpu class segac2_state : public md_base_state { public: @@ -150,6 +151,10 @@ public: void init_pclubjv4(); void init_pclubjv5(); +protected: + virtual void machine_start() override; + virtual void machine_reset() override; + private: // for Print Club only int m_cam_data; @@ -174,9 +179,7 @@ private: uint8_t m_sound_banks; /* number of sound banks */ void segac2_common_init(segac2_prot_delegate prot_func); - DECLARE_VIDEO_START(segac2_new); - DECLARE_MACHINE_START(segac2); - DECLARE_MACHINE_RESET(segac2); + uint32_t screen_update_segac2_new(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); int m_segac2_bg_pal_lookup[4]; @@ -251,7 +254,7 @@ public: ******************************************************************************/ -MACHINE_START_MEMBER(segac2_state,segac2) +void segac2_state::machine_start() { save_item(NAME(m_prot_write_buf)); save_item(NAME(m_prot_read_buf)); @@ -260,7 +263,7 @@ MACHINE_START_MEMBER(segac2_state,segac2) } -MACHINE_RESET_MEMBER(segac2_state,segac2) +void segac2_state::machine_reset() { // megadriv_scanline_timer = machine().device<timer_device>("md_scan_timer"); // megadriv_scanline_timer->adjust(attotime::zero); @@ -1497,11 +1500,6 @@ WRITE_LINE_MEMBER(segac2_state::segac2_irq2_interrupt) ******************************************************************************/ -VIDEO_START_MEMBER(segac2_state,segac2_new) -{ - VIDEO_START_CALL_MEMBER(megadriv); -} - // C2 doesn't use the internal VDP CRAM, instead it uses the digital output of the chip // and applies it's own external colour circuity uint32_t segac2_state::screen_update_segac2_new(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) @@ -1598,9 +1596,6 @@ void segac2_state::segac(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &segac2_state::main_map); m_maincpu->set_irq_acknowledge_callback(FUNC(md_base_state::genesis_int_callback)); - MCFG_MACHINE_START_OVERRIDE(segac2_state,segac2) - MCFG_MACHINE_RESET_OVERRIDE(segac2_state,segac2) - NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1); // borencha requires 0xff fill or there is no sound (it lacks some of the init code of the borench set) SEGA_315_5296(config, m_io, XL2_CLOCK/6); // clock divider guessed @@ -1636,8 +1631,6 @@ void segac2_state::segac(machine_config &config) PALETTE(config, m_palette).set_entries(2048*3); - MCFG_VIDEO_START_OVERRIDE(segac2_state,segac2_new) - /* sound hardware */ SPEAKER(config, "mono").front_center(); diff --git a/src/mame/drivers/tsamurai.cpp b/src/mame/drivers/tsamurai.cpp index 0d2e034f607..426ba8f7ec2 100644 --- a/src/mame/drivers/tsamurai.cpp +++ b/src/mame/drivers/tsamurai.cpp @@ -51,26 +51,27 @@ the "America" release. void tsamurai_state::machine_start() { - save_item(NAME(m_nmi_enabled)); -} + m_textbank1 = 0; + m_nmi_enabled = 0; + + m_sound_command1 = 0; + m_sound_command2 = 0; -MACHINE_START_MEMBER(tsamurai_state, tsamurai) -{ save_item(NAME(m_sound_command1)); save_item(NAME(m_sound_command2)); - machine_start(); + save_item(NAME(m_nmi_enabled)); } -MACHINE_START_MEMBER(tsamurai_state, m660) +void m660_state::machine_start() { - MACHINE_START_CALL_MEMBER(tsamurai); + tsamurai_state::machine_start(); save_item(NAME(m_sound_command3)); } -MACHINE_START_MEMBER(tsamurai_state, vsgongf) +void vsgongf_state::machine_start() { + tsamurai_state::machine_start(); save_item(NAME(m_vsgongf_sound_nmi_enabled)); - machine_start(); } WRITE_LINE_MEMBER(tsamurai_state::nmi_enable_w) @@ -89,7 +90,7 @@ uint8_t tsamurai_state::tsamurai_unknown_d803_r() return 0x6b; } -uint8_t tsamurai_state::m660_unknown_d803_r() +uint8_t m660_state::m660_unknown_d803_r() { return 0x53; // this is what the bootleg patches in. } @@ -121,7 +122,7 @@ void tsamurai_state::sound_command2_w(uint8_t data) m_audio2->set_input_line(0, HOLD_LINE ); } -void tsamurai_state::m660_sound_command3_w(uint8_t data) +void m660_state::m660_sound_command3_w(uint8_t data) { m_sound_command3 = data; m_audio3->set_input_line(0, HOLD_LINE ); @@ -174,32 +175,32 @@ void tsamurai_state::main_map(address_map &map) map(0xfc00, 0xfc07).w("mainlatch", FUNC(ls259_device::write_d0)); } -void tsamurai_state::m660_map(address_map &map) +void m660_state::m660_map(address_map &map) { map(0x0000, 0xbfff).rom(); map(0xc000, 0xcfff).ram(); /* protection? - there are writes as well...*/ - map(0xd803, 0xd803).r(FUNC(tsamurai_state::m660_unknown_d803_r)); - map(0xd806, 0xd806).r(FUNC(tsamurai_state::unknown_d806_r)); - map(0xd900, 0xd900).r(FUNC(tsamurai_state::unknown_d900_r)); - map(0xd938, 0xd938).r(FUNC(tsamurai_state::unknown_d938_r)); + map(0xd803, 0xd803).r(FUNC(m660_state::m660_unknown_d803_r)); + map(0xd806, 0xd806).r(FUNC(m660_state::unknown_d806_r)); + map(0xd900, 0xd900).r(FUNC(m660_state::unknown_d900_r)); + map(0xd938, 0xd938).r(FUNC(m660_state::unknown_d938_r)); - map(0xe000, 0xe3ff).ram().w(FUNC(tsamurai_state::fg_videoram_w)).share("videoram"); - map(0xe400, 0xe43f).ram().w(FUNC(tsamurai_state::fg_colorram_w)).share("colorram"); + map(0xe000, 0xe3ff).ram().w(FUNC(m660_state::fg_videoram_w)).share("videoram"); + map(0xe400, 0xe43f).ram().w(FUNC(m660_state::fg_colorram_w)).share("colorram"); map(0xe440, 0xe7ff).ram(); - map(0xe800, 0xefff).ram().w(FUNC(tsamurai_state::bg_videoram_w)).share("bg_videoram"); + map(0xe800, 0xefff).ram().w(FUNC(m660_state::bg_videoram_w)).share("bg_videoram"); map(0xf000, 0xf3ff).ram().share("spriteram"); map(0xf400, 0xf400).nopw();/* This is always written with F401, F402 & F403 data */ - map(0xf401, 0xf401).w(FUNC(tsamurai_state::m660_sound_command3_w)); - map(0xf402, 0xf402).w(FUNC(tsamurai_state::sound_command2_w)); - map(0xf403, 0xf403).w(FUNC(tsamurai_state::sound_command1_w)); + map(0xf401, 0xf401).w(FUNC(m660_state::m660_sound_command3_w)); + map(0xf402, 0xf402).w(FUNC(m660_state::sound_command2_w)); + map(0xf403, 0xf403).w(FUNC(m660_state::sound_command1_w)); map(0xf800, 0xf800).portr("P1"); - map(0xf801, 0xf801).portr("P2").w(FUNC(tsamurai_state::bgcolor_w)); - map(0xf802, 0xf802).portr("SYSTEM").w(FUNC(tsamurai_state::scrolly_w)); - map(0xf803, 0xf803).w(FUNC(tsamurai_state::scrollx_w)); + map(0xf801, 0xf801).portr("P2").w(FUNC(m660_state::bgcolor_w)); + map(0xf802, 0xf802).portr("SYSTEM").w(FUNC(m660_state::scrolly_w)); + map(0xf803, 0xf803).w(FUNC(m660_state::scrollx_w)); map(0xf804, 0xf804).portr("DSW1"); map(0xf805, 0xf805).portr("DSW2"); @@ -212,7 +213,7 @@ void tsamurai_state::z80_io_map(address_map &map) map(0x00, 0x01).w("aysnd", FUNC(ay8910_device::address_data_w)); } -void tsamurai_state::z80_m660_io_map(address_map &map) +void m660_state::z80_m660_io_map(address_map &map) { map.global_mask(0xff); map(0x00, 0x00).nopw(); /* ? */ @@ -220,7 +221,7 @@ void tsamurai_state::z80_m660_io_map(address_map &map) map(0x02, 0x02).nopw(); /* Always follows above with 0x01 data */ } -void tsamurai_state::vsgongf_audio_io_map(address_map &map) +void vsgongf_state::vsgongf_audio_io_map(address_map &map) { map.global_mask(0xff); map(0x00, 0x01).w("aysnd", FUNC(ay8910_device::address_data_w)); @@ -236,7 +237,7 @@ uint8_t tsamurai_state::sound_command2_r() return m_sound_command2; } -uint8_t tsamurai_state::m660_sound_command3_r() +uint8_t m660_state::m660_sound_command3_r() { return m_sound_command3; } @@ -264,10 +265,10 @@ void tsamurai_state::sound2_map(address_map &map) /*******************************************************************************/ -void tsamurai_state::sound1_m660_map(address_map &map) +void m660_state::sound1_m660_map(address_map &map) { map(0x0000, 0x3fff).rom(); - map(0xc000, 0xc000).r(FUNC(tsamurai_state::sound_command1_r)); + map(0xc000, 0xc000).r(FUNC(m660_state::sound_command1_r)); map(0xc001, 0xc001).nopw(); /* ? - probably clear IRQ */ map(0xc002, 0xc002).w("dac1", FUNC(dac_byte_interface::data_w)); map(0x8000, 0x87ff).ram(); @@ -275,10 +276,10 @@ void tsamurai_state::sound1_m660_map(address_map &map) /*******************************************************************************/ -void tsamurai_state::sound2_m660_map(address_map &map) +void m660_state::sound2_m660_map(address_map &map) { map(0x0000, 0x3fff).rom(); - map(0xc000, 0xc000).r(FUNC(tsamurai_state::sound_command2_r)); + map(0xc000, 0xc000).r(FUNC(m660_state::sound_command2_r)); map(0xc001, 0xc001).nopw(); /* ? - probably clear IRQ */ map(0xc002, 0xc002).w("dac2", FUNC(dac_byte_interface::data_w)); map(0x8000, 0x87ff).ram(); @@ -286,16 +287,16 @@ void tsamurai_state::sound2_m660_map(address_map &map) /*******************************************************************************/ -void tsamurai_state::sound3_m660_map(address_map &map) +void m660_state::sound3_m660_map(address_map &map) { map(0x0000, 0x7fff).rom(); - map(0xc000, 0xc000).r(FUNC(tsamurai_state::m660_sound_command3_r)); + map(0xc000, 0xc000).r(FUNC(m660_state::m660_sound_command3_r)); map(0xc001, 0xc001).nopw(); /* ? - probably clear IRQ */ map(0x8000, 0x87ff).ram(); map(0xfffc, 0xffff).ram(); /* CPU writes here - music data */ } -void tsamurai_state::sound3_m660_io_map(address_map &map) +void m660_state::sound3_m660_io_map(address_map &map) { map.global_mask(0xff); map(0x00, 0x01).w("aysnd", FUNC(ay8910_device::address_data_w)); @@ -303,12 +304,12 @@ void tsamurai_state::sound3_m660_io_map(address_map &map) /*******************************************************************************/ -void tsamurai_state::vsgongf_sound_nmi_enable_w(uint8_t data) +void vsgongf_state::vsgongf_sound_nmi_enable_w(uint8_t data) { m_vsgongf_sound_nmi_enabled = data; } -INTERRUPT_GEN_MEMBER(tsamurai_state::vsgongf_sound_interrupt) +INTERRUPT_GEN_MEMBER(vsgongf_state::vsgongf_sound_interrupt) { if (m_vsgongf_sound_nmi_enabled) device.execute().pulse_input_line(INPUT_LINE_NMI, attotime::zero); @@ -316,7 +317,7 @@ INTERRUPT_GEN_MEMBER(tsamurai_state::vsgongf_sound_interrupt) /* what are these, protection of some kind? */ -uint8_t tsamurai_state::vsgongf_a006_r() +uint8_t vsgongf_state::vsgongf_a006_r() { /* sound CPU busy? */ if (!strcmp(machine().system().name,"vsgongf")) return 0x80; @@ -327,7 +328,7 @@ uint8_t tsamurai_state::vsgongf_a006_r() return 0x00; } -uint8_t tsamurai_state::vsgongf_a100_r() +uint8_t vsgongf_state::vsgongf_a100_r() { /* protection? */ if (!strcmp(machine().system().name,"vsgongf")) return 0xaa; @@ -338,25 +339,25 @@ uint8_t tsamurai_state::vsgongf_a100_r() return 0x00; } -void tsamurai_state::vsgongf_sound_command_w(uint8_t data) +void vsgongf_state::vsgongf_sound_command_w(uint8_t data) { m_soundlatch->write(data); m_audiocpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero); } -void tsamurai_state::vsgongf_map(address_map &map) +void vsgongf_state::vsgongf_map(address_map &map) { map(0x0000, 0x7fff).rom(); map(0xa003, 0xa003).readonly(); - map(0xa006, 0xa006).r(FUNC(tsamurai_state::vsgongf_a006_r)); /* protection */ - map(0xa100, 0xa100).r(FUNC(tsamurai_state::vsgongf_a100_r)); /* protection */ + map(0xa006, 0xa006).r(FUNC(vsgongf_state::vsgongf_a006_r)); /* protection */ + map(0xa100, 0xa100).r(FUNC(vsgongf_state::vsgongf_a100_r)); /* protection */ map(0xc000, 0xc7ff).ram(); /* work ram */ - map(0xe000, 0xe3ff).ram().w(FUNC(tsamurai_state::fg_videoram_w)).share("videoram"); + map(0xe000, 0xe3ff).ram().w(FUNC(vsgongf_state::fg_videoram_w)).share("videoram"); map(0xe400, 0xe43f).ram().share("spriteram"); map(0xe440, 0xe47b).ram(); - map(0xe800, 0xe800).w(FUNC(tsamurai_state::vsgongf_sound_command_w)); + map(0xe800, 0xe800).w(FUNC(vsgongf_state::vsgongf_sound_command_w)); map(0xec00, 0xec06).nopw(); - map(0xf000, 0xf000).w(FUNC(tsamurai_state::vsgongf_color_w)); + map(0xf000, 0xf000).w(FUNC(vsgongf_state::vsgongf_color_w)); map(0xf400, 0xf400).nopw(); /* vreg? always 0 */ map(0xf800, 0xf800).portr("P1"); map(0xf801, 0xf801).portr("P2"); @@ -369,11 +370,11 @@ void tsamurai_state::vsgongf_map(address_map &map) map(0xfc00, 0xfc07).w("mainlatch", FUNC(ls259_device::write_d0)); } -void tsamurai_state::sound_vsgongf_map(address_map &map) +void vsgongf_state::sound_vsgongf_map(address_map &map) { map(0x0000, 0x3fff).rom(); map(0x6000, 0x63ff).ram(); /* work RAM */ - map(0x8000, 0x8000).r(m_soundlatch, FUNC(generic_latch_8_device::read)).w(FUNC(tsamurai_state::vsgongf_sound_nmi_enable_w)); /* NMI enable */ + map(0x8000, 0x8000).r(m_soundlatch, FUNC(generic_latch_8_device::read)).w(FUNC(vsgongf_state::vsgongf_sound_nmi_enable_w)); /* NMI enable */ map(0xa000, 0xa000).w("dac", FUNC(dac_byte_interface::data_w)); } @@ -739,7 +740,6 @@ void tsamurai_state::tsamurai(machine_config &config) Z80(config, m_audio2, XTAL(24'000'000)/8); m_audio2->set_addrmap(AS_PROGRAM, &tsamurai_state::sound2_map); - MCFG_MACHINE_START_OVERRIDE(tsamurai_state,tsamurai) ls259_device &mainlatch(LS259(config, "mainlatch")); mainlatch.q_out_cb<0>().set(FUNC(tsamurai_state::flip_screen_w)); @@ -760,7 +760,6 @@ void tsamurai_state::tsamurai(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_tsamurai); PALETTE(config, m_palette, palette_device::RGB_444_PROMS, "proms", 256); - MCFG_VIDEO_START_OVERRIDE(tsamurai_state,tsamurai) /* sound hardware */ SPEAKER(config, "speaker").front_center(); @@ -772,25 +771,23 @@ void tsamurai_state::tsamurai(machine_config &config) } -void tsamurai_state::vsgongf(machine_config &config) +void vsgongf_state::vsgongf(machine_config &config) { /* basic machine hardware */ Z80(config, m_maincpu, XTAL(24'000'000)/8); - m_maincpu->set_addrmap(AS_PROGRAM, &tsamurai_state::vsgongf_map); + m_maincpu->set_addrmap(AS_PROGRAM, &vsgongf_state::vsgongf_map); Z80(config, m_audiocpu, XTAL(24'000'000)/8); - m_audiocpu->set_addrmap(AS_PROGRAM, &tsamurai_state::sound_vsgongf_map); - m_audiocpu->set_addrmap(AS_IO, &tsamurai_state::vsgongf_audio_io_map); - m_audiocpu->set_periodic_int(FUNC(tsamurai_state::vsgongf_sound_interrupt), attotime::from_hz(3*60)); - - MCFG_MACHINE_START_OVERRIDE(tsamurai_state,vsgongf) + m_audiocpu->set_addrmap(AS_PROGRAM, &vsgongf_state::sound_vsgongf_map); + m_audiocpu->set_addrmap(AS_IO, &vsgongf_state::vsgongf_audio_io_map); + m_audiocpu->set_periodic_int(FUNC(vsgongf_state::vsgongf_sound_interrupt), attotime::from_hz(3*60)); ls259_device &mainlatch(LS259(config, "mainlatch")); // 4L mainlatch.q_out_cb<0>().set_nop(); // vreg? always 0 - mainlatch.q_out_cb<1>().set(FUNC(tsamurai_state::nmi_enable_w)); - mainlatch.q_out_cb<2>().set(FUNC(tsamurai_state::coin1_counter_w)); - mainlatch.q_out_cb<3>().set(FUNC(tsamurai_state::coin2_counter_w)); - mainlatch.q_out_cb<4>().set(FUNC(tsamurai_state::textbank1_w)); + mainlatch.q_out_cb<1>().set(FUNC(vsgongf_state::nmi_enable_w)); + mainlatch.q_out_cb<2>().set(FUNC(vsgongf_state::coin1_counter_w)); + mainlatch.q_out_cb<3>().set(FUNC(vsgongf_state::coin2_counter_w)); + mainlatch.q_out_cb<4>().set(FUNC(vsgongf_state::textbank1_w)); /* video hardware */ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); @@ -798,13 +795,12 @@ void tsamurai_state::vsgongf(machine_config &config) screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */); screen.set_size(32*8, 32*8); screen.set_visarea(0, 255, 16, 255-16); - screen.set_screen_update(FUNC(tsamurai_state::screen_update_vsgongf)); + screen.set_screen_update(FUNC(vsgongf_state::screen_update_vsgongf)); screen.set_palette(m_palette); - screen.screen_vblank().set(FUNC(tsamurai_state::vblank_irq)); + screen.screen_vblank().set(FUNC(vsgongf_state::vblank_irq)); GFXDECODE(config, m_gfxdecode, m_palette, gfx_tsamurai); PALETTE(config, m_palette, palette_device::RGB_444_PROMS, "proms", 256); - MCFG_VIDEO_START_OVERRIDE(tsamurai_state,vsgongf) /* sound hardware */ SPEAKER(config, "speaker").front_center(); @@ -817,32 +813,31 @@ void tsamurai_state::vsgongf(machine_config &config) } -void tsamurai_state::m660(machine_config &config) +void m660_state::m660(machine_config &config) { /* basic machine hardware */ Z80(config, m_maincpu, XTAL(24'000'000)/8); - m_maincpu->set_addrmap(AS_PROGRAM, &tsamurai_state::m660_map); - m_maincpu->set_addrmap(AS_IO, &tsamurai_state::z80_m660_io_map); + m_maincpu->set_addrmap(AS_PROGRAM, &m660_state::m660_map); + m_maincpu->set_addrmap(AS_IO, &m660_state::z80_m660_io_map); Z80(config, m_audiocpu, XTAL(24'000'000)/8); - m_audiocpu->set_addrmap(AS_PROGRAM, &tsamurai_state::sound1_m660_map); + m_audiocpu->set_addrmap(AS_PROGRAM, &m660_state::sound1_m660_map); Z80(config, m_audio2, XTAL(24'000'000)/8); - m_audio2->set_addrmap(AS_PROGRAM, &tsamurai_state::sound2_m660_map); + m_audio2->set_addrmap(AS_PROGRAM, &m660_state::sound2_m660_map); Z80(config, m_audio3, XTAL(24'000'000)/8); - m_audio3->set_addrmap(AS_PROGRAM, &tsamurai_state::sound3_m660_map); - m_audio3->set_addrmap(AS_IO, &tsamurai_state::sound3_m660_io_map); + m_audio3->set_addrmap(AS_PROGRAM, &m660_state::sound3_m660_map); + m_audio3->set_addrmap(AS_IO, &m660_state::sound3_m660_io_map); - MCFG_MACHINE_START_OVERRIDE(tsamurai_state,m660) ls259_device &mainlatch(LS259(config, "mainlatch")); - mainlatch.q_out_cb<0>().set(FUNC(tsamurai_state::flip_screen_w)); - mainlatch.q_out_cb<1>().set(FUNC(tsamurai_state::nmi_enable_w)); - mainlatch.q_out_cb<2>().set(FUNC(tsamurai_state::textbank1_w)); - mainlatch.q_out_cb<3>().set(FUNC(tsamurai_state::coin1_counter_w)); - mainlatch.q_out_cb<4>().set(FUNC(tsamurai_state::coin2_counter_w)); - mainlatch.q_out_cb<7>().set(FUNC(tsamurai_state::textbank2_w)); + mainlatch.q_out_cb<0>().set(FUNC(m660_state::flip_screen_w)); + mainlatch.q_out_cb<1>().set(FUNC(m660_state::nmi_enable_w)); + mainlatch.q_out_cb<2>().set(FUNC(m660_state::textbank1_w)); + mainlatch.q_out_cb<3>().set(FUNC(m660_state::coin1_counter_w)); + mainlatch.q_out_cb<4>().set(FUNC(m660_state::coin2_counter_w)); + mainlatch.q_out_cb<7>().set(FUNC(m660_state::textbank2_w)); /* video hardware */ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); @@ -850,14 +845,13 @@ void tsamurai_state::m660(machine_config &config) screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */); screen.set_size(32*8, 32*8); screen.set_visarea(0, 255, 16, 255-16); - screen.set_screen_update(FUNC(tsamurai_state::screen_update)); + screen.set_screen_update(FUNC(m660_state::screen_update)); screen.set_palette(m_palette); - screen.screen_vblank().set(FUNC(tsamurai_state::vblank_irq)); + screen.screen_vblank().set(FUNC(m660_state::vblank_irq)); screen.screen_vblank().append_inputline(m_audio3, INPUT_LINE_NMI); GFXDECODE(config, m_gfxdecode, m_palette, gfx_tsamurai); PALETTE(config, m_palette, palette_device::RGB_444_PROMS, "proms", 256); - MCFG_VIDEO_START_OVERRIDE(tsamurai_state,m660) /* sound hardware */ SPEAKER(config, "speaker").front_center(); @@ -1382,15 +1376,15 @@ ROM_START( ringfgt2 ) ROM_LOAD( "rft-13.6p", 0x200, 0x0100, CRC(0e4fd17a) SHA1(d4e32bd9dd903177af61f77976a25c5db1467bba) ) ROM_END -void tsamurai_state::init_the26thz() +void m660_state::init_the26thz() { m_maincpu->space(AS_PROGRAM).unmap_read(0xd803, 0xd803); - m_maincpu->space(AS_PROGRAM).install_read_handler(0xd803, 0xd803, read8smo_delegate(*this, FUNC(tsamurai_state::tsamurai_unknown_d803_r))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0xd803, 0xd803, read8smo_delegate(*this, FUNC(m660_state::tsamurai_unknown_d803_r))); } -GAME( 1984, vsgongf, 0, vsgongf, vsgongf, tsamurai_state, empty_init, ROT90, "Kaneko", "VS Gong Fight", MACHINE_IMPERFECT_COLORS | MACHINE_SUPPORTS_SAVE | MACHINE_UNEMULATED_PROTECTION ) -GAME( 1984, ringfgt, vsgongf, vsgongf, vsgongf, tsamurai_state, empty_init, ROT90, "Kaneko (Taito license)", "Ring Fighter (set 1)", MACHINE_IMPERFECT_COLORS | MACHINE_SUPPORTS_SAVE ) -GAME( 1984, ringfgt2, vsgongf, vsgongf, vsgongf, tsamurai_state, empty_init, ROT90, "Kaneko (Taito license)", "Ring Fighter (set 2)", MACHINE_IMPERFECT_COLORS | MACHINE_SUPPORTS_SAVE ) +GAME( 1984, vsgongf, 0, vsgongf, vsgongf, vsgongf_state, empty_init, ROT90, "Kaneko", "VS Gong Fight", MACHINE_IMPERFECT_COLORS | MACHINE_SUPPORTS_SAVE | MACHINE_UNEMULATED_PROTECTION ) +GAME( 1984, ringfgt, vsgongf, vsgongf, vsgongf, vsgongf_state, empty_init, ROT90, "Kaneko (Taito license)", "Ring Fighter (set 1)", MACHINE_IMPERFECT_COLORS | MACHINE_SUPPORTS_SAVE ) +GAME( 1984, ringfgt2, vsgongf, vsgongf, vsgongf, vsgongf_state, empty_init, ROT90, "Kaneko (Taito license)", "Ring Fighter (set 2)", MACHINE_IMPERFECT_COLORS | MACHINE_SUPPORTS_SAVE ) GAME( 1985, tsamurai, 0, tsamurai, tsamurai, tsamurai_state, empty_init, ROT90, "Kaneko / Taito", "Samurai Nihon-Ichi (set 1)", MACHINE_SUPPORTS_SAVE ) GAME( 1985, tsamurai2, tsamurai, tsamurai, tsamurai, tsamurai_state, empty_init, ROT90, "Kaneko / Taito", "Samurai Nihon-Ichi (set 2)", MACHINE_SUPPORTS_SAVE ) @@ -1402,8 +1396,8 @@ GAME( 1985, nunchaku, ladymstr, tsamurai, nunchaku, tsamurai_state, empty_init GAME( 1985, yamagchi, 0, tsamurai, yamagchi, tsamurai_state, empty_init, ROT90, "Kaneko / Taito", "Go Go Mr. Yamaguchi / Yuke Yuke Yamaguchi-kun", MACHINE_IMPERFECT_COLORS | MACHINE_SUPPORTS_SAVE ) -GAME( 1986, m660, 0, m660, m660, tsamurai_state, empty_init, ROT90, "Wood Place Co. Ltd. (Taito America Corporation license)", "Mission 660 (US)", MACHINE_SUPPORTS_SAVE ) -GAME( 1986, m660j, m660, m660, m660, tsamurai_state, empty_init, ROT90, "Wood Place Co. Ltd. (Taito Corporation license)", "Mission 660 (Japan)", MACHINE_SUPPORTS_SAVE ) -GAME( 1986, m660b, m660, m660, m660, tsamurai_state, empty_init, ROT90, "bootleg", "Mission 660 (bootleg)", MACHINE_SUPPORTS_SAVE ) -GAME( 1986, alphaxz, m660, m660, m660, tsamurai_state, empty_init, ROT90, "Ed Co., Ltd. (Wood Place Co., Ltd. license)", "The Alphax Z (Japan)", MACHINE_SUPPORTS_SAVE ) -GAME( 1986, the26thz, m660, m660, m660, tsamurai_state, init_the26thz, ROT90, "Ed Co., Ltd. (Taito license)", "The 26th Z (Japan, location test)", MACHINE_SUPPORTS_SAVE ) +GAME( 1986, m660, 0, m660, m660, m660_state, empty_init, ROT90, "Wood Place Co. Ltd. (Taito America Corporation license)", "Mission 660 (US)", MACHINE_SUPPORTS_SAVE ) +GAME( 1986, m660j, m660, m660, m660, m660_state, empty_init, ROT90, "Wood Place Co. Ltd. (Taito Corporation license)", "Mission 660 (Japan)", MACHINE_SUPPORTS_SAVE ) +GAME( 1986, m660b, m660, m660, m660, m660_state, empty_init, ROT90, "bootleg", "Mission 660 (bootleg)", MACHINE_SUPPORTS_SAVE ) +GAME( 1986, alphaxz, m660, m660, m660, m660_state, empty_init, ROT90, "Ed Co., Ltd. (Wood Place Co., Ltd. license)", "The Alphax Z (Japan)", MACHINE_SUPPORTS_SAVE ) +GAME( 1986, the26thz, m660, m660, m660, m660_state, init_the26thz, ROT90, "Ed Co., Ltd. (Taito license)", "The 26th Z (Japan, location test)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/tubep.cpp b/src/mame/drivers/tubep.cpp index ff34c23d8ed..ff76fc10eb5 100644 --- a/src/mame/drivers/tubep.cpp +++ b/src/mame/drivers/tubep.cpp @@ -334,7 +334,7 @@ void tubep_state::tubep_setup_save_state() -MACHINE_START_MEMBER(tubep_state,tubep) +void tubep_state::machine_start() { /* Create interrupt timer */ m_interrupt_timer = timer_alloc(TIMER_TUBEP_SCANLINE); @@ -343,7 +343,7 @@ MACHINE_START_MEMBER(tubep_state,tubep) } -MACHINE_RESET_MEMBER(tubep_state,tubep) +void tubep_state::machine_reset() { m_interrupt_timer->adjust(m_screen->time_until_pos(0)); } @@ -374,16 +374,16 @@ void tubep_state::nsc_map(address_map &map) * *************************************/ -void tubep_state::rjammer_main_map(address_map &map) +void rjammer_state::rjammer_main_map(address_map &map) { map(0x0000, 0x9fff).rom(); map(0xa000, 0xa7ff).ram(); /* MB8416 SRAM on daughterboard on main PCB (there are two SRAMs, this is the one on the left) */ - map(0xc000, 0xc7ff).w(FUNC(tubep_state::tubep_textram_w)).share("textram");/* RAM on GFX PCB @B13 */ + map(0xc000, 0xc7ff).w(FUNC(rjammer_state::tubep_textram_w)).share("textram");/* RAM on GFX PCB @B13 */ map(0xe000, 0xe7ff).ram().share("share1"); /* MB8416 SRAM on daughterboard (the one on the right) */ } -void tubep_state::rjammer_main_portmap(address_map &map) +void rjammer_state::rjammer_main_portmap(address_map &map) { map.global_mask(0xff); map(0x00, 0x00).portr("DSW2"); /* a bug in game code (during attract mode) */ @@ -394,12 +394,12 @@ void tubep_state::rjammer_main_portmap(address_map &map) map(0xc0, 0xc0).portr("P2"); map(0xd0, 0xd7).w("mainlatch", FUNC(ls259_device::write_d0)); - map(0xe0, 0xe0).w(FUNC(tubep_state::main_cpu_irq_line_clear_w)); /* clear IRQ interrupt */ + map(0xe0, 0xe0).w(FUNC(rjammer_state::main_cpu_irq_line_clear_w)); /* clear IRQ interrupt */ map(0xf0, 0xf0).w("soundlatch", FUNC(generic_latch_8_device::write)); } -void tubep_state::rjammer_second_map(address_map &map) +void rjammer_state::rjammer_second_map(address_map &map) { map(0x0000, 0x7fff).rom(); map(0xa000, 0xa7ff).ram(); /* M5M5117P @21G */ @@ -409,11 +409,11 @@ void tubep_state::rjammer_second_map(address_map &map) } -void tubep_state::rjammer_second_portmap(address_map &map) +void rjammer_state::rjammer_second_portmap(address_map &map) { map.global_mask(0xff); - map(0xb0, 0xb0).w(FUNC(tubep_state::rjammer_background_page_w)); - map(0xd0, 0xd0).w(FUNC(tubep_state::rjammer_background_LS377_w)); + map(0xb0, 0xb0).w(FUNC(rjammer_state::rjammer_background_page_w)); + map(0xd0, 0xd0).w(FUNC(rjammer_state::rjammer_background_LS377_w)); } @@ -478,7 +478,7 @@ TIMER_CALLBACK_MEMBER(tubep_state::rjammer_scanline_callback) } -MACHINE_START_MEMBER(tubep_state,rjammer) +void rjammer_state::machine_start() { /* Create interrupt timer */ m_interrupt_timer = timer_alloc(TIMER_RJAMMER_SCANLINE); @@ -486,7 +486,7 @@ MACHINE_START_MEMBER(tubep_state,rjammer) tubep_setup_save_state(); } -MACHINE_RESET_MEMBER(tubep_state,rjammer) +void rjammer_state::machine_reset() { m_interrupt_timer->adjust(m_screen->time_until_pos(0)); } @@ -499,7 +499,7 @@ MACHINE_RESET_MEMBER(tubep_state,rjammer) * *************************************/ -void tubep_state::rjammer_voice_startstop_w(uint8_t data) +void rjammer_state::rjammer_voice_startstop_w(uint8_t data) { /* bit 0 of data selects voice start/stop (reset pin on MSM5205)*/ // 0 -stop; 1-start @@ -509,7 +509,7 @@ void tubep_state::rjammer_voice_startstop_w(uint8_t data) } -void tubep_state::rjammer_voice_frequency_select_w(uint8_t data) +void rjammer_state::rjammer_voice_frequency_select_w(uint8_t data) { /* bit 0 of data selects voice frequency on MSM5205 */ // 0 -4 KHz; 1- 8KHz @@ -520,7 +520,7 @@ void tubep_state::rjammer_voice_frequency_select_w(uint8_t data) } -WRITE_LINE_MEMBER(tubep_state::rjammer_adpcm_vck) +WRITE_LINE_MEMBER(rjammer_state::rjammer_adpcm_vck) { m_ls74 = (m_ls74 + 1) & 1; @@ -537,7 +537,7 @@ WRITE_LINE_MEMBER(tubep_state::rjammer_adpcm_vck) } -void tubep_state::rjammer_voice_input_w(uint8_t data) +void rjammer_state::rjammer_voice_input_w(uint8_t data) { /* 8 bits of adpcm data for MSM5205 */ /* need to buffer the data, and switch two nibbles on two following interrupts*/ @@ -554,7 +554,7 @@ void tubep_state::rjammer_voice_input_w(uint8_t data) } -void tubep_state::rjammer_voice_intensity_control_w(uint8_t data) +void rjammer_state::rjammer_voice_intensity_control_w(uint8_t data) { /* 4 LSB bits select the intensity (analog circuit that alters the output from MSM5205) */ /* need to buffer the data */ @@ -562,24 +562,24 @@ void tubep_state::rjammer_voice_intensity_control_w(uint8_t data) } -void tubep_state::rjammer_sound_map(address_map &map) +void rjammer_state::rjammer_sound_map(address_map &map) { map(0x0000, 0x7fff).rom(); map(0xe000, 0xe7ff).ram(); /* M5M5117P (M58125P @2C on schematics) */ } -void tubep_state::rjammer_sound_portmap(address_map &map) +void rjammer_state::rjammer_sound_portmap(address_map &map) { map.global_mask(0xff); map(0x00, 0x00).r("soundlatch", FUNC(generic_latch_8_device::read)); - map(0x10, 0x10).w(FUNC(tubep_state::rjammer_voice_startstop_w)); - map(0x18, 0x18).w(FUNC(tubep_state::rjammer_voice_frequency_select_w)); - map(0x80, 0x80).w(FUNC(tubep_state::rjammer_voice_input_w)); + map(0x10, 0x10).w(FUNC(rjammer_state::rjammer_voice_startstop_w)); + map(0x18, 0x18).w(FUNC(rjammer_state::rjammer_voice_frequency_select_w)); + map(0x80, 0x80).w(FUNC(rjammer_state::rjammer_voice_input_w)); map(0x90, 0x91).w("ay1", FUNC(ay8910_device::address_data_w)); map(0x92, 0x93).w("ay2", FUNC(ay8910_device::address_data_w)); map(0x94, 0x95).w("ay3", FUNC(ay8910_device::address_data_w)); - map(0x96, 0x96).w(FUNC(tubep_state::rjammer_voice_intensity_control_w)); + map(0x96, 0x96).w(FUNC(rjammer_state::rjammer_voice_intensity_control_w)); } @@ -839,9 +839,6 @@ void tubep_state::tubep(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); m_soundlatch->set_separate_acknowledge(true); - MCFG_MACHINE_START_OVERRIDE(tubep_state,tubep) - MCFG_MACHINE_RESET_OVERRIDE(tubep_state,tubep) - /* video hardware */ SCREEN(config, m_screen, SCREEN_TYPE_RASTER); m_screen->set_refresh_hz(60); @@ -882,65 +879,62 @@ void tubep_state::tubepb(machine_config &config) //m_screen->screen_vblank().set_inputline(m_mcu, INPUT_LINE_NMI); } -void tubep_state::rjammer(machine_config &config) +void rjammer_state::rjammer(machine_config &config) { /* basic machine hardware */ Z80(config, m_maincpu, 16000000 / 4); /* 4 MHz */ - m_maincpu->set_addrmap(AS_PROGRAM, &tubep_state::rjammer_main_map); - m_maincpu->set_addrmap(AS_IO, &tubep_state::rjammer_main_portmap); + m_maincpu->set_addrmap(AS_PROGRAM, &rjammer_state::rjammer_main_map); + m_maincpu->set_addrmap(AS_IO, &rjammer_state::rjammer_main_portmap); Z80(config, m_slave, 16000000 / 4); /* 4 MHz */ - m_slave->set_addrmap(AS_PROGRAM, &tubep_state::rjammer_second_map); - m_slave->set_addrmap(AS_IO, &tubep_state::rjammer_second_portmap); + m_slave->set_addrmap(AS_PROGRAM, &rjammer_state::rjammer_second_map); + m_slave->set_addrmap(AS_IO, &rjammer_state::rjammer_second_portmap); Z80(config, m_soundcpu, 19968000 / 8); /* X2 19968000 Hz divided by LS669 (on Qc output) (signal RH0) */ - m_soundcpu->set_addrmap(AS_PROGRAM, &tubep_state::rjammer_sound_map); - m_soundcpu->set_addrmap(AS_IO, &tubep_state::rjammer_sound_portmap); + m_soundcpu->set_addrmap(AS_PROGRAM, &rjammer_state::rjammer_sound_map); + m_soundcpu->set_addrmap(AS_IO, &rjammer_state::rjammer_sound_portmap); GENERIC_LATCH_8(config, "soundlatch").data_pending_callback().set_inputline(m_soundcpu, INPUT_LINE_NMI); NSC8105(config, m_mcu, 6000000); /* 6 MHz Xtal - divided internally ??? */ m_mcu->set_ram_enable(false); - m_mcu->set_addrmap(AS_PROGRAM, &tubep_state::nsc_map); + m_mcu->set_addrmap(AS_PROGRAM, &rjammer_state::nsc_map); ls259_device &mainlatch(LS259(config, "mainlatch")); // 3A - mainlatch.q_out_cb<0>().set(FUNC(tubep_state::coin1_counter_w)); - mainlatch.q_out_cb<1>().set(FUNC(tubep_state::coin2_counter_w)); - mainlatch.q_out_cb<5>().set(FUNC(tubep_state::screen_flip_w)); - - MCFG_MACHINE_START_OVERRIDE(tubep_state,rjammer) - MCFG_MACHINE_RESET_OVERRIDE(tubep_state,rjammer) + mainlatch.q_out_cb<0>().set(FUNC(rjammer_state::coin1_counter_w)); + mainlatch.q_out_cb<1>().set(FUNC(rjammer_state::coin2_counter_w)); + mainlatch.q_out_cb<5>().set(FUNC(rjammer_state::screen_flip_w)); /* video hardware */ SCREEN(config, m_screen, SCREEN_TYPE_RASTER); m_screen->set_refresh_hz(60); m_screen->set_size(256, 264); m_screen->set_visarea(0*8, 32*8-1, 2*8, 30*8-1); - m_screen->set_screen_update(FUNC(tubep_state::screen_update_rjammer)); + m_screen->set_screen_update(FUNC(rjammer_state::screen_update_rjammer)); m_screen->set_palette("palette"); - PALETTE(config, "palette", FUNC(tubep_state::rjammer_palette), 64); + PALETTE(config, "palette", FUNC(rjammer_state::rjammer_palette), 64); /* sound hardware */ SPEAKER(config, "mono").front_center(); ay8910_device &ay1(AY8910(config, "ay1", 19968000 / 8 / 2)); - ay1.port_a_write_callback().set(FUNC(tubep_state::ay8910_portA_0_w)); - ay1.port_b_write_callback().set(FUNC(tubep_state::ay8910_portB_0_w)); + ay1.port_a_write_callback().set(FUNC(rjammer_state::ay8910_portA_0_w)); + ay1.port_b_write_callback().set(FUNC(rjammer_state::ay8910_portB_0_w)); ay1.add_route(ALL_OUTPUTS, "mono", 0.10); ay8910_device &ay2(AY8910(config, "ay2", 19968000 / 8 / 2)); - ay2.port_a_write_callback().set(FUNC(tubep_state::ay8910_portA_1_w)); - ay2.port_b_write_callback().set(FUNC(tubep_state::ay8910_portB_1_w)); + ay2.port_a_write_callback().set(FUNC(rjammer_state::ay8910_portA_1_w)); + ay2.port_b_write_callback().set(FUNC(rjammer_state::ay8910_portB_1_w)); ay2.add_route(ALL_OUTPUTS, "mono", 0.10); ay8910_device &ay3(AY8910(config, "ay3", 19968000 / 8 / 2)); - ay3.port_a_write_callback().set(FUNC(tubep_state::ay8910_portA_2_w)); - ay3.port_b_write_callback().set(FUNC(tubep_state::ay8910_portB_2_w)); + ay3.port_a_write_callback().set(FUNC(rjammer_state::ay8910_portA_2_w)); + ay3.port_b_write_callback().set(FUNC(rjammer_state::ay8910_portB_2_w)); ay3.add_route(ALL_OUTPUTS, "mono", 0.10); MSM5205(config, m_msm, 384000); - m_msm->vck_legacy_callback().set(FUNC(tubep_state::rjammer_adpcm_vck)); /* VCK function */ + m_msm->vck_legacy_callback().set(FUNC(rjammer_state::rjammer_adpcm_vck)); /* VCK function */ m_msm->set_prescaler_selector(msm5205_device::S48_4B); /* 8 KHz (changes at run time) */ m_msm->add_route(ALL_OUTPUTS, "mono", 1.0); } @@ -1144,4 +1138,5 @@ ROM_END // year rom parent machine inp state init GAME( 1984, tubep, 0, tubep, tubep, tubep_state, empty_init, ROT0, "Nichibutsu / Fujitek", "Tube Panic", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) GAME( 1984, tubepb, tubep, tubepb, tubepb, tubep_state, empty_init, ROT0, "bootleg", "Tube Panic (bootleg)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) -GAME( 1984, rjammer, 0, rjammer, rjammer, tubep_state, empty_init, ROT0, "Nichibutsu / Alice", "Roller Jammer", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) + +GAME( 1984, rjammer, 0, rjammer, rjammer, rjammer_state, empty_init, ROT0, "Nichibutsu / Alice", "Roller Jammer", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) diff --git a/src/mame/drivers/wecleman.cpp b/src/mame/drivers/wecleman.cpp index 363cd1dcd13..69d55f85e64 100644 --- a/src/mame/drivers/wecleman.cpp +++ b/src/mame/drivers/wecleman.cpp @@ -551,22 +551,22 @@ void wecleman_state::wecleman_map(address_map &map) -void wecleman_state::hotchase_map(address_map &map) +void hotchase_state::hotchase_map(address_map &map) { map(0x000000, 0x03ffff).rom(); map(0x040000, 0x041fff).ram(); // RAM map(0x060000, 0x063fff).ram(); // RAM - map(0x080000, 0x080011).ram().w(FUNC(wecleman_state::blitter_w)).share("blitter_regs"); // Blitter + map(0x080000, 0x080011).ram().w(FUNC(hotchase_state::blitter_w)).share("blitter_regs"); // Blitter map(0x100000, 0x100fff).rw("k051316_1", FUNC(k051316_device::read), FUNC(k051316_device::write)).umask16(0x00ff); // Background map(0x101000, 0x10101f).w("k051316_1", FUNC(k051316_device::ctrl_w)).umask16(0x00ff); // Background Ctrl map(0x102000, 0x102fff).rw("k051316_2", FUNC(k051316_device::read), FUNC(k051316_device::write)).umask16(0x00ff); // Foreground map(0x103000, 0x10301f).w("k051316_2", FUNC(k051316_device::ctrl_w)).umask16(0x00ff); // Foreground Ctrl - map(0x110000, 0x111fff).ram().w(FUNC(wecleman_state::hotchase_paletteram16_SBGRBBBBGGGGRRRR_word_w)).share("paletteram"); + map(0x110000, 0x111fff).ram().w(FUNC(hotchase_state::hotchase_paletteram16_SBGRBBBBGGGGRRRR_word_w)).share("paletteram"); map(0x120000, 0x123fff).ram().share("share1"); // Shared with sub CPU map(0x130000, 0x130fff).ram().share("spriteram"); // Sprites map(0x140001, 0x140001).w("soundlatch", FUNC(generic_latch_8_device::write)); // To sound CPU - map(0x140002, 0x140003).w(FUNC(wecleman_state::selected_ip_w)); // Selects accelerator / wheel / - map(0x140004, 0x140005).w(FUNC(wecleman_state::irqctrl_w)); // Main CPU controls the other CPUs + map(0x140002, 0x140003).w(FUNC(hotchase_state::selected_ip_w)); // Selects accelerator / wheel / + map(0x140004, 0x140005).w(FUNC(hotchase_state::irqctrl_w)); // Main CPU controls the other CPUs map(0x140006, 0x140007).nopr(); // Watchdog reset map(0x140010, 0x140011).portr("IN0"); // Coins + brake + gear map(0x140012, 0x140013).portr("IN1"); // ?? bit 4 from sound cpu @@ -594,7 +594,7 @@ void wecleman_state::wecleman_sub_map(address_map &map) Hot Chase Sub CPU Handlers ***************************************************************************/ -void wecleman_state::hotchase_sub_map(address_map &map) +void hotchase_state::hotchase_sub_map(address_map &map) { map(0x000000, 0x01ffff).rom(); // ROM map(0x020000, 0x020fff).ram().share("roadram"); // Road @@ -665,7 +665,7 @@ void wecleman_state::wecleman_sound_map(address_map &map) Hot Chase Sound CPU Handlers ***************************************************************************/ -void wecleman_state::hotchase_sound_control_w(offs_t offset, uint8_t data) +void hotchase_state::hotchase_sound_control_w(offs_t offset, uint8_t data) { // int reg[8]; @@ -712,7 +712,7 @@ void wecleman_state::hotchase_sound_control_w(offs_t offset, uint8_t data) } } -void wecleman_state::hotchase_sound_hs_w(uint8_t data) +void hotchase_state::hotchase_sound_hs_w(uint8_t data) { m_hotchase_sound_hs = true; } @@ -720,27 +720,27 @@ void wecleman_state::hotchase_sound_hs_w(uint8_t data) /* Read and write handlers for one K007232 chip: even and odd register are mapped swapped */ template<int Chip> -uint8_t wecleman_state::hotchase_k007232_r(offs_t offset) +uint8_t hotchase_state::hotchase_k007232_r(offs_t offset) { return m_k007232[Chip]->read(offset ^ 1); } template<int Chip> -void wecleman_state::hotchase_k007232_w(offs_t offset, uint8_t data) +void hotchase_state::hotchase_k007232_w(offs_t offset, uint8_t data) { m_k007232[Chip]->write(offset ^ 1, data); } -void wecleman_state::hotchase_sound_map(address_map &map) +void hotchase_state::hotchase_sound_map(address_map &map) { map(0x0000, 0x07ff).ram(); - map(0x1000, 0x100d).rw(FUNC(wecleman_state::hotchase_k007232_r<0>), FUNC(wecleman_state::hotchase_k007232_w<0>)); // 3 x K007232 - map(0x2000, 0x200d).rw(FUNC(wecleman_state::hotchase_k007232_r<1>), FUNC(wecleman_state::hotchase_k007232_w<1>)); - map(0x3000, 0x300d).rw(FUNC(wecleman_state::hotchase_k007232_r<2>), FUNC(wecleman_state::hotchase_k007232_w<2>)); - map(0x4000, 0x4007).w(FUNC(wecleman_state::hotchase_sound_control_w)); // Sound volume, banking, etc. + map(0x1000, 0x100d).rw(FUNC(hotchase_state::hotchase_k007232_r<0>), FUNC(hotchase_state::hotchase_k007232_w<0>)); // 3 x K007232 + map(0x2000, 0x200d).rw(FUNC(hotchase_state::hotchase_k007232_r<1>), FUNC(hotchase_state::hotchase_k007232_w<1>)); + map(0x3000, 0x300d).rw(FUNC(hotchase_state::hotchase_k007232_r<2>), FUNC(hotchase_state::hotchase_k007232_w<2>)); + map(0x4000, 0x4007).w(FUNC(hotchase_state::hotchase_sound_control_w)); // Sound volume, banking, etc. map(0x5000, 0x5000).nopw(); // 0 at start of IRQ service, 1 at end (irq mask?) map(0x6000, 0x6000).r("soundlatch", FUNC(generic_latch_8_device::read)); // From main CPU (Read on IRQ) - map(0x7000, 0x7000).w(FUNC(wecleman_state::hotchase_sound_hs_w)); // ACK signal to main CPU + map(0x7000, 0x7000).w(FUNC(hotchase_state::hotchase_sound_hs_w)); // ACK signal to main CPU map(0x8000, 0xffff).rom(); } @@ -1031,7 +1031,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(wecleman_state::wecleman_scanline) m_maincpu->set_input_line(5, HOLD_LINE); } -TIMER_DEVICE_CALLBACK_MEMBER(wecleman_state::hotchase_scanline) +TIMER_DEVICE_CALLBACK_MEMBER(hotchase_state::hotchase_scanline) { int scanline = param; @@ -1039,12 +1039,12 @@ TIMER_DEVICE_CALLBACK_MEMBER(wecleman_state::hotchase_scanline) m_maincpu->set_input_line(4, HOLD_LINE); } -MACHINE_RESET_MEMBER(wecleman_state, wecleman) +void wecleman_state::machine_reset() { m_k007232[0]->set_bank( 0, 1 ); } -MACHINE_START_MEMBER(wecleman_state, wecleman) +void wecleman_state::machine_start() { m_led.resolve(); } @@ -1065,9 +1065,6 @@ void wecleman_state::wecleman(machine_config &config) config.set_maximum_quantum(attotime::from_hz(6000)); - MCFG_MACHINE_START_OVERRIDE(wecleman_state, wecleman) - MCFG_MACHINE_RESET_OVERRIDE(wecleman_state, wecleman) - adc0804_device &adc(ADC0804(config, "adc", 640000)); // unknown "ADCCLK" (generated on video board?) adc.vin_callback().set(FUNC(wecleman_state::selected_ip_r)); @@ -1083,8 +1080,6 @@ void wecleman_state::wecleman(machine_config &config) PALETTE(config, m_palette).set_entries(2048); - MCFG_VIDEO_START_OVERRIDE(wecleman_state,wecleman) - /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); @@ -1104,17 +1099,12 @@ void wecleman_state::wecleman(machine_config &config) Hot Chase Hardware Definitions ***************************************************************************/ -INTERRUPT_GEN_MEMBER(wecleman_state::hotchase_sound_timer) +INTERRUPT_GEN_MEMBER(hotchase_state::hotchase_sound_timer) { device.execute().set_input_line(M6809_FIRQ_LINE, HOLD_LINE); } -MACHINE_START_MEMBER(wecleman_state, hotchase) -{ - m_led.resolve(); -} - -MACHINE_RESET_MEMBER(wecleman_state, hotchase) +void hotchase_state::machine_reset() { int i; @@ -1128,27 +1118,24 @@ MACHINE_RESET_MEMBER(wecleman_state, hotchase) } -void wecleman_state::hotchase(machine_config &config) +void hotchase_state::hotchase(machine_config &config) { /* basic machine hardware */ M68000(config, m_maincpu, 10000000); /* 10 MHz - PCB is drawn in one set's readme */ - m_maincpu->set_addrmap(AS_PROGRAM, &wecleman_state::hotchase_map); - TIMER(config, "scantimer").configure_scanline(FUNC(wecleman_state::hotchase_scanline), "screen", 0, 1); + m_maincpu->set_addrmap(AS_PROGRAM, &hotchase_state::hotchase_map); + TIMER(config, "scantimer").configure_scanline(FUNC(hotchase_state::hotchase_scanline), "screen", 0, 1); M68000(config, m_subcpu, 10000000); /* 10 MHz - PCB is drawn in one set's readme */ - m_subcpu->set_addrmap(AS_PROGRAM, &wecleman_state::hotchase_sub_map); + m_subcpu->set_addrmap(AS_PROGRAM, &hotchase_state::hotchase_sub_map); MC6809E(config, m_audiocpu, 3579545 / 2); /* 3.579/2 MHz - PCB is drawn in one set's readme */ - m_audiocpu->set_addrmap(AS_PROGRAM, &wecleman_state::hotchase_sound_map); - m_audiocpu->set_periodic_int(FUNC(wecleman_state::hotchase_sound_timer), attotime::from_hz(496)); + m_audiocpu->set_addrmap(AS_PROGRAM, &hotchase_state::hotchase_sound_map); + m_audiocpu->set_periodic_int(FUNC(hotchase_state::hotchase_sound_timer), attotime::from_hz(496)); config.set_maximum_quantum(attotime::from_hz(6000)); - MCFG_MACHINE_RESET_OVERRIDE(wecleman_state, hotchase) - MCFG_MACHINE_START_OVERRIDE(wecleman_state, hotchase) - adc0804_device &adc(ADC0804(config, "adc", 640000)); // unknown clock (generated on video board?) - adc.vin_callback().set(FUNC(wecleman_state::selected_ip_r)); + adc.vin_callback().set(FUNC(hotchase_state::selected_ip_r)); /* video hardware */ SCREEN(config, m_screen, SCREEN_TYPE_RASTER); @@ -1156,24 +1143,22 @@ void wecleman_state::hotchase(machine_config &config) m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(0)); m_screen->set_size(320 +16, 256); m_screen->set_visarea(0, 320-1, 0, 224-1); - m_screen->set_screen_update(FUNC(wecleman_state::screen_update_hotchase)); + m_screen->set_screen_update(FUNC(hotchase_state::screen_update_hotchase)); m_screen->set_palette(m_palette); GFXDECODE(config, m_gfxdecode, m_palette, gfx_hotchase); PALETTE(config, m_palette).set_entries(8192); - MCFG_VIDEO_START_OVERRIDE(wecleman_state, hotchase) - K051316(config, m_k051316[0], 0); m_k051316[0]->set_palette(m_palette); m_k051316[0]->set_offsets(-0xb0 / 2, -16); m_k051316[0]->set_wrap(1); - m_k051316[0]->set_zoom_callback(FUNC(wecleman_state::hotchase_zoom_callback_1)); + m_k051316[0]->set_zoom_callback(FUNC(hotchase_state::hotchase_zoom_callback_1)); K051316(config, m_k051316[1], 0); m_k051316[1]->set_palette(m_palette); m_k051316[1]->set_offsets(-0xb0 / 2, -16); - m_k051316[1]->set_zoom_callback(FUNC(wecleman_state::hotchase_zoom_callback_2)); + m_k051316[1]->set_zoom_callback(FUNC(hotchase_state::hotchase_zoom_callback_2)); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); @@ -1690,7 +1675,7 @@ ROM_END in a ROM module definition. This routine unpacks each sprite nibble into a byte, doubling the memory consumption. */ -void wecleman_state::hotchase_sprite_decode( int num16_banks, int bank_size ) +void hotchase_state::hotchase_sprite_decode( int num16_banks, int bank_size ) { uint8_t *base; int i; @@ -1737,7 +1722,7 @@ void wecleman_state::hotchase_sprite_decode( int num16_banks, int bank_size ) } /* Unpack sprites data and do some patching */ -void wecleman_state::init_hotchase() +void hotchase_state::init_hotchase() { // uint16_t *RAM1 = (uint16_t) memregion("maincpu")->base(); /* Main CPU patches */ // RAM[0x1140/2] = 0x0015; RAM[0x195c/2] = 0x601A; // faster self test @@ -1760,5 +1745,5 @@ GAMEL( 1988, weclemanb, wecleman, wecleman, wecleman, wecleman_state, init_wecle GAMEL( 1986, weclemanc, wecleman, wecleman, wecleman, wecleman_state, init_wecleman, ROT0, "Konami", "WEC Le Mans 24 (v1.26)", 0, layout_wecleman ) // a version 1.21 is known to exist too, see https://www.youtube.com/watch?v=4l8vYJi1OeU -GAMEL( 1988, hotchase, 0, hotchase, hotchase, wecleman_state, init_hotchase, ROT0, "Konami", "Hot Chase (set 1)", 0, layout_wecleman ) -GAMEL( 1988, hotchasea, hotchase, hotchase, hotchase, wecleman_state, init_hotchase, ROT0, "Konami", "Hot Chase (set 2)", 0, layout_wecleman ) +GAMEL( 1988, hotchase, 0, hotchase, hotchase, hotchase_state, init_hotchase, ROT0, "Konami", "Hot Chase (set 1)", 0, layout_wecleman ) +GAMEL( 1988, hotchasea, hotchase, hotchase, hotchase, hotchase_state, init_hotchase, ROT0, "Konami", "Hot Chase (set 2)", 0, layout_wecleman ) diff --git a/src/mame/includes/megadriv.h b/src/mame/includes/megadriv.h index 0cd19ff39bc..5eeb2ecb7e4 100644 --- a/src/mame/includes/megadriv.h +++ b/src/mame/includes/megadriv.h @@ -131,8 +131,6 @@ public: void megadriv_stop_scanline_timer(); - - DECLARE_VIDEO_START( megadriv ); uint32_t screen_update_megadriv(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(screen_vblank_megadriv); @@ -154,6 +152,7 @@ public: protected: virtual void machine_start() override; virtual void machine_reset() override; + virtual void video_start() override; }; class md_cons_state : public md_base_state diff --git a/src/mame/includes/tsamurai.h b/src/mame/includes/tsamurai.h index 44aeae901d2..981c7eca517 100644 --- a/src/mame/includes/tsamurai.h +++ b/src/mame/includes/tsamurai.h @@ -20,7 +20,6 @@ public: m_audio3(*this, "audio3"), m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette"), - m_soundlatch(*this, "soundlatch"), m_videoram(*this, "videoram"), m_colorram(*this, "colorram"), m_bg_videoram(*this, "bg_videoram"), @@ -28,12 +27,11 @@ public: { } void tsamurai(machine_config &config); - void m660(machine_config &config); - void vsgongf(machine_config &config); - void init_the26thz(); +protected: + virtual void machine_start() override; + virtual void video_start() override; -private: // common DECLARE_WRITE_LINE_MEMBER(nmi_enable_w); DECLARE_WRITE_LINE_MEMBER(coin1_counter_w); @@ -56,51 +54,17 @@ private: uint8_t sound_command1_r(); uint8_t sound_command2_r(); - // tsamurai specific + // tsamurai/the26thz specific uint8_t tsamurai_unknown_d803_r(); - // m660 specific - DECLARE_WRITE_LINE_MEMBER(textbank2_w); - uint8_t m660_unknown_d803_r(); - void m660_sound_command3_w(uint8_t data); - uint8_t m660_sound_command3_r(); - - // vsgongf specific - void vsgongf_color_w(uint8_t data); - void vsgongf_sound_nmi_enable_w(uint8_t data); - uint8_t vsgongf_a006_r(); - uint8_t vsgongf_a100_r(); - void vsgongf_sound_command_w(uint8_t data); - - DECLARE_MACHINE_START(m660); - DECLARE_MACHINE_START(tsamurai); - DECLARE_MACHINE_START(vsgongf); - DECLARE_VIDEO_START(m660); - DECLARE_VIDEO_START(tsamurai); - DECLARE_VIDEO_START(vsgongf); - uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - uint32_t screen_update_vsgongf(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(vblank_irq); - INTERRUPT_GEN_MEMBER(vsgongf_sound_interrupt); - void m660_map(address_map &map); void main_map(address_map &map); - void sound1_m660_map(address_map &map); void sound1_map(address_map &map); - void sound2_m660_map(address_map &map); void sound2_map(address_map &map); - void sound3_m660_io_map(address_map &map); - void sound3_m660_map(address_map &map); - void sound_vsgongf_map(address_map &map); - void vsgongf_audio_io_map(address_map &map); - void vsgongf_map(address_map &map); void z80_io_map(address_map &map); - void z80_m660_io_map(address_map &map); - - virtual void machine_start() override; - virtual void video_start() override; required_device<cpu_device> m_maincpu; required_device<cpu_device> m_audiocpu; @@ -108,7 +72,6 @@ private: optional_device<cpu_device> m_audio3; required_device<gfxdecode_device> m_gfxdecode; required_device<palette_device> m_palette; - optional_device<generic_latch_8_device> m_soundlatch; // vsgongf only required_shared_ptr<uint8_t> m_videoram; optional_shared_ptr<uint8_t> m_colorram; @@ -119,7 +82,6 @@ private: tilemap_t *m_foreground; //common - int m_flicker; int m_textbank1; int m_nmi_enabled; @@ -128,19 +90,89 @@ private: int m_sound_command1; int m_sound_command2; - //m660 specific - int m_textbank2; - int m_sound_command3; + virtual TILE_GET_INFO_MEMBER(get_bg_tile_info); + virtual TILE_GET_INFO_MEMBER(get_fg_tile_info); + + int m_numsprites; + void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect ); +}; + +class vsgongf_state : public tsamurai_state +{ +public: + vsgongf_state(const machine_config &mconfig, device_type type, const char *tag) : + tsamurai_state(mconfig, type, tag), + m_soundlatch(*this, "soundlatch") + { } + + void vsgongf(machine_config &config); + +protected: + virtual void machine_start() override; + virtual void video_start() override; + +private: + optional_device<generic_latch_8_device> m_soundlatch; // vsgongf only + + void sound_vsgongf_map(address_map &map); + void vsgongf_audio_io_map(address_map &map); + void vsgongf_map(address_map &map); + + // vsgongf specific + void vsgongf_color_w(uint8_t data); + void vsgongf_sound_nmi_enable_w(uint8_t data); + uint8_t vsgongf_a006_r(); + uint8_t vsgongf_a100_r(); + void vsgongf_sound_command_w(uint8_t data); //vsgongf specific int m_vsgongf_sound_nmi_enabled; int m_vsgongf_color; int m_key_count; //debug only - TILE_GET_INFO_MEMBER(get_bg_tile_info); - TILE_GET_INFO_MEMBER(get_fg_tile_info); + INTERRUPT_GEN_MEMBER(vsgongf_sound_interrupt); + TILE_GET_INFO_MEMBER(get_vsgongf_tile_info); - void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect ); + + uint32_t screen_update_vsgongf(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); +}; + +class m660_state : public tsamurai_state +{ +public: + m660_state(const machine_config &mconfig, device_type type, const char *tag) : + tsamurai_state(mconfig, type, tag) + { } + + void m660(machine_config &config); + + void init_the26thz(); + +protected: + virtual void machine_start() override; + virtual void video_start() override; + + virtual TILE_GET_INFO_MEMBER(get_bg_tile_info) override; + virtual TILE_GET_INFO_MEMBER(get_fg_tile_info) override; + +private: + + // m660 specific + DECLARE_WRITE_LINE_MEMBER(textbank2_w); + uint8_t m660_unknown_d803_r(); + void m660_sound_command3_w(uint8_t data); + uint8_t m660_sound_command3_r(); + + void m660_map(address_map &map); + void sound1_m660_map(address_map &map); + void sound2_m660_map(address_map &map); + void sound3_m660_io_map(address_map &map); + void sound3_m660_map(address_map &map); + void z80_m660_io_map(address_map &map); + + //m660 specific + int m_textbank2; + int m_sound_command3; }; #endif // MAME_INCLUDES_TSAMURAI_H diff --git a/src/mame/includes/tubep.h b/src/mame/includes/tubep.h index 397d9be8907..8f8a9291138 100644 --- a/src/mame/includes/tubep.h +++ b/src/mame/includes/tubep.h @@ -25,15 +25,16 @@ public: m_screen(*this, "screen"), m_textram(*this, "textram"), m_backgroundram(*this, "backgroundram"), - m_sprite_colorsharedram(*this, "sprite_color"), - m_rjammer_backgroundram(*this, "rjammer_bgram") + m_sprite_colorsharedram(*this, "sprite_color") { } void tubepb(machine_config &config); void tubep(machine_config &config); - void rjammer(machine_config &config); -private: +protected: + virtual void machine_start() override; + virtual void machine_reset() override; + enum { TIMER_TUBEP_SCANLINE, @@ -51,7 +52,6 @@ private: required_shared_ptr<uint8_t> m_textram; optional_shared_ptr<uint8_t> m_backgroundram; required_shared_ptr<uint8_t> m_sprite_colorsharedram; - optional_shared_ptr<uint8_t> m_rjammer_backgroundram; uint8_t m_ls74; uint8_t m_ls377; @@ -87,8 +87,6 @@ private: void second_cpu_irq_line_clear_w(uint8_t data); uint8_t tubep_soundlatch_r(); uint8_t tubep_sound_irq_ack(); - void rjammer_voice_input_w(uint8_t data); - void rjammer_voice_intensity_control_w(uint8_t data); void tubep_textram_w(offs_t offset, uint8_t data); DECLARE_WRITE_LINE_MEMBER(screen_flip_w); DECLARE_WRITE_LINE_MEMBER(background_romselect_w); @@ -96,40 +94,25 @@ private: void tubep_background_a000_w(uint8_t data); void tubep_background_c000_w(uint8_t data); void tubep_sprite_control_w(offs_t offset, uint8_t data); - void rjammer_background_LS377_w(uint8_t data); - void rjammer_background_page_w(uint8_t data); - void rjammer_voice_startstop_w(uint8_t data); - void rjammer_voice_frequency_select_w(uint8_t data); + void ay8910_portA_0_w(uint8_t data); void ay8910_portB_0_w(uint8_t data); void ay8910_portA_1_w(uint8_t data); void ay8910_portB_1_w(uint8_t data); void ay8910_portA_2_w(uint8_t data); void ay8910_portB_2_w(uint8_t data); - DECLARE_MACHINE_START(tubep); - DECLARE_MACHINE_RESET(tubep); virtual void video_start() override; virtual void video_reset() override; void tubep_palette(palette_device &palette); - DECLARE_MACHINE_START(rjammer); - DECLARE_MACHINE_RESET(rjammer); - void rjammer_palette(palette_device &palette) const; uint32_t screen_update_tubep(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - uint32_t screen_update_rjammer(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); TIMER_CALLBACK_MEMBER(tubep_scanline_callback); - TIMER_CALLBACK_MEMBER(rjammer_scanline_callback); + TIMER_CALLBACK_MEMBER(rjammer_scanline_callback); // called from common device_timer function so can't be moved out of here yet void draw_sprite(); void tubep_vblank_end(); void tubep_setup_save_state(); - DECLARE_WRITE_LINE_MEMBER(rjammer_adpcm_vck); void nsc_map(address_map &map); - void rjammer_main_map(address_map &map); - void rjammer_main_portmap(address_map &map); - void rjammer_second_map(address_map &map); - void rjammer_second_portmap(address_map &map); - void rjammer_sound_map(address_map &map); - void rjammer_sound_portmap(address_map &map); + void tubep_main_map(address_map &map); void tubep_main_portmap(address_map &map); void tubep_second_map(address_map &map); @@ -140,4 +123,44 @@ private: virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; }; +class rjammer_state : public tubep_state +{ +public: + rjammer_state(const machine_config &mconfig, device_type type, const char *tag) : + tubep_state(mconfig, type, tag), + m_rjammer_backgroundram(*this, "rjammer_bgram") + { } + + void rjammer(machine_config &config); + +protected: + virtual void machine_start() override; + virtual void machine_reset() override; + +private: + + void rjammer_background_LS377_w(uint8_t data); + void rjammer_background_page_w(uint8_t data); + void rjammer_voice_startstop_w(uint8_t data); + void rjammer_voice_frequency_select_w(uint8_t data); + + void rjammer_voice_input_w(uint8_t data); + void rjammer_voice_intensity_control_w(uint8_t data); + + DECLARE_WRITE_LINE_MEMBER(rjammer_adpcm_vck); + + uint32_t screen_update_rjammer(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + + void rjammer_palette(palette_device &palette) const; + + void rjammer_main_map(address_map &map); + void rjammer_main_portmap(address_map &map); + void rjammer_second_map(address_map &map); + void rjammer_second_portmap(address_map &map); + void rjammer_sound_map(address_map &map); + void rjammer_sound_portmap(address_map &map); + + optional_shared_ptr<uint8_t> m_rjammer_backgroundram; +}; + #endif // MAME_INCLUDES_TUBEP_H diff --git a/src/mame/includes/wecleman.h b/src/mame/includes/wecleman.h index ffd480bbaef..fd2070bc679 100644 --- a/src/mame/includes/wecleman.h +++ b/src/mame/includes/wecleman.h @@ -37,15 +37,17 @@ public: , m_led(*this, "led%u", 0U) { } - void hotchase(machine_config &config); void wecleman(machine_config &config); void init_wecleman(); - void init_hotchase(); DECLARE_READ_LINE_MEMBER(hotchase_sound_status_r); -private: +protected: + virtual void machine_start() override; + virtual void machine_reset() override; + virtual void video_start() override; + enum { WECLEMAN_ID = 0, @@ -97,46 +99,26 @@ private: void blitter_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); uint8_t multiply_r(); void multiply_w(offs_t offset, uint8_t data); - void hotchase_sound_control_w(offs_t offset, uint8_t data); + void wecleman_txtram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); void wecleman_pageram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); void wecleman_videostatus_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - void hotchase_paletteram16_SBGRBBBBGGGGRRRR_word_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); void wecleman_paletteram16_SSSSBBBBGGGGRRRR_word_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); void wecleman_K00723216_bank_w(uint8_t data); void wecleman_volume_callback(uint8_t data); - template<int Chip> uint8_t hotchase_k007232_r(offs_t offset); - template<int Chip> void hotchase_k007232_w(offs_t offset, uint8_t data); TILE_GET_INFO_MEMBER(wecleman_get_txt_tile_info); TILE_GET_INFO_MEMBER(wecleman_get_bg_tile_info); TILE_GET_INFO_MEMBER(wecleman_get_fg_tile_info); - DECLARE_MACHINE_START(wecleman); - DECLARE_MACHINE_RESET(wecleman); - DECLARE_VIDEO_START(wecleman); - - DECLARE_MACHINE_START(hotchase); - DECLARE_MACHINE_RESET(hotchase); - DECLARE_VIDEO_START(hotchase); - uint32_t screen_update_wecleman(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - uint32_t screen_update_hotchase(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - INTERRUPT_GEN_MEMBER(hotchase_sound_timer); TIMER_DEVICE_CALLBACK_MEMBER(wecleman_scanline); - TIMER_DEVICE_CALLBACK_MEMBER(hotchase_scanline); void draw_cloud(bitmap_rgb32 &bitmap,gfx_element *gfx,uint16_t *tm_base,int x0,int y0,int xcount,int ycount,int scrollx,int scrolly,int tmw_l2,int tmh_l2,int alpha,int pal_offset); void wecleman_unpack_sprites(); void bitswap(uint8_t *src,size_t len,int _14,int _13,int _12,int _11,int _10,int _f,int _e,int _d,int _c,int _b,int _a,int _9,int _8,int _7,int _6,int _5,int _4,int _3,int _2,int _1,int _0); - void hotchase_sprite_decode( int num16_banks, int bank_size ); void get_sprite_info(); void sortsprite(int *idx_array, int *key_array, int size); void wecleman_draw_road(bitmap_rgb32 &bitmap, const rectangle &cliprect, int priority); - void hotchase_draw_road(bitmap_ind16 &bitmap, const rectangle &cliprect); - K051316_CB_MEMBER(hotchase_zoom_callback_1); - K051316_CB_MEMBER(hotchase_zoom_callback_2); - - void hotchase_sound_hs_w(uint8_t data); required_device<cpu_device> m_maincpu; required_device<cpu_device> m_audiocpu; @@ -149,9 +131,6 @@ private: output_finder<1> m_led; - void hotchase_map(address_map &map); - void hotchase_sound_map(address_map &map); - void hotchase_sub_map(address_map &map); void wecleman_map(address_map &map); void wecleman_sound_map(address_map &map); void wecleman_sub_map(address_map &map); @@ -180,4 +159,45 @@ private: sprite_t **m_spr_ptr_list; }; +class hotchase_state : public wecleman_state +{ +public: + hotchase_state(const machine_config &mconfig, device_type type, const char* tag) + : wecleman_state(mconfig, type, tag) + { + } + + void hotchase(machine_config &config); + + void init_hotchase(); + +protected: + virtual void machine_reset() override; + virtual void video_start() override; + +private: + uint32_t screen_update_hotchase(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + void hotchase_draw_road(bitmap_ind16 &bitmap, const rectangle &cliprect); + + void hotchase_paletteram16_SBGRBBBBGGGGRRRR_word_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + + K051316_CB_MEMBER(hotchase_zoom_callback_1); + K051316_CB_MEMBER(hotchase_zoom_callback_2); + + TIMER_DEVICE_CALLBACK_MEMBER(hotchase_scanline); + + void hotchase_sound_control_w(offs_t offset, uint8_t data); + void hotchase_sound_hs_w(uint8_t data); + template<int Chip> uint8_t hotchase_k007232_r(offs_t offset); + template<int Chip> void hotchase_k007232_w(offs_t offset, uint8_t data); + + INTERRUPT_GEN_MEMBER(hotchase_sound_timer); + + void hotchase_sprite_decode( int num16_banks, int bank_size ); + + void hotchase_map(address_map &map); + void hotchase_sound_map(address_map &map); + void hotchase_sub_map(address_map &map); +}; + #endif // MAME_INCLUDES_WECLEMAN_H diff --git a/src/mame/machine/megadriv.cpp b/src/mame/machine/megadriv.cpp index b3f431a670b..7c384e683e1 100644 --- a/src/mame/machine/megadriv.cpp +++ b/src/mame/machine/megadriv.cpp @@ -785,8 +785,9 @@ uint32_t md_base_state::screen_update_megadriv(screen_device &screen, bitmap_rgb /*****************************************************************************************/ -VIDEO_START_MEMBER(md_base_state,megadriv) +void md_base_state::video_start() { + // nothing? } void md_base_state::machine_start() @@ -928,8 +929,6 @@ void md_base_state::md_ntsc(machine_config &config) m_screen->set_screen_update(FUNC(md_base_state::screen_update_megadriv)); /* Copies a bitmap */ m_screen->screen_vblank().set(FUNC(md_base_state::screen_vblank_megadriv)); /* Used to Sync the timing */ - MCFG_VIDEO_START_OVERRIDE(md_base_state, megadriv) - /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); @@ -990,8 +989,6 @@ void md_base_state::md_pal(machine_config &config) m_screen->set_screen_update(FUNC(md_base_state::screen_update_megadriv)); /* Copies a bitmap */ m_screen->screen_vblank().set(FUNC(md_base_state::screen_vblank_megadriv)); /* Used to Sync the timing */ - MCFG_VIDEO_START_OVERRIDE(md_base_state, megadriv) - /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 7e6627223ea..c0a539e02ec 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -22281,6 +22281,7 @@ rad_ssoc // (c)2004 Radica rad_sonic rad_sonicp rad_orun +msi_sf2 @source:megadriv_sunplus_hybrid.cpp reactmd diff --git a/src/mame/video/tsamurai.cpp b/src/mame/video/tsamurai.cpp index 2a43152cd2f..546691a78fc 100644 --- a/src/mame/video/tsamurai.cpp +++ b/src/mame/video/tsamurai.cpp @@ -19,7 +19,6 @@ TILE_GET_INFO_MEMBER(tsamurai_state::get_bg_tile_info) uint8_t attributes = m_bg_videoram[2*tile_index+1]; int tile_number = m_bg_videoram[2*tile_index]; tile_number += (( attributes & 0xc0 ) >> 6 ) * 256; /* legacy */ - tile_number += (( attributes & 0x20 ) >> 5 ) * 1024; /* Mission 660 add-on*/ tileinfo.set(0, tile_number, attributes & 0x1f, @@ -30,6 +29,28 @@ TILE_GET_INFO_MEMBER(tsamurai_state::get_fg_tile_info) { int tile_number = m_videoram[tile_index]; if (m_textbank1 & 0x01) tile_number += 256; /* legacy */ + tileinfo.set(1, + tile_number, + m_colorram[((tile_index&0x1f)*2)+1] & 0x1f, + 0); +} + +TILE_GET_INFO_MEMBER(m660_state::get_bg_tile_info) +{ + uint8_t attributes = m_bg_videoram[2*tile_index+1]; + int tile_number = m_bg_videoram[2*tile_index]; + tile_number += (( attributes & 0xc0 ) >> 6 ) * 256; /* legacy */ + tile_number += (( attributes & 0x20 ) >> 5 ) * 1024; /* Mission 660 add-on*/ + tileinfo.set(0, + tile_number, + attributes & 0x1f, + 0); +} + +TILE_GET_INFO_MEMBER(m660_state::get_fg_tile_info) +{ + int tile_number = m_videoram[tile_index]; + if (m_textbank1 & 0x01) tile_number += 256; /* legacy */ if (m_textbank2 & 0x01) tile_number += 512; /* Mission 660 add-on */ tileinfo.set(1, tile_number, @@ -44,13 +65,9 @@ TILE_GET_INFO_MEMBER(tsamurai_state::get_fg_tile_info) ***************************************************************************/ -void tsamurai_state::video_start() -{ - //save_item(NAME(m_flicker)); - save_item(NAME(m_textbank1)); -} -VIDEO_START_MEMBER(tsamurai_state, tsamurai) + +void tsamurai_state::video_start() { m_background = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(tsamurai_state::get_bg_tile_info)), TILEMAP_SCAN_ROWS, 8,8, 32,32); m_foreground = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(tsamurai_state::get_fg_tile_info)), TILEMAP_SCAN_ROWS, 8,8, 32,32); @@ -58,14 +75,17 @@ VIDEO_START_MEMBER(tsamurai_state, tsamurai) m_background->set_transparent_pen(0); m_foreground->set_transparent_pen(0); + m_bgcolor = 0; + m_numsprites = 32; + save_item(NAME(m_bgcolor)); - video_start(); } -VIDEO_START_MEMBER(tsamurai_state, m660) +void m660_state::video_start() { - VIDEO_START_CALL_MEMBER(tsamurai); + tsamurai_state::video_start(); + m_textbank2 = 0; save_item(NAME(m_textbank2)); } @@ -97,7 +117,7 @@ WRITE_LINE_MEMBER(tsamurai_state::textbank1_w) m_foreground->mark_all_dirty(); } -WRITE_LINE_MEMBER(tsamurai_state::textbank2_w) +WRITE_LINE_MEMBER(m660_state::textbank2_w) { m_textbank2 = state; m_foreground->mark_all_dirty(); @@ -106,14 +126,15 @@ WRITE_LINE_MEMBER(tsamurai_state::textbank2_w) void tsamurai_state::bg_videoram_w(offs_t offset, uint8_t data) { m_bg_videoram[offset]=data; - offset = offset/2; - m_background->mark_tile_dirty(offset); + m_background->mark_tile_dirty(offset/2); } + void tsamurai_state::fg_videoram_w(offs_t offset, uint8_t data) { m_videoram[offset]=data; m_foreground->mark_tile_dirty(offset); } + void tsamurai_state::fg_colorram_w(offs_t offset, uint8_t data) { if( m_colorram[offset]!=data ) @@ -139,9 +160,8 @@ void tsamurai_state::fg_colorram_w(offs_t offset, uint8_t data) void tsamurai_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect ) { gfx_element *gfx = m_gfxdecode->gfx(2); - const uint8_t *source = m_spriteram+32*4-4; + const uint8_t *source = m_spriteram+m_numsprites*4-4; const uint8_t *finish = m_spriteram; /* ? */ - m_flicker = 1-m_flicker; while( source>=finish ) { @@ -228,7 +248,7 @@ VS Gong Fight runs on older hardware ***************************************************************************/ -void tsamurai_state::vsgongf_color_w(uint8_t data) +void vsgongf_state::vsgongf_color_w(uint8_t data) { if( m_vsgongf_color != data ) { @@ -238,7 +258,7 @@ void tsamurai_state::vsgongf_color_w(uint8_t data) } -TILE_GET_INFO_MEMBER(tsamurai_state::get_vsgongf_tile_info) +TILE_GET_INFO_MEMBER(vsgongf_state::get_vsgongf_tile_info) { int tile_number = m_videoram[tile_index]; int color = m_vsgongf_color&0x1f; @@ -249,15 +269,17 @@ TILE_GET_INFO_MEMBER(tsamurai_state::get_vsgongf_tile_info) 0); } -VIDEO_START_MEMBER(tsamurai_state,vsgongf) +void vsgongf_state::video_start() { - m_foreground = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(tsamurai_state::get_vsgongf_tile_info)), TILEMAP_SCAN_ROWS, 8,8, 32,32); + m_foreground = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(vsgongf_state::get_vsgongf_tile_info)), TILEMAP_SCAN_ROWS, 8,8, 32,32); + + m_numsprites = 16; save_item(NAME(m_vsgongf_color)); - video_start(); + save_item(NAME(m_textbank1)); } -uint32_t tsamurai_state::screen_update_vsgongf(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +uint32_t vsgongf_state::screen_update_vsgongf(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { #ifdef MAME_DEBUG if( machine().input().code_pressed( KEYCODE_Q ) ){ diff --git a/src/mame/video/tubep.cpp b/src/mame/video/tubep.cpp index 3273086647f..93785f7dbc9 100644 --- a/src/mame/video/tubep.cpp +++ b/src/mame/video/tubep.cpp @@ -686,7 +686,7 @@ uint32_t tubep_state::screen_update_tubep(screen_device &screen, bitmap_ind16 &b ***************************************************************************/ -void tubep_state::rjammer_palette(palette_device &palette) const +void rjammer_state::rjammer_palette(palette_device &palette) const { uint8_t const *color_prom = memregion("proms")->base(); @@ -726,19 +726,19 @@ void tubep_state::rjammer_palette(palette_device &palette) const } -void tubep_state::rjammer_background_LS377_w(uint8_t data) +void rjammer_state::rjammer_background_LS377_w(uint8_t data) { m_ls377_data = data & 0xff; } -void tubep_state::rjammer_background_page_w(uint8_t data) +void rjammer_state::rjammer_background_page_w(uint8_t data) { m_page = (data & 1) * 0x200; } -uint32_t tubep_state::screen_update_rjammer(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +uint32_t rjammer_state::screen_update_rjammer(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { int DISP_ = m_DISP^1; diff --git a/src/mame/video/wecleman.cpp b/src/mame/video/wecleman.cpp index 2a7ec37d4cc..b79c9fadc0a 100644 --- a/src/mame/video/wecleman.cpp +++ b/src/mame/video/wecleman.cpp @@ -747,7 +747,7 @@ void wecleman_state::draw_cloud(bitmap_rgb32 &bitmap, ------------------------------------------------------------------------*/ -void wecleman_state::hotchase_draw_road(bitmap_ind16 &bitmap, const rectangle &cliprect) +void hotchase_state::hotchase_draw_road(bitmap_ind16 &bitmap, const rectangle &cliprect) { /* Referred to what's in the ROMs */ #define XSIZE 512 @@ -809,7 +809,7 @@ void wecleman_state::wecleman_videostatus_w(offs_t offset, uint16_t data, uint16 } } -void wecleman_state::hotchase_paletteram16_SBGRBBBBGGGGRRRR_word_w(offs_t offset, uint16_t data, uint16_t mem_mask) +void hotchase_state::hotchase_paletteram16_SBGRBBBBGGGGRRRR_word_w(offs_t offset, uint16_t data, uint16_t mem_mask) { int newword, r, g, b; @@ -838,7 +838,7 @@ void wecleman_state::wecleman_paletteram16_SSSSBBBBGGGGRRRR_word_w(offs_t offset Initializations ***************************************************************************/ -VIDEO_START_MEMBER(wecleman_state,wecleman) +void wecleman_state::video_start() { /* Sprite banking - each bank is 0x20000 bytes (we support 0x40 bank codes) @@ -928,19 +928,19 @@ VIDEO_START_MEMBER(wecleman_state,wecleman) // Callbacks for the K051316 -K051316_CB_MEMBER(wecleman_state::hotchase_zoom_callback_1) +K051316_CB_MEMBER(hotchase_state::hotchase_zoom_callback_1) { *code |= (*color & 0x03) << 8; *color = (*color & 0xfc) >> 2; } -K051316_CB_MEMBER(wecleman_state::hotchase_zoom_callback_2) +K051316_CB_MEMBER(hotchase_state::hotchase_zoom_callback_2) { *color = ((*color & 0x3f) << 1) | ((*code & 0x80) >> 7); } -VIDEO_START_MEMBER(wecleman_state,hotchase) +void hotchase_state::video_start() { /* Sprite banking - each bank is 0x20000 bytes (we support 0x40 bank codes) @@ -1062,7 +1062,7 @@ uint32_t wecleman_state::screen_update_wecleman(screen_device &screen, bitmap_rg Hot Chase ***************************************************************************/ -uint32_t wecleman_state::screen_update_hotchase(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +uint32_t hotchase_state::screen_update_hotchase(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { bool video_on = (m_irqctrl & 0x40) ? true : false; |