diff options
author | AJR <ajrhacker@users.noreply.github.com> | 2019-05-10 18:23:29 -0400 |
---|---|---|
committer | AJR <ajrhacker@users.noreply.github.com> | 2019-05-10 18:23:29 -0400 |
commit | 260c9a285685fab415155bc1186dc8cd45baaa42 (patch) | |
tree | 0a3770c150e8785f47046790a65c0ba442468e24 | |
parent | 463c53087f5e83280c63024218855a23edd19f3c (diff) |
ygv608: Internalize palette (nw)
-rw-r--r-- | src/mame/drivers/namcond1.cpp | 6 | ||||
-rw-r--r-- | src/mame/video/ygv608.cpp | 5 | ||||
-rw-r--r-- | src/mame/video/ygv608.h | 3 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/mame/drivers/namcond1.cpp b/src/mame/drivers/namcond1.cpp index df2642001aa..f86996ee325 100644 --- a/src/mame/drivers/namcond1.cpp +++ b/src/mame/drivers/namcond1.cpp @@ -196,7 +196,6 @@ Some logic, resistors/caps/transistors, some connectors etc. #include "cpu/m68000/m68000.h" #include "machine/at28c16.h" #include "sound/c352.h" -#include "emupal.h" #include "screen.h" #include "speaker.h" @@ -383,7 +382,6 @@ void namcond1_state::namcond1(machine_config &config) config.m_minimum_quantum = attotime::from_hz(6000); YGV608(config, m_ygv608, 0); - m_ygv608->set_palette("palette"); m_ygv608->vblank_callback().set(FUNC(namcond1_state::vblank_irq_w)); m_ygv608->raster_callback().set(FUNC(namcond1_state::raster_irq_w)); m_ygv608->set_screen("screen"); @@ -396,9 +394,7 @@ void namcond1_state::namcond1(machine_config &config) */ screen.set_raw( XTAL(49'152'000)/8, 804/2, 108/2, (108+576)/2, 261, 26, 26+224); screen.set_screen_update("ygv608", FUNC(ygv608_device::update_screen)); - screen.set_palette("palette"); - - PALETTE(config, "palette").set_entries(256); + screen.set_palette("ygv608"); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); diff --git a/src/mame/video/ygv608.cpp b/src/mame/video/ygv608.cpp index 4bfcfa59064..5f7860b5a81 100644 --- a/src/mame/video/ygv608.cpp +++ b/src/mame/video/ygv608.cpp @@ -317,8 +317,9 @@ void ygv608_device::port_map(address_map &map) ygv608_device::ygv608_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock ) : device_t(mconfig, YGV608, tag, owner, clock), - device_gfx_interface(mconfig, *this, gfx_ygv608), + device_gfx_interface(mconfig, *this, gfx_ygv608, DEVICE_SELF), device_memory_interface(mconfig, *this), + device_palette_interface(mconfig, *this), device_video_interface(mconfig, *this), m_io_space_config("io", ENDIANNESS_BIG, 8, 6, 0, address_map_constructor(FUNC(ygv608_device::regs_map), this)), m_vblank_handler(*this), @@ -1601,7 +1602,7 @@ WRITE8_MEMBER( ygv608_device::palette_data_w ) m_color_state_w = 0; // if(m_colour_palette[m_palette_address][0] & 0x80) // Transparency designation, none of the Namco games enables it? - palette().set_pen_color(m_palette_address, + set_pen_color(m_palette_address, pal6bit( m_colour_palette[m_palette_address][0] ), pal6bit( m_colour_palette[m_palette_address][1] ), pal6bit( m_colour_palette[m_palette_address][2] )); diff --git a/src/mame/video/ygv608.h b/src/mame/video/ygv608.h index 28eca3f63f7..383b3471db3 100644 --- a/src/mame/video/ygv608.h +++ b/src/mame/video/ygv608.h @@ -16,6 +16,7 @@ class ygv608_device : public device_t, public device_gfx_interface, public device_memory_interface, + public device_palette_interface, public device_video_interface { public: @@ -102,6 +103,8 @@ protected: virtual space_config_vector memory_space_config() const override; + virtual uint32_t palette_entries() const override { return 256; } + void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; address_space *m_iospace; |