summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2017-04-06 18:00:43 -0400
committer AJR <ajrhacker@users.noreply.github.com>2017-04-06 18:00:43 -0400
commitcb68159154a5586dc92cae779fac4a9ecde4abf4 (patch)
tree0de47e8a30c0a364bee8813132a1ba249d956f13
parent0eebf8c69c5401b9fa74bb0c3453e2f5d92294e8 (diff)
Palette device fixes (nw)
- Enforce dependencies in various Konami, Sega & Seta GFX devices - Disable palette uniqueness check in divideo
-rw-r--r--src/emu/divideo.cpp6
-rw-r--r--src/mame/video/k001604.cpp3
-rw-r--r--src/mame/video/k037122.cpp3
-rw-r--r--src/mame/video/k051316.cpp3
-rw-r--r--src/mame/video/k051960.cpp2
-rw-r--r--src/mame/video/k053244_k053245.cpp3
-rw-r--r--src/mame/video/k054156_k054157_k056832.cpp3
-rw-r--r--src/mame/video/segaic24.cpp3
-rw-r--r--src/mame/video/st0020.cpp3
9 files changed, 26 insertions, 3 deletions
diff --git a/src/emu/divideo.cpp b/src/emu/divideo.cpp
index a8e86fe0bd1..4abe607dab3 100644
--- a/src/emu/divideo.cpp
+++ b/src/emu/divideo.cpp
@@ -137,9 +137,9 @@ void device_video_interface::interface_pre_start()
// resolve the palette for the sake of register_screen_bitmap
m_screen->resolve_palette();
- // no other palette may be specified
- if (m_screen->has_palette() && palintf != &m_screen->palette())
- throw emu_fatalerror("Device '%s' cannot control screen '%s' with palette '%s'", m_screen_tag, device().tag(), m_screen->palette().device().tag());
+ // no other palette may be specified (FIXME: breaks meritm.cpp)
+ if (0 && m_screen->has_palette() && palintf != &m_screen->palette())
+ throw emu_fatalerror("Device '%s' cannot control screen '%s' with palette '%s'", device().tag(), m_screen_tag, m_screen->palette().device().tag());
}
}
}
diff --git a/src/mame/video/k001604.cpp b/src/mame/video/k001604.cpp
index 6735d79dad1..1ad9bf82123 100644
--- a/src/mame/video/k001604.cpp
+++ b/src/mame/video/k001604.cpp
@@ -37,6 +37,9 @@ k001604_device::k001604_device(const machine_config &mconfig, const char *tag, d
void k001604_device::device_start()
{
+ if (!palette().device().started())
+ throw device_missing_dependencies();
+
static const gfx_layout k001604_char_layout_layer_8x8 =
{
8, 8,
diff --git a/src/mame/video/k037122.cpp b/src/mame/video/k037122.cpp
index 5e25e19a897..4885c080e63 100644
--- a/src/mame/video/k037122.cpp
+++ b/src/mame/video/k037122.cpp
@@ -33,6 +33,9 @@ k037122_device::k037122_device(const machine_config &mconfig, const char *tag, d
void k037122_device::device_start()
{
+ if (!palette().device().started())
+ throw device_missing_dependencies();
+
static const gfx_layout k037122_char_layout =
{
8, 8,
diff --git a/src/mame/video/k051316.cpp b/src/mame/video/k051316.cpp
index 22b78747023..e60bcc06bac 100644
--- a/src/mame/video/k051316.cpp
+++ b/src/mame/video/k051316.cpp
@@ -150,6 +150,9 @@ void k051316_device::set_bpp(device_t &device, int bpp)
void k051316_device::device_start()
{
+ if (!palette().device().started())
+ throw device_missing_dependencies();
+
decode_gfx();
gfx(0)->set_colors(palette().entries() / gfx(0)->depth());
diff --git a/src/mame/video/k051960.cpp b/src/mame/video/k051960.cpp
index b0fb6d5893e..93299644cd3 100644
--- a/src/mame/video/k051960.cpp
+++ b/src/mame/video/k051960.cpp
@@ -184,6 +184,8 @@ void k051960_device::device_start()
// make sure our screen is started
if (!m_screen->started())
throw device_missing_dependencies();
+ if (!palette().device().started())
+ throw device_missing_dependencies();
// allocate scanline timer and start at first scanline
m_scanline_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(k051960_device::scanline_callback), this));
diff --git a/src/mame/video/k053244_k053245.cpp b/src/mame/video/k053244_k053245.cpp
index 186942fa794..2d9e0e1b4c4 100644
--- a/src/mame/video/k053244_k053245.cpp
+++ b/src/mame/video/k053244_k053245.cpp
@@ -118,6 +118,9 @@ void k05324x_device::set_bpp(device_t &device, int bpp)
void k05324x_device::device_start()
{
+ if (!palette().device().started())
+ throw device_missing_dependencies();
+
/* decode the graphics */
decode_gfx();
gfx(0)->set_colors(palette().entries() / gfx(0)->depth());
diff --git a/src/mame/video/k054156_k054157_k056832.cpp b/src/mame/video/k054156_k054157_k056832.cpp
index c908c4ce72d..2fb5942aabe 100644
--- a/src/mame/video/k054156_k054157_k056832.cpp
+++ b/src/mame/video/k054156_k054157_k056832.cpp
@@ -333,6 +333,9 @@ void k056832_device::finalize_init()
void k056832_device::device_start()
{
+ if (!palette().device().started())
+ throw device_missing_dependencies();
+
memset(m_regs, 0x00, sizeof(m_regs) );
memset(m_regsb, 0x00, sizeof(m_regsb) );
diff --git a/src/mame/video/segaic24.cpp b/src/mame/video/segaic24.cpp
index d4bb17157b5..6747046de0b 100644
--- a/src/mame/video/segaic24.cpp
+++ b/src/mame/video/segaic24.cpp
@@ -77,6 +77,9 @@ TILE_GET_INFO_MEMBER(segas24_tile::tile_info_1w)
void segas24_tile::device_start()
{
+ if (!palette().device().started())
+ throw device_missing_dependencies();
+
char_ram = std::make_unique<uint16_t[]>(0x80000/2);
tile_ram = std::make_unique<uint16_t[]>(0x10000/2);
diff --git a/src/mame/video/st0020.cpp b/src/mame/video/st0020.cpp
index f58b1d4e430..35bb1d5e4e3 100644
--- a/src/mame/video/st0020.cpp
+++ b/src/mame/video/st0020.cpp
@@ -52,6 +52,9 @@ static const gfx_layout layout_16x8x8_2 =
void st0020_device::device_start()
{
+ if (!palette().device().started())
+ throw device_missing_dependencies();
+
memory_region* rgn = memregion(tag());
if (rgn)