mirror of
https://github.com/holub/mame
synced 2025-06-02 02:49:44 +03:00
fix lookup table for sprites in spikes91
This commit is contained in:
parent
a8209dd70d
commit
8fd458820b
@ -76,6 +76,7 @@ WRITE16_HANDLER( aerofgt_bg1videoram_w );
|
||||
WRITE16_HANDLER( aerofgt_bg2videoram_w );
|
||||
WRITE16_HANDLER( pspikes_gfxbank_w );
|
||||
WRITE16_HANDLER( pspikesb_gfxbank_w );
|
||||
WRITE16_HANDLER( spikes91_lookup_w );
|
||||
WRITE16_HANDLER( karatblz_gfxbank_w );
|
||||
WRITE16_HANDLER( spinlbrk_gfxbank_w );
|
||||
WRITE16_HANDLER( turbofrc_gfxbank_w );
|
||||
@ -203,11 +204,11 @@ static ADDRESS_MAP_START( spikes91_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
//AM_RANGE(0xffd200, 0xffd201) AM_WRITE(pspikesb_gfxbank_w)
|
||||
AM_RANGE(0xffd000, 0xffdfff) AM_RAM AM_BASE(&aerofgt_rasterram) /* bg1 scroll registers */
|
||||
AM_RANGE(0xffe000, 0xffefff) AM_RAM AM_WRITE(paletteram16_xRRRRRGGGGGBBBBB_word_w) AM_BASE(&paletteram16)
|
||||
AM_RANGE(0xfff000, 0xfff001) AM_READ(input_port_0_word_r)
|
||||
AM_RANGE(0xfff000, 0xfff001) AM_READ(input_port_0_word_r)
|
||||
AM_RANGE(0xfff002, 0xfff003) AM_READ(input_port_1_word_r) AM_WRITE(pspikes_gfxbank_w)
|
||||
AM_RANGE(0xfff004, 0xfff005) AM_READWRITE(input_port_2_word_r, aerofgt_bg1scrolly_w)
|
||||
AM_RANGE(0xfff006, 0xfff007) AM_NOP
|
||||
AM_RANGE(0xfff008, 0xfff009) AM_NOP
|
||||
AM_RANGE(0xfff006, 0xfff007) AM_NOP
|
||||
AM_RANGE(0xfff008, 0xfff009) AM_WRITE(spikes91_lookup_w)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( pspikesc_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
|
@ -14,6 +14,7 @@ static int charpalettebank,spritepalettebank;
|
||||
|
||||
static tilemap *bg1_tilemap,*bg2_tilemap;
|
||||
static int sprite_gfx;
|
||||
static int spikes91_lookup;
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
@ -208,6 +209,11 @@ WRITE16_HANDLER( pspikesb_gfxbank_w )
|
||||
setbank(bg1_tilemap,1,(data & 0x0f00) >> 8);
|
||||
}
|
||||
|
||||
WRITE16_HANDLER( spikes91_lookup_w )
|
||||
{
|
||||
spikes91_lookup = data;
|
||||
}
|
||||
|
||||
WRITE16_HANDLER( karatblz_gfxbank_w )
|
||||
{
|
||||
if (ACCESSING_BITS_8_15)
|
||||
@ -497,13 +503,8 @@ static void spikes91_draw_sprites(running_machine *machine, bitmap_t *bitmap,con
|
||||
flipx = aerofgt_spriteram3[i + 3] & 0x8000;
|
||||
color = ((aerofgt_spriteram3[i + 3] & 0x00f0) >> 4);
|
||||
|
||||
// look-up table
|
||||
// RZ notes:
|
||||
// in game it's necessary an or with 0x2000;
|
||||
// probably a bit switch the table
|
||||
// almost sure no line swap in the look-up table
|
||||
if (spikes91_lookup==1) code |= 0x2000;
|
||||
|
||||
code |= 0x2000;
|
||||
realcode = (lookup[code] << 8) + lookup[0x10000 + code];
|
||||
|
||||
drawgfx(bitmap,machine->gfx[sprite_gfx],
|
||||
|
Loading…
Reference in New Issue
Block a user