spiders: use standard 3-bit palette

This commit is contained in:
Dirk Best 2015-07-27 12:51:27 +02:00
parent 5a3c89c7a5
commit 59f346c254
2 changed files with 8 additions and 16 deletions

View File

@ -323,16 +323,6 @@ WRITE_LINE_MEMBER(spiders_state::flipscreen_w)
}
MC6845_BEGIN_UPDATE( spiders_state::crtc_begin_update )
{
/* create the pens */
for (offs_t i = 0; i < NUM_PENS; i++)
{
m_pens[i] = rgb_t(pal1bit(i >> 0), pal1bit(i >> 1), pal1bit(i >> 2));
}
}
MC6845_UPDATE_ROW( spiders_state::crtc_update_row )
{
UINT8 x = 0;
@ -378,7 +368,7 @@ MC6845_UPDATE_ROW( spiders_state::crtc_update_row )
data3 = data3 >> 1;
}
bitmap.pix32(y, x) = m_pens[color];
bitmap.pix32(y, x) = m_palette->pen_color(color);
x = x + 1;
}
@ -578,10 +568,11 @@ static MACHINE_CONFIG_START( spiders, spiders_state )
MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, 256, 0, 256, 256, 0, 256) /* temporary, CRTC will configure screen */
MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update)
MCFG_PALETTE_ADD_3BIT_RGB("palette")
MCFG_MC6845_ADD("crtc", MC6845, "screen", CRTC_CLOCK)
MCFG_MC6845_SHOW_BORDER_AREA(false)
MCFG_MC6845_CHAR_WIDTH(8)
MCFG_MC6845_BEGIN_UPDATE_CB(spiders_state, crtc_begin_update)
MCFG_MC6845_UPDATE_ROW_CB(spiders_state, crtc_update_row)
MCFG_MC6845_OUT_DE_CB(WRITELINE(spiders_state, display_enable_changed))

View File

@ -8,8 +8,6 @@
#include "sound/discrete.h"
#include "video/mc6845.h"
#define NUM_PENS (8)
class spiders_state : public driver_device
{
public:
@ -18,6 +16,7 @@ public:
m_ram(*this, "ram"),
m_discrete(*this, "discrete"),
m_maincpu(*this, "maincpu"),
m_palette(*this, "palette"),
m_audiocpu(*this, "audiocpu") { }
required_shared_ptr<UINT8> m_ram;
@ -27,7 +26,7 @@ public:
UINT8 m_gfx_rom_ctrl_mode;
UINT8 m_gfx_rom_ctrl_latch;
UINT8 m_gfx_rom_ctrl_data;
pen_t m_pens[NUM_PENS];
DECLARE_WRITE_LINE_MEMBER(main_cpu_irq);
DECLARE_WRITE_LINE_MEMBER(main_cpu_firq);
DECLARE_WRITE_LINE_MEMBER(audio_cpu_irq);
@ -42,9 +41,11 @@ public:
DECLARE_WRITE8_MEMBER(spiders_audio_a_w);
DECLARE_WRITE8_MEMBER(spiders_audio_b_w);
DECLARE_WRITE8_MEMBER(spiders_audio_ctrl_w);
MC6845_BEGIN_UPDATE(crtc_begin_update);
MC6845_UPDATE_ROW(crtc_update_row);
required_device<cpu_device> m_maincpu;
required_device<palette_device> m_palette;
required_device<cpu_device> m_audiocpu;
};