summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/video/vic4567.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mess/video/vic4567.c')
-rw-r--r--src/mess/video/vic4567.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/mess/video/vic4567.c b/src/mess/video/vic4567.c
index 55b629657e6..1e3050ab0f9 100644
--- a/src/mess/video/vic4567.c
+++ b/src/mess/video/vic4567.c
@@ -144,7 +144,8 @@ const device_type VIC3 = &device_creator<vic3_device>;
vic3_device::vic3_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, VIC3, "4567 VIC III", tag, owner, clock, "vic3", __FILE__),
- device_video_interface(mconfig, *this)
+ device_video_interface(mconfig, *this),
+ m_palette(*this, "palette")
{
}
@@ -1953,7 +1954,7 @@ void vic3_device::raster_interrupt_gen()
m_rasterline = 0;
if (m_palette_dirty)
for (i = 0; i < 256; i++)
- palette_set_color_rgb(machine(), i, m_palette_red[i] << 4, m_palette_green[i] << 4, m_palette_blue[i] << 4);
+ m_palette->set_pen_color(i, m_palette_red[i] << 4, m_palette_green[i] << 4, m_palette_blue[i] << 4);
if (m_palette_dirty)
{
@@ -2057,3 +2058,18 @@ UINT32 vic3_device::video_update( bitmap_ind16 &bitmap, const rectangle &cliprec
copybitmap(bitmap, *m_bitmap, 0, 0, 0, 0, cliprect);
return 0;
}
+
+
+static MACHINE_CONFIG_FRAGMENT( vic3 )
+ MCFG_PALETTE_ADD_INIT_BLACK("palette", 0x100)
+MACHINE_CONFIG_END
+
+//-------------------------------------------------
+// machine_config_additions - return a pointer to
+// the device's machine fragment
+//-------------------------------------------------
+
+machine_config_constructor vic3_device::device_mconfig_additions() const
+{
+ return MACHINE_CONFIG_NAME( vic3 );
+}