segag80r.c: fix generic_paletteram regression (nw)

This commit is contained in:
Alex W. Jackson 2014-05-06 06:28:17 +00:00
parent 04090feede
commit c3f40b01ee
2 changed files with 9 additions and 9 deletions

View File

@ -35,8 +35,7 @@ public:
m_005snd(*this, "005"),
m_gfxdecode(*this, "gfxdecode"),
m_screen(*this, "screen"),
m_palette(*this, "palette"),
m_generic_paletteram_8(*this, "paletteram") { }
m_palette(*this, "palette") { }
required_shared_ptr<UINT8> m_mainram;
required_shared_ptr<UINT8> m_videoram;
@ -52,7 +51,8 @@ public:
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
required_shared_ptr<UINT8> m_generic_paletteram_8;
dynamic_array<UINT8> m_paletteram;
UINT8 m_sound_state[2];
UINT8 m_sound_rate;

View File

@ -199,7 +199,7 @@ void segag80r_state::video_start()
m_gfxdecode->gfx(0)->set_source(&videoram[0x800]);
/* allocate paletteram */
m_generic_paletteram_8.allocate(0x80);
m_paletteram.resize(0x80);
/* initialize the particulars for each type of background PCB */
switch (m_background_pcb)
@ -262,7 +262,7 @@ WRITE8_MEMBER(segag80r_state::segag80r_videoram_w)
if ((offset & 0x1000) && (m_video_control & 0x02))
{
offset &= 0x3f;
m_generic_paletteram_8[offset] = data;
m_paletteram[offset] = data;
g80_set_palette_entry(offset, data);
return;
}
@ -426,7 +426,7 @@ WRITE8_MEMBER(segag80r_state::monsterb_videoram_w)
if ((offset & 0x1fc0) == 0x1040 && (m_video_control & 0x40))
{
offs_t paloffs = offset & 0x3f;
m_generic_paletteram_8[paloffs | 0x40] = data;
m_paletteram[paloffs | 0x40] = data;
g80_set_palette_entry(paloffs | 0x40, data);
/* note that since the background board is not integrated with the main board */
/* writes here also write through to regular videoram */
@ -496,7 +496,7 @@ WRITE8_MEMBER(segag80r_state::pignewt_videoram_w)
if ((offset & 0x1fc0) == 0x1040 && (m_video_control & 0x02))
{
offs_t paloffs = offset & 0x3f;
m_generic_paletteram_8[paloffs | 0x40] = data;
m_paletteram[paloffs | 0x40] = data;
g80_set_palette_entry(paloffs | 0x40, data);
return;
}
@ -579,7 +579,7 @@ WRITE8_MEMBER(segag80r_state::sindbadm_videoram_w)
if ((offset & 0x1fc0) == 0x1000 && (m_video_control & 0x02))
{
offs_t paloffs = offset & 0x3f;
m_generic_paletteram_8[paloffs | 0x40] = data;
m_paletteram[paloffs | 0x40] = data;
g80_set_palette_entry(paloffs | 0x40, data);
return;
}
@ -683,7 +683,7 @@ void segag80r_state::draw_background_spaceod(bitmap_ind16 &bitmap, const rectang
for (x = cliprect.min_x; x <= cliprect.max_x; x++)
{
int effx = ((x + m_spaceod_hcounter) ^ flipmask) + xoffset;
UINT8 fgpix = m_generic_paletteram_8[dst[x]];
UINT8 fgpix = m_paletteram[dst[x]];
UINT8 bgpix = src[effx & xmask] & 0x3f;
/* the background detect flag is set if: