mirror of
https://github.com/holub/mame
synced 2025-10-07 01:16:22 +03:00
Attempt to fix sprite-sprite priorities in Panic Road, nw
This commit is contained in:
parent
f8ed67472d
commit
74ebabf032
@ -124,7 +124,6 @@ public:
|
|||||||
virtual void palette_init();
|
virtual void palette_init();
|
||||||
DECLARE_MACHINE_RESET(cshooter);
|
DECLARE_MACHINE_RESET(cshooter);
|
||||||
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
|
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||||
UINT32 screen_update_cshooter(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
|
||||||
UINT32 screen_update_airraid(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
UINT32 screen_update_airraid(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||||
TIMER_DEVICE_CALLBACK_MEMBER(cshooter_scanline);
|
TIMER_DEVICE_CALLBACK_MEMBER(cshooter_scanline);
|
||||||
};
|
};
|
||||||
@ -189,27 +188,6 @@ void cshooter_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprec
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT32 cshooter_state::screen_update_cshooter(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
|
||||||
{
|
|
||||||
// set palette
|
|
||||||
for (int i = 0; i < 0x100; i++)
|
|
||||||
{
|
|
||||||
int r = m_generic_paletteram_8[i] >> 4;
|
|
||||||
int g = m_generic_paletteram_8[i] & 0xf;
|
|
||||||
int b = m_generic_paletteram2_8[i] & 0xf;
|
|
||||||
|
|
||||||
rgb_t color = MAKE_RGB(pal4bit(r), pal4bit(g), pal4bit(b));
|
|
||||||
colortable_palette_set_color(machine().colortable, i, color);
|
|
||||||
}
|
|
||||||
|
|
||||||
bitmap.fill(0x80, cliprect); // temp
|
|
||||||
|
|
||||||
//draw_sprites(bitmap, cliprect);
|
|
||||||
|
|
||||||
m_txtilemap->draw(screen, bitmap, cliprect, 0,0);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
UINT32 cshooter_state::screen_update_airraid(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
UINT32 cshooter_state::screen_update_airraid(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||||
{
|
{
|
||||||
// set palette (compared to cshooter, r and g are swapped)
|
// set palette (compared to cshooter, r and g are swapped)
|
||||||
@ -451,39 +429,6 @@ static GFXDECODE_START( cshooter )
|
|||||||
GFXDECODE_ENTRY( "gfx1", 0, cshooter_charlayout, 0, 16 )
|
GFXDECODE_ENTRY( "gfx1", 0, cshooter_charlayout, 0, 16 )
|
||||||
GFXDECODE_END
|
GFXDECODE_END
|
||||||
|
|
||||||
#if 0
|
|
||||||
static MACHINE_CONFIG_START( cshooter, cshooter_state )
|
|
||||||
|
|
||||||
/* basic machine hardware */
|
|
||||||
MCFG_CPU_ADD("maincpu", Z80,XTAL_12MHz/2) /* verified on pcb */
|
|
||||||
MCFG_CPU_PROGRAM_MAP(cshooter_map)
|
|
||||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", cshooter_state, cshooter_scanline, "screen", 0, 1)
|
|
||||||
|
|
||||||
MCFG_CPU_ADD("audiocpu", Z80,XTAL_14_31818MHz/4) /* verified on pcb */
|
|
||||||
MCFG_CPU_PROGRAM_MAP(sound_map)
|
|
||||||
|
|
||||||
MCFG_QUANTUM_TIME(attotime::from_hz(6000))
|
|
||||||
|
|
||||||
MCFG_MACHINE_RESET_OVERRIDE(cshooter_state,cshooter)
|
|
||||||
|
|
||||||
/* video hardware */
|
|
||||||
MCFG_SCREEN_ADD("screen", RASTER)
|
|
||||||
MCFG_SCREEN_REFRESH_RATE(60)
|
|
||||||
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
|
|
||||||
MCFG_SCREEN_SIZE(256, 256)
|
|
||||||
MCFG_SCREEN_VISIBLE_AREA(0, 256-1, 16, 256-1-16)
|
|
||||||
MCFG_SCREEN_UPDATE_DRIVER(cshooter_state, screen_update_cshooter)
|
|
||||||
|
|
||||||
MCFG_GFXDECODE(cshooter)
|
|
||||||
MCFG_PALETTE_LENGTH(0x100)
|
|
||||||
|
|
||||||
/* sound hardware */
|
|
||||||
/* YM2151 and ym3931 seibu custom cpu running at XTAL_14_31818MHz/4 */
|
|
||||||
MCFG_SEIBU_SOUND_ADD("seibu_sound")
|
|
||||||
|
|
||||||
MACHINE_CONFIG_END
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static MACHINE_CONFIG_START( airraid, cshooter_state )
|
static MACHINE_CONFIG_START( airraid, cshooter_state )
|
||||||
|
|
||||||
/* basic machine hardware */
|
/* basic machine hardware */
|
||||||
|
@ -80,7 +80,7 @@ public:
|
|||||||
required_shared_ptr<UINT8> m_spriteram;
|
required_shared_ptr<UINT8> m_spriteram;
|
||||||
required_shared_ptr<UINT8> m_textram;
|
required_shared_ptr<UINT8> m_textram;
|
||||||
required_shared_ptr<UINT8> m_spritebank;
|
required_shared_ptr<UINT8> m_spritebank;
|
||||||
|
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
required_device<t5182_device> m_t5182;
|
required_device<t5182_device> m_t5182;
|
||||||
|
|
||||||
@ -255,7 +255,7 @@ void panicr_state::draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect )
|
|||||||
|
|
||||||
// ssss ssss | Fx-- cccc | yyyy yyyy | xxxx xxxx
|
// ssss ssss | Fx-- cccc | yyyy yyyy | xxxx xxxx
|
||||||
|
|
||||||
for (offs = 0; offs<0x1d00; offs+=16)
|
for (offs = m_spriteram.bytes() - 16; offs>=0; offs-=16)
|
||||||
{
|
{
|
||||||
flipx = 0;
|
flipx = 0;
|
||||||
flipy = spriteram[offs+1] & 0x80;
|
flipy = spriteram[offs+1] & 0x80;
|
||||||
@ -371,7 +371,7 @@ READ8_MEMBER(panicr_state::panicr_collision_r)
|
|||||||
UINT8 ret = 0;
|
UINT8 ret = 0;
|
||||||
UINT16* srcline = &m_tempbitmap_1->pix16(actual_line);
|
UINT16* srcline = &m_tempbitmap_1->pix16(actual_line);
|
||||||
|
|
||||||
|
|
||||||
ret |= (srcline[(actual_column+0)&0xff]&3) << 6;
|
ret |= (srcline[(actual_column+0)&0xff]&3) << 6;
|
||||||
ret |= (srcline[(actual_column+1)&0xff]&3) << 4;
|
ret |= (srcline[(actual_column+1)&0xff]&3) << 4;
|
||||||
ret |= (srcline[(actual_column+2)&0xff]&3) << 2;
|
ret |= (srcline[(actual_column+2)&0xff]&3) << 2;
|
||||||
@ -611,7 +611,7 @@ static MACHINE_CONFIG_START( panicr, panicr_state )
|
|||||||
MCFG_CPU_ADD("maincpu", V20,MASTER_CLOCK/2) /* Sony 8623h9 CXQ70116D-8 (V20 compatible) */
|
MCFG_CPU_ADD("maincpu", V20,MASTER_CLOCK/2) /* Sony 8623h9 CXQ70116D-8 (V20 compatible) */
|
||||||
MCFG_CPU_PROGRAM_MAP(panicr_map)
|
MCFG_CPU_PROGRAM_MAP(panicr_map)
|
||||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", panicr_state, panicr_scanline, "screen", 0, 1)
|
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", panicr_state, panicr_scanline, "screen", 0, 1)
|
||||||
|
|
||||||
MCFG_T5182_ADD("t5182")
|
MCFG_T5182_ADD("t5182")
|
||||||
MCFG_FRAGMENT_ADD(t5182)
|
MCFG_FRAGMENT_ADD(t5182)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user