summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/cchance.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/cchance.cpp')
-rw-r--r--src/mame/drivers/cchance.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/mame/drivers/cchance.cpp b/src/mame/drivers/cchance.cpp
index f55bc9cde2c..e3d9a4cd3af 100644
--- a/src/mame/drivers/cchance.cpp
+++ b/src/mame/drivers/cchance.cpp
@@ -47,18 +47,23 @@ class cchance_state : public tnzs_base_state
{
public:
cchance_state(const machine_config &mconfig, device_type type, const char *tag)
- : tnzs_base_state(mconfig, type, tag) { }
+ : tnzs_base_state(mconfig, type, tag)
+ { }
+ void cchance(machine_config &config);
+
+protected:
void machine_reset() override;
void machine_start() override;
- uint8_t m_hop_io;
- uint8_t m_bell_io;
+private:
DECLARE_WRITE8_MEMBER(output_0_w);
DECLARE_READ8_MEMBER(input_1_r);
DECLARE_WRITE8_MEMBER(output_1_w);
- void cchance(machine_config &config);
void main_map(address_map &map);
+
+ uint8_t m_hop_io;
+ uint8_t m_bell_io;
};
@@ -218,7 +223,7 @@ MACHINE_CONFIG_START(cchance_state::cchance)
MCFG_DEVICE_PROGRAM_MAP(main_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cchance_state, irq0_line_hold)
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_cchance)
+ GFXDECODE(config, "gfxdecode", m_palette, gfx_cchance);
SETA001_SPRITE(config, m_seta001, 0);
m_seta001->set_gfxdecode_tag("gfxdecode");
@@ -231,10 +236,9 @@ MACHINE_CONFIG_START(cchance_state::cchance)
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
MCFG_SCREEN_UPDATE_DRIVER(cchance_state, screen_update_tnzs)
MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, cchance_state, screen_vblank_tnzs))
- MCFG_SCREEN_PALETTE("palette")
+ MCFG_SCREEN_PALETTE(m_palette)
- MCFG_PALETTE_ADD("palette", 512)
- MCFG_PALETTE_INIT_OWNER(cchance_state, prompalette)
+ PALETTE(config, m_palette, FUNC(cchance_state::prompalette), 512);
SPEAKER(config, "mono").front_center();