Fix rest of mess issues (nw)

This commit is contained in:
Miodrag Milanovic 2014-03-02 08:29:24 +00:00
parent 3c4cb26006
commit bc57e5824a
3 changed files with 9 additions and 5 deletions

View File

@ -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; int i;
@ -272,7 +272,9 @@ PALETTE_INIT_MEMBER(v9958_device, v9958)
UINT8 pal[19268*3]; UINT8 pal[19268*3];
// init v9938 512-color palette // 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) if(palette.entries() != 19780)
fatalerror("V9958: not enough palette, must be 19780"); fatalerror("V9958: not enough palette, must be 19780");
@ -3260,7 +3262,7 @@ void v99x8_device::update_command()
} }
static MACHINE_CONFIG_FRAGMENT( v9938 ) static MACHINE_CONFIG_FRAGMENT( v9938 )
MCFG_PALETTE_ADD("palette", 19780) MCFG_PALETTE_ADD("palette", 512)
MCFG_PALETTE_INIT_OWNER(v9938_device, v9938) MCFG_PALETTE_INIT_OWNER(v9938_device, v9938)
MACHINE_CONFIG_END MACHINE_CONFIG_END

View File

@ -78,8 +78,6 @@ public:
DECLARE_READ8_MEMBER( read ); DECLARE_READ8_MEMBER( read );
DECLARE_WRITE8_MEMBER( write ); DECLARE_WRITE8_MEMBER( write );
DECLARE_PALETTE_INIT(v9938);
UINT8 vram_r(); UINT8 vram_r();
UINT8 status_r(); UINT8 status_r();
void palette_w(UINT8 data); void palette_w(UINT8 data);
@ -247,6 +245,7 @@ class v9938_device : public v99x8_device
public: public:
v9938_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); v9938_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
DECLARE_PALETTE_INIT(v9938);
protected: protected:
virtual machine_config_constructor device_mconfig_additions() const; virtual machine_config_constructor device_mconfig_additions() const;
}; };

View File

@ -82,6 +82,9 @@ isa8_pc1640_iga_device::isa8_pc1640_iga_device(const machine_config &mconfig, co
void isa8_pc1640_iga_device::device_start() void isa8_pc1640_iga_device::device_start()
{ {
if (m_palette != NULL && !m_palette->started())
throw device_missing_dependencies();
astring tempstring; astring tempstring;
set_isa_device(); set_isa_device();