diff options
Diffstat (limited to 'src/mame/drivers/hunter2.cpp')
-rw-r--r-- | src/mame/drivers/hunter2.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mame/drivers/hunter2.cpp b/src/mame/drivers/hunter2.cpp index 192b51a0344..713f03d4914 100644 --- a/src/mame/drivers/hunter2.cpp +++ b/src/mame/drivers/hunter2.cpp @@ -54,6 +54,9 @@ public: void init_hunter2(); +protected: + virtual void machine_reset() override; + private: DECLARE_READ8_MEMBER(keyboard_r); DECLARE_READ8_MEMBER(serial_dsr_r); @@ -67,7 +70,7 @@ private: DECLARE_WRITE8_MEMBER(speaker_w); DECLARE_WRITE8_MEMBER(irqctrl_w); DECLARE_WRITE8_MEMBER(memmap_w); - DECLARE_PALETTE_INIT(hunter2); + void hunter2_palette(palette_device &palette) const; DECLARE_WRITE_LINE_MEMBER(timer0_out); DECLARE_WRITE_LINE_MEMBER(timer1_out); @@ -80,7 +83,6 @@ private: uint8_t m_keydata; uint8_t m_irq_mask; - virtual void machine_reset() override; required_device<cpu_device> m_maincpu; required_device<speaker_sound_device> m_speaker; required_device<rs232_port_device> m_rs232; @@ -343,7 +345,7 @@ void hunter2_state::init_hunter2() m_nvram->set_base(ram,m_ram->bytes()); } -PALETTE_INIT_MEMBER(hunter2_state, hunter2) +void hunter2_state::hunter2_palette(palette_device &palette) const { palette.set_pen_color(0, rgb_t(138, 146, 148)); palette.set_pen_color(1, rgb_t(92, 83, 88)); @@ -390,8 +392,7 @@ MACHINE_CONFIG_START(hunter2_state::hunter2) MCFG_SCREEN_VISIBLE_AREA(0, 239, 0, 63) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD("palette", 2) - MCFG_PALETTE_INIT_OWNER(hunter2_state, hunter2) + PALETTE(config, "palette", FUNC(hunter2_state::hunter2_palette), 2); MCFG_DEVICE_ADD("lcdc", HD61830, XTAL(4'915'200)/2/2) // unknown clock MCFG_VIDEO_SET_SCREEN("screen") |