summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Dirk Best <mail@dirk-best.de>2015-07-30 11:19:02 +0200
committer Dirk Best <mail@dirk-best.de>2015-07-30 12:10:41 +0200
commitd5432ba6140c06205466a1a3dcd69797a1f34a69 (patch)
treee063c39cbcce761dc73411ded420721000137c95
parent4b1e08c1bb282af1f3b09d992bf006a58908eee6 (diff)
nascom avc: use standard 3-bit rgb palette
-rw-r--r--src/emu/bus/nasbus/avc.c17
-rw-r--r--src/emu/bus/nasbus/avc.h3
2 files changed, 5 insertions, 15 deletions
diff --git a/src/emu/bus/nasbus/avc.c b/src/emu/bus/nasbus/avc.c
index 35b86e09420..8960a19573f 100644
--- a/src/emu/bus/nasbus/avc.c
+++ b/src/emu/bus/nasbus/avc.c
@@ -25,6 +25,8 @@ static MACHINE_CONFIG_FRAGMENT( nascom_avc )
MCFG_SCREEN_RAW_PARAMS(16250000, 1024, 0, 768, 320, 0, 256)
MCFG_SCREEN_UPDATE_DEVICE("mc6845", mc6845_device, screen_update)
+ MCFG_PALETTE_ADD_3BIT_RGB("palette")
+
MCFG_MC6845_ADD("mc6845", MC6845, "screen", XTAL_16MHz / 8)
MCFG_MC6845_SHOW_BORDER_AREA(false)
MCFG_MC6845_CHAR_WIDTH(6)
@@ -36,18 +38,6 @@ machine_config_constructor nascom_avc_device::device_mconfig_additions() const
return MACHINE_CONFIG_NAME( nascom_avc );
}
-const rgb_t nascom_avc_device::m_palette[] =
-{
- rgb_t::black,
- rgb_t(0xff, 0x00, 0x00),
- rgb_t(0x00, 0xff, 0x00),
- rgb_t(0xff, 0xff, 0x00),
- rgb_t(0x00, 0x00, 0xff),
- rgb_t(0xff, 0x00, 0xff),
- rgb_t(0x00, 0xff, 0xff),
- rgb_t::white,
-};
-
//**************************************************************************
// LIVE DEVICE
@@ -61,6 +51,7 @@ nascom_avc_device::nascom_avc_device(const machine_config &mconfig, const char *
device_t(mconfig, NASCOM_AVC, "Nascom Advanced Video Card", tag, owner, clock, "nascom_avc", __FILE__),
device_nasbus_card_interface(mconfig, *this),
m_crtc(*this, "mc6845"),
+ m_palette(*this, "palette"),
m_control(0x80)
{
}
@@ -130,7 +121,7 @@ MC6845_UPDATE_ROW( nascom_avc_device::crtc_update_row )
}
// plot the pixel
- bitmap.pix32(y, x) = m_palette[(b << 2) | (g << 1) | (r << 0)];
+ bitmap.pix32(y, x) = m_palette->pen_color((b << 2) | (g << 1) | (r << 0));
}
}
diff --git a/src/emu/bus/nasbus/avc.h b/src/emu/bus/nasbus/avc.h
index bcd22b09050..754781fc70e 100644
--- a/src/emu/bus/nasbus/avc.h
+++ b/src/emu/bus/nasbus/avc.h
@@ -41,14 +41,13 @@ protected:
private:
required_device<mc6845_device> m_crtc;
+ required_device<palette_device> m_palette;
std::vector<UINT8> m_r_ram;
std::vector<UINT8> m_g_ram;
std::vector<UINT8> m_b_ram;
UINT8 m_control;
-
- static const rgb_t m_palette[];
};
// device type definition