mirror of
https://github.com/holub/mame
synced 2025-05-29 09:03:08 +03:00
Winning Run: Mask is actually saved in videoram write, fixes tachometer.
This commit is contained in:
parent
8e8f20df82
commit
a6b5427eaf
@ -73,6 +73,7 @@ public:
|
|||||||
optional_device<namco_c148_device> m_gpu_intc;
|
optional_device<namco_c148_device> m_gpu_intc;
|
||||||
|
|
||||||
std::unique_ptr<uint8_t[]> m_videoram;
|
std::unique_ptr<uint8_t[]> m_videoram;
|
||||||
|
std::unique_ptr<uint8_t[]> m_colorram;
|
||||||
std::unique_ptr<uint16_t[]> m_winrun_dspcomram;
|
std::unique_ptr<uint16_t[]> m_winrun_dspcomram;
|
||||||
uint16_t m_winrun_poly_buf[WINRUN_MAX_POLY_PARAM];
|
uint16_t m_winrun_poly_buf[WINRUN_MAX_POLY_PARAM];
|
||||||
int m_winrun_poly_index;
|
int m_winrun_poly_index;
|
||||||
|
@ -52,7 +52,6 @@ WRITE16_MEMBER(namcos21_state::winrun_gpu_register_w)
|
|||||||
|
|
||||||
WRITE16_MEMBER(namcos21_state::winrun_gpu_videoram_w)
|
WRITE16_MEMBER(namcos21_state::winrun_gpu_videoram_w)
|
||||||
{
|
{
|
||||||
uint8_t *videoram = m_videoram.get();
|
|
||||||
int color = data>>8;
|
int color = data>>8;
|
||||||
int mask = data&0xff;
|
int mask = data&0xff;
|
||||||
int i;
|
int i;
|
||||||
@ -60,15 +59,15 @@ WRITE16_MEMBER(namcos21_state::winrun_gpu_videoram_w)
|
|||||||
{
|
{
|
||||||
if( mask&(0x01<<i) )
|
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)
|
READ16_MEMBER(namcos21_state::winrun_gpu_videoram_r)
|
||||||
{
|
{
|
||||||
uint8_t *videoram = m_videoram.get();
|
return (m_videoram[offset]<<8) | m_colorram[offset];
|
||||||
return videoram[offset]<<8;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void namcos21_state::allocate_poly_framebuffer()
|
void namcos21_state::allocate_poly_framebuffer()
|
||||||
@ -363,6 +362,7 @@ VIDEO_START_MEMBER(namcos21_state,namcos21)
|
|||||||
if( m_gametype == NAMCOS21_WINRUN91 )
|
if( m_gametype == NAMCOS21_WINRUN91 )
|
||||||
{
|
{
|
||||||
m_videoram = std::make_unique<uint8_t[]>(0x80000);
|
m_videoram = std::make_unique<uint8_t[]>(0x80000);
|
||||||
|
m_colorram = std::make_unique<uint8_t[]>(0x80000);
|
||||||
}
|
}
|
||||||
allocate_poly_framebuffer();
|
allocate_poly_framebuffer();
|
||||||
c355_obj_init(
|
c355_obj_init(
|
||||||
|
Loading…
Reference in New Issue
Block a user