mirror of
https://github.com/holub/mame
synced 2025-07-05 09:57:47 +03:00
taito_b.cpp: Separate hitice state class; eliminate old-style overrides (nw)
This commit is contained in:
parent
1c202190b4
commit
b1879fe62b
@ -363,7 +363,7 @@ void taitob_state::tetrista_map(address_map &map)
|
||||
}
|
||||
|
||||
|
||||
void taitob_state::hitice_map(address_map &map)
|
||||
void hitice_state::hitice_map(address_map &map)
|
||||
{
|
||||
map(0x000000, 0x07ffff).rom();
|
||||
map(0x400000, 0x47ffff).m(m_tc0180vcu, FUNC(tc0180vcu_device::tc0180vcu_memrw));
|
||||
@ -374,8 +374,8 @@ void taitob_state::hitice_map(address_map &map)
|
||||
map(0x700002, 0x700002).rw("ciu", FUNC(pc060ha_device::master_comm_r), FUNC(pc060ha_device::master_comm_w));
|
||||
map(0x800000, 0x803fff).ram(); /* Main RAM */
|
||||
map(0xa00000, 0xa01fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
|
||||
map(0xb00000, 0xb7ffff).ram().w(FUNC(taitob_state::hitice_pixelram_w)).share("pixelram");
|
||||
map(0xbffff0, 0xbffff5).w(FUNC(taitob_state::hitice_pixel_scroll_w));
|
||||
map(0xb00000, 0xb7ffff).ram().w(FUNC(hitice_state::pixelram_w)).share("pixelram");
|
||||
map(0xbffff0, 0xbffff5).w(FUNC(hitice_state::pixel_scroll_w));
|
||||
// { 0xbffffa, 0xbffffb, ???
|
||||
}
|
||||
|
||||
@ -1759,8 +1759,6 @@ void taitob_state::rastsag2(machine_config &config)
|
||||
|
||||
PALETTE(config, m_palette).set_format(palette_device::RGBx_444, 4096);
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(taitob_state,taitob_core)
|
||||
|
||||
TC0180VCU(config, m_tc0180vcu, 27.164_MHz_XTAL / 4);
|
||||
m_tc0180vcu->set_fb_colorbase(0x40);
|
||||
m_tc0180vcu->set_bg_colorbase(0xc0);
|
||||
@ -1815,8 +1813,6 @@ void taitob_state::masterw(machine_config &config)
|
||||
|
||||
PALETTE(config, m_palette).set_format(palette_device::RGBx_444, 4096);
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(taitob_state,taitob_core)
|
||||
|
||||
TC0180VCU(config, m_tc0180vcu, 27.164_MHz_XTAL / 4);
|
||||
m_tc0180vcu->set_fb_colorbase(0x10);
|
||||
m_tc0180vcu->set_bg_colorbase(0x30);
|
||||
@ -1888,8 +1884,6 @@ void taitob_state::ashura(machine_config &config)
|
||||
|
||||
PALETTE(config, m_palette).set_format(palette_device::RGBx_444, 4096);
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(taitob_state,taitob_core)
|
||||
|
||||
TC0180VCU(config, m_tc0180vcu, 27.164_MHz_XTAL / 4);
|
||||
m_tc0180vcu->set_fb_colorbase(0x40);
|
||||
m_tc0180vcu->set_bg_colorbase(0xc0);
|
||||
@ -1944,8 +1938,6 @@ void taitob_state::crimec(machine_config &config)
|
||||
|
||||
PALETTE(config, m_palette).set_format(palette_device::RGBx_444, 4096);
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(taitob_state,taitob_core)
|
||||
|
||||
TC0180VCU(config, m_tc0180vcu, 27.164_MHz_XTAL / 4);
|
||||
m_tc0180vcu->set_fb_colorbase(0x80);
|
||||
m_tc0180vcu->set_bg_colorbase(0x00);
|
||||
@ -1970,14 +1962,14 @@ void taitob_state::crimec(machine_config &config)
|
||||
}
|
||||
|
||||
|
||||
void taitob_state::hitice(machine_config &config)
|
||||
void hitice_state::hitice(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
M68000(config, m_maincpu, 24_MHz_XTAL / 2); /* 12 MHz */
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &taitob_state::hitice_map);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &hitice_state::hitice_map);
|
||||
|
||||
Z80(config, m_audiocpu, 24_MHz_XTAL / 4); /* 6 MHz Z80B */
|
||||
m_audiocpu->set_addrmap(AS_PROGRAM, &taitob_state::viofight_sound_map);
|
||||
m_audiocpu->set_addrmap(AS_PROGRAM, &hitice_state::viofight_sound_map);
|
||||
|
||||
config.m_minimum_quantum = attotime::from_hz(600);
|
||||
|
||||
@ -1986,7 +1978,7 @@ void taitob_state::hitice(machine_config &config)
|
||||
m_tc0220ioc->read_1_callback().set_ioport("DSWB");
|
||||
m_tc0220ioc->read_2_callback().set_ioport("IN0");
|
||||
m_tc0220ioc->read_3_callback().set_ioport("IN1");
|
||||
m_tc0220ioc->write_4_callback().set(FUNC(taitob_state::player_12_coin_ctrl_w));
|
||||
m_tc0220ioc->write_4_callback().set(FUNC(hitice_state::player_12_coin_ctrl_w));
|
||||
m_tc0220ioc->read_7_callback().set_ioport("IN2");
|
||||
|
||||
/* video hardware */
|
||||
@ -1995,14 +1987,11 @@ void taitob_state::hitice(machine_config &config)
|
||||
m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(0));
|
||||
m_screen->set_size(64*8, 32*8);
|
||||
m_screen->set_visarea(0*8, 40*8-1, 2*8, 30*8-1);
|
||||
m_screen->set_screen_update(FUNC(taitob_state::screen_update_taitob));
|
||||
m_screen->set_screen_update(FUNC(hitice_state::screen_update_taitob));
|
||||
m_screen->set_palette(m_palette);
|
||||
|
||||
PALETTE(config, m_palette).set_format(palette_device::RGBx_444, 4096);
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(taitob_state,hitice)
|
||||
MCFG_VIDEO_RESET_OVERRIDE(taitob_state,hitice)
|
||||
|
||||
TC0180VCU(config, m_tc0180vcu, 27.164_MHz_XTAL / 4); // nominally "6.6 MHZ"
|
||||
m_tc0180vcu->set_fb_colorbase(0x40);
|
||||
m_tc0180vcu->set_bg_colorbase(0xc0);
|
||||
@ -2062,8 +2051,6 @@ void taitob_state::rambo3p(machine_config &config)
|
||||
|
||||
PALETTE(config, m_palette).set_format(palette_device::RGBx_444, 4096);
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(taitob_state,taitob_core)
|
||||
|
||||
TC0180VCU(config, m_tc0180vcu, 27.164_MHz_XTAL / 4);
|
||||
m_tc0180vcu->set_fb_colorbase(0x40);
|
||||
m_tc0180vcu->set_bg_colorbase(0xc0);
|
||||
@ -2118,8 +2105,6 @@ void taitob_state::rambo3(machine_config &config)
|
||||
|
||||
PALETTE(config, m_palette).set_format(palette_device::RGBx_444, 4096);
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(taitob_state,taitob_core)
|
||||
|
||||
TC0180VCU(config, m_tc0180vcu, 27.164_MHz_XTAL / 4);
|
||||
m_tc0180vcu->set_fb_colorbase(0x10);
|
||||
m_tc0180vcu->set_bg_colorbase(0x30);
|
||||
@ -2179,8 +2164,6 @@ void taitob_state::pbobble(machine_config &config)
|
||||
|
||||
PALETTE(config, m_palette).set_format(palette_device::RRRRGGGGBBBBRGBx, 4096);
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(taitob_state,taitob_core)
|
||||
|
||||
TC0180VCU(config, m_tc0180vcu, 27.164_MHz_XTAL / 4);
|
||||
m_tc0180vcu->set_fb_colorbase(0x80);
|
||||
m_tc0180vcu->set_bg_colorbase(0x00);
|
||||
@ -2240,8 +2223,6 @@ void taitob_state::spacedx(machine_config &config)
|
||||
|
||||
PALETTE(config, m_palette).set_format(palette_device::RRRRGGGGBBBBRGBx, 4096);
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(taitob_state,taitob_core)
|
||||
|
||||
TC0180VCU(config, m_tc0180vcu, 27.164_MHz_XTAL / 4);
|
||||
m_tc0180vcu->set_fb_colorbase(0x80);
|
||||
m_tc0180vcu->set_bg_colorbase(0x00);
|
||||
@ -2296,8 +2277,6 @@ void taitob_state::spacedxo(machine_config &config)
|
||||
|
||||
PALETTE(config, m_palette).set_format(palette_device::RRRRGGGGBBBBRGBx, 4096);
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(taitob_state,taitob_core)
|
||||
|
||||
TC0180VCU(config, m_tc0180vcu, 27.164_MHz_XTAL / 4);
|
||||
m_tc0180vcu->set_fb_colorbase(0x10);
|
||||
m_tc0180vcu->set_bg_colorbase(0x30);
|
||||
@ -2357,8 +2336,6 @@ void taitob_state::qzshowby(machine_config &config)
|
||||
|
||||
PALETTE(config, m_palette).set_format(palette_device::RRRRGGGGBBBBRGBx, 4096);
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(taitob_state,taitob_core)
|
||||
|
||||
TC0180VCU(config, m_tc0180vcu, 27.164_MHz_XTAL / 4);
|
||||
m_tc0180vcu->set_fb_colorbase(0x80);
|
||||
m_tc0180vcu->set_bg_colorbase(0x00);
|
||||
@ -2413,8 +2390,6 @@ void taitob_state::viofight(machine_config &config)
|
||||
|
||||
PALETTE(config, m_palette).set_format(palette_device::RGBx_444, 4096);
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(taitob_state,taitob_core)
|
||||
|
||||
TC0180VCU(config, m_tc0180vcu, 27.164_MHz_XTAL / 4);
|
||||
m_tc0180vcu->set_fb_colorbase(0x10);
|
||||
m_tc0180vcu->set_bg_colorbase(0x30);
|
||||
@ -2474,8 +2449,6 @@ void taitob_state::silentd(machine_config &config)
|
||||
|
||||
PALETTE(config, m_palette).set_format(palette_device::RRRRGGGGBBBBRGBx, 4096);
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(taitob_state,taitob_core)
|
||||
|
||||
TC0180VCU(config, m_tc0180vcu, 27.164_MHz_XTAL / 4);
|
||||
m_tc0180vcu->set_fb_colorbase(0x10);
|
||||
m_tc0180vcu->set_bg_colorbase(0x30);
|
||||
@ -2530,8 +2503,6 @@ void taitob_state::selfeena(machine_config &config)
|
||||
|
||||
PALETTE(config, m_palette).set_format(palette_device::RRRRGGGGBBBBRGBx, 4096);
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(taitob_state,taitob_core)
|
||||
|
||||
TC0180VCU(config, m_tc0180vcu, 27.164_MHz_XTAL / 4);
|
||||
m_tc0180vcu->set_fb_colorbase(0x10);
|
||||
m_tc0180vcu->set_bg_colorbase(0x30);
|
||||
@ -2595,8 +2566,6 @@ void taitob_state::ryujin(machine_config &config)
|
||||
|
||||
PALETTE(config, m_palette).set_format(palette_device::RRRRGGGGBBBBRGBx, 4096);
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(taitob_state,taitob_core)
|
||||
|
||||
TC0180VCU(config, m_tc0180vcu, 27.164_MHz_XTAL / 4);
|
||||
m_tc0180vcu->set_fb_colorbase(0x10);
|
||||
m_tc0180vcu->set_bg_colorbase(0x30);
|
||||
@ -2658,8 +2627,6 @@ void taitob_state::sbm(machine_config &config)
|
||||
|
||||
PALETTE(config, m_palette).set_format(palette_device::RGBx_444, 4096);
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(taitob_state,taitob_core)
|
||||
|
||||
TC0180VCU(config, m_tc0180vcu, 27.164_MHz_XTAL / 4);
|
||||
m_tc0180vcu->set_fb_colorbase(0x40);
|
||||
m_tc0180vcu->set_bg_colorbase(0xc0);
|
||||
@ -2714,8 +2681,6 @@ void taitob_c_state::realpunc(machine_config &config)
|
||||
|
||||
PALETTE(config, m_palette).set_format(palette_device::RGBx_444, 4096);
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(taitob_c_state,realpunc)
|
||||
|
||||
hd63484_device &hd63484(HD63484(config, "hd63484", 0));
|
||||
hd63484.set_addrmap(0, &taitob_c_state::realpunc_hd63484_map);
|
||||
hd63484.set_auto_configure_screen(false);
|
||||
@ -3599,9 +3564,9 @@ GAME( 1990, ashura, 0, ashura, ashura, taitob_state, init_taito_b,
|
||||
GAME( 1990, ashuraj, ashura, ashura, ashuraj, taitob_state, init_taito_b, ROT270, "Taito Corporation", "Ashura Blaster (Japan)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1990, ashurau, ashura, ashura, ashurau, taitob_state, init_taito_b, ROT270, "Taito America Corporation", "Ashura Blaster (US)", MACHINE_SUPPORTS_SAVE )
|
||||
|
||||
GAME( 1990, hitice, 0, hitice, hitice, taitob_state, init_taito_b, ROT0, "Taito Corporation (Williams license)", "Hit the Ice (US)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1990, hiticerb, hitice, hitice, hitice, taitob_state, init_taito_b, ROT0, "Taito Corporation (Williams license)", "Hit the Ice (US, with riser board)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1990, hiticej, hitice, hitice, hiticej, taitob_state, init_taito_b, ROT0, "Taito Corporation (licensed from Midway)", "Hit the Ice (Japan)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1990, hitice, 0, hitice, hitice, hitice_state, init_taito_b, ROT0, "Taito Corporation (Williams license)", "Hit the Ice (US)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1990, hiticerb, hitice, hitice, hitice, hitice_state, init_taito_b, ROT0, "Taito Corporation (Williams license)", "Hit the Ice (US, with riser board)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1990, hiticej, hitice, hitice, hiticej, hitice_state, init_taito_b, ROT0, "Taito Corporation (licensed from Midway)", "Hit the Ice (Japan)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
|
||||
|
||||
GAME( 1991, selfeena, 0, selfeena, selfeena, taitob_state, init_taito_b, ROT0, "East Technology", "Sel Feena", MACHINE_SUPPORTS_SAVE )
|
||||
|
||||
|
@ -17,7 +17,6 @@ class taitob_state : public driver_device
|
||||
public:
|
||||
taitob_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
driver_device(mconfig, type, tag),
|
||||
m_pixelram(*this, "pixelram"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_audiocpu(*this, "audiocpu"),
|
||||
m_ym(*this, "ymsnd"),
|
||||
@ -37,7 +36,6 @@ public:
|
||||
|
||||
void spacedx(machine_config &config);
|
||||
void rambo3(machine_config &config);
|
||||
void hitice(machine_config &config);
|
||||
void ashura(machine_config &config);
|
||||
void silentd(machine_config &config);
|
||||
void tetrista(machine_config &config);
|
||||
@ -71,16 +69,11 @@ protected:
|
||||
DECLARE_READ16_MEMBER(player_34_coin_ctrl_r);
|
||||
DECLARE_WRITE16_MEMBER(player_34_coin_ctrl_w);
|
||||
DECLARE_WRITE16_MEMBER(spacedxo_tc0220ioc_w);
|
||||
DECLARE_WRITE16_MEMBER(hitice_pixelram_w);
|
||||
DECLARE_WRITE16_MEMBER(hitice_pixel_scroll_w);
|
||||
DECLARE_WRITE8_MEMBER(mb87078_gain_changed);
|
||||
DECLARE_VIDEO_START(hitice);
|
||||
DECLARE_VIDEO_RESET(hitice);
|
||||
DECLARE_VIDEO_START(taitob_core);
|
||||
virtual void video_start() override;
|
||||
uint32_t screen_update_taitob(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
|
||||
void crimec_map(address_map &map);
|
||||
void hitice_map(address_map &map);
|
||||
void masterw_map(address_map &map);
|
||||
void masterw_sound_map(address_map &map);
|
||||
void pbobble_map(address_map &map);
|
||||
@ -101,9 +94,6 @@ protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
|
||||
/* memory pointers */
|
||||
optional_shared_ptr<uint16_t> m_pixelram;
|
||||
|
||||
/* video-related */
|
||||
std::unique_ptr<bitmap_ind16> m_pixel_bitmap;
|
||||
|
||||
@ -132,8 +122,6 @@ protected:
|
||||
optional_ioport m_eepromout_io;
|
||||
optional_ioport_array<2> m_trackx_io;
|
||||
optional_ioport_array<2> m_tracky_io;
|
||||
|
||||
void hitice_clear_pixel_bitmap();
|
||||
};
|
||||
|
||||
class taitob_c_state : public taitob_state
|
||||
@ -152,7 +140,7 @@ protected:
|
||||
void realpunc_map(address_map &map);
|
||||
void realpunc_hd63484_map(address_map &map);
|
||||
|
||||
DECLARE_VIDEO_START(realpunc);
|
||||
virtual void video_start() override;
|
||||
uint32_t screen_update_realpunc(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
|
||||
private:
|
||||
@ -160,4 +148,29 @@ private:
|
||||
uint16_t m_realpunc_video_ctrl;
|
||||
};
|
||||
|
||||
class hitice_state : public taitob_state
|
||||
{
|
||||
public:
|
||||
hitice_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
taitob_state(mconfig, type, tag),
|
||||
m_pixelram(*this, "pixelram")
|
||||
{ }
|
||||
|
||||
void hitice(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual void video_start() override;
|
||||
virtual void video_reset() override;
|
||||
|
||||
private:
|
||||
DECLARE_WRITE16_MEMBER(pixelram_w);
|
||||
DECLARE_WRITE16_MEMBER(pixel_scroll_w);
|
||||
|
||||
void hitice_map(address_map &map);
|
||||
|
||||
void clear_pixel_bitmap();
|
||||
|
||||
required_shared_ptr<uint16_t> m_pixelram;
|
||||
};
|
||||
|
||||
#endif // MAME_INCLUDES_TAITO_B_H
|
||||
|
@ -3,7 +3,7 @@
|
||||
#include "emu.h"
|
||||
#include "includes/taito_b.h"
|
||||
|
||||
WRITE16_MEMBER(taitob_state::hitice_pixelram_w)
|
||||
WRITE16_MEMBER(hitice_state::pixelram_w)
|
||||
{
|
||||
int sy = offset >> 9;
|
||||
int sx = offset & 0x1ff;
|
||||
@ -18,18 +18,18 @@ WRITE16_MEMBER(taitob_state::hitice_pixelram_w)
|
||||
}
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(taitob_state::hitice_pixel_scroll_w)
|
||||
WRITE16_MEMBER(hitice_state::pixel_scroll_w)
|
||||
{
|
||||
COMBINE_DATA(&m_pixel_scroll[offset]);
|
||||
}
|
||||
|
||||
void taitob_state::hitice_clear_pixel_bitmap( )
|
||||
void hitice_state::clear_pixel_bitmap()
|
||||
{
|
||||
int i;
|
||||
address_space &space = m_maincpu->space(AS_PROGRAM);
|
||||
|
||||
for (i = 0; i < 0x40000; i++)
|
||||
hitice_pixelram_w(space, i, 0, 0xffff);
|
||||
pixelram_w(space, i, 0, 0xffff);
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(taitob_c_state::realpunc_video_ctrl_w)
|
||||
@ -37,16 +37,16 @@ WRITE16_MEMBER(taitob_c_state::realpunc_video_ctrl_w)
|
||||
COMBINE_DATA(&m_realpunc_video_ctrl);
|
||||
}
|
||||
|
||||
VIDEO_START_MEMBER(taitob_state,taitob_core)
|
||||
void taitob_state::video_start()
|
||||
{
|
||||
m_pixel_bitmap = nullptr; /* only hitice needs this */
|
||||
|
||||
save_item(NAME(m_pixel_scroll));
|
||||
}
|
||||
|
||||
VIDEO_START_MEMBER(taitob_state,hitice)
|
||||
void hitice_state::video_start()
|
||||
{
|
||||
VIDEO_START_CALL_MEMBER(taitob_core);
|
||||
taitob_state::video_start();
|
||||
|
||||
m_b_fg_color_base = 0x80; /* hitice also uses this for the pixel_bitmap */
|
||||
|
||||
@ -55,18 +55,18 @@ VIDEO_START_MEMBER(taitob_state,hitice)
|
||||
save_item(NAME(*m_pixel_bitmap));
|
||||
}
|
||||
|
||||
VIDEO_RESET_MEMBER(taitob_state,hitice)
|
||||
void hitice_state::video_reset()
|
||||
{
|
||||
/* kludge: clear the bitmap on startup */
|
||||
hitice_clear_pixel_bitmap();
|
||||
clear_pixel_bitmap();
|
||||
}
|
||||
|
||||
|
||||
VIDEO_START_MEMBER(taitob_c_state,realpunc)
|
||||
void taitob_c_state::video_start()
|
||||
{
|
||||
m_realpunc_bitmap = std::make_unique<bitmap_ind16>(m_screen->width(), m_screen->height());
|
||||
|
||||
VIDEO_START_CALL_MEMBER(taitob_core);
|
||||
taitob_state::video_start();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user