(nw) more header cleanup, split up some more all-in-one state classes

This commit is contained in:
Vas Crabb 2018-12-03 02:33:33 +11:00
parent 57a0782136
commit 26da0fedf2
60 changed files with 685 additions and 350 deletions

View File

@ -83,21 +83,25 @@ TODO:
#include "speaker.h"
MACHINE_START_MEMBER(lvcards_state,lvpoker)
void lvpoker_state::machine_start()
{
lvcards_state::machine_start();
save_item(NAME(m_payout));
save_item(NAME(m_pulse));
save_item(NAME(m_result));
}
MACHINE_RESET_MEMBER(lvcards_state,lvpoker)
void lvpoker_state::machine_reset()
{
lvcards_state::machine_reset();
m_payout = 0;
m_pulse = 0;
m_result = 0;
}
WRITE8_MEMBER(lvcards_state::control_port_2_w)
WRITE8_MEMBER(lvpoker_state::control_port_2_w)
{
switch (data)
{
@ -113,7 +117,7 @@ WRITE8_MEMBER(lvcards_state::control_port_2_w)
}
}
WRITE8_MEMBER(lvcards_state::control_port_2a_w)
WRITE8_MEMBER(lvpoker_state::control_port_2a_w)
{
switch (data)
{
@ -129,13 +133,13 @@ WRITE8_MEMBER(lvcards_state::control_port_2a_w)
}
}
READ8_MEMBER(lvcards_state::payout_r)
READ8_MEMBER(lvpoker_state::payout_r)
{
m_result = ioport("IN2")->read();
if (m_payout)
{
if ( m_pulse < 3 )
if (m_pulse < 3)
{
m_result = m_result | 0x40;
m_pulse++;
@ -148,23 +152,23 @@ READ8_MEMBER(lvcards_state::payout_r)
return m_result;
}
void lvcards_state::ponttehk_map(address_map &map)
void lvpoker_state::ponttehk_map(address_map &map)
{
map(0x0000, 0x5fff).rom();
map(0x6000, 0x67ff).ram().share("nvram");
map(0x8000, 0x83ff).ram().w(FUNC(lvcards_state::lvcards_videoram_w)).share("videoram");
map(0x8400, 0x87ff).ram().w(FUNC(lvcards_state::lvcards_colorram_w)).share("colorram");
map(0x8000, 0x83ff).ram().w(FUNC(lvpoker_state::videoram_w)).share("videoram");
map(0x8400, 0x87ff).ram().w(FUNC(lvpoker_state::colorram_w)).share("colorram");
map(0xa000, 0xa000).portr("IN0");
map(0xa001, 0xa001).portr("IN1").nopw(); // lamps
map(0xa002, 0xa002).r(FUNC(lvcards_state::payout_r)).w(FUNC(lvcards_state::control_port_2a_w));//AM_WRITENOP // ???
map(0xa002, 0xa002).r(FUNC(lvpoker_state::payout_r)).w(FUNC(lvpoker_state::control_port_2a_w));//AM_WRITENOP // ???
}
void lvcards_state::lvcards_map(address_map &map)
{
map(0x0000, 0x5fff).rom();
map(0x6000, 0x67ff).ram().share("nvram");
map(0x9000, 0x93ff).ram().w(FUNC(lvcards_state::lvcards_videoram_w)).share("videoram");
map(0x9400, 0x97ff).ram().w(FUNC(lvcards_state::lvcards_colorram_w)).share("colorram");
map(0x9000, 0x93ff).ram().w(FUNC(lvcards_state::videoram_w)).share("videoram");
map(0x9400, 0x97ff).ram().w(FUNC(lvcards_state::colorram_w)).share("colorram");
map(0xa000, 0xa000).portr("IN0");
map(0xa001, 0xa001).portr("IN1").nopw();
map(0xa002, 0xa002).portr("IN2").nopw();
@ -178,15 +182,15 @@ void lvcards_state::lvcards_io_map(address_map &map)
map(0x00, 0x01).w("aysnd", FUNC(ay8910_device::data_address_w));
}
void lvcards_state::lvpoker_map(address_map &map)
void lvpoker_state::lvpoker_map(address_map &map)
{
map(0x0000, 0x5fff).rom();
map(0x6000, 0x67ff).ram().share("nvram");
map(0x9000, 0x93ff).ram().w(FUNC(lvcards_state::lvcards_videoram_w)).share("videoram");
map(0x9400, 0x97ff).ram().w(FUNC(lvcards_state::lvcards_colorram_w)).share("colorram");
map(0x9000, 0x93ff).ram().w(FUNC(lvpoker_state::videoram_w)).share("videoram");
map(0x9400, 0x97ff).ram().w(FUNC(lvpoker_state::colorram_w)).share("colorram");
map(0xa000, 0xa000).portr("IN0");
map(0xa001, 0xa001).portr("IN1").nopw(); // lamps
map(0xa002, 0xa002).r(FUNC(lvcards_state::payout_r)).w(FUNC(lvcards_state::control_port_2_w));
map(0xa002, 0xa002).r(FUNC(lvpoker_state::payout_r)).w(FUNC(lvpoker_state::control_port_2_w));
map(0xc000, 0xdfff).rom();
}
@ -484,25 +488,22 @@ MACHINE_CONFIG_START(lvcards_state::lvcards)
aysnd.add_route(ALL_OUTPUTS, "mono", 0.25);
MACHINE_CONFIG_END
MACHINE_CONFIG_START(lvcards_state::lvpoker)
MACHINE_CONFIG_START(lvpoker_state::lvpoker)
lvcards(config);
// basic machine hardware
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1);
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(lvpoker_map)
MCFG_MACHINE_START_OVERRIDE(lvcards_state,lvpoker)
MCFG_MACHINE_RESET_OVERRIDE(lvcards_state,lvpoker)
MACHINE_CONFIG_END
MACHINE_CONFIG_START(lvcards_state::ponttehk)
MACHINE_CONFIG_START(lvpoker_state::ponttehk)
lvcards(config);
// basic machine hardware
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1);
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(ponttehk_map)
MCFG_MACHINE_RESET_OVERRIDE(lvcards_state,lvpoker)
// video hardware
MCFG_DEVICE_REMOVE("palette")
@ -571,5 +572,5 @@ ROM_START( ponttehk )
ROM_END
GAME( 1985, lvcards, 0, lvcards, lvcards, lvcards_state, empty_init, ROT0, "Tehkan", "Lovely Cards", 0 )
GAME( 1985, lvpoker, lvcards, lvpoker, lvpoker, lvcards_state, empty_init, ROT0, "Tehkan", "Lovely Poker [BET]", 0 )
GAME( 1985, ponttehk, 0, ponttehk, ponttehk, lvcards_state, empty_init, ROT0, "Tehkan", "Pontoon (Tehkan)", 0 )
GAME( 1985, lvpoker, lvcards, lvpoker, lvpoker, lvpoker_state, empty_init, ROT0, "Tehkan", "Lovely Poker [BET]", 0 )
GAME( 1985, ponttehk, 0, ponttehk, ponttehk, lvpoker_state, empty_init, ROT0, "Tehkan", "Pontoon (Tehkan)", 0 )

View File

@ -434,8 +434,8 @@ void mnight_state::mnight_main_cpu(address_map &map)
map(0x8000, 0xbfff).bankr("mainbank");
map(0xc000, 0xd9ff).ram();
map(0xda00, 0xdfff).ram().share("spriteram");
map(0xe000, 0xe7ff).ram().w(FUNC(ninjakd2_state::ninjakd2_bgvideoram_w)).share("bg_videoram");
map(0xe800, 0xefff).ram().w(FUNC(ninjakd2_state::ninjakd2_fgvideoram_w)).share("fg_videoram");
map(0xe000, 0xe7ff).ram().w(FUNC(mnight_state::ninjakd2_bgvideoram_w)).share("bg_videoram");
map(0xe800, 0xefff).ram().w(FUNC(mnight_state::ninjakd2_fgvideoram_w)).share("fg_videoram");
map(0xf000, 0xf5ff).ram().w(m_palette, FUNC(palette_device::write8)).share("palette");
map(0xf800, 0xf800).portr("KEYCOIN");
map(0xf801, 0xf801).portr("PAD1");
@ -443,10 +443,10 @@ void mnight_state::mnight_main_cpu(address_map &map)
map(0xf803, 0xf803).portr("DIPSW1");
map(0xf804, 0xf804).portr("DIPSW2");
map(0xfa00, 0xfa00).w("soundlatch", FUNC(generic_latch_8_device::write));
map(0xfa01, 0xfa01).w(FUNC(ninjakd2_state::ninjakd2_soundreset_w));
map(0xfa02, 0xfa02).w(FUNC(ninjakd2_state::ninjakd2_bankselect_w));
map(0xfa03, 0xfa03).w(FUNC(ninjakd2_state::ninjakd2_sprite_overdraw_w));
map(0xfa08, 0xfa0c).w(FUNC(ninjakd2_state::ninjakd2_bg_ctrl_w));
map(0xfa01, 0xfa01).w(FUNC(mnight_state::ninjakd2_soundreset_w));
map(0xfa02, 0xfa02).w(FUNC(mnight_state::ninjakd2_bankselect_w));
map(0xfa03, 0xfa03).w(FUNC(mnight_state::ninjakd2_sprite_overdraw_w));
map(0xfa08, 0xfa0c).w(FUNC(mnight_state::ninjakd2_bg_ctrl_w));
}
@ -455,14 +455,14 @@ void robokid_state::robokid_main_cpu(address_map &map)
map(0x0000, 0x7fff).rom();
map(0x8000, 0xbfff).bankr("mainbank");
map(0xc000, 0xc7ff).ram().w(m_palette, FUNC(palette_device::write8)).share("palette");
map(0xc800, 0xcfff).ram().w(FUNC(ninjakd2_state::ninjakd2_fgvideoram_w)).share("fg_videoram");
map(0xc800, 0xcfff).ram().w(FUNC(robokid_state::ninjakd2_fgvideoram_w)).share("fg_videoram");
map(0xd000, 0xd3ff).rw(FUNC(robokid_state::robokid_bg_videoram_r<2>), FUNC(robokid_state::robokid_bg_videoram_w<2>)); // banked
map(0xd400, 0xd7ff).rw(FUNC(robokid_state::robokid_bg_videoram_r<1>), FUNC(robokid_state::robokid_bg_videoram_w<1>)); // banked
map(0xd800, 0xdbff).rw(FUNC(robokid_state::robokid_bg_videoram_r<0>), FUNC(robokid_state::robokid_bg_videoram_w<0>)); // banked
map(0xdc00, 0xdc00).portr("KEYCOIN").w("soundlatch", FUNC(generic_latch_8_device::write));
map(0xdc01, 0xdc01).portr("PAD1").w(FUNC(ninjakd2_state::ninjakd2_soundreset_w));
map(0xdc02, 0xdc02).portr("PAD2").w(FUNC(ninjakd2_state::ninjakd2_bankselect_w));
map(0xdc03, 0xdc03).portr("DIPSW1").w(FUNC(ninjakd2_state::ninjakd2_sprite_overdraw_w));
map(0xdc01, 0xdc01).portr("PAD1").w(FUNC(robokid_state::ninjakd2_soundreset_w));
map(0xdc02, 0xdc02).portr("PAD2").w(FUNC(robokid_state::ninjakd2_bankselect_w));
map(0xdc03, 0xdc03).portr("DIPSW1").w(FUNC(robokid_state::ninjakd2_sprite_overdraw_w));
map(0xdc04, 0xdc04).portr("DIPSW2");
map(0xdd00, 0xdd04).w(FUNC(robokid_state::robokid_bg_ctrl_w<0>));
map(0xdd05, 0xdd05).w(FUNC(robokid_state::robokid_bg_bank_w<0>));
@ -481,9 +481,9 @@ void omegaf_state::omegaf_main_cpu(address_map &map)
map(0x8000, 0xbfff).bankr("mainbank");
map(0xc000, 0xc000).portr("KEYCOIN").w("soundlatch", FUNC(generic_latch_8_device::write));
map(0xc001, 0xc003).r(FUNC(omegaf_state::io_protection_r));
map(0xc001, 0xc001).w(FUNC(ninjakd2_state::ninjakd2_soundreset_w));
map(0xc002, 0xc002).w(FUNC(ninjakd2_state::ninjakd2_bankselect_w));
map(0xc003, 0xc003).w(FUNC(ninjakd2_state::ninjakd2_sprite_overdraw_w));
map(0xc001, 0xc001).w(FUNC(omegaf_state::ninjakd2_soundreset_w));
map(0xc002, 0xc002).w(FUNC(omegaf_state::ninjakd2_bankselect_w));
map(0xc003, 0xc003).w(FUNC(omegaf_state::ninjakd2_sprite_overdraw_w));
map(0xc004, 0xc006).w(FUNC(omegaf_state::io_protection_w));
map(0xc100, 0xc104).w(FUNC(omegaf_state::robokid_bg_ctrl_w<0>));
map(0xc105, 0xc105).w(FUNC(omegaf_state::robokid_bg_bank_w<0>));
@ -495,7 +495,7 @@ void omegaf_state::omegaf_main_cpu(address_map &map)
map(0xc400, 0xc7ff).rw(FUNC(omegaf_state::robokid_bg_videoram_r<0>), FUNC(omegaf_state::robokid_bg_videoram_w<0>)); // banked
map(0xc800, 0xcbff).rw(FUNC(omegaf_state::robokid_bg_videoram_r<1>), FUNC(omegaf_state::robokid_bg_videoram_w<1>)); // banked
map(0xcc00, 0xcfff).rw(FUNC(omegaf_state::robokid_bg_videoram_r<2>), FUNC(omegaf_state::robokid_bg_videoram_w<2>)); // banked
map(0xd000, 0xd7ff).ram().w(FUNC(ninjakd2_state::ninjakd2_fgvideoram_w)).share("fg_videoram");
map(0xd000, 0xd7ff).ram().w(FUNC(omegaf_state::ninjakd2_fgvideoram_w)).share("fg_videoram");
map(0xd800, 0xdfff).ram().w(m_palette, FUNC(palette_device::write8)).share("palette");
map(0xe000, 0xf9ff).ram();
map(0xfa00, 0xffff).ram().share("spriteram");
@ -983,7 +983,7 @@ MACHINE_CONFIG_START(ninjakd2_state::ninjakd2_core)
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 4*8, 28*8-1)
MCFG_SCREEN_UPDATE_DRIVER(ninjakd2_state, screen_update_ninjakd2)
MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, ninjakd2_state, screen_vblank_ninjakd2))
MCFG_SCREEN_PALETTE("palette")
MCFG_SCREEN_PALETTE(m_palette)
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_ninjakd2)
MCFG_PALETTE_ADD("palette", 0x300)

View File

@ -403,6 +403,10 @@ To reset the NVRAM in Othello Derby, hold P1 Button 1 down while booting.
#define UNICODE_YEN "\xC2\xA5"
#define PWRKICK_HOPPER_PULSE 50 // time between hopper pulses in milliseconds (probably wrong)
//#define TRUXTON2_STEREO /* Uncomment to hear truxton2 music in stereo */
constexpr unsigned toaplan2_state::T2PALETTE_LENGTH;
/***************************************************************************
Initialisation handlers

View File

@ -708,8 +708,6 @@ MACHINE_CONFIG_START(twincobr_state::twincobr)
MCFG_PALETTE_ADD("palette", 1792)
MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
MCFG_VIDEO_START_OVERRIDE(twincobr_state,toaplan0)
/* sound hardware */
SPEAKER(config, "mono").front_center();

View File

@ -438,8 +438,6 @@ MACHINE_CONFIG_START(wardner_state::wardner)
MCFG_PALETTE_ADD("palette", 4096)
MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
MCFG_VIDEO_START_OVERRIDE(wardner_state,toaplan0)
/* sound hardware */
SPEAKER(config, "mono").front_center();

View File

@ -105,7 +105,7 @@ Stephh's notes (based on the games M68000 code and some tests) :
***************************************************************************/
WRITE8_MEMBER(yunsun16_state::sound_bank_w)
WRITE8_MEMBER(shocking_state::sound_bank_w)
{
m_okibank->set_entry(data & 3);
}
@ -132,7 +132,6 @@ void yunsun16_state::main_map(address_map &map)
map(0x80010c, 0x80010f).ram().share("scrollram_1"); // Scrolling
map(0x800114, 0x800117).ram().share("scrollram_0"); // Scrolling
map(0x800154, 0x800155).ram().share("priorityram"); // Priority
map(0x800181, 0x800181).w(FUNC(yunsun16_state::sound_bank_w)); // Sound
map(0x800189, 0x800189).rw("oki", FUNC(okim6295_device::read), FUNC(okim6295_device::write)); // Sound
map(0x8001fe, 0x8001ff).nopw(); // ? 0 (during int)
map(0x900000, 0x903fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); // Palette
@ -142,28 +141,29 @@ void yunsun16_state::main_map(address_map &map)
map(0xff0000, 0xffffff).ram();
}
WRITE16_MEMBER(yunsun16_state::magicbub_sound_command_w)
void magicbub_state::main_map(address_map &map)
{
if (ACCESSING_BITS_0_7)
{
/*
HACK: the game continuously sends this. It'll play the oki sample
number 0 on each voice. That sample is 00000-00000.
*/
yunsun16_state::main_map(map);
map(0x800189, 0x800189).w(FUNC(magicbub_state::magicbub_sound_command_w));
}
void shocking_state::main_map(address_map &map)
{
yunsun16_state::main_map(map);
map(0x800181, 0x800181).w(FUNC(shocking_state::sound_bank_w)); // Sound
}
WRITE8_MEMBER(magicbub_state::magicbub_sound_command_w)
{
// HACK: the game continuously sends this. It'll play the oki sample number 0 on each voice. That sample is 00000-00000.
if ((data & 0xff) != 0x3a)
{
m_soundlatch->write(space, 0, data & 0xff);
m_audiocpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero);
}
}
}
void yunsun16_state::init_magicbub()
{
m_maincpu->space(AS_PROGRAM).unmap_write(0x800180, 0x800181);
m_maincpu->space(AS_PROGRAM).install_write_handler(0x800188, 0x800189, write16_delegate(FUNC(yunsun16_state::magicbub_sound_command_w), this));
}
/***************************************************************************
@ -173,13 +173,13 @@ void yunsun16_state::init_magicbub()
***************************************************************************/
void yunsun16_state::sound_map(address_map &map)
void magicbub_state::sound_map(address_map &map)
{
map(0x0000, 0xdfff).rom();
map(0xe000, 0xe7ff).ram();
}
void yunsun16_state::sound_port_map(address_map &map)
void magicbub_state::sound_port_map(address_map &map)
{
map.global_mask(0xff);
map(0x10, 0x11).rw("ymsnd", FUNC(ym3812_device::read), FUNC(ym3812_device::write));
@ -187,11 +187,11 @@ void yunsun16_state::sound_port_map(address_map &map)
map(0x1c, 0x1c).rw("oki", FUNC(okim6295_device::read), FUNC(okim6295_device::write)); // M6295
}
void yunsun16_state::oki_map(address_map &map)
void shocking_state::oki_map(address_map &map)
{
map(0x00000, 0x1ffff).rom();
map(0x20000, 0x3ffff).bankr("okibank");
}
}
/***************************************************************************
@ -572,32 +572,36 @@ void yunsun16_state::machine_start()
{
save_item(NAME(m_sprites_scrolldx));
save_item(NAME(m_sprites_scrolldy));
if (m_okibank)
{
m_okibank->configure_entries(0, 0x80000 / 0x20000, memregion("oki")->base(), 0x20000);
}
}
void yunsun16_state::machine_reset()
{
m_sprites_scrolldx = -0x40;
m_sprites_scrolldy = -0x0f;
if (m_okibank)
{
}
void shocking_state::machine_start()
{
yunsun16_state::machine_start();
m_okibank->configure_entries(0, 0x80000 / 0x20000, memregion("oki")->base(), 0x20000);
}
void shocking_state::machine_reset()
{
yunsun16_state::machine_reset();
m_okibank->set_entry(0);
}
}
/***************************************************************************
Magic Bubble
***************************************************************************/
MACHINE_CONFIG_START(yunsun16_state::magicbub)
MACHINE_CONFIG_START(magicbub_state::magicbub)
/* basic machine hardware */
MCFG_DEVICE_ADD("maincpu", M68000, XTAL(16'000'000))
MCFG_DEVICE_PROGRAM_MAP(main_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", yunsun16_state, irq2_line_hold)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", magicbub_state, irq2_line_hold)
MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(16'000'000)/4)
MCFG_DEVICE_PROGRAM_MAP(sound_map)
@ -606,7 +610,7 @@ MACHINE_CONFIG_START(yunsun16_state::magicbub)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_RAW_PARAMS(XTAL(16'000'000)/2, 512, 0x20, 0x180-0x20, 260, 0, 0xe0) /* TODO: completely inaccurate */
MCFG_SCREEN_UPDATE_DRIVER(yunsun16_state, screen_update)
MCFG_SCREEN_UPDATE_DRIVER(magicbub_state, screen_update)
MCFG_SCREEN_PALETTE("palette")
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_yunsun16)
@ -634,17 +638,17 @@ MACHINE_CONFIG_END
Shocking
***************************************************************************/
MACHINE_CONFIG_START(yunsun16_state::shocking)
MACHINE_CONFIG_START(shocking_state::shocking)
/* basic machine hardware */
MCFG_DEVICE_ADD("maincpu", M68000, XTAL(16'000'000))
MCFG_DEVICE_PROGRAM_MAP(main_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", yunsun16_state, irq2_line_hold)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", shocking_state, irq2_line_hold)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_RAW_PARAMS(XTAL(16'000'000)/2, 512, 0, 0x180-4, 260, 0, 0xe0) /* TODO: completely inaccurate */
MCFG_SCREEN_UPDATE_DRIVER(yunsun16_state, screen_update)
MCFG_SCREEN_UPDATE_DRIVER(shocking_state, screen_update)
MCFG_SCREEN_PALETTE("palette")
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_yunsun16)
@ -1021,12 +1025,12 @@ ROM_END
***************************************************************************/
GAME( 199?, magicbub, 0, magicbub, magicbub, yunsun16_state, init_magicbub, ROT0, "Yun Sung", "Magic Bubble", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
GAME( 199?, magicbuba, magicbub, magicbub, magicbua, yunsun16_state, init_magicbub, ROT0, "Yun Sung", "Magic Bubble (Adult version, YS-1302 PCB)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
GAME( 199?, magicbubb, magicbub, shocking, magicbua, yunsun16_state, empty_init, ROT0, "Yun Sung", "Magic Bubble (Adult version, YS-0211 PCB)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
GAME( 1996, paprazzi, 0, shocking, paprazzi, yunsun16_state, empty_init, ROT270, "Yun Sung", "Paparazzi", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
GAME( 1997, shocking, 0, shocking, shocking, yunsun16_state, empty_init, ROT0, "Yun Sung", "Shocking", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
GAME( 1997, shockingk, shocking, shocking, shocking, yunsun16_state, empty_init, ROT0, "Yun Sung", "Shocking (Korea, set 1)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
GAME( 1997, shockingko, shocking, shocking, shocking, yunsun16_state, empty_init, ROT0, "Yun Sung", "Shocking (Korea, set 2)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
GAME( 1998, bombkick, 0, shocking, bombkick, yunsun16_state, empty_init, ROT0, "Yun Sung", "Bomb Kick (set 1)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
GAME( 1998, bombkicka, bombkick, shocking, bombkick, yunsun16_state, empty_init, ROT0, "Yun Sung", "Bomb Kick (set 2)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
GAME( 199?, magicbub, 0, magicbub, magicbub, magicbub_state, empty_init, ROT0, "Yun Sung", "Magic Bubble", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
GAME( 199?, magicbuba, magicbub, magicbub, magicbua, magicbub_state, empty_init, ROT0, "Yun Sung", "Magic Bubble (Adult version, YS-1302 PCB)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
GAME( 199?, magicbubb, magicbub, shocking, magicbua, shocking_state, empty_init, ROT0, "Yun Sung", "Magic Bubble (Adult version, YS-0211 PCB)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
GAME( 1996, paprazzi, 0, shocking, paprazzi, shocking_state, empty_init, ROT270, "Yun Sung", "Paparazzi", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
GAME( 1997, shocking, 0, shocking, shocking, shocking_state, empty_init, ROT0, "Yun Sung", "Shocking", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
GAME( 1997, shockingk, shocking, shocking, shocking, shocking_state, empty_init, ROT0, "Yun Sung", "Shocking (Korea, set 1)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
GAME( 1997, shockingko, shocking, shocking, shocking, shocking_state, empty_init, ROT0, "Yun Sung", "Shocking (Korea, set 2)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
GAME( 1998, bombkick, 0, shocking, bombkick, shocking_state, empty_init, ROT0, "Yun Sung", "Bomb Kick (set 1)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
GAME( 1998, bombkicka, bombkick, shocking, bombkick, shocking_state, empty_init, ROT0, "Yun Sung", "Bomb Kick (set 2)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )

View File

@ -26,7 +26,6 @@ public:
m_spriteram(*this, "spriteram")
{ }
void bagman_base(machine_config &config);
void botanic(machine_config &config);
void sbagman(machine_config &config);
void bagman(machine_config &config);
@ -63,6 +62,7 @@ protected:
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
void update_pal();
void bagman_base(machine_config &config);
void main_map(address_map &map);
void main_portmap(address_map &map);
void pickin_map(address_map &map);

View File

@ -27,6 +27,14 @@ public:
m_soundlatch(*this, "soundlatch")
{ }
void bombjack(machine_config &config);
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
private:
DECLARE_READ8_MEMBER(soundlatch_read_and_clear);
DECLARE_WRITE8_MEMBER(irq_mask_w);
DECLARE_WRITE8_MEMBER(bombjack_videoram_w);
@ -35,19 +43,15 @@ public:
DECLARE_WRITE8_MEMBER(bombjack_flipscreen_w);
TILE_GET_INFO_MEMBER(get_bg_tile_info);
TILE_GET_INFO_MEMBER(get_fg_tile_info);
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
uint32_t screen_update_bombjack(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
DECLARE_WRITE_LINE_MEMBER(vblank_irq);
TIMER_CALLBACK_MEMBER(soundlatch_callback);
void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
void bombjack(machine_config &config);
void audio_io_map(address_map &map);
void audio_map(address_map &map);
void main_map(address_map &map);
private:
/* memory pointers */
required_shared_ptr<uint8_t> m_videoram;
required_shared_ptr<uint8_t> m_colorram;

View File

@ -31,10 +31,18 @@ public:
{
}
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
void cheekyms(machine_config &config);
protected:
virtual void machine_start() override;
virtual void video_start() override;
private:
DECLARE_WRITE8_MEMBER(port_40_w);
DECLARE_WRITE8_MEMBER(port_80_w);
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
INTERRUPT_GEN_MEMBER(vblank_irq);
TILE_GET_INFO_MEMBER(get_tile_info);
@ -42,17 +50,11 @@ public:
DECLARE_PALETTE_INIT(cheekyms);
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void cheekyms(machine_config &config);
void io_map(address_map &map);
void main_map(address_map &map);
protected:
virtual void machine_start() override;
virtual void video_start() override;
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, gfx_element *gfx, int flip);
private:
void io_map(address_map &map);
void main_map(address_map &map);
// devices
required_device<cpu_device> m_maincpu;
required_device<cheekyms_audio_device> m_sound_board;

View File

@ -5,6 +5,10 @@
Cosmic Guerilla & other Universal boards (in cosmic.c)
*************************************************************************/
#ifndef MAME_INCLUDES_COSMIC_H
#define MAME_INCLUDES_COSMIC_H
#pragma once
#include "machine/timer.h"
#include "sound/samples.h"
@ -19,8 +23,8 @@
class cosmic_state : public driver_device
{
public:
cosmic_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
cosmic_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_videoram(*this, "videoram"),
m_spriteram(*this, "spriteram"),
m_in_ports(*this, "IN%u", 0),
@ -30,7 +34,8 @@ public:
m_dac(*this, "dac"),
m_gfxdecode(*this, "gfxdecode"),
m_screen(*this, "screen"),
m_palette(*this, "palette") { }
m_palette(*this, "palette")
{ }
/* memory pointers */
required_shared_ptr<uint8_t> m_videoram;
@ -122,3 +127,5 @@ public:
void magspot_map(address_map &map);
void panic_map(address_map &map);
};
#endif // MAME_INCLUDES_COSMIC_H

View File

@ -37,6 +37,11 @@ public:
void idsoccer(machine_config &config);
void docastle(machine_config &config);
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
private:
/* devices */
required_device<cpu_device> m_maincpu;
@ -78,9 +83,6 @@ private:
DECLARE_READ8_MEMBER(idsoccer_adpcm_status_r);
DECLARE_WRITE8_MEMBER(idsoccer_adpcm_w);
TILE_GET_INFO_MEMBER(get_tile_info);
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
DECLARE_PALETTE_INIT(docastle);
DECLARE_VIDEO_START(dorunrun);
uint32_t screen_update_docastle(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);

View File

@ -1,5 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:David Haywood
#ifndef MAME_INCLUDES_DRGNMST_H
#define MAME_INCLUDES_DRGNMST_H
#pragma once
#include "cpu/pic16c5x/pic16c5x.h"
#include "sound/okim6295.h"
@ -22,12 +26,18 @@ public:
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette") { }
m_palette(*this, "palette")
{ }
void drgnmst(machine_config &config);
void init_drgnmst();
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
private:
/* memory pointers */
required_shared_ptr<uint16_t> m_vidregs;
@ -74,9 +84,6 @@ private:
TILEMAP_MAPPER_MEMBER(md_tilemap_scan_cols);
TILEMAP_MAPPER_MEMBER(bg_tilemap_scan_cols);
DECLARE_PALETTE_DECODER(drgnmst_IIIIRRRRGGGGBBBB);
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void draw_sprites( bitmap_ind16 &bitmap,const rectangle &cliprect );
uint8_t drgnmst_asciitohex( uint8_t data );
@ -87,3 +94,5 @@ private:
void drgnmst_main_map(address_map &map);
void drgnmst_oki1_map(address_map &map);
};
#endif // MAME_INCLUDES_DRGNMST_H

View File

@ -1,5 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:Takahiro Nogi, Uki
#ifndef MAME_INCLUDES_FROMANC2_H
#define MAME_INCLUDES_FROMANC2_H
#pragma once
#include "machine/gen_latch.h"
#include "machine/eepromser.h"
@ -20,7 +24,8 @@ public:
m_rpalette(*this, "rpalette"),
m_soundlatch(*this, "soundlatch"),
m_soundlatch2(*this, "soundlatch2"),
m_uart(*this, "uart") { }
m_uart(*this, "uart")
{ }
void fromanc2(machine_config &config);
void fromancr(machine_config &config);
@ -122,3 +127,5 @@ private:
void fromanc4_main_map(address_map &map);
void fromancr_main_map(address_map &map);
};
#endif // MAME_INCLUDES_FROMANC2_H

View File

@ -8,6 +8,10 @@
and Bryan McPhail, Nicola Salmoria, Aaron Giles
***************************************************************************/
#ifndef MAME_INCLUDES_FROMANCE_H
#define MAME_INCLUDES_FROMANCE_H
#pragma once
#include "machine/gen_latch.h"
#include "sound/msm5205.h"
@ -19,8 +23,8 @@
class fromance_state : public driver_device
{
public:
fromance_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
fromance_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_subcpu(*this, "sub"),
m_spriteram(*this, "spriteram"),
@ -76,6 +80,10 @@ private:
/* memory pointers (used by pipedrm) */
optional_shared_ptr<uint8_t> m_videoram;
optional_device<generic_latch_8_device> m_sublatch;
optional_device<msm5205_device> m_msm;
required_device<screen_device> m_screen;
/* video-related */
tilemap_t *m_bg_tilemap;
tilemap_t *m_fg_tilemap;
@ -110,13 +118,10 @@ private:
DECLARE_VIDEO_START(nekkyoku);
DECLARE_VIDEO_START(fromance);
TIMER_CALLBACK_MEMBER(crtc_interrupt_gen);
inline void get_fromance_tile_info( tile_data &tileinfo, int tile_index, int layer );
inline void get_nekkyoku_tile_info( tile_data &tileinfo, int tile_index, int layer );
inline void get_fromance_tile_info(tile_data &tileinfo, int tile_index, int layer);
inline void get_nekkyoku_tile_info(tile_data &tileinfo, int tile_index, int layer);
void crtc_refresh();
DECLARE_WRITE_LINE_MEMBER(fromance_adpcm_int);
optional_device<generic_latch_8_device> m_sublatch;
optional_device<msm5205_device> m_msm;
required_device<screen_device> m_screen;
void fromance_main_map(address_map &map);
void fromance_sub_io_map(address_map &map);
void fromance_sub_map(address_map &map);
@ -125,3 +130,5 @@ private:
void nekkyoku_sub_io_map(address_map &map);
void nekkyoku_sub_map(address_map &map);
};
#endif // MAME_INCLUDES_FROMANCE_H

View File

@ -52,6 +52,10 @@ public:
void init_shadoww();
void init_wildfang();
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
private:
/* memory pointers */
required_shared_ptr_array<uint16_t, 3> m_videoram;
@ -146,9 +150,6 @@ private:
void mastninj_map(address_map &map);
void mastninj_sound_map(address_map &map);
void sound_map(address_map &map);
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
};
#endif // MAME_INCLUDES_GAIDEN_H

View File

@ -1,9 +1,10 @@
// license:BSD-3-Clause
// copyright-holders:Farfetch'd, David Haywood
#ifndef MAME_INCLUDES_GSTRIKER_H
#define MAME_INCLUDES_GSTRIKER_H
#pragma once
#include "machine/6850acia.h"
#include "machine/gen_latch.h"
#include "machine/mb3773.h"
@ -18,8 +19,8 @@
class gstriker_state : public driver_device
{
public:
gstriker_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
gstriker_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
m_spr(*this, "vsystem_spr"),
@ -46,6 +47,10 @@ public:
void init_twcup94a();
void init_twcup94b();
protected:
virtual void machine_start() override;
virtual void video_start() override;
private:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
@ -84,9 +89,6 @@ private:
DECLARE_READ16_MEMBER(vbl_toggle_r);
DECLARE_WRITE16_MEMBER(vbl_toggle_w);
virtual void machine_start() override;
virtual void video_start() override;
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
DECLARE_WRITE_LINE_MEMBER(screen_vblank);
@ -97,4 +99,4 @@ private:
void twcup94_map(address_map &map);
};
#endif
#endif // MAME_INCLUDES_GSTRIKER_H

View File

@ -19,7 +19,11 @@ class ladybug_base_state : public driver_device
protected:
using driver_device::driver_device;
void palette_init_common(palette_device &palette, const uint8_t *color_prom, int r_bit0, int r_bit1, int g_bit0, int g_bit1, int b_bit0, int b_bit1);
void palette_init_common(
palette_device &palette, const uint8_t *color_prom,
int r_bit0, int r_bit1,
int g_bit0, int g_bit1,
int b_bit0, int b_bit1) const;
};

View File

@ -5,6 +5,10 @@
Laser Battle / Lazarian - Cat and Mouse
*************************************************************************/
#ifndef MAME_INCLUDES_LASERBAT_H
#define MAME_INCLUDES_LASERBAT_H
#pragma once
#include "audio/zaccaria.h"
@ -23,7 +27,6 @@
class laserbat_state_base : public driver_device
{
public:
laserbat_state_base(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
, m_mux_ports(*this, {"ROW0", "ROW1", "SW1", "SW2"})
@ -164,7 +167,6 @@ public:
void laserbat(machine_config &config);
protected:
// initialisation/startup
virtual void machine_start() override;
@ -206,3 +208,5 @@ protected:
required_device<zac1b11107_audio_device> m_audiopcb;
};
#endif // MAME_INCLUDES_LASERBAT_H

View File

@ -1,5 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:Roberto Fresca
#ifndef MAME_INCLUDES_LUCKY74_H
#define MAME_INCLUDES_LUCKY74_H
#pragma once
#include "sound/msm5205.h"
#include "emupal.h"
@ -21,6 +25,12 @@ public:
void lucky74(machine_config &config);
protected:
virtual void machine_start() override { m_lamps.resolve(); }
virtual void video_start() override;
virtual void machine_reset() override;
virtual void sound_start() override;
private:
DECLARE_READ8_MEMBER(custom_09R81P_port_r);
DECLARE_WRITE8_MEMBER(custom_09R81P_port_w);
@ -44,11 +54,6 @@ private:
void lucky74_map(address_map &map);
void lucky74_portmap(address_map &map);
virtual void machine_start() override { m_lamps.resolve(); }
virtual void video_start() override;
virtual void machine_reset() override;
virtual void sound_start() override;
uint8_t m_ym2149_portb;
uint8_t m_usart_8251;
uint8_t m_copro_sm7831;
@ -68,3 +73,5 @@ private:
required_device<gfxdecode_device> m_gfxdecode;
output_finder<12> m_lamps;
};
#endif // MAME_INCLUDES_LUCKY74_H

View File

@ -18,34 +18,51 @@ public:
m_gfxdecode(*this, "gfxdecode")
{ }
void lvpoker(machine_config &config);
void lvcards(machine_config &config);
void ponttehk(machine_config &config);
protected:
virtual void video_start() override;
DECLARE_WRITE8_MEMBER(videoram_w);
DECLARE_WRITE8_MEMBER(colorram_w);
private:
uint8_t m_payout;
uint8_t m_pulse;
uint8_t m_result;
required_shared_ptr<uint8_t> m_videoram;
required_shared_ptr<uint8_t> m_colorram;
tilemap_t *m_bg_tilemap;
DECLARE_WRITE8_MEMBER(control_port_2_w);
DECLARE_WRITE8_MEMBER(control_port_2a_w);
DECLARE_READ8_MEMBER(payout_r);
DECLARE_WRITE8_MEMBER(lvcards_videoram_w);
DECLARE_WRITE8_MEMBER(lvcards_colorram_w);
TILE_GET_INFO_MEMBER(get_bg_tile_info);
virtual void video_start() override;
DECLARE_PALETTE_INIT(lvcards);
DECLARE_MACHINE_START(lvpoker);
DECLARE_MACHINE_RESET(lvpoker);
uint32_t screen_update_lvcards(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
required_device<cpu_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode;
void lvcards_io_map(address_map &map);
void lvcards_map(address_map &map);
};
class lvpoker_state : public lvcards_state
{
public:
using lvcards_state::lvcards_state;
void lvpoker(machine_config &config);
void ponttehk(machine_config &config);
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
private:
DECLARE_WRITE8_MEMBER(control_port_2_w);
DECLARE_WRITE8_MEMBER(control_port_2a_w);
DECLARE_READ8_MEMBER(payout_r);
void lvpoker_map(address_map &map);
void ponttehk_map(address_map &map);
uint8_t m_payout;
uint8_t m_pulse;
uint8_t m_result;
};
#endif // MAME_INCLUDES_LVCARDS_H

View File

@ -5,14 +5,18 @@
Mouser
*************************************************************************/
#ifndef MAME_INCLUDES_MOUSER_H
#define MAME_INCLUDES_MOUSER_H
#pragma once
#include "emupal.h"
class mouser_state : public driver_device
{
public:
mouser_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
mouser_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_videoram(*this, "videoram"),
m_colorram(*this, "colorram"),
m_spriteram(*this, "spriteram"),
@ -20,12 +24,17 @@ public:
m_audiocpu(*this, "audiocpu"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette"),
m_decrypted_opcodes(*this, "decrypted_opcodes") { }
m_decrypted_opcodes(*this, "decrypted_opcodes")
{ }
void mouser(machine_config &config);
void init_mouser();
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
private:
/* memory pointers */
required_shared_ptr<uint8_t> m_videoram;
@ -46,8 +55,6 @@ private:
DECLARE_WRITE8_MEMBER(mouser_sound_nmi_clear_w);
DECLARE_WRITE_LINE_MEMBER(flip_screen_x_w);
DECLARE_WRITE_LINE_MEMBER(flip_screen_y_w);
virtual void machine_start() override;
virtual void machine_reset() override;
DECLARE_PALETTE_INIT(mouser);
uint32_t screen_update_mouser(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
DECLARE_WRITE_LINE_MEMBER(mouser_nmi_interrupt);
@ -57,3 +64,5 @@ private:
void mouser_sound_io_map(address_map &map);
void mouser_sound_map(address_map &map);
};
#endif // MAME_INCLUDES_MOUSER_H

View File

@ -5,34 +5,47 @@
Mr. Do
*************************************************************************/
#ifndef MAME_INCLUDES_MRDO_H
#define MAME_INCLUDES_MRDO_H
#pragma once
#include "emupal.h"
class mrdo_state : public driver_device
{
public:
mrdo_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
mrdo_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_bgvideoram(*this, "bgvideoram"),
m_fgvideoram(*this, "fgvideoram"),
m_spriteram(*this, "spriteram"),
m_maincpu(*this, "maincpu"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette") { }
m_palette(*this, "palette")
{ }
void mrlo(machine_config &config);
void mrdo(machine_config &config);
void mrlo(machine_config &config);
protected:
virtual void video_start() override;
private:
/* memory pointers */
// memory pointers
required_shared_ptr<uint8_t> m_bgvideoram;
required_shared_ptr<uint8_t> m_fgvideoram;
required_shared_ptr<uint8_t> m_spriteram;
/* video-related */
required_device<cpu_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
// video-related
tilemap_t *m_bg_tilemap;
tilemap_t *m_fg_tilemap;
int m_flipscreen;
DECLARE_READ8_MEMBER(mrdo_SECRE_r);
DECLARE_WRITE8_MEMBER(mrdo_bgvideoram_w);
DECLARE_WRITE8_MEMBER(mrdo_fgvideoram_w);
@ -41,12 +54,10 @@ private:
DECLARE_WRITE8_MEMBER(mrdo_flipscreen_w);
TILE_GET_INFO_MEMBER(get_bg_tile_info);
TILE_GET_INFO_MEMBER(get_fg_tile_info);
virtual void video_start() override;
DECLARE_PALETTE_INIT(mrdo);
uint32_t screen_update_mrdo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void draw_sprites( bitmap_ind16 &bitmap,const rectangle &cliprect );
required_device<cpu_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
void main_map(address_map &map);
};
#endif // MAME_INCLUDES_MRDO_H

View File

@ -5,10 +5,11 @@
UPL "sprite framebuffer" hardware
******************************************************************************/
#ifndef MAME_INCLUDES_NINJAKD2_H
#define MAME_INCLUDES_NINJAKD2_H
#pragma once
#include "sound/samples.h"
#include "emupal.h"
#include "screen.h"
@ -34,11 +35,11 @@ public:
void ninjakd2b(machine_config &config);
void ninjakd2(machine_config &config);
void ninjakd2_core(machine_config &config);
void init_ninjakd2();
void init_bootleg();
protected:
DECLARE_WRITE8_MEMBER(ninjakd2_bgvideoram_w);
DECLARE_WRITE8_MEMBER(ninjakd2_fgvideoram_w);
DECLARE_WRITE8_MEMBER(ninjakd2_bg_ctrl_w);
@ -47,7 +48,6 @@ public:
DECLARE_WRITE8_MEMBER(ninjakd2_bankselect_w);
DECLARE_WRITE8_MEMBER(ninjakd2_soundreset_w);
protected:
required_device<cpu_device> m_maincpu;
required_device<palette_device> m_palette;
optional_shared_ptr<uint8_t> m_bg_videoram;
@ -81,6 +81,8 @@ protected:
virtual void machine_reset() override;
virtual void video_start() override;
void ninjakd2_core(machine_config &config);
private:
required_device<cpu_device> m_soundcpu;
optional_device<samples_device> m_pcm;
@ -134,7 +136,6 @@ public:
{ }
void robokid(machine_config &config);
void robokid_main_cpu(address_map &map);
void init_robokid();
void init_robokidj();
@ -150,6 +151,8 @@ protected:
TILEMAP_MAPPER_MEMBER(robokid_bg_scan);
template<int Layer> TILE_GET_INFO_MEMBER(robokid_get_bg_tile_info);
void robokid_main_cpu(address_map &map);
private:
DECLARE_READ8_MEMBER(motion_error_verbose_r);
@ -198,4 +201,4 @@ private:
int m_io_protection_tick;
};
#endif
#endif // MAME_INCLUDES_NINJAKD2_H

View File

@ -5,6 +5,11 @@
Ojanko High School & other Video System mahjong series
*************************************************************************/
#ifndef MAME_INCLUDES_OJANKOHS_H
#define MAME_INCLUDES_OJANKOHS_H
#pragma once
#include "sound/msm5205.h"
#include "emupal.h"
#include "screen.h"
@ -36,6 +41,9 @@ public:
void ojankoc(machine_config &config);
void ojankoy(machine_config &config);
protected:
virtual void machine_reset() override;
private:
/* memory pointers */
optional_shared_ptr<uint8_t> m_videoram;
@ -100,7 +108,6 @@ private:
DECLARE_READ8_MEMBER(ojankohs_dipsw2_r);
TILE_GET_INFO_MEMBER(ojankohs_get_tile_info);
TILE_GET_INFO_MEMBER(ojankoy_get_tile_info);
virtual void machine_reset() override;
DECLARE_MACHINE_START(ojankohs);
DECLARE_VIDEO_START(ojankohs);
DECLARE_MACHINE_START(ojankoy);
@ -123,3 +130,5 @@ private:
void ojankoy_io_map(address_map &map);
void ojankoy_map(address_map &map);
};
#endif // MAME_INCLUDES_OJANKOHS_H

View File

@ -1,5 +1,10 @@
// license:BSD-3-Clause
// copyright-holders:Luca Elia
#ifndef MAME_INCLUDES_PARADISE_H
#define MAME_INCLUDES_PARADISE_H
#pragma once
#include "sound/okim6295.h"
#include "emupal.h"
#include "screen.h"
@ -7,8 +12,8 @@
class paradise_state : public driver_device
{
public:
paradise_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
paradise_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_oki2(*this, "oki2"),
m_gfxdecode(*this, "gfxdecode"),
@ -19,8 +24,26 @@ public:
m_vram_2(*this, "vram_2"),
m_videoram(*this, "videoram"),
m_paletteram(*this, "paletteram"),
m_spriteram(*this, "spriteram") { }
m_spriteram(*this, "spriteram")
{ }
void penkyi(machine_config &config);
void tgtball(machine_config &config);
void paradise(machine_config &config);
void madball(machine_config &config);
void torus(machine_config &config);
void penky(machine_config &config);
void init_torus();
void init_paradise();
void init_tgtball();
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
private:
/* devices */
required_device<cpu_device> m_maincpu;
optional_device<okim6295_device> m_oki2;
@ -68,18 +91,10 @@ public:
// tgtball specific
DECLARE_WRITE8_MEMBER(tgtball_flipscreen_w);
void init_torus();
void init_paradise();
void init_tgtball();
TILE_GET_INFO_MEMBER(get_tile_info_0);
TILE_GET_INFO_MEMBER(get_tile_info_1);
TILE_GET_INFO_MEMBER(get_tile_info_2);
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
uint32_t screen_update_paradise(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
uint32_t screen_update_torus(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
uint32_t screen_update_madball(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@ -88,12 +103,6 @@ public:
void update_pix_palbank();
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
void penkyi(machine_config &config);
void tgtball(machine_config &config);
void paradise(machine_config &config);
void madball(machine_config &config);
void torus(machine_config &config);
void penky(machine_config &config);
void base_map(address_map &map);
void paradise_io_map(address_map &map);
void paradise_map(address_map &map);
@ -101,3 +110,5 @@ public:
void torus_io_map(address_map &map);
void torus_map(address_map &map);
};
#endif // MAME_INCLUDES_PARADISE_H

View File

@ -5,6 +5,10 @@
Pinball Action
*************************************************************************/
#ifndef MAME_INCLUDES_PBACTION_H
#define MAME_INCLUDES_PBACTION_H
#pragma once
#include "cpu/z80/z80.h"
#include "machine/gen_latch.h"
@ -14,8 +18,8 @@
class pbaction_state : public driver_device
{
public:
pbaction_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
pbaction_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_videoram(*this, "videoram"),
m_videoram2(*this, "videoram2"),
m_colorram(*this, "colorram"),
@ -28,7 +32,8 @@ public:
m_palette(*this, "palette"),
m_soundlatch(*this, "soundlatch"),
m_ctc(*this, "ctc"),
m_decrypted_opcodes(*this, "decrypted_opcodes") { }
m_decrypted_opcodes(*this, "decrypted_opcodes")
{ }
/* memory pointers */
required_shared_ptr<uint8_t> m_videoram;
@ -128,3 +133,5 @@ private:
uint8_t m_outlatch;
uint32_t m_outdata;
};
#endif // MAME_INCLUDES_PBACTION_H

View File

@ -36,6 +36,11 @@ public:
DECLARE_INPUT_CHANGED_MEMBER(left_coin_inserted);
DECLARE_INPUT_CHANGED_MEMBER(right_coin_inserted);
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
private:
DECLARE_WRITE_LINE_MEMBER(screen_vblank_redclash);
DECLARE_WRITE8_MEMBER(redclash_videoram_w);
@ -47,9 +52,6 @@ private:
DECLARE_PALETTE_INIT(redclash);
TILE_GET_INFO_MEMBER(get_fg_tile_info);
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
uint32_t screen_update_redclash(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void redclash_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
void redclash_draw_bullets(bitmap_ind16 &bitmap, const rectangle &cliprect);

View File

@ -38,6 +38,10 @@ public:
DECLARE_CUSTOM_INPUT_MEMBER(hi_bits_r);
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
private:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
@ -72,8 +76,6 @@ private:
DECLARE_WRITE8_MEMBER(upd_data_w);
TILE_GET_INFO_MEMBER(get_bg0_tile_info);
TILE_GET_INFO_MEMBER(get_bg1_tile_info);
virtual void machine_start() override;
virtual void machine_reset() override;
DECLARE_VIDEO_START(rpunch);
DECLARE_VIDEO_START(svolley);

View File

@ -50,6 +50,11 @@ public:
void init_starfore();
void init_starforc();
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
private:
/* devices */
required_device<cpu_device> m_maincpu;
@ -113,9 +118,6 @@ private:
TILE_GET_INFO_MEMBER(get_bg2_tile_info);
TILE_GET_INFO_MEMBER(get_bg3_tile_info);
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
void draw_bgbitmap(bitmap_rgb32 &bitmap, const rectangle &cliprect);
void draw_radar(bitmap_rgb32 &bitmap, const rectangle &cliprect);

View File

@ -1,13 +1,18 @@
// license:BSD-3-Clause
// copyright-holders:David Haywood, R. Belmont
#ifndef MAME_INCLUDES_SILKROAD_H
#define MAME_INCLUDES_SILKROAD_H
#pragma once
#include "sound/okim6295.h"
#include "emupal.h"
class silkroad_state : public driver_device
{
public:
silkroad_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
silkroad_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette"),
@ -19,6 +24,10 @@ public:
void silkroad(machine_config &config);
protected:
virtual void machine_start() override;
virtual void video_start() override;
private:
required_device<cpu_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode;
@ -38,11 +47,10 @@ private:
template<int Layer> TILE_GET_INFO_MEMBER(get_tile_info);
virtual void machine_start() override;
virtual void video_start() override;
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void cpu_map(address_map &map);
void oki_map(address_map &map);
};
#endif // MAME_INCLUDES_SILKROAD_H

View File

@ -1,5 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:David Haywood, Mike Coates
#ifndef MAME_INCLUDES_SNOWBROS_H
#define MAME_INCLUDES_SNOWBROS_H
#pragma once
#include "machine/gen_latch.h"
#include "machine/timer.h"
@ -108,3 +112,5 @@ private:
void wintbob_map(address_map &map);
void yutnori_map(address_map &map);
};
#endif // MAME_INCLUDES_SNOWBROS_H

View File

@ -1,5 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:Mirko Buffoni
#ifndef MAME_INCLUDES_SOLOMON_H
#define MAME_INCLUDES_SOLOMON_H
#pragma once
#include "machine/gen_latch.h"
#include "emupal.h"
@ -7,8 +11,8 @@
class solomon_state : public driver_device
{
public:
solomon_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
solomon_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_spriteram(*this, "spriteram"),
m_videoram(*this, "videoram"),
m_colorram(*this, "colorram"),
@ -18,10 +22,14 @@ public:
m_audiocpu(*this, "audiocpu"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette"),
m_soundlatch(*this, "soundlatch") { }
m_soundlatch(*this, "soundlatch")
{ }
void solomon(machine_config &config);
protected:
virtual void video_start() override;
private:
required_shared_ptr<uint8_t> m_spriteram;
required_shared_ptr<uint8_t> m_videoram;
@ -43,10 +51,9 @@ private:
DECLARE_WRITE8_MEMBER(solomon_flipscreen_w);
TILE_GET_INFO_MEMBER(get_bg_tile_info);
TILE_GET_INFO_MEMBER(get_fg_tile_info);
virtual void video_start() override;
uint32_t screen_update_solomon(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(vblank_irq);
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect );
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
required_device<gfxdecode_device> m_gfxdecode;
@ -57,3 +64,5 @@ private:
void sound_map(address_map &map);
void sound_portmap(address_map &map);
};
#endif // MAME_INCLUDES_SOLOMON_H

View File

@ -1,5 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:David Haywood
#ifndef MAME_INCLUDES_SPBACTN_H
#define MAME_INCLUDES_SPBACTN_H
#pragma once
#include "machine/gen_latch.h"
#include "video/tecmo_spr.h"
@ -10,8 +14,8 @@
class spbactn_state : public driver_device
{
public:
spbactn_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
spbactn_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
m_gfxdecode(*this, "gfxdecode"),
@ -92,3 +96,5 @@ private:
void spbactnp_extra_map(address_map &map);
void spbactnp_map(address_map &map);
};
#endif // MAME_INCLUDES_SPBACTN_H

View File

@ -1,5 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:Zsolt Vasvari
#ifndef MAME_INCLUDES_SPCFORCE_H
#define MAME_INCLUDES_SPCFORCE_H
#pragma once
#include "machine/74259.h"
#include "sound/sn76496.h"
@ -27,6 +31,9 @@ public:
void meteors(machine_config &config);
void spcforce(machine_config &config);
protected:
virtual void machine_start() override;
private:
DECLARE_WRITE8_MEMBER(SN76496_latch_w);
DECLARE_READ8_MEMBER(SN76496_select_r);
@ -50,8 +57,6 @@ private:
void spcforce_map(address_map &map);
void spcforce_sound_map(address_map &map);
virtual void machine_start() override;
required_device<cpu_device> m_maincpu;
required_device<ls259_device> m_mainlatch;
required_device<cpu_device> m_audiocpu;
@ -73,3 +78,5 @@ private:
int m_sn3_ready;
uint8_t m_irq_mask;
};
#endif // MAME_INCLUDES_SPCFORCE_H

View File

@ -5,6 +5,10 @@
Venture Line Super Rider driver
**************************************************************************/
#ifndef MAME_INCLUDES_SUPRRIDR_H
#define MAME_INCLUDES_SUPRRIDR_H
#pragma once
#include "machine/gen_latch.h"
#include "emupal.h"
@ -12,8 +16,8 @@
class suprridr_state : public driver_device
{
public:
suprridr_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
suprridr_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
m_soundlatch(*this, "soundlatch"),
@ -28,6 +32,11 @@ public:
DECLARE_CUSTOM_INPUT_MEMBER(control_r);
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
private:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
@ -61,9 +70,6 @@ private:
INTERRUPT_GEN_MEMBER(main_nmi_gen);
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
DECLARE_PALETTE_INIT(suprridr);
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@ -74,3 +80,5 @@ private:
void sound_map(address_map &map);
void sound_portmap(address_map &map);
};
#endif // MAME_INCLUDES_SUPRRIDR_H

View File

@ -8,6 +8,8 @@
#ifndef MAME_INCLUDES_SUPRSLAM_H
#define MAME_INCLUDES_SUPRSLAM_H
#pragma once
#include "video/vsystem_spr.h"
#include "machine/gen_latch.h"
#include "video/k053936.h"
@ -15,8 +17,8 @@
class suprslam_state : public driver_device
{
public:
suprslam_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
suprslam_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_screen_videoram(*this, "screen_videoram"),
m_bg_videoram(*this, "bg_videoram"),
m_sp_videoram(*this, "sp_videoram"),
@ -28,10 +30,16 @@ public:
m_spr(*this, "vsystem_spr"),
m_palette(*this, "palette"),
m_gfxdecode(*this, "gfxdecode"),
m_soundlatch(*this, "soundlatch") { }
m_soundlatch(*this, "soundlatch")
{ }
void suprslam(machine_config &config);
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
private:
/* memory pointers */
required_shared_ptr<uint16_t> m_screen_videoram;
@ -64,9 +72,6 @@ private:
DECLARE_WRITE8_MEMBER(spr_ctrl_w);
TILE_GET_INFO_MEMBER(get_suprslam_tile_info);
TILE_GET_INFO_MEMBER(get_suprslam_bg_tile_info);
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
uint32_t screen_update_suprslam(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void sound_io_map(address_map &map);

View File

@ -5,6 +5,10 @@
Tail to Nose / Super Formula
*************************************************************************/
#ifndef MAME_INCLUDES_TAIL2NOS_H
#define MAME_INCLUDES_TAIL2NOS_H
#pragma once
#include "machine/6850acia.h"
#include "machine/gen_latch.h"
@ -14,8 +18,8 @@
class tail2nos_state : public driver_device
{
public:
tail2nos_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
tail2nos_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_txvideoram(*this, "txvideoram"),
m_spriteram(*this, "spriteram"),
m_zoomram(*this, "k051316"),
@ -25,12 +29,18 @@ public:
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette"),
m_soundlatch(*this, "soundlatch"),
m_acia(*this, "acia") { }
m_acia(*this, "acia")
{ }
void tail2nos(machine_config &config);
DECLARE_CUSTOM_INPUT_MEMBER(analog_in_r);
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
private:
/* memory pointers */
required_shared_ptr<uint16_t> m_txvideoram;
@ -59,9 +69,6 @@ private:
DECLARE_WRITE8_MEMBER(sound_bankswitch_w);
DECLARE_READ8_MEMBER(sound_semaphore_r);
TILE_GET_INFO_MEMBER(get_tile_info);
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
uint32_t screen_update_tail2nos(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void tail2nos_postload();
void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
@ -70,3 +77,5 @@ private:
void sound_map(address_map &map);
void sound_port_map(address_map &map);
};
#endif // MAME_INCLUDES_TAIL2NOS_H

View File

@ -1,13 +1,17 @@
// license:GPL-2.0+
// copyright-holders:Jarek Burczynski
#ifndef MAME_INCLUDES_TANKBUST_H
#define MAME_INCLUDES_TANKBUST_H
#pragma once
#include "emupal.h"
class tankbust_state : public driver_device
{
public:
tankbust_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
tankbust_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_subcpu(*this, "sub"),
m_gfxdecode(*this, "gfxdecode"),
@ -15,10 +19,16 @@ public:
m_txtram(*this, "txtram"),
m_videoram(*this, "videoram"),
m_colorram(*this, "colorram"),
m_spriteram(*this, "spriteram") { }
m_spriteram(*this, "spriteram")
{ }
void tankbust(machine_config &config);
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
private:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_subcpu;
@ -55,9 +65,6 @@ private:
TILE_GET_INFO_MEMBER(get_bg_tile_info);
TILE_GET_INFO_MEMBER(get_txt_tile_info);
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
DECLARE_PALETTE_INIT(tankbust);
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@ -71,3 +78,5 @@ private:
void map_cpu2(address_map &map);
void port_map_cpu2(address_map &map);
};
#endif // MAME_INCLUDES_TANKBUST_H

View File

@ -3,6 +3,8 @@
#ifndef MAME_INCLUDES_TAOTAIDO_H
#define MAME_INCLUDES_TAOTAIDO_H
#pragma once
#include "video/vsystem_spr.h"
#include "machine/gen_latch.h"
#include "machine/mb3773.h"
@ -28,6 +30,10 @@ public:
void taotaido(machine_config &config);
protected:
virtual void machine_start() override;
virtual void video_start() override;
private:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
@ -62,9 +68,6 @@ private:
TILE_GET_INFO_MEMBER(bg_tile_info);
TILEMAP_MAPPER_MEMBER(tilemap_scan_rows);
virtual void machine_start() override;
virtual void video_start() override;
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
DECLARE_WRITE_LINE_MEMBER(screen_vblank);
uint32_t tile_callback( uint32_t code );

View File

@ -1,5 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:David Haywood
#ifndef MAME_INCLUDES_TBOWL_H
#define MAME_INCLUDES_TBOWL_H
#pragma once
#include "machine/gen_latch.h"
#include "sound/msm5205.h"
@ -9,8 +13,8 @@
class tbowl_state : public driver_device
{
public:
tbowl_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
tbowl_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
m_msm1(*this, "msm1"),
@ -27,6 +31,11 @@ public:
void tbowl(machine_config &config);
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
private:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
@ -76,10 +85,6 @@ private:
TILE_GET_INFO_MEMBER(get_bg_tile_info);
TILE_GET_INFO_MEMBER(get_bg2_tile_info);
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
uint32_t screen_update_left(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
uint32_t screen_update_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@ -91,3 +96,5 @@ private:
void _6206B_map(address_map &map);
void _6206C_map(address_map &map);
};
#endif // MAME_INCLUDES_TBOWL_H

View File

@ -1,5 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:Nicola Salmoria
#ifndef MAME_INCLUDES_TECMO_H
#define MAME_INCLUDES_TECMO_H
#pragma once
#include "sound/msm5205.h"
#include "video/tecmo_spr.h"
@ -9,8 +13,8 @@
class tecmo_state : public driver_device
{
public:
tecmo_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
tecmo_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_soundcpu(*this, "soundcpu"),
m_msm(*this, "msm"),
@ -25,7 +29,8 @@ public:
m_fgscroll(*this, "fgscroll"),
m_bgscroll(*this, "bgscroll"),
m_adpcm_rom(*this, "adpcm"),
m_mainbank(*this, "mainbank") { }
m_mainbank(*this, "mainbank")
{ }
void geminib(machine_config &config);
void backfirt(machine_config &config);
@ -102,3 +107,5 @@ private:
void silkwormp_sound_map(address_map &map);
void backfirt_sound_map(address_map &map);
};
#endif // MAME_INCLUDES_TECMO_H

View File

@ -5,6 +5,10 @@
tecmosys protection simulation
***************************************************************************/
#ifndef MAME_INCLUDES_TECMOSYS_H
#define MAME_INCLUDES_TECMOSYS_H
#pragma once
#include "machine/eepromser.h"
#include "machine/gen_latch.h"
@ -45,6 +49,10 @@ public:
void init_deroon();
void init_tkdensho();
protected:
virtual void machine_start() override;
virtual void video_start() override;
private:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
@ -94,16 +102,13 @@ private:
DECLARE_READ16_MEMBER(eeprom_r);
DECLARE_WRITE16_MEMBER(eeprom_w);
virtual void machine_start() override;
virtual void video_start() override;
template<int Layer> TILE_GET_INFO_MEMBER(get_tile_info);
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
void prot_init(int which);
void prot_reset();
inline void set_color_555(pen_t color, int rshift, int gshift, int bshift, uint16_t data);
void render_sprites_to_bitmap(bitmap_rgb32 &bitmap, uint16_t extrax, uint16_t extray );
void render_sprites_to_bitmap(bitmap_rgb32 &bitmap, uint16_t extrax, uint16_t extray);
void tilemap_copy_to_compose(uint16_t pri, const rectangle &cliprect);
void do_final_mix(bitmap_rgb32 &bitmap, const rectangle &cliprect);
void descramble();
@ -113,3 +118,5 @@ private:
void oki_map(address_map &map);
void sound_map(address_map &map);
};
#endif // MAME_INCLUDES_TECMOSYS_H

View File

@ -1,5 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:Ernesto Corvi, Roberto Fresca
#ifndef MAME_INCLUDES_TEHKANWC_H
#define MAME_INCLUDES_TEHKANWC_H
#pragma once
#include "machine/gen_latch.h"
#include "sound/msm5205.h"
@ -8,8 +12,8 @@
class tehkanwc_state : public driver_device
{
public:
tehkanwc_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
tehkanwc_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
m_subcpu(*this, "sub"),
@ -30,12 +34,18 @@ public:
void init_teedoff();
private:
protected:
enum
{
TIMER_RESET
};
virtual void machine_start() override;
virtual void video_start() override;
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
private:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
required_device<cpu_device> m_subcpu;
@ -89,9 +99,6 @@ private:
TILE_GET_INFO_MEMBER(get_bg_tile_info);
TILE_GET_INFO_MEMBER(get_fg_tile_info);
virtual void machine_start() override;
virtual void video_start() override;
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void gridiron_draw_led(bitmap_ind16 &bitmap, const rectangle &cliprect, uint8_t led,int player);
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
@ -100,6 +107,6 @@ private:
void sound_mem(address_map &map);
void sound_port(address_map &map);
void sub_mem(address_map &map);
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
};
#endif // MAME_INCLUDES_TEHKANWC_H

View File

@ -1,5 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:Zsolt Vasvari
#ifndef MAME_INCLUDES_THEPIT_H
#define MAME_INCLUDES_THEPIT_H
#pragma once
#include "machine/74259.h"
#include "emupal.h"
@ -7,8 +11,8 @@
class thepit_state : public driver_device
{
public:
thepit_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
thepit_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_mainlatch(*this, "mainlatch"),
m_gfxdecode(*this, "gfxdecode"),
@ -16,7 +20,8 @@ public:
m_videoram(*this, "videoram"),
m_colorram(*this, "colorram"),
m_attributesram(*this, "attributesram"),
m_spriteram(*this, "spriteram") { }
m_spriteram(*this, "spriteram")
{ }
void suprmous(machine_config &config);
void desertdn(machine_config &config);
@ -26,6 +31,10 @@ public:
void init_rtriv();
protected:
virtual void machine_start() override;
virtual void video_start() override;
private:
required_device<cpu_device> m_maincpu;
required_device<ls259_device> m_mainlatch;
@ -66,8 +75,6 @@ private:
TILE_GET_INFO_MEMBER(solid_get_tile_info);
TILE_GET_INFO_MEMBER(get_tile_info);
virtual void machine_start() override;
virtual void video_start() override;
DECLARE_PALETTE_INIT(thepit);
DECLARE_PALETTE_INIT(suprmous);
@ -83,3 +90,5 @@ private:
void intrepid_main_map(address_map &map);
void thepit_main_map(address_map &map);
};
#endif // MAME_INCLUDES_THEPIT_H

View File

@ -23,6 +23,10 @@ public:
void kot(machine_config &config);
void tiamc1(machine_config &config);
protected:
virtual void machine_reset() override;
virtual void video_start() override;
private:
std::unique_ptr<uint8_t[]> m_videoram;
uint8_t *m_tileram;
@ -56,8 +60,6 @@ private:
TILE_GET_INFO_MEMBER(get_bg1_tile_info);
TILE_GET_INFO_MEMBER(get_bg2_tile_info);
virtual void machine_reset() override;
virtual void video_start() override;
DECLARE_VIDEO_START(kot);
DECLARE_PALETTE_INIT(tiamc1);
uint32_t screen_update_tiamc1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);

View File

@ -24,6 +24,10 @@ public:
void timelimt(machine_config &config);
protected:
virtual void machine_start() override;
virtual void video_start() override;
private:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
required_device<gfxdecode_device> m_gfxdecode;
@ -51,8 +55,6 @@ protected:
TILE_GET_INFO_MEMBER(get_bg_tile_info);
TILE_GET_INFO_MEMBER(get_fg_tile_info);
virtual void machine_start() override;
virtual void video_start() override;
DECLARE_PALETTE_INIT(timelimt);
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);

View File

@ -4,6 +4,10 @@
ToaPlan game hardware from 1988-1991
------------------------------------
****************************************************************************/
#ifndef MAME_INCLUDES_TOAPLAN1_H
#define MAME_INCLUDES_TOAPLAN1_H
#pragma once
#include "cpu/m68000/m68000.h"
#include "sound/3812intf.h"
@ -14,8 +18,8 @@
class toaplan1_state : public driver_device
{
public:
toaplan1_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
toaplan1_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_bgpaletteram(*this, "bgpalette"),
m_fgpaletteram(*this, "fgpalette"),
m_sharedram(*this, "sharedram"),
@ -26,7 +30,8 @@ public:
m_dsp(*this, "dsp"),
m_gfxdecode(*this, "gfxdecode"),
m_screen(*this, "screen"),
m_palette(*this, "palette") { }
m_palette(*this, "palette")
{ }
void demonwld(machine_config &config);
void samesame(machine_config &config);
@ -204,8 +209,8 @@ protected:
class toaplan1_rallybik_state : public toaplan1_state
{
public:
toaplan1_rallybik_state(const machine_config &mconfig, device_type type, const char *tag)
: toaplan1_state(mconfig, type, tag),
toaplan1_rallybik_state(const machine_config &mconfig, device_type type, const char *tag) :
toaplan1_state(mconfig, type, tag),
m_spritegen(*this, "scu")
{
}
@ -226,3 +231,5 @@ private:
void rallybik_main_map(address_map &map);
void rallybik_sound_io_map(address_map &map);
};
#endif // MAME_INCLUDES_TOAPLAN1_H

View File

@ -18,10 +18,6 @@
#include "screen.h"
/**************** Machine stuff ******************/
//#define TRUXTON2_STEREO /* Uncomment to hear truxton2 music in stereo */
// We encode priority with colour in the tilemaps, so need a larger palette
#define T2PALETTE_LENGTH 0x10000
class toaplan2_state : public driver_device
{
@ -92,6 +88,9 @@ protected:
virtual void device_post_load() override;
private:
// We encode priority with colour in the tilemaps, so need a larger palette
static constexpr unsigned T2PALETTE_LENGTH = 0x10000;
optional_shared_ptr<uint8_t> m_shared_ram; // 8 bit RAM shared between 68K and sound CPU
optional_shared_ptr<uint16_t> m_tx_videoram;
optional_shared_ptr<uint16_t> m_tx_lineselect;
@ -195,7 +194,6 @@ private:
DECLARE_WRITE_LINE_MEMBER(toaplan2_reset);
void batrider_68k_mem(address_map &map);
void batrider_dma_mem(address_map &map);
void batrider_sound_z80_mem(address_map &map);

View File

@ -42,6 +42,8 @@ public:
void init_twincobr();
protected:
virtual void video_start() override;
optional_shared_ptr<uint8_t> m_sharedram;
optional_device<buffered_spriteram8_device> m_spriteram8;
optional_device<buffered_spriteram16_device> m_spriteram16;
@ -121,7 +123,6 @@ protected:
TILE_GET_INFO_MEMBER(get_fg_tile_info);
TILE_GET_INFO_MEMBER(get_tx_tile_info);
DECLARE_MACHINE_RESET(twincobr);
DECLARE_VIDEO_START(toaplan0);
uint32_t screen_update_toaplan0(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
DECLARE_WRITE_LINE_MEMBER(twincobr_vblank_irq);
DECLARE_WRITE_LINE_MEMBER(wardner_vblank_irq);

View File

@ -16,13 +16,13 @@ public:
unico_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_palette(*this, "palette"),
m_gfxdecode(*this, "gfxdecode"),
m_leds(*this, "led%u", 0U),
m_vram(*this, "vram", 0),
m_scroll(*this, "scroll", 0),
m_spriteram(*this, "spriteram", 0),
m_maincpu(*this, "maincpu"),
m_oki(*this, "oki"),
m_gfxdecode(*this, "gfxdecode")
m_oki(*this, "oki")
{ }
void burglarx(machine_config &config);
@ -46,6 +46,7 @@ protected:
void burglarx_map(address_map &map);
required_device<palette_device> m_palette;
required_device<gfxdecode_device> m_gfxdecode;
output_finder<2> m_leds;
private:
@ -58,7 +59,6 @@ private:
required_device<cpu_device> m_maincpu;
optional_device<okim6295_device> m_oki;
required_device<gfxdecode_device> m_gfxdecode;
};
class zeropnt_state : public unico_state

View File

@ -1,5 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:Ernesto Corvi
#ifndef MAME_INCLUDES_WC90_H
#define MAME_INCLUDES_WC90_H
#pragma once
#include "machine/gen_latch.h"
#include "video/tecmo_spr.h"
@ -8,8 +12,8 @@
class wc90_state : public driver_device
{
public:
wc90_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
wc90_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
m_gfxdecode(*this, "gfxdecode"),
@ -40,6 +44,10 @@ public:
void wc90(machine_config &config);
void pac90(machine_config &config);
protected:
virtual void machine_start() override;
virtual void video_start() override;
private:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
@ -84,8 +92,6 @@ private:
TILE_GET_INFO_MEMBER(track_get_bg_tile_info);
TILE_GET_INFO_MEMBER(track_get_fg_tile_info);
virtual void machine_start() override;
virtual void video_start() override;
DECLARE_VIDEO_START(wc90t);
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@ -94,3 +100,5 @@ private:
void wc90_map_1(address_map &map);
void wc90_map_2(address_map &map);
};
#endif // MAME_INCLUDES_WC90_H

View File

@ -1,5 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:Ernesto Corvi
#ifndef MAME_INCLUDES_WC90B_H
#define MAME_INCLUDES_WC90B_H
#pragma once
#include "machine/gen_latch.h"
#include "sound/msm5205.h"
@ -8,8 +12,8 @@
class wc90b_state : public driver_device
{
public:
wc90b_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
wc90b_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_subcpu(*this, "sub"),
m_audiocpu(*this, "audiocpu"),
@ -25,10 +29,15 @@ public:
m_scroll1y(*this, "scroll1y"),
m_scroll2y(*this, "scroll2y"),
m_scroll_x_lo(*this, "scroll_x_lo"),
m_spriteram(*this, "spriteram") { }
m_spriteram(*this, "spriteram")
{ }
void wc90b(machine_config &config);
protected:
virtual void machine_start() override;
virtual void video_start() override;
private:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_subcpu;
@ -70,9 +79,6 @@ private:
TILE_GET_INFO_MEMBER(get_fg_tile_info);
TILE_GET_INFO_MEMBER(get_tx_tile_info);
virtual void machine_start() override;
virtual void video_start() override;
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int priority );
@ -80,3 +86,5 @@ private:
void wc90b_map1(address_map &map);
void wc90b_map2(address_map &map);
};
#endif // MAME_INCLUDES_WC90B_H

View File

@ -1,5 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:David Haywood
#ifndef MAME_INCLUDES_WELLTRIS_H
#define MAME_INCLUDES_WELLTRIS_H
#pragma once
#include "machine/gen_latch.h"
#include "video/vsystem_spr2.h"
@ -7,8 +11,8 @@
class welltris_state : public driver_device
{
public:
welltris_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
welltris_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
m_spr_old(*this, "vsystem_spr_old"),
@ -16,7 +20,8 @@ public:
m_soundlatch(*this, "soundlatch"),
m_spriteram(*this, "spriteram"),
m_pixelram(*this, "pixelram"),
m_charvideoram(*this, "charvideoram") { }
m_charvideoram(*this, "charvideoram")
{ }
void quiz18k(machine_config &config);
void welltris(machine_config &config);
@ -24,6 +29,10 @@ public:
void init_quiz18k();
void init_welltris();
protected:
virtual void machine_start() override;
virtual void video_start() override;
private:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
@ -49,9 +58,6 @@ private:
DECLARE_WRITE16_MEMBER(scrollreg_w);
DECLARE_WRITE16_MEMBER(charvideoram_w);
virtual void machine_start() override;
virtual void video_start() override;
TILE_GET_INFO_MEMBER(get_tile_info);
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void draw_background(bitmap_ind16 &bitmap, const rectangle &cliprect);
@ -60,3 +66,5 @@ private:
void sound_map(address_map &map);
void sound_port_map(address_map &map);
};
#endif // MAME_INCLUDES_WELLTRIS_H

View File

@ -1,25 +1,34 @@
// license:BSD-3-Clause
// copyright-holders:Uki
#ifndef MAME_INCLUDES_XXMISSIO_H
#define MAME_INCLUDES_XXMISSIO_H
#pragma once
#include "emupal.h"
class xxmissio_state : public driver_device
{
public:
xxmissio_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
xxmissio_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_subcpu(*this, "sub"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette"),
m_bgram(*this, "bgram"),
m_fgram(*this, "fgram"),
m_spriteram(*this, "spriteram") { }
m_spriteram(*this, "spriteram")
{ }
void xxmissio(machine_config &config);
DECLARE_CUSTOM_INPUT_MEMBER(status_r);
protected:
virtual void machine_start() override;
virtual void video_start() override;
private:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_subcpu;
@ -46,16 +55,12 @@ private:
DECLARE_WRITE8_MEMBER(scroll_x_w);
DECLARE_WRITE8_MEMBER(scroll_y_w);
DECLARE_WRITE_LINE_MEMBER(interrupt_m);
INTERRUPT_GEN_MEMBER(interrupt_s);
TILE_GET_INFO_MEMBER(get_bg_tile_info);
TILE_GET_INFO_MEMBER(get_fg_tile_info);
virtual void machine_start() override;
virtual void video_start() override;
DECLARE_PALETTE_DECODER(BBGGRRII);
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@ -64,3 +69,5 @@ private:
void map1(address_map &map);
void map2(address_map &map);
};
#endif // MAME_INCLUDES_XXMISSIO_H

View File

@ -6,6 +6,10 @@
Yun Sung 16 Bit Games
*************************************************************************/
#ifndef MAME_INCLUDES_YUNSUN16_H
#define MAME_INCLUDES_YUNSUN16_H
#pragma once
#include "machine/gen_latch.h"
#include "screen.h"
@ -13,62 +17,100 @@
class yunsun16_state : public driver_device
{
public:
yunsun16_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
protected:
yunsun16_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
m_gfxdecode(*this, "gfxdecode"),
m_screen(*this, "screen"),
m_palette(*this, "palette"),
m_soundlatch(*this, "soundlatch"),
m_vram(*this, "vram_%u", 0U),
m_scrollram(*this, "scrollram_%u", 0U),
m_priorityram(*this, "priorityram"),
m_spriteram(*this, "spriteram"),
m_okibank(*this, "okibank") { }
m_spriteram(*this, "spriteram")
{ }
void magicbub(machine_config &config);
void shocking(machine_config &config);
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
void init_magicbub();
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void main_map(address_map &map);
private:
/* devices */
required_device<cpu_device> m_maincpu;
optional_device<cpu_device> m_audiocpu;
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
optional_device<generic_latch_8_device> m_soundlatch; // magicbub
private:
/* memory pointers */
required_shared_ptr_array<uint16_t, 2> m_vram;
required_shared_ptr_array<uint16_t, 2> m_scrollram;
required_shared_ptr<uint16_t> m_priorityram;
required_shared_ptr<uint16_t> m_spriteram;
optional_memory_bank m_okibank;
/* other video-related elements */
tilemap_t *m_tilemap[2];
int m_sprites_scrolldx;
int m_sprites_scrolldy;
DECLARE_WRITE8_MEMBER(sound_bank_w);
DECLARE_WRITE16_MEMBER(magicbub_sound_command_w);
template<int Layer> DECLARE_WRITE16_MEMBER(vram_w);
TILEMAP_MAPPER_MEMBER(tilemap_scan_pages);
template<int Layer> TILE_GET_INFO_MEMBER(get_tile_info);
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect );
void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
};
class magicbub_state : public yunsun16_state
{
public:
magicbub_state(const machine_config &mconfig, device_type type, const char *tag) :
yunsun16_state(mconfig, type, tag),
m_audiocpu(*this, "audiocpu"),
m_soundlatch(*this, "soundlatch")
{ }
void magicbub(machine_config &config);
protected:
void main_map(address_map &map);
void oki_map(address_map &map);
private:
DECLARE_WRITE8_MEMBER(magicbub_sound_command_w);
void sound_map(address_map &map);
void sound_port_map(address_map &map);
required_device<cpu_device> m_audiocpu;
required_device<generic_latch_8_device> m_soundlatch;
};
class shocking_state : public yunsun16_state
{
public:
shocking_state(const machine_config &mconfig, device_type type, const char *tag) :
yunsun16_state(mconfig, type, tag),
m_okibank(*this, "okibank")
{ }
void shocking(machine_config &config);
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
void main_map(address_map &map);
private:
DECLARE_WRITE8_MEMBER(sound_bank_w);
void oki_map(address_map &map);
required_memory_bank m_okibank;
};
#endif // MAME_INCLUDES_YUNSUN16_H

View File

@ -25,6 +25,9 @@ public:
void tinvader(machine_config &config);
protected:
virtual void video_start() override;
private:
/* devices */
required_device<cpu_device> m_maincpu;
@ -49,7 +52,6 @@ private:
DECLARE_WRITE8_MEMBER(zac_s2636_w);
DECLARE_READ8_MEMBER(tinvader_port_0_r);
TILE_GET_INFO_MEMBER(get_bg_tile_info);
virtual void video_start() override;
DECLARE_PALETTE_INIT(zac2650);
uint32_t screen_update_tinvader(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
int SpriteCollision(int first,int second);

View File

@ -1,5 +1,10 @@
// license:BSD-3-Clause
// copyright-holders:Nicola Salmoria
#ifndef MAME_INCLUDES_ZACCARIA_H
#define MAME_INCLUDES_ZACCARIA_H
#pragma once
#include "audio/zaccaria.h"
#include "emupal.h"
@ -21,6 +26,11 @@ public:
void zaccaria(machine_config &config);
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
private:
DECLARE_READ8_MEMBER(dsw_r);
DECLARE_READ8_MEMBER(prot1_r);
@ -33,9 +43,6 @@ private:
DECLARE_WRITE_LINE_MEMBER(flip_screen_y_w);
DECLARE_WRITE8_MEMBER(dsw_sel_w);
TILE_GET_INFO_MEMBER(get_tile_info);
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
DECLARE_PALETTE_INIT(zaccaria);
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
DECLARE_WRITE_LINE_MEMBER(vblank_irq);
@ -59,3 +66,5 @@ private:
tilemap_t *m_bg_tilemap;
uint8_t m_nmi_mask;
};
#endif // MAME_INCLUDES_ZACCARIA_H

View File

@ -273,7 +273,7 @@ void zerohour_stars_device::device_reset()
***************************************************************************/
void ladybug_base_state::palette_init_common(palette_device &palette, const uint8_t *color_prom,
int r_bit0, int r_bit1, int g_bit0, int g_bit1, int b_bit0, int b_bit1)
int r_bit0, int r_bit1, int g_bit0, int g_bit1, int b_bit0, int b_bit1) const
{
static const int resistances[2] = { 470, 220 };
double rweights[2], gweights[2], bweights[2];

View File

@ -48,13 +48,13 @@ PALETTE_INIT_MEMBER(lvcards_state, lvcards)//Ever so slightly different, but dif
}
}
WRITE8_MEMBER(lvcards_state::lvcards_videoram_w)
WRITE8_MEMBER(lvcards_state::videoram_w)
{
m_videoram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);
}
WRITE8_MEMBER(lvcards_state::lvcards_colorram_w)
WRITE8_MEMBER(lvcards_state::colorram_w)
{
m_colorram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);

View File

@ -82,7 +82,7 @@ void twincobr_state::twincobr_create_tilemaps()
m_tx_tilemap->set_transparent_pen(0);
}
VIDEO_START_MEMBER(twincobr_state,toaplan0)
void twincobr_state::video_start()
{
m_spritegen->alloc_sprite_bitmap(*m_screen);