ygv608: Internalize palette (nw)

This commit is contained in:
AJR 2019-05-10 18:23:29 -04:00
parent 463c53087f
commit 260c9a2856
3 changed files with 7 additions and 7 deletions

View File

@ -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();

View File

@ -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] ));

View File

@ -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;