summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/emu/bus/ecbbus/grip.c4
-rw-r--r--src/mess/drivers/fp1100.c1
-rw-r--r--src/mess/drivers/mc10.c1
-rw-r--r--src/mess/drivers/vg5k.c1
-rw-r--r--src/mess/video/ef9345.c18
-rw-r--r--src/mess/video/ef9345.h8
6 files changed, 26 insertions, 7 deletions
diff --git a/src/emu/bus/ecbbus/grip.c b/src/emu/bus/ecbbus/grip.c
index f5697d32d44..bd197cea275 100644
--- a/src/emu/bus/ecbbus/grip.c
+++ b/src/emu/bus/ecbbus/grip.c
@@ -310,8 +310,8 @@ static MC6845_INTERFACE( grip5_crtc_intf )
NULL,
grip5_update_row,
NULL,
- DEVCB_DEVICE_LINE(Z80STI_TAG, z80sti_i1_w),
- DEVCB_DEVICE_LINE(Z80STI_TAG, z80sti_i2_w),
+ DEVCB_DEVICE_LINE_MEMBER(Z80STI_TAG, z80sti_device, i1_w),
+ DEVCB_DEVICE_LINE_MEMBER(Z80STI_TAG, z80sti_device, i2_w),
DEVCB_NULL,
DEVCB_NULL,
grip5_update_addr_changed
diff --git a/src/mess/drivers/fp1100.c b/src/mess/drivers/fp1100.c
index 1b91d10a272..22d49cf9e0b 100644
--- a/src/mess/drivers/fp1100.c
+++ b/src/mess/drivers/fp1100.c
@@ -316,7 +316,6 @@ static GFXDECODE_START( fp1100 )
//GFXDECODE_ENTRY( "chargen", 0x0000, fp1100_chars_8x8, 0, 1 )
GFXDECODE_END
-//static const upd1771_interface scv_upd1771c_config = { DEVCB_LINE( scv_upd1771_ack_w ) };
static MC6845_INTERFACE( mc6845_intf )
diff --git a/src/mess/drivers/mc10.c b/src/mess/drivers/mc10.c
index 8881f623a6c..782721d1a29 100644
--- a/src/mess/drivers/mc10.c
+++ b/src/mess/drivers/mc10.c
@@ -544,6 +544,7 @@ static MACHINE_CONFIG_START( alice32, mc10_state )
MCFG_PALETTE_ADD("palette", 8)
MCFG_EF9345_ADD("ef9345", "screen")
+ MCFG_EF9345_PALETTE("palette")
MCFG_TIMER_DRIVER_ADD_SCANLINE("alice32_sl", mc10_state, alice32_scanline, "screen", 0, 10)
/* sound hardware */
diff --git a/src/mess/drivers/vg5k.c b/src/mess/drivers/vg5k.c
index 0d273533e94..ea277f938a1 100644
--- a/src/mess/drivers/vg5k.c
+++ b/src/mess/drivers/vg5k.c
@@ -380,6 +380,7 @@ static MACHINE_CONFIG_START( vg5k, vg5k_state )
MCFG_TIMER_DRIVER_ADD_PERIODIC("irq_timer", vg5k_state, z80_irq, attotime::from_msec(20))
MCFG_EF9345_ADD("ef9345", "screen")
+ MCFG_EF9345_PALETTE("palette")
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mess/video/ef9345.c b/src/mess/video/ef9345.c
index dac8a671df7..f4b69ba4556 100644
--- a/src/mess/video/ef9345.c
+++ b/src/mess/video/ef9345.c
@@ -103,11 +103,22 @@ ef9345_device::ef9345_device(const machine_config &mconfig, const char *tag, dev
device_t(mconfig, EF9345, "EF9345", tag, owner, clock, "ef9345", __FILE__),
device_memory_interface(mconfig, *this),
device_video_interface(mconfig, *this),
- m_space_config("videoram", ENDIANNESS_LITTLE, 8, 16, 0, NULL, *ADDRESS_MAP_NAME(ef9345))
+ m_space_config("videoram", ENDIANNESS_LITTLE, 8, 16, 0, NULL, *ADDRESS_MAP_NAME(ef9345)),
+ m_palette(*this)
{
}
//-------------------------------------------------
+// static_set_palette_tag: Set the tag of the
+// palette device
+//-------------------------------------------------
+
+void ef9345_device::static_set_palette_tag(device_t &device, const char *tag)
+{
+ downcast<ef9345_device &>(device).m_palette.set_tag(tag);
+}
+
+//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
@@ -120,7 +131,6 @@ void ef9345_device::device_start()
m_charset = region();
m_screen_out.allocate(496, m_screen->height());
- m_screen_out.set_palette(m_screen->palette()->palette());
m_blink_timer->adjust(attotime::from_msec(500), 0, attotime::from_msec(500));
@@ -206,7 +216,7 @@ void ef9345_device::draw_char_40(UINT8 *c, UINT16 x, UINT16 y)
if (y * 10 >= m_screen->height() || x * 8 >= m_screen->width())
return;
- const rgb_t *palette = m_screen_out.palette()->entry_list_raw();
+ const rgb_t *palette = m_palette->palette()->entry_list_raw();
for(int i = 0; i < 10; i++)
for(int j = 0; j < 8; j++)
m_screen_out.pix32(y * 10 + i, x * 8 + j) = palette[c[8 * i + j] & 0x07];
@@ -219,7 +229,7 @@ void ef9345_device::draw_char_80(UINT8 *c, UINT16 x, UINT16 y)
if (y * 10 >= m_screen->height() || x * 6 >= m_screen->width())
return;
- const rgb_t *palette = m_screen_out.palette()->entry_list_raw();
+ const rgb_t *palette = m_palette->palette()->entry_list_raw();
for(int i = 0; i < 10; i++)
for(int j = 0; j < 6; j++)
m_screen_out.pix32(y * 10 + i, x * 6 + j) = palette[c[6 * i + j] & 0x07];
diff --git a/src/mess/video/ef9345.h b/src/mess/video/ef9345.h
index e033d0f9831..540d3e13c3b 100644
--- a/src/mess/video/ef9345.h
+++ b/src/mess/video/ef9345.h
@@ -19,6 +19,9 @@
MCFG_DEVICE_ADD(_tag, EF9345, 0) \
MCFG_DEVICE_CONFIG(_config)
+#define MCFG_EF9345_PALETTE(_palette_tag) \
+ ef9345_device::static_set_palette_tag(*device, "^" _palette_tag);
+
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -33,6 +36,9 @@ public:
// construction/destruction
ef9345_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ // static configuration
+ static void static_set_palette_tag(device_t &device, const char *tag);
+
// device interface
DECLARE_READ8_MEMBER( data_r );
DECLARE_WRITE8_MEMBER( data_w );
@@ -106,6 +112,8 @@ private:
// timers
emu_timer *m_busy_timer;
emu_timer *m_blink_timer;
+
+ required_device<palette_device> m_palette;
};
// device type definition