mirror of
https://github.com/holub/mame
synced 2025-04-27 18:53:05 +03:00
Added sprite template to main cshooter set too
This commit is contained in:
parent
c614a29886
commit
072521f2e3
@ -220,6 +220,8 @@ conventional RAM. See the memory map for sprite data format.
|
|||||||
TODO:
|
TODO:
|
||||||
- MCU is identical between Empire City and Cross Shooter, I guess it's coinage
|
- MCU is identical between Empire City and Cross Shooter, I guess it's coinage
|
||||||
related.
|
related.
|
||||||
|
- Cross Shooter has serious issues with firing rate, especially noticeable
|
||||||
|
when some bosses appears. irq related?
|
||||||
- palette is incorporated - fix!!!
|
- palette is incorporated - fix!!!
|
||||||
- handle transparency in text layer properly (how?)
|
- handle transparency in text layer properly (how?)
|
||||||
- second bank of sf02 is this used? (probably NOT)
|
- second bank of sf02 is this used? (probably NOT)
|
||||||
@ -574,6 +576,9 @@ static MACHINE_CONFIG_DERIVED( cshooter, stfight )
|
|||||||
MCFG_CPU_ADD("mcu", M68705, 3000000) /* 3 MHz */
|
MCFG_CPU_ADD("mcu", M68705, 3000000) /* 3 MHz */
|
||||||
MCFG_CPU_PROGRAM_MAP(cshooter_mcu_map)
|
MCFG_CPU_PROGRAM_MAP(cshooter_mcu_map)
|
||||||
|
|
||||||
|
MCFG_SCREEN_MODIFY("screen")
|
||||||
|
MCFG_SCREEN_UPDATE_DRIVER(stfight_state, screen_update_cshooter)
|
||||||
|
|
||||||
MCFG_GFXDECODE(cshooter)
|
MCFG_GFXDECODE(cshooter)
|
||||||
MCFG_VIDEO_START_OVERRIDE(stfight_state,cshooter)
|
MCFG_VIDEO_START_OVERRIDE(stfight_state,cshooter)
|
||||||
MACHINE_CONFIG_END
|
MACHINE_CONFIG_END
|
||||||
@ -985,8 +990,8 @@ ROM_START( cshooter )
|
|||||||
|
|
||||||
ROM_REGION( 0x820, "proms", 0 )
|
ROM_REGION( 0x820, "proms", 0 )
|
||||||
ROM_LOAD( "63s281.16a", 0x0000, 0x0100, CRC(0b8b914b) SHA1(8cf4910b846de79661cc187887171ed8ebfd6719) ) // clut
|
ROM_LOAD( "63s281.16a", 0x0000, 0x0100, CRC(0b8b914b) SHA1(8cf4910b846de79661cc187887171ed8ebfd6719) ) // clut
|
||||||
ROM_LOAD( "82s129.9s", 0x0100, 0x0100, CRC(cf14ba30) SHA1(3284b6809075756b3c8e07d9705fc7eacb7556f1) ) // timing? (not used)
|
ROM_LOAD( "82s129.9s", 0x0500, 0x0100, CRC(cf14ba30) SHA1(3284b6809075756b3c8e07d9705fc7eacb7556f1) ) // timing? (not used)
|
||||||
ROM_LOAD( "82s129.4e", 0x0200, 0x0100, CRC(0eaf5158) SHA1(bafd4108708f66cd7b280e47152b108f3e254fc9) ) // timing? (not used)
|
ROM_LOAD( "82s129.4e", 0x0600, 0x0100, CRC(0eaf5158) SHA1(bafd4108708f66cd7b280e47152b108f3e254fc9) ) // timing? (not used)
|
||||||
ROM_LOAD( "82s123.7a", 0x0800, 0x0020, CRC(93e2d292) SHA1(af8edd0cfe85f28ede9604cfaf4516d54e5277c9) ) // sprite color related? (not used)
|
ROM_LOAD( "82s123.7a", 0x0800, 0x0020, CRC(93e2d292) SHA1(af8edd0cfe85f28ede9604cfaf4516d54e5277c9) ) // sprite color related? (not used)
|
||||||
ROM_END
|
ROM_END
|
||||||
|
|
||||||
|
@ -66,10 +66,12 @@ public:
|
|||||||
virtual void machine_reset();
|
virtual void machine_reset();
|
||||||
virtual void palette_init();
|
virtual void palette_init();
|
||||||
UINT32 screen_update_stfight(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
UINT32 screen_update_stfight(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||||
|
UINT32 screen_update_cshooter(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||||
INTERRUPT_GEN_MEMBER(stfight_vb_interrupt);
|
INTERRUPT_GEN_MEMBER(stfight_vb_interrupt);
|
||||||
DECLARE_WRITE8_MEMBER(stfight_adpcm_control_w);
|
DECLARE_WRITE8_MEMBER(stfight_adpcm_control_w);
|
||||||
void set_pens();
|
void set_pens();
|
||||||
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
|
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||||
|
void cshooter_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||||
DECLARE_WRITE_LINE_MEMBER(stfight_adpcm_int);
|
DECLARE_WRITE_LINE_MEMBER(stfight_adpcm_int);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -335,3 +335,48 @@ UINT32 stfight_state::screen_update_stfight(screen_device &screen, bitmap_ind16
|
|||||||
m_tx_tilemap->draw(bitmap, cliprect, 0,0);
|
m_tx_tilemap->draw(bitmap, cliprect, 0,0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void stfight_state::cshooter_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||||
|
{
|
||||||
|
for (int i = m_sprite_ram.bytes() - 4; i >= 0 ; i -= 4)
|
||||||
|
{
|
||||||
|
if (m_sprite_ram[i+1]&0x80)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
int attr = m_sprite_ram[i+1];
|
||||||
|
int flipx = attr & 0x10;
|
||||||
|
int color = attr & 0x0f;
|
||||||
|
int pri = (attr & 0x20) >> 5;
|
||||||
|
|
||||||
|
/* BCD debug code, to be removed in the end */
|
||||||
|
UINT8 tile_low = (m_sprite_ram[i]&0x0f);
|
||||||
|
UINT8 tile_high = ((m_sprite_ram[i]&0xf0)>>4);
|
||||||
|
|
||||||
|
tile_low += (tile_low > 0x9) ? 0x37 : 0x30;
|
||||||
|
tile_high += (tile_high > 0x9) ? 0x37 : 0x30;
|
||||||
|
|
||||||
|
pdrawgfx_transpen(bitmap,cliprect,machine().gfx[0], tile_high << 1, color, flipx, 0, m_sprite_ram[i+3],m_sprite_ram[i+2],machine().priority_bitmap,pri ? 0x02 : 0,0x00);
|
||||||
|
pdrawgfx_transpen(bitmap,cliprect,machine().gfx[0], tile_high << 1, color, flipx, 0, m_sprite_ram[i+3]+8,m_sprite_ram[i+2],machine().priority_bitmap,pri ? 0x02 : 0,0x00);
|
||||||
|
pdrawgfx_transpen(bitmap,cliprect,machine().gfx[0], tile_low << 1, color, flipx, 0, m_sprite_ram[i+3]+8,m_sprite_ram[i+2]+8,machine().priority_bitmap,pri ? 0x02 : 0,0x00);
|
||||||
|
pdrawgfx_transpen(bitmap,cliprect,machine().gfx[0], tile_low << 1, color, flipx, 0, m_sprite_ram[i+3],m_sprite_ram[i+2]+8,machine().priority_bitmap,pri ? 0x02 : 0,0x00);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
UINT32 stfight_state::screen_update_cshooter(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||||
|
{
|
||||||
|
set_pens();
|
||||||
|
|
||||||
|
machine().priority_bitmap.fill(0, cliprect);
|
||||||
|
|
||||||
|
bitmap.fill(0, cliprect); /* in case m_bg_tilemap is disabled */
|
||||||
|
m_bg_tilemap->draw(bitmap, cliprect, 0,0);
|
||||||
|
m_fg_tilemap->draw(bitmap, cliprect, 0,1);
|
||||||
|
|
||||||
|
/* Draw sprites (may be obscured by foreground layer) */
|
||||||
|
// if (m_vh_latch_ram[0x07] & 0x40)
|
||||||
|
cshooter_draw_sprites(bitmap,cliprect);
|
||||||
|
|
||||||
|
m_tx_tilemap->draw(bitmap, cliprect, 0,0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user