mirror of
https://github.com/holub/mame
synced 2025-05-09 15:51:48 +03:00
Move non-buffered spriteram drivers away from using the generic
spriteram in favor of using spriteram in their own driver_device classes. [Atari Ace]
This commit is contained in:
parent
c809bf3d3a
commit
9d26109f6a
@ -77,7 +77,7 @@ static ADDRESS_MAP_START( contra_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x2400, 0x27ff) AM_WRITE(contra_fg_vram_w) AM_BASE_MEMBER(contra_state, fg_vram)
|
||||
AM_RANGE(0x2800, 0x2bff) AM_WRITE(contra_text_cram_w) AM_BASE_MEMBER(contra_state, tx_cram)
|
||||
AM_RANGE(0x2c00, 0x2fff) AM_WRITE(contra_text_vram_w) AM_BASE_MEMBER(contra_state, tx_vram)
|
||||
AM_RANGE(0x3000, 0x37ff) AM_WRITEONLY AM_BASE_GENERIC(spriteram)/* 2nd bank is at 0x5000 */
|
||||
AM_RANGE(0x3000, 0x37ff) AM_WRITEONLY AM_BASE_MEMBER(contra_state, spriteram)/* 2nd bank is at 0x5000 */
|
||||
AM_RANGE(0x3800, 0x3fff) AM_WRITEONLY // second sprite buffer
|
||||
AM_RANGE(0x4000, 0x43ff) AM_WRITE(contra_bg_cram_w) AM_BASE_MEMBER(contra_state, bg_cram)
|
||||
AM_RANGE(0x4400, 0x47ff) AM_WRITE(contra_bg_vram_w) AM_BASE_MEMBER(contra_state, bg_vram)
|
||||
|
@ -297,7 +297,7 @@ static ADDRESS_MAP_START( dec0_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x310000, 0x3107ff) AM_RAM_WRITE(dec0_paletteram_rg_w) AM_BASE_GENERIC(paletteram)
|
||||
AM_RANGE(0x314000, 0x3147ff) AM_RAM_WRITE(dec0_paletteram_b_w) AM_BASE_GENERIC(paletteram2)
|
||||
AM_RANGE(0xff8000, 0xffbfff) AM_RAM AM_BASE_MEMBER(dec0_state, ram) /* Main ram */
|
||||
AM_RANGE(0xffc000, 0xffc7ff) AM_RAM AM_BASE_GENERIC(spriteram) /* Sprites */
|
||||
AM_RANGE(0xffc000, 0xffc7ff) AM_RAM AM_BASE_MEMBER(dec0_state, spriteram) /* Sprites */
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( robocop_sub_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
@ -348,7 +348,7 @@ static ADDRESS_MAP_START( slyspy_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x301000, 0x3017ff) AM_WRITE(dec0_pf3_data_w) AM_BASE_MEMBER(dec0_state, pf3_data)
|
||||
|
||||
AM_RANGE(0x304000, 0x307fff) AM_RAM AM_BASE_MEMBER(dec0_state, ram) /* Sly spy main ram */
|
||||
AM_RANGE(0x308000, 0x3087ff) AM_RAM AM_BASE_GENERIC(spriteram) /* Sprites */
|
||||
AM_RANGE(0x308000, 0x3087ff) AM_RAM AM_BASE_MEMBER(dec0_state, spriteram) /* Sprites */
|
||||
AM_RANGE(0x310000, 0x3107ff) AM_RAM_WRITE(paletteram16_xxxxBBBBGGGGRRRR_word_w) AM_BASE_GENERIC(paletteram)
|
||||
AM_RANGE(0x314000, 0x314003) AM_WRITE(slyspy_control_w)
|
||||
AM_RANGE(0x314008, 0x31400f) AM_READ(slyspy_controls_r)
|
||||
@ -358,7 +358,7 @@ ADDRESS_MAP_END
|
||||
static ADDRESS_MAP_START( midres_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x000000, 0x07ffff) AM_ROM
|
||||
AM_RANGE(0x100000, 0x103fff) AM_RAM AM_BASE_MEMBER(dec0_state, ram)
|
||||
AM_RANGE(0x120000, 0x1207ff) AM_RAM AM_BASE_GENERIC(spriteram)
|
||||
AM_RANGE(0x120000, 0x1207ff) AM_RAM AM_BASE_MEMBER(dec0_state, spriteram)
|
||||
AM_RANGE(0x140000, 0x1407ff) AM_WRITE(paletteram16_xxxxBBBBGGGGRRRR_word_w) AM_BASE_GENERIC(paletteram)
|
||||
AM_RANGE(0x160000, 0x160001) AM_WRITE(dec0_priority_w)
|
||||
AM_RANGE(0x180000, 0x18000f) AM_READ(midres_controls_r)
|
||||
@ -445,7 +445,7 @@ static ADDRESS_MAP_START( secretab_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x301000, 0x3017ff) AM_RAM_WRITE(dec0_pf3_data_w) AM_BASE_MEMBER(dec0_state, pf3_data)
|
||||
AM_RANGE(0x301800, 0x307fff) AM_RAM AM_BASE_MEMBER(dec0_state, ram) /* Sly spy main ram */
|
||||
AM_RANGE(0x310000, 0x3107ff) AM_RAM_WRITE(paletteram16_xxxxBBBBGGGGRRRR_word_w) AM_BASE_GENERIC(paletteram)
|
||||
AM_RANGE(0xb08000, 0xb087ff) AM_RAM AM_BASE_GENERIC(spriteram) /* Sprites */
|
||||
AM_RANGE(0xb08000, 0xb087ff) AM_RAM AM_BASE_MEMBER(dec0_state, spriteram) /* Sprites */
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( automat_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
@ -477,7 +477,7 @@ static ADDRESS_MAP_START( automat_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x314000, 0x3147ff) AM_RAM
|
||||
AM_RANGE(0x400008, 0x400009) AM_WRITE(dec0_priority_w) // NEW
|
||||
AM_RANGE(0xff8000, 0xffbfff) AM_RAM AM_BASE_MEMBER(dec0_state, ram) /* Main ram */
|
||||
AM_RANGE(0xffc000, 0xffc7ff) AM_RAM AM_BASE_GENERIC(spriteram) /* Sprites */
|
||||
AM_RANGE(0xffc000, 0xffc7ff) AM_RAM AM_BASE_MEMBER(dec0_state, spriteram) /* Sprites */
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static WRITE8_HANDLER( automat_adpcm_w )
|
||||
|
@ -56,7 +56,7 @@ static ADDRESS_MAP_START( goal92_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x102000, 0x102fff) AM_RAM_WRITE(goal92_text_w) AM_BASE_MEMBER(goal92_state, tx_data)
|
||||
AM_RANGE(0x103000, 0x103fff) AM_RAM_WRITE(paletteram16_xBBBBBGGGGGRRRRR_word_w) AM_BASE_GENERIC(paletteram)
|
||||
AM_RANGE(0x104000, 0x13ffff) AM_RAM
|
||||
AM_RANGE(0x140000, 0x1407ff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram)
|
||||
AM_RANGE(0x140000, 0x1407ff) AM_RAM AM_BASE_MEMBER(goal92_state, spriteram)
|
||||
AM_RANGE(0x140800, 0x140801) AM_WRITENOP
|
||||
AM_RANGE(0x140802, 0x140803) AM_WRITENOP
|
||||
AM_RANGE(0x180000, 0x18000f) AM_READ(goal92_inputs_r)
|
||||
|
@ -173,7 +173,7 @@ static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0xa0000, 0xbffff) AM_ROMBANK("bank1")
|
||||
AM_RANGE(0xd0000, 0xdffff) AM_RAM_WRITE(m107_vram_w) AM_BASE_MEMBER(m107_state, vram_data)
|
||||
AM_RANGE(0xe0000, 0xeffff) AM_RAM /* System ram */
|
||||
AM_RANGE(0xf8000, 0xf8fff) AM_RAM AM_BASE_GENERIC(spriteram)
|
||||
AM_RANGE(0xf8000, 0xf8fff) AM_RAM AM_BASE_MEMBER(m107_state, spriteram)
|
||||
AM_RANGE(0xf9000, 0xf9fff) AM_RAM_WRITE(paletteram16_xBBBBBGGGGGRRRRR_word_w) AM_BASE_GENERIC(paletteram)
|
||||
AM_RANGE(0xffff0, 0xfffff) AM_ROM
|
||||
ADDRESS_MAP_END
|
||||
|
@ -885,7 +885,7 @@ static READ16_HANDLER( poundfor_trackball_r )
|
||||
static ADDRESS_MAP_START( NAME##_map, ADDRESS_SPACE_PROGRAM, 16 ) \
|
||||
AM_RANGE(0x00000, ROMSIZE-1) AM_ROM \
|
||||
AM_RANGE(WORKRAM, WORKRAM+0x3fff) AM_RAM /* work RAM */ \
|
||||
AM_RANGE(0xc0000, 0xc03ff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram) \
|
||||
AM_RANGE(0xc0000, 0xc03ff) AM_RAM AM_BASE_SIZE_MEMBER(m72_state, spriteram, spriteram_size) \
|
||||
AM_RANGE(0xc8000, 0xc8bff) AM_READWRITE(m72_palette1_r, m72_palette1_w) AM_BASE_GENERIC(paletteram) \
|
||||
AM_RANGE(0xcc000, 0xccbff) AM_READWRITE(m72_palette2_r, m72_palette2_w) AM_BASE_GENERIC(paletteram2) \
|
||||
AM_RANGE(0xd0000, 0xd3fff) AM_RAM_WRITE(m72_videoram1_w) AM_BASE_MEMBER(m72_state, videoram1) \
|
||||
@ -905,7 +905,7 @@ static ADDRESS_MAP_START( xmultipl_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x00000, 0x7ffff) AM_ROM
|
||||
AM_RANGE(0x9c000, 0x9ffff) AM_RAM /* work RAM */
|
||||
AM_RANGE(0xb0ffe, 0xb0fff) AM_WRITEONLY /* leftover from protection?? */
|
||||
AM_RANGE(0xc0000, 0xc03ff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram)
|
||||
AM_RANGE(0xc0000, 0xc03ff) AM_RAM AM_BASE_SIZE_MEMBER(m72_state, spriteram, spriteram_size)
|
||||
AM_RANGE(0xc8000, 0xc8bff) AM_READWRITE(m72_palette1_r, m72_palette1_w) AM_BASE_GENERIC(paletteram)
|
||||
AM_RANGE(0xcc000, 0xccbff) AM_READWRITE(m72_palette2_r, m72_palette2_w) AM_BASE_GENERIC(paletteram2)
|
||||
AM_RANGE(0xd0000, 0xd3fff) AM_RAM_WRITE(m72_videoram1_w) AM_BASE_MEMBER(m72_state, videoram1)
|
||||
@ -917,7 +917,7 @@ static ADDRESS_MAP_START( dbreed_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x00000, 0x7ffff) AM_ROM
|
||||
AM_RANGE(0x88000, 0x8bfff) AM_RAM /* work RAM */
|
||||
AM_RANGE(0xb0ffe, 0xb0fff) AM_WRITEONLY /* leftover from protection?? */
|
||||
AM_RANGE(0xc0000, 0xc03ff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram)
|
||||
AM_RANGE(0xc0000, 0xc03ff) AM_RAM AM_BASE_SIZE_MEMBER(m72_state, spriteram, spriteram_size)
|
||||
AM_RANGE(0xc8000, 0xc8bff) AM_READWRITE(m72_palette1_r, m72_palette1_w) AM_BASE_GENERIC(paletteram)
|
||||
AM_RANGE(0xcc000, 0xccbff) AM_READWRITE(m72_palette2_r, m72_palette2_w) AM_BASE_GENERIC(paletteram2)
|
||||
AM_RANGE(0xd0000, 0xd3fff) AM_RAM_WRITE(m72_videoram1_w) AM_BASE_MEMBER(m72_state, videoram1)
|
||||
@ -929,7 +929,7 @@ static ADDRESS_MAP_START( rtype2_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x00000, 0x7ffff) AM_ROM
|
||||
AM_RANGE(0xb0000, 0xb0001) AM_WRITE(m72_irq_line_w)
|
||||
AM_RANGE(0xbc000, 0xbc001) AM_WRITE(m72_dmaon_w)
|
||||
AM_RANGE(0xc0000, 0xc03ff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram)
|
||||
AM_RANGE(0xc0000, 0xc03ff) AM_RAM AM_BASE_SIZE_MEMBER(m72_state, spriteram, spriteram_size)
|
||||
AM_RANGE(0xc8000, 0xc8bff) AM_READWRITE(m72_palette1_r, m72_palette1_w) AM_BASE_GENERIC(paletteram)
|
||||
AM_RANGE(0xd0000, 0xd3fff) AM_RAM_WRITE(m72_videoram1_w) AM_BASE_MEMBER(m72_state, videoram1)
|
||||
AM_RANGE(0xd4000, 0xd7fff) AM_RAM_WRITE(m72_videoram2_w) AM_BASE_MEMBER(m72_state, videoram2)
|
||||
@ -944,8 +944,8 @@ static ADDRESS_MAP_START( majtitle_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0xa4000, 0xa4bff) AM_READWRITE(m72_palette2_r, m72_palette2_w) AM_BASE_GENERIC(paletteram2)
|
||||
AM_RANGE(0xac000, 0xaffff) AM_RAM_WRITE(m72_videoram1_w) AM_BASE_MEMBER(m72_state, videoram1)
|
||||
AM_RANGE(0xb0000, 0xbffff) AM_RAM_WRITE(m72_videoram2_w) AM_BASE_MEMBER(m72_state, videoram2) /* larger than the other games */
|
||||
AM_RANGE(0xc0000, 0xc03ff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram)
|
||||
AM_RANGE(0xc8000, 0xc83ff) AM_RAM AM_BASE_GENERIC(spriteram2)
|
||||
AM_RANGE(0xc0000, 0xc03ff) AM_RAM AM_BASE_SIZE_MEMBER(m72_state, spriteram, spriteram_size)
|
||||
AM_RANGE(0xc8000, 0xc83ff) AM_RAM AM_BASE_MEMBER(m72_state, spriteram2)
|
||||
AM_RANGE(0xcc000, 0xccbff) AM_READWRITE(m72_palette1_r, m72_palette1_w) AM_BASE_GENERIC(paletteram)
|
||||
AM_RANGE(0xd0000, 0xd3fff) AM_RAM /* work RAM */
|
||||
AM_RANGE(0xe0000, 0xe0001) AM_WRITE(m72_irq_line_w)
|
||||
@ -958,7 +958,7 @@ static ADDRESS_MAP_START( hharry_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x00000, 0x7ffff) AM_ROM
|
||||
AM_RANGE(0xa0000, 0xa3fff) AM_RAM /* work RAM */
|
||||
AM_RANGE(0xb0ffe, 0xb0fff) AM_WRITEONLY /* leftover from protection?? */
|
||||
AM_RANGE(0xc0000, 0xc03ff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram)
|
||||
AM_RANGE(0xc0000, 0xc03ff) AM_RAM AM_BASE_SIZE_MEMBER(m72_state, spriteram, spriteram_size)
|
||||
AM_RANGE(0xc8000, 0xc8bff) AM_READWRITE(m72_palette1_r, m72_palette1_w) AM_BASE_GENERIC(paletteram)
|
||||
AM_RANGE(0xcc000, 0xccbff) AM_READWRITE(m72_palette2_r, m72_palette2_w) AM_BASE_GENERIC(paletteram2)
|
||||
AM_RANGE(0xd0000, 0xd3fff) AM_RAM_WRITE(m72_videoram1_w) AM_BASE_MEMBER(m72_state, videoram1)
|
||||
@ -973,7 +973,7 @@ static ADDRESS_MAP_START( hharryu_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0xb0000, 0xb0001) AM_WRITE(m72_irq_line_w)
|
||||
AM_RANGE(0xbc000, 0xbc001) AM_WRITE(m72_dmaon_w)
|
||||
AM_RANGE(0xb0ffe, 0xb0fff) AM_WRITEONLY /* leftover from protection?? */
|
||||
AM_RANGE(0xc0000, 0xc03ff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram)
|
||||
AM_RANGE(0xc0000, 0xc03ff) AM_RAM AM_BASE_SIZE_MEMBER(m72_state, spriteram, spriteram_size)
|
||||
AM_RANGE(0xd0000, 0xd3fff) AM_RAM_WRITE(m72_videoram1_w) AM_BASE_MEMBER(m72_state, videoram1)
|
||||
AM_RANGE(0xd4000, 0xd7fff) AM_RAM_WRITE(m72_videoram2_w) AM_BASE_MEMBER(m72_state, videoram2)
|
||||
AM_RANGE(0xe0000, 0xe3fff) AM_RAM /* work RAM */
|
||||
@ -987,7 +987,7 @@ static ADDRESS_MAP_START( kengo_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0xb0000, 0xb0001) AM_WRITE(m72_irq_line_w)
|
||||
AM_RANGE(0xb4000, 0xb4001) AM_WRITENOP /* ??? */
|
||||
AM_RANGE(0xbc000, 0xbc001) AM_WRITE(m72_dmaon_w)
|
||||
AM_RANGE(0xc0000, 0xc03ff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram)
|
||||
AM_RANGE(0xc0000, 0xc03ff) AM_RAM AM_BASE_SIZE_MEMBER(m72_state, spriteram, spriteram_size)
|
||||
AM_RANGE(0x80000, 0x83fff) AM_RAM_WRITE(m72_videoram1_w) AM_BASE_MEMBER(m72_state, videoram1)
|
||||
AM_RANGE(0x84000, 0x87fff) AM_RAM_WRITE(m72_videoram2_w) AM_BASE_MEMBER(m72_state, videoram2)
|
||||
AM_RANGE(0xe0000, 0xe3fff) AM_RAM /* work RAM */
|
||||
|
@ -92,7 +92,7 @@ ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( dynablsb_main_cpu_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x00000, 0x3ffff) AM_ROM
|
||||
AM_RANGE(0x6000e, 0x60fff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram)
|
||||
AM_RANGE(0x6000e, 0x60fff) AM_RAM AM_BASE_SIZE_MEMBER(m90_state, spriteram, spriteram_size)
|
||||
AM_RANGE(0xa0000, 0xa3fff) AM_RAM
|
||||
AM_RANGE(0xd0000, 0xdffff) AM_RAM_WRITE(m90_video_w) AM_BASE_MEMBER(m90_state, video_data)
|
||||
AM_RANGE(0xe0000, 0xe03ff) AM_RAM_WRITE(paletteram16_xBBBBBGGGGGRRRRR_word_w) AM_BASE_GENERIC(paletteram)
|
||||
@ -102,7 +102,7 @@ ADDRESS_MAP_END
|
||||
static ADDRESS_MAP_START( bomblord_main_cpu_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x00000, 0x7ffff) AM_ROM
|
||||
AM_RANGE(0xa0000, 0xa3fff) AM_RAM
|
||||
AM_RANGE(0xc000e, 0xc0fff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram)
|
||||
AM_RANGE(0xc000e, 0xc0fff) AM_RAM AM_BASE_SIZE_MEMBER(m90_state, spriteram, spriteram_size)
|
||||
AM_RANGE(0xd0000, 0xdffff) AM_RAM_WRITE(m90_video_w) AM_BASE_MEMBER(m90_state, video_data)
|
||||
AM_RANGE(0xe0000, 0xe03ff) AM_RAM_WRITE(paletteram16_xBBBBBGGGGGRRRRR_word_w) AM_BASE_GENERIC(paletteram)
|
||||
AM_RANGE(0xffff0, 0xfffff) AM_ROM
|
||||
|
@ -12,7 +12,8 @@ public:
|
||||
|
||||
/* memory pointers */
|
||||
UINT8 * spriteram;
|
||||
UINT8 * spriteram_2;
|
||||
UINT8 * buffered_spriteram;
|
||||
UINT8 * buffered_spriteram_2;
|
||||
UINT8 * paletteram;
|
||||
UINT8 * bg_vram;
|
||||
UINT8 * bg_cram;
|
||||
|
@ -41,6 +41,7 @@ public:
|
||||
UINT16 pf3_control_0[4];
|
||||
UINT16 pf3_control_1[4];
|
||||
UINT16 *spriteram;
|
||||
UINT16 *buffered_spriteram;
|
||||
UINT16 pri;
|
||||
int buffer[0x20];
|
||||
};
|
||||
|
@ -16,7 +16,8 @@ public:
|
||||
UINT16 * tx_data;
|
||||
UINT16 * scrollram;
|
||||
// UINT16 * paletteram; // this currently use generic palette handling
|
||||
// UINT16 * spriteram; // this currently use generic buffered spriteram
|
||||
UINT16 * spriteram;
|
||||
UINT16 * buffered_spriteram;
|
||||
|
||||
/* video-related */
|
||||
tilemap_t *bg_layer, *fg_layer, *tx_layer;
|
||||
|
@ -30,6 +30,7 @@ public:
|
||||
pf_layer_info pf_layer[4];
|
||||
UINT16 control[0x10];
|
||||
UINT16 *spriteram;
|
||||
UINT16 *buffered_spriteram;
|
||||
};
|
||||
|
||||
|
||||
|
@ -26,6 +26,9 @@ public:
|
||||
UINT16 *majtitle_rowscrollram;
|
||||
UINT32 raster_irq_position;
|
||||
UINT16 *spriteram;
|
||||
UINT16 *spriteram2;
|
||||
UINT16 *buffered_spriteram;
|
||||
size_t spriteram_size;
|
||||
tilemap_t *fg_tilemap;
|
||||
tilemap_t *bg_tilemap;
|
||||
INT32 scrollx1;
|
||||
|
@ -7,6 +7,7 @@ public:
|
||||
UINT32 bankaddress;
|
||||
UINT16 *video_data;
|
||||
UINT16 *spriteram;
|
||||
size_t spriteram_size;
|
||||
UINT16 video_control_data[8];
|
||||
tilemap_t *pf1_layer;
|
||||
tilemap_t *pf2_layer;
|
||||
|
@ -501,7 +501,8 @@ void dec0_i8751_reset(running_machine *machine)
|
||||
|
||||
static WRITE16_HANDLER( sprite_mirror_w )
|
||||
{
|
||||
COMBINE_DATA(&space->machine->generic.spriteram.u16[offset]);
|
||||
dec0_state *state = space->machine->driver_data<dec0_state>();
|
||||
COMBINE_DATA(&state->spriteram[offset]);
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
|
@ -128,8 +128,6 @@ VIDEO_START( baraduke )
|
||||
|
||||
tilemap_set_scrolldx(state->tx_tilemap,0,512-288);
|
||||
tilemap_set_scrolldy(state->tx_tilemap,16,16);
|
||||
|
||||
machine->generic.spriteram.u8 = state->spriteram + 0x1800;
|
||||
}
|
||||
|
||||
|
||||
@ -221,11 +219,13 @@ WRITE8_HANDLER( baraduke_spriteram_w )
|
||||
|
||||
static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, int sprite_priority)
|
||||
{
|
||||
const UINT8 *source = &machine->generic.spriteram.u8[0];
|
||||
const UINT8 *finish = &machine->generic.spriteram.u8[0x0800-16]; /* the last is NOT a sprite */
|
||||
baraduke_state *state = machine->driver_data<baraduke_state>();
|
||||
UINT8 *spriteram = state->spriteram + 0x1800;
|
||||
const UINT8 *source = &spriteram[0x0000];
|
||||
const UINT8 *finish = &spriteram[0x0800-16]; /* the last is NOT a sprite */
|
||||
|
||||
int sprite_xoffs = machine->generic.spriteram.u8[0x07f5] - 256 * (machine->generic.spriteram.u8[0x07f4] & 1);
|
||||
int sprite_yoffs = machine->generic.spriteram.u8[0x07f7];
|
||||
int sprite_xoffs = spriteram[0x07f5] - 256 * (spriteram[0x07f4] & 1);
|
||||
int sprite_yoffs = spriteram[0x07f7];
|
||||
|
||||
while( source<finish )
|
||||
{
|
||||
@ -315,11 +315,12 @@ static void set_scroll(running_machine *machine, int layer)
|
||||
SCREEN_UPDATE( baraduke )
|
||||
{
|
||||
baraduke_state *state = screen->machine->driver_data<baraduke_state>();
|
||||
UINT8 *spriteram = state->spriteram + 0x1800;
|
||||
int back;
|
||||
|
||||
/* flip screen is embedded in the sprite control registers */
|
||||
/* can't use flip_screen_set(screen->machine, ) because the visible area is asymmetrical */
|
||||
flip_screen_set_no_update(screen->machine, screen->machine->generic.spriteram.u8[0x07f6] & 0x01);
|
||||
flip_screen_set_no_update(screen->machine, spriteram[0x07f6] & 0x01);
|
||||
tilemap_set_flip_all(screen->machine,flip_screen_get(screen->machine) ? (TILEMAP_FLIPX | TILEMAP_FLIPY) : 0);
|
||||
set_scroll(screen->machine, 0);
|
||||
set_scroll(screen->machine, 1);
|
||||
@ -344,12 +345,13 @@ SCREEN_EOF( baraduke )
|
||||
baraduke_state *state = machine->driver_data<baraduke_state>();
|
||||
if (state->copy_sprites)
|
||||
{
|
||||
UINT8 *spriteram = state->spriteram + 0x1800;
|
||||
int i,j;
|
||||
|
||||
for (i = 0;i < 0x800;i += 16)
|
||||
{
|
||||
for (j = 10;j < 16;j++)
|
||||
machine->generic.spriteram.u8[i+j] = machine->generic.spriteram.u8[i+j - 6];
|
||||
spriteram[i+j] = spriteram[i+j - 6];
|
||||
}
|
||||
|
||||
state->copy_sprites = 0;
|
||||
|
@ -172,8 +172,8 @@ VIDEO_START( contra )
|
||||
state->fg_tilemap = tilemap_create(machine, get_fg_tile_info, tilemap_scan_rows, 8, 8, 32, 32);
|
||||
state->tx_tilemap = tilemap_create(machine, get_tx_tile_info, tilemap_scan_rows, 8, 8, 32, 32);
|
||||
|
||||
state->spriteram = auto_alloc_array(machine, UINT8, 0x800);
|
||||
state->spriteram_2 = auto_alloc_array(machine, UINT8, 0x800);
|
||||
state->buffered_spriteram = auto_alloc_array(machine, UINT8, 0x800);
|
||||
state->buffered_spriteram_2 = auto_alloc_array(machine, UINT8, 0x800);
|
||||
|
||||
state->bg_clip = machine->primary_screen->visible_area();
|
||||
state->bg_clip.min_x += 40;
|
||||
@ -186,8 +186,8 @@ VIDEO_START( contra )
|
||||
|
||||
tilemap_set_transparent_pen(state->fg_tilemap, 0);
|
||||
|
||||
state->save_pointer(NAME(state->spriteram), 0x800);
|
||||
state->save_pointer(NAME(state->spriteram_2), 0x800);
|
||||
state->save_pointer(NAME(state->buffered_spriteram), 0x800);
|
||||
state->save_pointer(NAME(state->buffered_spriteram_2), 0x800);
|
||||
}
|
||||
|
||||
|
||||
@ -253,9 +253,9 @@ WRITE8_HANDLER( contra_K007121_ctrl_0_w )
|
||||
if (offset == 3)
|
||||
{
|
||||
if ((data & 0x8) == 0)
|
||||
memcpy(state->spriteram, space->machine->generic.spriteram.u8 + 0x800, 0x800);
|
||||
memcpy(state->buffered_spriteram, state->spriteram + 0x800, 0x800);
|
||||
else
|
||||
memcpy(state->spriteram, space->machine->generic.spriteram.u8, 0x800);
|
||||
memcpy(state->buffered_spriteram, state->spriteram, 0x800);
|
||||
}
|
||||
|
||||
if (offset == 6)
|
||||
@ -278,9 +278,9 @@ WRITE8_HANDLER( contra_K007121_ctrl_1_w )
|
||||
if (offset == 3)
|
||||
{
|
||||
if ((data & 0x8) == 0)
|
||||
memcpy(state->spriteram_2, space->machine->generic.spriteram.u8 + 0x2800, 0x800);
|
||||
memcpy(state->buffered_spriteram_2, state->spriteram + 0x2800, 0x800);
|
||||
else
|
||||
memcpy(state->spriteram_2, space->machine->generic.spriteram.u8 + 0x2000, 0x800);
|
||||
memcpy(state->buffered_spriteram_2, state->spriteram + 0x2000, 0x800);
|
||||
}
|
||||
if (offset == 6)
|
||||
{
|
||||
@ -309,9 +309,9 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta
|
||||
const UINT8 *source;
|
||||
|
||||
if (bank == 0)
|
||||
source = state->spriteram;
|
||||
source = state->buffered_spriteram;
|
||||
else
|
||||
source = state->spriteram_2;
|
||||
source = state->buffered_spriteram_2;
|
||||
|
||||
k007121_sprites_draw(k007121, bitmap, cliprect, machine->gfx[bank], machine->colortable, source, base_color, 40, 0, (UINT32)-1);
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ Todo:
|
||||
WRITE16_HANDLER( dec0_update_sprites_w )
|
||||
{
|
||||
dec0_state *state = space->machine->driver_data<dec0_state>();
|
||||
memcpy(state->spriteram,space->machine->generic.spriteram.u16,0x800);
|
||||
memcpy(state->buffered_spriteram,state->spriteram,0x800);
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
@ -137,16 +137,17 @@ WRITE16_HANDLER( dec0_paletteram_b_w )
|
||||
static void draw_sprites(running_machine* machine, bitmap_t *bitmap,const rectangle *cliprect,int pri_mask,int pri_val)
|
||||
{
|
||||
dec0_state *state = machine->driver_data<dec0_state>();
|
||||
UINT16 *spriteram = state->buffered_spriteram;
|
||||
int offs;
|
||||
|
||||
for (offs = 0;offs < 0x400;offs += 4)
|
||||
{
|
||||
int x,y,sprite,colour,multi,fx,fy,inc,flash,mult;
|
||||
|
||||
y = state->spriteram[offs];
|
||||
y = spriteram[offs];
|
||||
if ((y&0x8000) == 0) continue;
|
||||
|
||||
x = state->spriteram[offs+2];
|
||||
x = spriteram[offs+2];
|
||||
colour = x >> 12;
|
||||
if ((colour & pri_mask) != pri_val) continue;
|
||||
|
||||
@ -158,7 +159,7 @@ static void draw_sprites(running_machine* machine, bitmap_t *bitmap,const rectan
|
||||
multi = (1 << ((y & 0x1800) >> 11)) - 1; /* 1x, 2x, 4x, 8x height */
|
||||
/* multi = 0 1 3 7 */
|
||||
|
||||
sprite = state->spriteram[offs+1] & 0x0fff;
|
||||
sprite = spriteram[offs+1] & 0x0fff;
|
||||
|
||||
x = x & 0x01ff;
|
||||
y = y & 0x01ff;
|
||||
@ -722,14 +723,14 @@ VIDEO_START( dec0_nodma )
|
||||
state->pf3_tilemap_1 = tilemap_create(machine, get_pf3_tile_info,tile_shape1_scan, 16,16, 32, 32);
|
||||
state->pf3_tilemap_2 = tilemap_create(machine, get_pf3_tile_info,tile_shape2_scan, 16,16, 16, 64);
|
||||
|
||||
state->spriteram=machine->generic.spriteram.u16;
|
||||
state->buffered_spriteram = state->spriteram;
|
||||
}
|
||||
|
||||
VIDEO_START( dec0 )
|
||||
{
|
||||
dec0_state *state = machine->driver_data<dec0_state>();
|
||||
VIDEO_START_CALL(dec0_nodma);
|
||||
state->spriteram=auto_alloc_array(machine, UINT16, 0x800/2);
|
||||
state->buffered_spriteram = auto_alloc_array(machine, UINT16, 0x800/2);
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
|
@ -94,7 +94,8 @@ static TILE_GET_INFO( get_fore_tile_info )
|
||||
|
||||
static void draw_sprites( running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, int pri )
|
||||
{
|
||||
UINT16 *buffered_spriteram16 = machine->generic.buffered_spriteram.u16;
|
||||
goal92_state *state = machine->driver_data<goal92_state>();
|
||||
UINT16 *buffered_spriteram16 = state->buffered_spriteram;
|
||||
int offs, fx, fy, x, y, color, sprite;
|
||||
|
||||
for (offs = 3; offs <= 0x400 - 5; offs += 4)
|
||||
@ -143,8 +144,8 @@ VIDEO_START( goal92 )
|
||||
state->fg_layer = tilemap_create(machine, get_fore_tile_info, tilemap_scan_rows, 16, 16, 32, 32);
|
||||
state->tx_layer = tilemap_create(machine, get_text_tile_info, tilemap_scan_rows, 8, 8, 64, 32);
|
||||
|
||||
machine->generic.buffered_spriteram.u16 = auto_alloc_array(machine, UINT16, 0x400 * 2);
|
||||
state_save_register_global_pointer(machine, machine->generic.buffered_spriteram.u16, 0x400 * 2);
|
||||
state->buffered_spriteram = auto_alloc_array(machine, UINT16, 0x400 * 2);
|
||||
state_save_register_global_pointer(machine, state->buffered_spriteram, 0x400 * 2);
|
||||
|
||||
tilemap_set_transparent_pen(state->bg_layer, 15);
|
||||
tilemap_set_transparent_pen(state->fg_layer, 15);
|
||||
@ -189,5 +190,6 @@ SCREEN_UPDATE( goal92 )
|
||||
|
||||
SCREEN_EOF( goal92 )
|
||||
{
|
||||
memcpy(machine->generic.buffered_spriteram.u16, machine->generic.spriteram.u16, 0x400 * 2);
|
||||
goal92_state *state = machine->driver_data<goal92_state>();
|
||||
memcpy(state->buffered_spriteram, state->spriteram, 0x400 * 2);
|
||||
}
|
||||
|
@ -145,7 +145,7 @@ VIDEO_START( m107 )
|
||||
tilemap_set_transparent_pen(layer->tmap, 0);
|
||||
}
|
||||
|
||||
state->spriteram = auto_alloc_array_clear(machine, UINT16, 0x1000/2);
|
||||
state->buffered_spriteram = auto_alloc_array_clear(machine, UINT16, 0x1000/2);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
@ -153,6 +153,7 @@ VIDEO_START( m107 )
|
||||
static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect)
|
||||
{
|
||||
m107_state *state = machine->driver_data<m107_state>();
|
||||
UINT16 *spriteram = state->buffered_spriteram;
|
||||
int offs;
|
||||
UINT8 *rom = machine->region("user1")->base();
|
||||
|
||||
@ -160,24 +161,24 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta
|
||||
{
|
||||
int x,y,sprite,colour,fx,fy,y_multi,i,s_ptr,pri_mask;
|
||||
|
||||
pri_mask = (!(state->spriteram[offs+2]&0x80)) ? 2 : 0;
|
||||
pri_mask = (!(spriteram[offs+2]&0x80)) ? 2 : 0;
|
||||
|
||||
y=state->spriteram[offs+0];
|
||||
x=state->spriteram[offs+3];
|
||||
y=spriteram[offs+0];
|
||||
x=spriteram[offs+3];
|
||||
x&=0x1ff;
|
||||
y&=0x1ff;
|
||||
|
||||
if (x==0 || y==0) continue; /* offscreen */
|
||||
|
||||
sprite=state->spriteram[offs+1]&0x7fff;
|
||||
sprite=spriteram[offs+1]&0x7fff;
|
||||
|
||||
x = x - 16;
|
||||
y = 384 - 16 - y;
|
||||
|
||||
colour=state->spriteram[offs+2]&0x7f;
|
||||
fx=(state->spriteram[offs+2]>>8)&0x1;
|
||||
fy=(state->spriteram[offs+2]>>8)&0x2;
|
||||
y_multi=(state->spriteram[offs+0]>>11)&0x3;
|
||||
colour=spriteram[offs+2]&0x7f;
|
||||
fx=(spriteram[offs+2]>>8)&0x1;
|
||||
fy=(spriteram[offs+2]>>8)&0x2;
|
||||
y_multi=(spriteram[offs+0]>>11)&0x3;
|
||||
|
||||
if (state->spritesystem == 0)
|
||||
{
|
||||
@ -381,7 +382,7 @@ WRITE16_HANDLER( m107_spritebuffer_w )
|
||||
// logerror("%04x: buffered spriteram\n",cpu_get_pc(space->cpu));
|
||||
state->sprite_display = (!(data & 0x1000));
|
||||
|
||||
memcpy(state->spriteram,space->machine->generic.spriteram.u16,0x1000);
|
||||
memcpy(state->buffered_spriteram, state->spriteram, 0x1000);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -115,7 +115,7 @@ static void register_savestate(running_machine *machine)
|
||||
state->save_item(NAME(state->scrolly1));
|
||||
state->save_item(NAME(state->scrollx2));
|
||||
state->save_item(NAME(state->scrolly2));
|
||||
state->save_pointer(NAME(state->spriteram), machine->generic.spriteram_size/2);
|
||||
state->save_pointer(NAME(state->buffered_spriteram), state->spriteram_size/2);
|
||||
}
|
||||
|
||||
|
||||
@ -125,7 +125,7 @@ VIDEO_START( m72 )
|
||||
state->bg_tilemap = tilemap_create(machine, m72_get_bg_tile_info,tilemap_scan_rows,8,8,64,64);
|
||||
state->fg_tilemap = tilemap_create(machine, m72_get_fg_tile_info,tilemap_scan_rows,8,8,64,64);
|
||||
|
||||
state->spriteram = auto_alloc_array(machine, UINT16, machine->generic.spriteram_size/2);
|
||||
state->buffered_spriteram = auto_alloc_array(machine, UINT16, state->spriteram_size/2);
|
||||
|
||||
tilemap_set_transmask(state->fg_tilemap,0,0xffff,0x0001);
|
||||
tilemap_set_transmask(state->fg_tilemap,1,0x00ff,0xff01);
|
||||
@ -136,7 +136,7 @@ VIDEO_START( m72 )
|
||||
//tilemap_set_transmask(state->bg_tilemap,2,0x0001,0xfffe);
|
||||
tilemap_set_transmask(state->bg_tilemap,2,0x0007,0xfff8);
|
||||
|
||||
memset(state->spriteram,0,machine->generic.spriteram_size);
|
||||
memset(state->buffered_spriteram,0,state->spriteram_size);
|
||||
|
||||
tilemap_set_scrolldx(state->fg_tilemap,0,0);
|
||||
tilemap_set_scrolldy(state->fg_tilemap,-128,16);
|
||||
@ -153,7 +153,7 @@ VIDEO_START( rtype2 )
|
||||
state->bg_tilemap = tilemap_create(machine, rtype2_get_bg_tile_info,tilemap_scan_rows,8,8,64,64);
|
||||
state->fg_tilemap = tilemap_create(machine, rtype2_get_fg_tile_info,tilemap_scan_rows,8,8,64,64);
|
||||
|
||||
state->spriteram = auto_alloc_array(machine, UINT16, machine->generic.spriteram_size/2);
|
||||
state->buffered_spriteram = auto_alloc_array(machine, UINT16, state->spriteram_size/2);
|
||||
|
||||
tilemap_set_transmask(state->fg_tilemap,0,0xffff,0x0001);
|
||||
tilemap_set_transmask(state->fg_tilemap,1,0x00ff,0xff01);
|
||||
@ -163,7 +163,7 @@ VIDEO_START( rtype2 )
|
||||
tilemap_set_transmask(state->bg_tilemap,1,0x00ff,0xff00);
|
||||
tilemap_set_transmask(state->bg_tilemap,2,0x0001,0xfffe);
|
||||
|
||||
memset(state->spriteram,0,machine->generic.spriteram_size);
|
||||
memset(state->buffered_spriteram,0,state->spriteram_size);
|
||||
|
||||
tilemap_set_scrolldx(state->fg_tilemap,4,0);
|
||||
tilemap_set_scrolldy(state->fg_tilemap,-128,16);
|
||||
@ -194,7 +194,7 @@ VIDEO_START( majtitle )
|
||||
state->bg_tilemap = tilemap_create(machine, rtype2_get_bg_tile_info,majtitle_scan_rows,8,8,128,64);
|
||||
state->fg_tilemap = tilemap_create(machine, rtype2_get_fg_tile_info,tilemap_scan_rows,8,8,64,64);
|
||||
|
||||
state->spriteram = auto_alloc_array(machine, UINT16, machine->generic.spriteram_size/2);
|
||||
state->buffered_spriteram = auto_alloc_array(machine, UINT16, state->spriteram_size/2);
|
||||
|
||||
tilemap_set_transmask(state->fg_tilemap,0,0xffff,0x0001);
|
||||
tilemap_set_transmask(state->fg_tilemap,1,0x00ff,0xff01);
|
||||
@ -204,7 +204,7 @@ VIDEO_START( majtitle )
|
||||
tilemap_set_transmask(state->bg_tilemap,1,0x00ff,0xff00);
|
||||
tilemap_set_transmask(state->bg_tilemap,2,0x0001,0xfffe);
|
||||
|
||||
memset(state->spriteram,0,machine->generic.spriteram_size);
|
||||
memset(state->buffered_spriteram,0,state->spriteram_size);
|
||||
|
||||
tilemap_set_scrolldx(state->fg_tilemap,4,0);
|
||||
tilemap_set_scrolldy(state->fg_tilemap,-128,16);
|
||||
@ -221,7 +221,7 @@ VIDEO_START( hharry )
|
||||
state->bg_tilemap = tilemap_create(machine, hharry_get_bg_tile_info,tilemap_scan_rows,8,8,64,64);
|
||||
state->fg_tilemap = tilemap_create(machine, m72_get_fg_tile_info, tilemap_scan_rows,8,8,64,64);
|
||||
|
||||
state->spriteram = auto_alloc_array(machine, UINT16, machine->generic.spriteram_size/2);
|
||||
state->buffered_spriteram = auto_alloc_array(machine, UINT16, state->spriteram_size/2);
|
||||
|
||||
tilemap_set_transmask(state->fg_tilemap,0,0xffff,0x0001);
|
||||
tilemap_set_transmask(state->fg_tilemap,1,0x00ff,0xff01);
|
||||
@ -231,7 +231,7 @@ VIDEO_START( hharry )
|
||||
tilemap_set_transmask(state->bg_tilemap,1,0x00ff,0xff00);
|
||||
tilemap_set_transmask(state->bg_tilemap,2,0x0001,0xfffe);
|
||||
|
||||
memset(state->spriteram,0,machine->generic.spriteram_size);
|
||||
memset(state->buffered_spriteram,0,state->spriteram_size);
|
||||
|
||||
tilemap_set_scrolldx(state->fg_tilemap,4,0);
|
||||
tilemap_set_scrolldy(state->fg_tilemap,-128,16);
|
||||
@ -346,7 +346,7 @@ WRITE16_HANDLER( m72_dmaon_w )
|
||||
{
|
||||
m72_state *state = space->machine->driver_data<m72_state>();
|
||||
if (ACCESSING_BITS_0_7)
|
||||
memcpy(state->spriteram,space->machine->generic.spriteram.u16,space->machine->generic.spriteram_size);
|
||||
memcpy(state->buffered_spriteram, state->spriteram, state->spriteram_size);
|
||||
}
|
||||
|
||||
|
||||
@ -421,23 +421,24 @@ WRITE16_HANDLER( majtitle_gfx_ctrl_w )
|
||||
static void m72_draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectangle *cliprect)
|
||||
{
|
||||
m72_state *state = machine->driver_data<m72_state>();
|
||||
UINT16 *spriteram = state->buffered_spriteram;
|
||||
int offs;
|
||||
|
||||
offs = 0;
|
||||
while (offs < machine->generic.spriteram_size/2)
|
||||
while (offs < state->spriteram_size/2)
|
||||
{
|
||||
int code,color,sx,sy,flipx,flipy,w,h,x,y;
|
||||
|
||||
|
||||
code = state->spriteram[offs+1];
|
||||
color = state->spriteram[offs+2] & 0x0f;
|
||||
sx = -256+(state->spriteram[offs+3] & 0x3ff);
|
||||
sy = 384-(state->spriteram[offs+0] & 0x1ff);
|
||||
flipx = state->spriteram[offs+2] & 0x0800;
|
||||
flipy = state->spriteram[offs+2] & 0x0400;
|
||||
code = spriteram[offs+1];
|
||||
color = spriteram[offs+2] & 0x0f;
|
||||
sx = -256+(spriteram[offs+3] & 0x3ff);
|
||||
sy = 384-(spriteram[offs+0] & 0x1ff);
|
||||
flipx = spriteram[offs+2] & 0x0800;
|
||||
flipy = spriteram[offs+2] & 0x0400;
|
||||
|
||||
w = 1 << ((state->spriteram[offs+2] & 0xc000) >> 14);
|
||||
h = 1 << ((state->spriteram[offs+2] & 0x3000) >> 12);
|
||||
w = 1 << ((spriteram[offs+2] & 0xc000) >> 14);
|
||||
h = 1 << ((spriteram[offs+2] & 0x3000) >> 12);
|
||||
sy -= 16 * h;
|
||||
|
||||
if (flip_screen_get(machine))
|
||||
@ -473,10 +474,11 @@ static void m72_draw_sprites(running_machine *machine, bitmap_t *bitmap,const re
|
||||
|
||||
static void majtitle_draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectangle *cliprect)
|
||||
{
|
||||
UINT16 *spriteram16_2 = machine->generic.spriteram2.u16;
|
||||
m72_state *state = machine->driver_data<m72_state>();
|
||||
UINT16 *spriteram16_2 = state->spriteram2;
|
||||
int offs;
|
||||
|
||||
for (offs = 0;offs < machine->generic.spriteram_size;offs += 4)
|
||||
for (offs = 0;offs < state->spriteram_size;offs += 4)
|
||||
{
|
||||
int code,color,sx,sy,flipx,flipy,w,h,x,y;
|
||||
|
||||
|
@ -140,25 +140,26 @@ VIDEO_START( dynablsb )
|
||||
static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectangle *cliprect)
|
||||
{
|
||||
m90_state *state = machine->driver_data<m90_state>();
|
||||
UINT16 *spriteram = state->video_data + 0xee00/2;;
|
||||
int offs;
|
||||
|
||||
for (offs = 0x1f2/2; offs >= 0; offs -= 3)
|
||||
{
|
||||
int x,y,sprite,colour,fx,fy,y_multi,i;
|
||||
|
||||
sprite = state->spriteram[offs+1];
|
||||
colour = (state->spriteram[offs+0] >> 9) & 0x0f;
|
||||
sprite = spriteram[offs+1];
|
||||
colour = (spriteram[offs+0] >> 9) & 0x0f;
|
||||
|
||||
y = state->spriteram[offs+0] & 0x1ff;
|
||||
x = state->spriteram[offs+2] & 0x1ff;
|
||||
y = spriteram[offs+0] & 0x1ff;
|
||||
x = spriteram[offs+2] & 0x1ff;
|
||||
|
||||
x = x - 16;
|
||||
y = 512 - y;
|
||||
|
||||
fx = (state->spriteram[offs+2] >> 8) & 0x02;
|
||||
fy = (state->spriteram[offs+0] >> 8) & 0x80;
|
||||
fx = (spriteram[offs+2] >> 8) & 0x02;
|
||||
fy = (spriteram[offs+0] >> 8) & 0x80;
|
||||
|
||||
y_multi = 1 << ((state->spriteram[offs+0] & 0x6000) >> 13);
|
||||
y_multi = 1 << ((spriteram[offs+0] & 0x6000) >> 13);
|
||||
y -= 16 * y_multi;
|
||||
|
||||
for (i = 0;i < y_multi;i++)
|
||||
@ -192,12 +193,13 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan
|
||||
|
||||
static void bomblord_draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectangle *cliprect)
|
||||
{
|
||||
UINT16 *spriteram16 = machine->generic.spriteram.u16;
|
||||
m90_state *state = machine->driver_data<m90_state>();
|
||||
UINT16 *spriteram16 = state->spriteram;
|
||||
int offs = 0, last_sprite = 0;
|
||||
int x,y,sprite,colour,fx,fy;
|
||||
|
||||
|
||||
while ((offs < machine->generic.spriteram_size/2) & (spriteram16[offs+0] != 0x8000))
|
||||
while ((offs < state->spriteram_size/2) & (spriteram16[offs+0] != 0x8000))
|
||||
{
|
||||
last_sprite = offs;
|
||||
offs += 4;
|
||||
@ -231,11 +233,12 @@ static void bomblord_draw_sprites(running_machine *machine, bitmap_t *bitmap,con
|
||||
|
||||
static void dynablsb_draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectangle *cliprect)
|
||||
{
|
||||
UINT16 *spriteram16 = machine->generic.spriteram.u16;
|
||||
m90_state *state = machine->driver_data<m90_state>();
|
||||
UINT16 *spriteram16 = state->spriteram;
|
||||
int offs = 0, last_sprite = 0;
|
||||
int x,y,sprite,colour,fx,fy;
|
||||
|
||||
while ((offs < machine->generic.spriteram_size/2) & (spriteram16[offs+0] != 0xffff))
|
||||
while ((offs < state->spriteram_size/2) & (spriteram16[offs+0] != 0xffff))
|
||||
{
|
||||
last_sprite = offs;
|
||||
offs += 4;
|
||||
@ -322,8 +325,6 @@ SCREEN_UPDATE( m90 )
|
||||
state->last_pf1=pf1_base;
|
||||
state->last_pf2=pf2_base;
|
||||
|
||||
state->spriteram=state->video_data+0xee00/2;
|
||||
|
||||
/* Setup scrolling */
|
||||
if (state->video_control_data[5]&0x20)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user