diff --git a/src/emu/video/v9938.c b/src/emu/video/v9938.c index 926e56d619c..d138d8aea6e 100644 --- a/src/emu/video/v9938.c +++ b/src/emu/video/v9938.c @@ -244,7 +244,7 @@ b0 is set if b2 and b1 are set (remember, color bus is 3 bits) */ -PALETTE_INIT_MEMBER(v99x8_device, v9938) +PALETTE_INIT_MEMBER(v9938_device, v9938) { int i; @@ -272,7 +272,9 @@ PALETTE_INIT_MEMBER(v9958_device, v9958) UINT8 pal[19268*3]; // init v9938 512-color palette - PALETTE_INIT_NAME(v9938)(palette); + for (i=0;i<512;i++) + palette.set_pen_color(i, pal3bit(i >> 6), pal3bit(i >> 3), pal3bit(i >> 0)); + if(palette.entries() != 19780) fatalerror("V9958: not enough palette, must be 19780"); @@ -3260,7 +3262,7 @@ void v99x8_device::update_command() } static MACHINE_CONFIG_FRAGMENT( v9938 ) - MCFG_PALETTE_ADD("palette", 19780) + MCFG_PALETTE_ADD("palette", 512) MCFG_PALETTE_INIT_OWNER(v9938_device, v9938) MACHINE_CONFIG_END diff --git a/src/emu/video/v9938.h b/src/emu/video/v9938.h index 8c786af9712..6f39a5d0eaf 100644 --- a/src/emu/video/v9938.h +++ b/src/emu/video/v9938.h @@ -78,8 +78,6 @@ public: DECLARE_READ8_MEMBER( read ); DECLARE_WRITE8_MEMBER( write ); - DECLARE_PALETTE_INIT(v9938); - UINT8 vram_r(); UINT8 status_r(); void palette_w(UINT8 data); @@ -247,6 +245,7 @@ class v9938_device : public v99x8_device public: v9938_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + DECLARE_PALETTE_INIT(v9938); protected: virtual machine_config_constructor device_mconfig_additions() const; }; diff --git a/src/mess/video/isa_pc1640_iga.c b/src/mess/video/isa_pc1640_iga.c index 4450a8405e4..b8f6b4f1225 100644 --- a/src/mess/video/isa_pc1640_iga.c +++ b/src/mess/video/isa_pc1640_iga.c @@ -82,6 +82,9 @@ isa8_pc1640_iga_device::isa8_pc1640_iga_device(const machine_config &mconfig, co void isa8_pc1640_iga_device::device_start() { + if (m_palette != NULL && !m_palette->started()) + throw device_missing_dependencies(); + astring tempstring; set_isa_device();