Winning Run: Mask is actually saved in videoram write, fixes tachometer.

This commit is contained in:
angelosa 2016-12-30 08:05:20 +01:00
parent 8e8f20df82
commit a6b5427eaf
2 changed files with 5 additions and 4 deletions

View File

@ -73,6 +73,7 @@ public:
optional_device<namco_c148_device> m_gpu_intc;
std::unique_ptr<uint8_t[]> m_videoram;
std::unique_ptr<uint8_t[]> m_colorram;
std::unique_ptr<uint16_t[]> m_winrun_dspcomram;
uint16_t m_winrun_poly_buf[WINRUN_MAX_POLY_PARAM];
int m_winrun_poly_index;

View File

@ -52,7 +52,6 @@ WRITE16_MEMBER(namcos21_state::winrun_gpu_register_w)
WRITE16_MEMBER(namcos21_state::winrun_gpu_videoram_w)
{
uint8_t *videoram = m_videoram.get();
int color = data>>8;
int mask = data&0xff;
int i;
@ -60,15 +59,15 @@ WRITE16_MEMBER(namcos21_state::winrun_gpu_videoram_w)
{
if( mask&(0x01<<i) )
{
videoram[(offset+i)&0x7ffff] = color;
m_videoram[(offset+i)&0x7ffff] = color;
m_colorram[(offset+i)&0x7ffff] = mask;
}
}
}
READ16_MEMBER(namcos21_state::winrun_gpu_videoram_r)
{
uint8_t *videoram = m_videoram.get();
return videoram[offset]<<8;
return (m_videoram[offset]<<8) | m_colorram[offset];
}
void namcos21_state::allocate_poly_framebuffer()
@ -363,6 +362,7 @@ VIDEO_START_MEMBER(namcos21_state,namcos21)
if( m_gametype == NAMCOS21_WINRUN91 )
{
m_videoram = std::make_unique<uint8_t[]>(0x80000);
m_colorram = std::make_unique<uint8_t[]>(0x80000);
}
allocate_poly_framebuffer();
c355_obj_init(