diff options
Diffstat (limited to 'src/mame/drivers/geniusiq.cpp')
-rw-r--r-- | src/mame/drivers/geniusiq.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/src/mame/drivers/geniusiq.cpp b/src/mame/drivers/geniusiq.cpp index 9001e558c18..fc916f4daf7 100644 --- a/src/mame/drivers/geniusiq.cpp +++ b/src/mame/drivers/geniusiq.cpp @@ -167,8 +167,8 @@ PCB - German Version: class geniusiq_state : public driver_device { public: - geniusiq_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), + geniusiq_state(const machine_config &mconfig, device_type type, const char *tag) : + driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), m_cart(*this, "cartslot"), m_rom(*this, "maincpu"), @@ -183,6 +183,10 @@ public: DECLARE_INPUT_CHANGED_MEMBER(send_input); DECLARE_INPUT_CHANGED_MEMBER(send_mouse_input); +protected: + virtual void machine_start() override; + virtual void machine_reset() override; + private: enum { @@ -198,9 +202,7 @@ private: required_shared_ptr<uint16_t> m_vram; required_shared_ptr<uint16_t> m_mouse_gfx; - virtual void machine_start() override; - virtual void machine_reset() override; - DECLARE_PALETTE_INIT(geniusiq); + void geniusiq_palette(palette_device &palette) const; virtual uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_READ16_MEMBER(input_r); @@ -237,31 +239,30 @@ private: }; -PALETTE_INIT_MEMBER(geniusiq_state, geniusiq) +void geniusiq_state::geniusiq_palette(palette_device &palette) const { // shades need to be verified - const uint8_t palette_val[] = + constexpr rgb_t palette_val[] = { - 0x00, 0x00, 0x00, // Black?? (used in the cursor for transparency) - 0xff, 0xff, 0xff, // White - 0xa0, 0xa0, 0xa0, // Light grey - 0x7f, 0x7f, 0x7f, // Dark grey - 0x00, 0x00, 0x00, // Black - 0x00, 0x60, 0xff, // Sky blue - 0x00, 0x00, 0xff, // Blue - 0xff, 0x00, 0x00, // Red - 0x00, 0xff, 0x00, // Green - 0x00, 0x7f, 0x00, // Dark green - 0xff, 0xff, 0x00, // Yellow - 0xff, 0x7f, 0x00, // Orange - 0x7f, 0x40, 0x00, // Brown - 0x60, 0x40, 0x00, // Dark brown - 0x60, 0x00, 0xff, // Mauve - 0xff, 0x00, 0xff // Pink + { 0x00, 0x00, 0x00 }, // Black?? (used in the cursor for transparency) + { 0xff, 0xff, 0xff }, // White + { 0xa0, 0xa0, 0xa0 }, // Light grey + { 0x7f, 0x7f, 0x7f }, // Dark grey + { 0x00, 0x00, 0x00 }, // Black + { 0x00, 0x60, 0xff }, // Sky blue + { 0x00, 0x00, 0xff }, // Blue + { 0xff, 0x00, 0x00 }, // Red + { 0x00, 0xff, 0x00 }, // Green + { 0x00, 0x7f, 0x00 }, // Dark green + { 0xff, 0xff, 0x00 }, // Yellow + { 0xff, 0x7f, 0x00 }, // Orange + { 0x7f, 0x40, 0x00 }, // Brown + { 0x60, 0x40, 0x00 }, // Dark brown + { 0x60, 0x00, 0xff }, // Mauve + { 0xff, 0x00, 0xff } // Pink }; - for (int i=0; i<ARRAY_LENGTH(palette_val)/3; i++) - palette.set_pen_color(i, palette_val[i*3], palette_val[i*3+1], palette_val[i*3+2]); + palette.set_pen_colors(0, palette_val); } @@ -712,8 +713,7 @@ MACHINE_CONFIG_START(geniusiq_state::iq128) MCFG_SCREEN_UPDATE_DRIVER( geniusiq_state, screen_update ) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD("palette", 16) - MCFG_PALETTE_INIT_OWNER(geniusiq_state, geniusiq) + PALETTE(config, "palette", FUNC(geniusiq_state::geniusiq_palette), 16); /* internal flash */ AMD_29F010(config, "flash"); |