- Removed dirtybuffer from video/generic.c and all drivers still using it. Good riddance...

- Removed videoram_w, colorram_w and spriteram_w and changed all drivers using it to access RAM directly.  Still kept the _r function as some old style drivers are relying on them for mirroring support.  Will investigate and address those next
This commit is contained in:
Zsolt Vasvari 2008-01-14 09:49:11 +00:00
parent c34bf82ad4
commit 2912a535dd
59 changed files with 578 additions and 1268 deletions

View File

@ -51,10 +51,6 @@ size_t spriteram_size; /* ... here just for convenience */
size_t spriteram_2_size;
size_t spriteram_3_size;
UINT8 *dirtybuffer;
UINT16 *dirtybuffer16;
UINT32 *dirtybuffer32;
UINT8 *paletteram;
UINT16 *paletteram16;
UINT32 *paletteram32;
@ -296,9 +292,6 @@ void generic_video_init(running_machine *machine)
spriteram_size = 0; /* ... here just for convenience */
spriteram_2_size = 0;
spriteram_3_size = 0;
dirtybuffer = NULL;
dirtybuffer16 = NULL;
dirtybuffer32 = NULL;
tmpbitmap = NULL;
flip_screen_x = flip_screen_y = 0;
}
@ -309,35 +302,16 @@ void generic_video_init(running_machine *machine)
GENERIC VIDEO START/UPDATE
***************************************************************************/
/*-------------------------------------------------
video_generic_postload - post-load callback
that marks all videoram as dirty
-------------------------------------------------*/
static void video_generic_postload(void)
{
memset(dirtybuffer, 1, videoram_size);
}
/*-------------------------------------------------
video_start_generic - general video system
with dirty buffer support
-------------------------------------------------*/
VIDEO_START( generic )
{
assert_always(videoram_size != 0, "VIDEO_START(generic) requires non-zero videoram_size");
/* allocate memory for the dirty buffer */
dirtybuffer = auto_malloc(videoram_size);
memset(dirtybuffer, 1, videoram_size);
/* allocate the temporary bitmap */
tmpbitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
/* on a restore, we automatically zap the dirty buffer */
state_save_register_func_postload(video_generic_postload);
}
@ -374,8 +348,7 @@ VIDEO_UPDATE( generic_bitmapped )
***************************************************************************/
/*-------------------------------------------------
videoram_r/w - 8-bit access to videoram with
dirty buffer marking
videoram_r - 8-bit read access to videoram
-------------------------------------------------*/
READ8_HANDLER( videoram_r )
@ -383,16 +356,9 @@ READ8_HANDLER( videoram_r )
return videoram[offset];
}
WRITE8_HANDLER( videoram_w )
{
dirtybuffer[offset] = 1;
videoram[offset] = data;
}
/*-------------------------------------------------
colorram_r/w - 8-bit access to colorram with
dirty buffer marking
colorram_r - 8-bit read access to colorram
-------------------------------------------------*/
READ8_HANDLER( colorram_r )
@ -400,15 +366,9 @@ READ8_HANDLER( colorram_r )
return colorram[offset];
}
WRITE8_HANDLER( colorram_w )
{
dirtybuffer[offset] = 1;
colorram[offset] = data;
}
/*-------------------------------------------------
spriteram_r/w - 8-bit access to spriteram
spriteram_r - 8-bit read access to spriteram
-------------------------------------------------*/
READ8_HANDLER( spriteram_r )
@ -416,11 +376,6 @@ READ8_HANDLER( spriteram_r )
return spriteram[offset];
}
WRITE8_HANDLER( spriteram_w )
{
spriteram[offset] = data;
}
/*-------------------------------------------------
spriteram16_r/w - 16-bit access to spriteram16
@ -437,21 +392,6 @@ WRITE16_HANDLER( spriteram16_w )
}
/*-------------------------------------------------
spriteram_r/w - 8-bit access to spriteram2
-------------------------------------------------*/
READ8_HANDLER( spriteram_2_r )
{
return spriteram_2[offset];
}
WRITE8_HANDLER( spriteram_2_w )
{
spriteram_2[offset] = data;
}
/***************************************************************************
GENERIC SPRITE BUFFERING

View File

@ -95,7 +95,7 @@ extern const gfx_layout gfx_16x16x4_planar;
/* set up all the common systems */
void generic_video_init(running_machine *machine);
/* generic video start with dirty buffers */
/* generic video start */
VIDEO_START( generic );
/* generic video start with a temporary bitmap */
@ -108,21 +108,16 @@ VIDEO_UPDATE( generic_bitmapped );
/* ----- core video/color/spriteram access ----- */
/* video RAM read/write handlers */
/* video RAM read handlers */
READ8_HANDLER( videoram_r );
WRITE8_HANDLER( videoram_w );
/* color RAM read/write handlers */
/* color RAM read handlers */
READ8_HANDLER( colorram_r );
WRITE8_HANDLER( colorram_w );
/* sprite RAM read/write handlers */
READ8_HANDLER( spriteram_r );
WRITE8_HANDLER( spriteram_w );
READ16_HANDLER( spriteram16_r );
WRITE16_HANDLER( spriteram16_w );
READ8_HANDLER( spriteram_2_r );
WRITE8_HANDLER( spriteram_2_w );

View File

@ -212,7 +212,7 @@ static ADDRESS_MAP_START( writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0xc000, 0xffff) AM_WRITE(MWA8_ROM) /* Super Bagman only */
AM_RANGE(0x9800, 0x981f) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size) /* hidden portion of color RAM */
/* here only to initialize the pointer, */
/* writes are handled by colorram_w */
/* writes are handled by bagman_colorram_w */
AM_RANGE(0xa800, 0xa805) AM_WRITE(bagman_ls259_w) /* TMS5110 driving state machine */
AM_RANGE(0x9c00, 0x9fff) AM_WRITE(MWA8_NOP) /* written to, but unused */
AM_RANGE(0xa004, 0xa004) AM_WRITE(bagman_coin_counter_w)
@ -243,7 +243,7 @@ static ADDRESS_MAP_START( pickin_writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0xa003, 0xa003) AM_WRITE(MWA8_RAM) AM_BASE(&bagman_video_enable)
AM_RANGE(0x9800, 0x981f) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size) /* hidden portion of color RAM */
/* here only to initialize the pointer, */
/* writes are handled by colorram_w */
/* writes are handled by bagman_colorram_w */
AM_RANGE(0x9c00, 0x9fff) AM_WRITE(MWA8_NOP) /* written to, but unused */
AM_RANGE(0xa004, 0xa004) AM_WRITE(bagman_coin_counter_w)
#if 0

View File

@ -164,7 +164,7 @@ static ADDRESS_MAP_START( readmem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x8000, 0x87ff) AM_READ(MRA8_RAM) /* 6116 SRAM (36) */
AM_RANGE(0x8800, 0x8fff) AM_READ(MRA8_RAM) /* 6116 SRAM (35) */
AM_RANGE(0xa000, 0xbfff) AM_READ(MRA8_BANK1)
AM_RANGE(0xc800, 0xcfff) AM_READ(videoram_r)
AM_RANGE(0xc800, 0xcfff) AM_READ(MRA8_RAM)
AM_RANGE(0xd400, 0xd400) AM_READ(buggychl_mcu_r)
AM_RANGE(0xd401, 0xd401) AM_READ(buggychl_mcu_status_r)
AM_RANGE(0xd600, 0xd600) AM_READ(input_port_0_r) /* dsw */
@ -184,7 +184,7 @@ static ADDRESS_MAP_START( writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x8800, 0x8fff) AM_WRITE(MWA8_RAM) /* 6116 SRAM (35) */
AM_RANGE(0x9000, 0x9fff) AM_WRITE(buggychl_sprite_lookup_w)
AM_RANGE(0xa000, 0xbfff) AM_WRITE(buggychl_chargen_w) AM_BASE(&buggychl_character_ram)
AM_RANGE(0xc800, 0xcfff) AM_WRITE(videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0xc800, 0xcfff) AM_WRITE(MWA8_RAM) AM_BASE(&videoram) AM_SIZE(&videoram_size)
// { 0xd000, 0xd000, horizon
AM_RANGE(0xd100, 0xd100) AM_WRITE(buggychl_ctrl_w)
AM_RANGE(0xd200, 0xd200) AM_WRITE(bankswitch_w)

View File

@ -71,7 +71,7 @@ static ADDRESS_MAP_START( carjmbre_writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x8fc1, 0x8fc1) AM_WRITE(MWA8_NOP) //overrun during initial screen clear
AM_RANGE(0x8fe1, 0x8fe1) AM_WRITE(MWA8_NOP) //overrun during initial screen clear
AM_RANGE(0x9000, 0x97ff) AM_WRITE(carjmbre_videoram_w) AM_BASE(&videoram)
AM_RANGE(0x9800, 0x985f) AM_WRITE(spriteram_w) AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
AM_RANGE(0x9800, 0x985f) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
AM_RANGE(0x9880, 0x98df) AM_WRITE(MWA8_RAM) //spriteram mirror
AM_RANGE(0xb800, 0xb800) AM_WRITE(soundlatch_w)
ADDRESS_MAP_END

View File

@ -195,8 +195,8 @@ static ADDRESS_MAP_START( writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x8000, 0x83ff) AM_WRITE(MWA8_RAM)
AM_RANGE(0x8800, 0x88ff) AM_WRITE(cclimber_bigsprite_videoram_w) AM_BASE(&cclimber_bsvideoram) AM_SIZE(&cclimber_bsvideoram_size)
AM_RANGE(0x8900, 0x8bff) AM_WRITE(MWA8_RAM) /* not used, but initialized */
AM_RANGE(0x9000, 0x93ff) AM_WRITE(videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0x9400, 0x97ff) AM_WRITE(videoram_w) /* mirror address, used by Crazy Climber to draw windows */
AM_RANGE(0x9000, 0x93ff) AM_WRITE(MWA8_RAM) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0x9400, 0x97ff) AM_WRITE(MWA8_RAM) /* mirror address, used by Crazy Climber to draw windows */
/* 9800-9bff and 9c00-9fff share the same RAM, interleaved */
/* (9800-981f for scroll, 9c20-9c3f for color RAM, and so on) */
AM_RANGE(0x9800, 0x981f) AM_WRITE(MWA8_RAM) AM_BASE(&cclimber_column_scroll)
@ -237,8 +237,8 @@ static ADDRESS_MAP_START( cannonb_writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x8000, 0x83ff) AM_WRITE(MWA8_RAM)
AM_RANGE(0x8800, 0x88ff) AM_WRITE(cclimber_bigsprite_videoram_w) AM_BASE(&cclimber_bsvideoram) AM_SIZE(&cclimber_bsvideoram_size)
//AM_RANGE(0x8900, 0x8bff) AM_WRITE(MWA8_RAM) /* not used, but initialized */
AM_RANGE(0x9000, 0x93ff) AM_WRITE(videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0x9400, 0x97ff) AM_WRITE(videoram_w) /* mirror address, used by Crazy Climber to draw windows */
AM_RANGE(0x9000, 0x93ff) AM_WRITE(MWA8_RAM) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0x9400, 0x97ff) AM_WRITE(MWA8_RAM) /* mirror address, used by Crazy Climber to draw windows */
/* 9800-9bff and 9c00-9fff share the same RAM, interleaved */
/* (9800-981f for scroll, 9c20-9c3f for color RAM, and so on) */
AM_RANGE(0x9800, 0x981f) AM_WRITE(MWA8_RAM) AM_BASE(&cclimber_column_scroll)
@ -273,8 +273,8 @@ static ADDRESS_MAP_START( swimmer_writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x8000, 0x87ff) AM_WRITE(MWA8_RAM)
AM_RANGE(0x8800, 0x88ff) AM_WRITE(cclimber_bigsprite_videoram_w) AM_BASE(&cclimber_bsvideoram) AM_SIZE(&cclimber_bsvideoram_size)
AM_RANGE(0x8900, 0x89ff) AM_WRITE(cclimber_bigsprite_videoram_w) /* mirror for the above (Guzzler writes to both) */
AM_RANGE(0x9000, 0x93ff) AM_WRITE(videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0x9400, 0x97ff) AM_WRITE(videoram_w) /* mirror address (used by Guzzler) */
AM_RANGE(0x9000, 0x93ff) AM_WRITE(MWA8_RAM) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0x9400, 0x97ff) AM_WRITE(MWA8_RAM) /* mirror address (used by Guzzler) */
AM_RANGE(0x9800, 0x981f) AM_WRITE(MWA8_RAM) AM_BASE(&cclimber_column_scroll)
AM_RANGE(0x9880, 0x989f) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
AM_RANGE(0x98fc, 0x98ff) AM_WRITE(MWA8_RAM) AM_BASE(&cclimber_bigspriteram)

View File

@ -134,8 +134,6 @@ Palette3*: 585D (low), 5899 (high), len = 60 (used alternatively with pal3)
extern UINT8 * cpk_colorram;
extern UINT8 * cpk_videoram;
extern UINT8 * cpk_palette;
extern UINT8 * cpk_palette2;
extern UINT8 * cpk_expram;
@ -146,12 +144,7 @@ VIDEO_START( cska );
WRITE8_HANDLER( cpk_palette_w );
WRITE8_HANDLER( cpk_palette2_w );
READ8_HANDLER( cpk_videoram_r );
WRITE8_HANDLER( cpk_videoram_w );
READ8_HANDLER( cpk_colorram_r );
WRITE8_HANDLER( cpk_colorram_w );
READ8_HANDLER( cpk_expansion_r );
WRITE8_HANDLER( cpk_expansion_w );
@ -207,9 +200,9 @@ static ADDRESS_MAP_START( csk227_map, ADDRESS_SPACE_IO, 8 )
AM_RANGE(0x5082, 0x5082) AM_READ(input_port_6_r) /* Coing & Kbd */
AM_RANGE(0x5091, 0x5091) AM_READ(input_port_7_r) /* Keyboard */
AM_RANGE(0x50a0, 0x50a0) AM_READ(input_port_8_r) /* Not connected */
AM_RANGE(0x6800, 0x6fff) AM_WRITE(cpk_expansion_w)
AM_RANGE(0x7000, 0x77ff) AM_READWRITE(cpk_videoram_r,cpk_videoram_w)
AM_RANGE(0x7800, 0x7fff) AM_READWRITE(cpk_colorram_r,cpk_colorram_w)
AM_RANGE(0x6800, 0x6fff) AM_WRITE(MWA8_RAM) AM_BASE(&cpk_expram)
AM_RANGE(0x7000, 0x77ff) AM_RAM AM_BASE(&cpk_videoram)
AM_RANGE(0x7800, 0x7fff) AM_RAM AM_BASE(&cpk_colorram)
AM_RANGE(0x8000, 0xffff) AM_READ(cpk_expansion_r)
ADDRESS_MAP_END
@ -226,9 +219,9 @@ static ADDRESS_MAP_START( csk234_map, ADDRESS_SPACE_IO, 8 )
AM_RANGE(0x5090, 0x5090) AM_WRITE(custom_io_w)
AM_RANGE(0x5091, 0x5091) AM_READ(custom_io_r) /* used for protection and other */
AM_RANGE(0x50a0, 0x50a0) AM_READ(input_port_8_r) /* Not connected */
AM_RANGE(0x6800, 0x6fff) AM_WRITE(cpk_expansion_w)
AM_RANGE(0x7000, 0x77ff) AM_READWRITE(cpk_videoram_r,cpk_videoram_w)
AM_RANGE(0x7800, 0x7fff) AM_READWRITE(cpk_colorram_r,cpk_colorram_w)
AM_RANGE(0x6800, 0x6fff) AM_WRITE(MWA8_RAM) AM_BASE(&cpk_expram)
AM_RANGE(0x7000, 0x77ff) AM_RAM AM_BASE(&cpk_videoram)
AM_RANGE(0x7800, 0x7fff) AM_RAM AM_BASE(&cpk_colorram)
AM_RANGE(0x8000, 0xffff) AM_READ(cpk_expansion_r)
ADDRESS_MAP_END

View File

@ -89,7 +89,7 @@ static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x5fff) AM_ROM
AM_RANGE(0x6008, 0x600b) AM_READ(exerion_protection_r)
AM_RANGE(0x6000, 0x67ff) AM_RAM AM_BASE(&exerion_ram)
AM_RANGE(0x8000, 0x87ff) AM_READWRITE(MRA8_RAM, videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0x8000, 0x87ff) AM_RAM AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0x8800, 0x887f) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
AM_RANGE(0x8800, 0x8bff) AM_RAM
AM_RANGE(0xa000, 0xa000) AM_READ(exerion_port01_r)

View File

@ -207,7 +207,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( fcombat_writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x7fff) AM_WRITE(MWA8_ROM)
AM_RANGE(0xc000, 0xc7ff) AM_WRITE(MWA8_RAM)
AM_RANGE(0xd000, 0xd7ff) AM_WRITE(videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0xd000, 0xd7ff) AM_WRITE(MWA8_RAM) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0xd800, 0xd8ff) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
AM_RANGE(0xe800, 0xe800) AM_WRITE(fcombat_videoreg_w) // at least bit 0 for flip screen and joystick input multiplexor

View File

@ -122,8 +122,8 @@ static ADDRESS_MAP_START( writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x081b, 0x081b) AM_WRITE(MWA8_NOP) /* Loads the snd command into the snd latch */
AM_RANGE(0x081c, 0x081c) AM_WRITE(finalizr_i8039_irq_w) /* custom sound chip */
AM_RANGE(0x081d, 0x081d) AM_WRITE(soundlatch_w) /* custom sound chip */
AM_RANGE(0x2000, 0x23ff) AM_WRITE(colorram_w) AM_BASE(&colorram)
AM_RANGE(0x2400, 0x27ff) AM_WRITE(videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0x2000, 0x23ff) AM_WRITE(MWA8_RAM) AM_BASE(&colorram)
AM_RANGE(0x2400, 0x27ff) AM_WRITE(MWA8_RAM) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0x2800, 0x2bff) AM_WRITE(MWA8_RAM) AM_BASE(&finalizr_colorram2)
AM_RANGE(0x2c00, 0x2fff) AM_WRITE(MWA8_RAM) AM_BASE(&finalizr_videoram2)
AM_RANGE(0x3000, 0x31ff) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size)

View File

@ -16,9 +16,6 @@ extern UINT8 *goldstar_video1, *goldstar_video2, *goldstar_video3;
extern size_t goldstar_video_size;
extern UINT8 *goldstar_scroll1, *goldstar_scroll2, *goldstar_scroll3;
WRITE8_HANDLER( goldstar_video1_w );
WRITE8_HANDLER( goldstar_video2_w );
WRITE8_HANDLER( goldstar_video3_w );
WRITE8_HANDLER( goldstar_fa00_w );
VIDEO_START( goldstar );
VIDEO_UPDATE( goldstar );
@ -59,13 +56,12 @@ static READ8_HANDLER( protection_r )
static ADDRESS_MAP_START( map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0xb7ff) AM_ROM
AM_RANGE(0xb800, 0xbfff) AM_RAM AM_BASE(&nvram) AM_SIZE(&nvram_size)
AM_RANGE(0xc000, 0xc7ff) AM_READ(MRA8_ROM)
AM_RANGE(0xc800, 0xd9ff) AM_READ(MRA8_RAM)
AM_RANGE(0xc800, 0xcfff) AM_WRITE(videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0xd000, 0xd7ff) AM_WRITE(colorram_w) AM_BASE(&colorram)
AM_RANGE(0xe000, 0xe1ff) AM_READWRITE(MRA8_RAM,goldstar_video2_w) AM_BASE(&goldstar_video2)
AM_RANGE(0xd800, 0xd9ff) AM_READWRITE(MRA8_RAM,goldstar_video1_w) AM_BASE(&goldstar_video1) AM_SIZE(&goldstar_video_size)
AM_RANGE(0xe800, 0xe9ff) AM_WRITE(goldstar_video3_w) AM_BASE(&goldstar_video3)
AM_RANGE(0xc000, 0xc7ff) AM_ROM
AM_RANGE(0xc800, 0xcfff) AM_RAM AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0xd000, 0xd7ff) AM_RAM AM_BASE(&colorram)
AM_RANGE(0xd800, 0xd9ff) AM_RAM AM_BASE(&goldstar_video1) AM_SIZE(&goldstar_video_size)
AM_RANGE(0xe000, 0xe1ff) AM_RAM AM_BASE(&goldstar_video2)
AM_RANGE(0xe800, 0xe9ff) AM_WRITE(MWA8_RAM) AM_BASE(&goldstar_video3)
AM_RANGE(0xf040, 0xf07f) AM_WRITE(MWA8_RAM) AM_BASE(&goldstar_scroll1)
AM_RANGE(0xf800, 0xf800) AM_READ(input_port_0_r)
AM_RANGE(0xf801, 0xf801) AM_READ(input_port_1_r) /* Test Mode */

View File

@ -40,7 +40,7 @@ static ADDRESS_MAP_START( ikki_cpu1, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x9fff) AM_ROM
AM_RANGE(0xc000, 0xc7ff) AM_RAM
AM_RANGE(0xc800, 0xcfff) AM_RAM AM_SHARE(1)
AM_RANGE(0xd000, 0xd7ff) AM_READWRITE(videoram_r, videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0xd000, 0xd7ff) AM_RAM AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0xe000, 0xe000) AM_READ(ikki_e000_r)
AM_RANGE(0xe001, 0xe001) AM_READ(input_port_0_r) /* dsw 1 */
AM_RANGE(0xe002, 0xe002) AM_READ(input_port_1_r) /* dsw 2 */

View File

@ -386,13 +386,13 @@ static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x1e87, 0x1e87) AM_WRITE(jedi_video_off_w)
AM_RANGE(0x1f00, 0x1f00) AM_WRITE(sound_latch_w)
AM_RANGE(0x1f80, 0x1f80) AM_WRITE(rom_banksel_w)
AM_RANGE(0x2000, 0x27ff) AM_READWRITE(MRA8_RAM, jedi_backgroundram_w) AM_BASE(&jedi_backgroundram) AM_SIZE(&jedi_backgroundram_size)
AM_RANGE(0x2000, 0x27ff) AM_RAM AM_BASE(&jedi_backgroundram) AM_SIZE(&jedi_backgroundram_size)
AM_RANGE(0x2800, 0x2fff) AM_READWRITE(MRA8_RAM, jedi_paletteram_w) AM_BASE(&paletteram)
AM_RANGE(0x3000, 0x37bf) AM_READWRITE(MRA8_RAM, videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0x37c0, 0x3bff) AM_READWRITE(MRA8_RAM, MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
AM_RANGE(0x3000, 0x37bf) AM_RAM AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0x37c0, 0x3bff) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
AM_RANGE(0x3c00, 0x3c01) AM_WRITE(jedi_vscroll_w)
AM_RANGE(0x3d00, 0x3d01) AM_WRITE(jedi_hscroll_w)
AM_RANGE(0x3e00, 0x3fff) AM_WRITE(jedi_PIXIRAM_w) AM_BASE(&jedi_PIXIRAM)
AM_RANGE(0x3e00, 0x3fff) AM_WRITE(jedi_PIXIRAM_w)
AM_RANGE(0x4000, 0x7fff) AM_ROMBANK(1)
AM_RANGE(0x8000, 0xffff) AM_ROM
ADDRESS_MAP_END

View File

@ -97,7 +97,7 @@ static ADDRESS_MAP_START( writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0xc000, 0xcfff) AM_WRITE(MWA8_RAM)
AM_RANGE(0xd000, 0xd3ff) AM_WRITE(kchamp_videoram_w) AM_BASE(&videoram)
AM_RANGE(0xd400, 0xd7ff) AM_WRITE(kchamp_colorram_w) AM_BASE(&colorram)
AM_RANGE(0xd800, 0xd8ff) AM_WRITE(spriteram_w) AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
AM_RANGE(0xd800, 0xd8ff) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
AM_RANGE(0xd900, 0xdfff) AM_WRITE(MWA8_RAM)
AM_RANGE(0xe000, 0xffff) AM_WRITE(MWA8_ROM)
ADDRESS_MAP_END
@ -188,7 +188,7 @@ static ADDRESS_MAP_START( kc_writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0xc000, 0xdfff) AM_WRITE(MWA8_RAM)
AM_RANGE(0xe000, 0xe3ff) AM_WRITE(kchamp_videoram_w) AM_BASE(&videoram)
AM_RANGE(0xe400, 0xe7ff) AM_WRITE(kchamp_colorram_w) AM_BASE(&colorram)
AM_RANGE(0xea00, 0xeaff) AM_WRITE(spriteram_w) AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
AM_RANGE(0xea00, 0xeaff) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
AM_RANGE(0xeb00, 0xffff) AM_WRITE(MWA8_RAM)
ADDRESS_MAP_END

View File

@ -138,7 +138,7 @@ static ADDRESS_MAP_START( sprite_writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x1fff) AM_WRITE(MWA8_ROM)
AM_RANGE(0x8000, 0x87ff) AM_WRITE(MWA8_RAM) /* work ram */
AM_RANGE(0xa000, 0xa7ff) AM_WRITE(sprite_shared_w) AM_BASE(&sprite_shared) /* shared with main */
AM_RANGE(0xc000, 0xc3ff) AM_WRITE(spriteram_w) AM_BASE(&spriteram) AM_SIZE(&spriteram_size) /* sprite ram */
AM_RANGE(0xc000, 0xc3ff) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size) /* sprite ram */
AM_RANGE(0xc400, 0xc43f) AM_WRITE(MWA8_RAM) /* something related to scroll? */
ADDRESS_MAP_END
@ -225,7 +225,7 @@ static ADDRESS_MAP_START( rk_sprite_writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x1fff) AM_WRITE(MWA8_ROM)
AM_RANGE(0x8000, 0x87ff) AM_WRITE(MWA8_RAM) /* work ram */
AM_RANGE(0xc800, 0xcfff) AM_WRITE(sprite_shared_w) AM_BASE(&sprite_shared) /* shared with main */
AM_RANGE(0xa000, 0xa3ff) AM_WRITE(spriteram_w) AM_BASE(&spriteram) AM_SIZE(&spriteram_size) /* sprite ram */
AM_RANGE(0xa000, 0xa3ff) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size) /* sprite ram */
AM_RANGE(0xa400, 0xa43f) AM_WRITE(MWA8_RAM) /* something related to scroll? */
ADDRESS_MAP_END

View File

@ -39,8 +39,6 @@ WRITE8_HANDLER( matmania_paletteram_w );
PALETTE_INIT( matmania );
VIDEO_UPDATE( matmania );
VIDEO_UPDATE( maniach );
WRITE8_HANDLER( matmania_videoram3_w );
WRITE8_HANDLER( matmania_colorram3_w );
VIDEO_START( matmania );
VIDEO_UPDATE( matmania );
@ -95,10 +93,10 @@ static ADDRESS_MAP_START( matmania_writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0780, 0x07df) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
AM_RANGE(0x1000, 0x13ff) AM_WRITE(MWA8_RAM) AM_BASE(&matmania_videoram2) AM_SIZE(&matmania_videoram2_size)
AM_RANGE(0x1400, 0x17ff) AM_WRITE(MWA8_RAM) AM_BASE(&matmania_colorram2)
AM_RANGE(0x2000, 0x21ff) AM_WRITE(videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0x2200, 0x23ff) AM_WRITE(colorram_w) AM_BASE(&colorram)
AM_RANGE(0x2400, 0x25ff) AM_WRITE(matmania_videoram3_w) AM_BASE(&matmania_videoram3) AM_SIZE(&matmania_videoram3_size)
AM_RANGE(0x2600, 0x27ff) AM_WRITE(matmania_colorram3_w) AM_BASE(&matmania_colorram3)
AM_RANGE(0x2000, 0x21ff) AM_WRITE(MWA8_RAM) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0x2200, 0x23ff) AM_WRITE(MWA8_RAM) AM_BASE(&colorram)
AM_RANGE(0x2400, 0x25ff) AM_WRITE(MWA8_RAM) AM_BASE(&matmania_videoram3) AM_SIZE(&matmania_videoram3_size)
AM_RANGE(0x2600, 0x27ff) AM_WRITE(MWA8_RAM) AM_BASE(&matmania_colorram3)
AM_RANGE(0x3000, 0x3000) AM_WRITE(MWA8_RAM) AM_BASE(&matmania_pageselect)
AM_RANGE(0x3010, 0x3010) AM_WRITE(matmania_sh_command_w)
AM_RANGE(0x3020, 0x3020) AM_WRITE(MWA8_RAM) AM_BASE(&matmania_scroll)
@ -125,10 +123,10 @@ static ADDRESS_MAP_START( maniach_writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0780, 0x07df) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
AM_RANGE(0x1000, 0x13ff) AM_WRITE(MWA8_RAM) AM_BASE(&matmania_videoram2) AM_SIZE(&matmania_videoram2_size)
AM_RANGE(0x1400, 0x17ff) AM_WRITE(MWA8_RAM) AM_BASE(&matmania_colorram2)
AM_RANGE(0x2000, 0x21ff) AM_WRITE(videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0x2200, 0x23ff) AM_WRITE(colorram_w) AM_BASE(&colorram)
AM_RANGE(0x2400, 0x25ff) AM_WRITE(matmania_videoram3_w) AM_BASE(&matmania_videoram3) AM_SIZE(&matmania_videoram3_size)
AM_RANGE(0x2600, 0x27ff) AM_WRITE(matmania_colorram3_w) AM_BASE(&matmania_colorram3)
AM_RANGE(0x2000, 0x21ff) AM_WRITE(MWA8_RAM) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0x2200, 0x23ff) AM_WRITE(MWA8_RAM) AM_BASE(&colorram)
AM_RANGE(0x2400, 0x25ff) AM_WRITE(MWA8_RAM) AM_BASE(&matmania_videoram3) AM_SIZE(&matmania_videoram3_size)
AM_RANGE(0x2600, 0x27ff) AM_WRITE(MWA8_RAM) AM_BASE(&matmania_colorram3)
AM_RANGE(0x3000, 0x3000) AM_WRITE(MWA8_RAM) AM_BASE(&matmania_pageselect)
AM_RANGE(0x3010, 0x3010) AM_WRITE(maniach_sh_command_w)
AM_RANGE(0x3020, 0x3020) AM_WRITE(MWA8_RAM) AM_BASE(&matmania_scroll)

View File

@ -20,8 +20,6 @@ void konami1_decode(void);
extern UINT8 *megazone_scrollx;
extern UINT8 *megazone_scrolly;
static UINT8 *megazone_sharedram;
extern UINT8 *megazone_videoram2;
extern UINT8 *megazone_colorram2;
extern size_t megazone_videoram2_size;
@ -75,32 +73,6 @@ static WRITE8_HANDLER( megazone_portB_w )
}
}
static WRITE8_HANDLER( megazone_videoram2_w )
{
if (megazone_videoram2[offset] != data)
{
megazone_videoram2[offset] = data;
}
}
static WRITE8_HANDLER( megazone_colorram2_w )
{
if (megazone_colorram2[offset] != data)
{
megazone_colorram2[offset] = data;
}
}
static READ8_HANDLER( megazone_sharedram_r )
{
return(megazone_sharedram[offset]);
}
static WRITE8_HANDLER( megazone_sharedram_w )
{
megazone_sharedram[offset] = data;
}
static WRITE8_HANDLER( megazone_i8039_irq_w )
{
cpunum_set_input_line(2, 0, ASSERT_LINE);
@ -123,7 +95,7 @@ static WRITE8_HANDLER( megazone_coin_counter_w )
static ADDRESS_MAP_START( readmem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x2000, 0x2fff) AM_READ(MRA8_RAM)
AM_RANGE(0x3000, 0x33ff) AM_READ(MRA8_RAM)
AM_RANGE(0x3800, 0x3fff) AM_READ(megazone_sharedram_r)
AM_RANGE(0x3800, 0x3fff) AM_RAM AM_SHARE(1)
AM_RANGE(0x4000, 0xffff) AM_READ(MRA8_ROM) /* 4000->5FFF is a debug rom */
ADDRESS_MAP_END
@ -134,12 +106,11 @@ static ADDRESS_MAP_START( writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0800, 0x0800) AM_WRITE(watchdog_reset_w)
AM_RANGE(0x1800, 0x1800) AM_WRITE(MWA8_RAM) AM_BASE(&megazone_scrollx)
AM_RANGE(0x1000, 0x1000) AM_WRITE(MWA8_RAM) AM_BASE(&megazone_scrolly)
AM_RANGE(0x2000, 0x23ff) AM_WRITE(videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0x2400, 0x27ff) AM_WRITE(megazone_videoram2_w) AM_BASE(&megazone_videoram2) AM_SIZE(&megazone_videoram2_size)
AM_RANGE(0x2800, 0x2bff) AM_WRITE(colorram_w) AM_BASE(&colorram)
AM_RANGE(0x2c00, 0x2fff) AM_WRITE(megazone_colorram2_w) AM_BASE(&megazone_colorram2)
AM_RANGE(0x2000, 0x23ff) AM_WRITE(MWA8_RAM) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0x2400, 0x27ff) AM_WRITE(MWA8_RAM) AM_BASE(&megazone_videoram2) AM_SIZE(&megazone_videoram2_size)
AM_RANGE(0x2800, 0x2bff) AM_WRITE(MWA8_RAM) AM_BASE(&colorram)
AM_RANGE(0x2c00, 0x2fff) AM_WRITE(MWA8_RAM) AM_BASE(&megazone_colorram2)
AM_RANGE(0x3000, 0x33ff) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
AM_RANGE(0x3800, 0x3fff) AM_WRITE(megazone_sharedram_w) AM_BASE(&megazone_sharedram)
AM_RANGE(0x4000, 0xffff) AM_WRITE(MWA8_ROM)
ADDRESS_MAP_END
@ -150,7 +121,7 @@ static ADDRESS_MAP_START( sound_readmem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x6002, 0x6002) AM_READ(input_port_2_r) /* P2 IO */
AM_RANGE(0x8000, 0x8000) AM_READ(input_port_3_r) /* DIP 1 */
AM_RANGE(0x8001, 0x8001) AM_READ(input_port_4_r) /* DIP 2 */
AM_RANGE(0xe000, 0xe7ff) AM_READ(megazone_sharedram_r) /* Shared with $3800->3fff of main CPU */
AM_RANGE(0xe000, 0xe7ff) AM_RAM AM_SHARE(1)
ADDRESS_MAP_END
static ADDRESS_MAP_START( sound_writemem, ADDRESS_SPACE_PROGRAM, 8 )
@ -160,7 +131,6 @@ static ADDRESS_MAP_START( sound_writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0xa000, 0xa000) AM_WRITE(MWA8_RAM) /* INTMAIN - Interrupts main CPU (unused) */
AM_RANGE(0xc000, 0xc000) AM_WRITE(MWA8_RAM) /* INT (Actually is NMI) enable/disable (unused)*/
AM_RANGE(0xc001, 0xc001) AM_WRITE(watchdog_reset_w)
AM_RANGE(0xe000, 0xe7ff) AM_WRITE(megazone_sharedram_w) /* Shared with $3800->3fff of main CPU */
ADDRESS_MAP_END
static ADDRESS_MAP_START( sound_readport, ADDRESS_SPACE_IO, 8 )

View File

@ -78,7 +78,7 @@ static ADDRESS_MAP_START( writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0xdc01, 0xdc01) AM_WRITE(momoko_fg_scrollx_w)
AM_RANGE(0xdc02, 0xdc02) AM_WRITE(momoko_fg_select_w)
AM_RANGE(0xe000, 0xe3ff) AM_WRITE(videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0xe000, 0xe3ff) AM_WRITE(MWA8_RAM) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0xe800, 0xe800) AM_WRITE(momoko_text_scrolly_w)
AM_RANGE(0xe801, 0xe801) AM_WRITE(momoko_text_mode_w)

View File

@ -68,9 +68,9 @@ static ADDRESS_MAP_START( writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x5fff) AM_WRITE(MWA8_ROM)
AM_RANGE(0x6000, 0x6bff) AM_WRITE(MWA8_RAM)
AM_RANGE(0x8800, 0x88ff) AM_WRITE(MWA8_NOP) /* unknown */
AM_RANGE(0x9000, 0x93ff) AM_WRITE(videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0x9800, 0x9cff) AM_WRITE(mouser_spriteram_w) AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
AM_RANGE(0x9c00, 0x9fff) AM_WRITE(mouser_colorram_w) AM_BASE(&colorram)
AM_RANGE(0x9000, 0x93ff) AM_WRITE(MWA8_RAM) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0x9800, 0x9cff) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
AM_RANGE(0x9c00, 0x9fff) AM_WRITE(MWA8_RAM) AM_BASE(&colorram)
AM_RANGE(0xa000, 0xa000) AM_WRITE(mouser_nmi_enable_w) /* bit 0 = NMI Enable */
AM_RANGE(0xa001, 0xa001) AM_WRITE(mouser_flip_screen_x_w)
AM_RANGE(0xa002, 0xa002) AM_WRITE(mouser_flip_screen_y_w)
@ -221,7 +221,6 @@ static MACHINE_DRIVER_START( mouser )
MDRV_PALETTE_LENGTH(64)
MDRV_PALETTE_INIT(mouser)
MDRV_VIDEO_START(generic)
MDRV_VIDEO_UPDATE(mouser)
/* sound hardware */

View File

@ -35,8 +35,6 @@ READ8_HANDLER( mnchmobl_sprite_attr_r );
WRITE8_HANDLER( mnchmobl_sprite_attr_w );
READ8_HANDLER( mnchmobl_sprite_tile_r );
WRITE8_HANDLER( mnchmobl_sprite_tile_w );
READ8_HANDLER( mnchmobl_videoram_r );
WRITE8_HANDLER( mnchmobl_videoram_w );
VIDEO_UPDATE( mnchmobl );
@ -77,8 +75,7 @@ static ADDRESS_MAP_START( readmem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0xac00, 0xafff) AM_READ(mnchmobl_sprite_tile_r) /* mirrored */
AM_RANGE(0xb000, 0xb3ff) AM_READ(MRA8_RAM)
AM_RANGE(0xb400, 0xb7ff) AM_READ(mnchmobl_sprite_attr_r) /* mirrored */
AM_RANGE(0xb800, 0xb8ff) AM_READ(MRA8_RAM)
AM_RANGE(0xb900, 0xb9ff) AM_READ(mnchmobl_videoram_r) /* mirrored */
AM_RANGE(0xb800, 0xb8ff) AM_MIRROR(0x0100) AM_READ(MRA8_RAM)
AM_RANGE(0xbe02, 0xbe02) AM_READ(input_port_3_r) /* DSW1 */
AM_RANGE(0xbe03, 0xbe03) AM_READ(input_port_4_r) /* DSW2 */
AM_RANGE(0xbf01, 0xbf01) AM_READ(input_port_0_r) /* coin, start */
@ -95,7 +92,7 @@ static ADDRESS_MAP_START( writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0xac00, 0xafff) AM_WRITE(mnchmobl_sprite_tile_w)
AM_RANGE(0xb000, 0xb3ff) AM_WRITE(MWA8_RAM) AM_BASE(&mnchmobl_sprite_attr)
AM_RANGE(0xb400, 0xb7ff) AM_WRITE(mnchmobl_sprite_attr_w)
AM_RANGE(0xb800, 0xb9ff) AM_WRITE(mnchmobl_videoram_w) AM_BASE(&videoram)
AM_RANGE(0xb800, 0xb8ff) AM_MIRROR(0x0100) AM_WRITE(MWA8_RAM) AM_BASE(&videoram)
AM_RANGE(0xba00, 0xbbff) AM_WRITE(MWA8_RAM)
AM_RANGE(0xbc00, 0xbc7f) AM_WRITE(MWA8_RAM) AM_BASE(&mnchmobl_status_vram)
AM_RANGE(0xbe00, 0xbe00) AM_WRITE(mnchmobl_soundlatch_w)

View File

@ -186,8 +186,8 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x3fff) AM_WRITE(MWA8_ROM)
AM_RANGE(0x4000, 0x7fff) AM_WRITE(MWA8_RAM)
AM_RANGE(0x8000, 0x87ff) AM_WRITE(videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0x8800, 0x8fff) AM_WRITE(naughtyb_videoram2_w) AM_BASE(&naughtyb_videoram2)
AM_RANGE(0x8000, 0x87ff) AM_WRITE(MWA8_RAM) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0x8800, 0x8fff) AM_WRITE(MWA8_RAM) AM_BASE(&naughtyb_videoram2)
AM_RANGE(0x9000, 0x97ff) AM_WRITE(naughtyb_videoreg_w)
AM_RANGE(0x9800, 0x9fff) AM_WRITE(MWA8_RAM) AM_BASE(&naughtyb_scrollreg)
AM_RANGE(0xa000, 0xa7ff) AM_WRITE(pleiads_sound_control_a_w)
@ -197,8 +197,8 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( popflame_writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x3fff) AM_WRITE(MWA8_ROM)
AM_RANGE(0x4000, 0x7fff) AM_WRITE(MWA8_RAM)
AM_RANGE(0x8000, 0x87ff) AM_WRITE(videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0x8800, 0x8fff) AM_WRITE(naughtyb_videoram2_w) AM_BASE(&naughtyb_videoram2)
AM_RANGE(0x8000, 0x87ff) AM_WRITE(MWA8_RAM) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0x8800, 0x8fff) AM_WRITE(MWA8_RAM) AM_BASE(&naughtyb_videoram2)
AM_RANGE(0x9000, 0x97ff) AM_WRITE(popflame_videoreg_w)
AM_RANGE(0x9800, 0x9fff) AM_WRITE(MWA8_RAM) AM_BASE(&naughtyb_scrollreg)
AM_RANGE(0xa000, 0xa7ff) AM_WRITE(pleiads_sound_control_a_w)

View File

@ -96,7 +96,6 @@ static ADDRESS_MAP_START( ninjakid_primary_readmem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0xa002, 0xa002) AM_READ(ninjakun_io_A002_r)
AM_RANGE(0xc000, 0xc7ff) AM_READ(MRA8_RAM) /* tilemaps */
AM_RANGE(0xc800, 0xcfff) AM_READ(ninjakid_bg_videoram_r)
AM_RANGE(0xd000, 0xd7ff) AM_READ(MRA8_RAM) /* spriteram */
AM_RANGE(0xd800, 0xd9ff) AM_READ(paletteram_r)
AM_RANGE(0xe000, 0xe7ff) AM_READ(MRA8_RAM)
ADDRESS_MAP_END
@ -109,7 +108,7 @@ static ADDRESS_MAP_START( ninjakid_primary_writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0xa003, 0xa003) AM_WRITE(ninjakun_flipscreen_w)
AM_RANGE(0xc000, 0xc7ff) AM_WRITE(ninjakid_fg_videoram_w) AM_BASE(&videoram)
AM_RANGE(0xc800, 0xcfff) AM_WRITE(ninjakid_bg_videoram_w)
AM_RANGE(0xd000, 0xd7ff) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram)
AM_RANGE(0xd000, 0xd7ff) AM_RAM AM_BASE(&spriteram) AM_SHARE(1)
AM_RANGE(0xd800, 0xd9ff) AM_WRITE(ninjakun_paletteram_w) AM_BASE(&paletteram)
AM_RANGE(0xe000, 0xe7ff) AM_WRITE(MWA8_RAM) AM_BASE(&shareram)
ADDRESS_MAP_END
@ -123,7 +122,6 @@ static ADDRESS_MAP_START( ninjakid_secondary_readmem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0xa002, 0xa002) AM_READ(ninjakun_io_A002_r)
AM_RANGE(0xc000, 0xc7ff) AM_READ(videoram_r) /* tilemaps */
AM_RANGE(0xc800, 0xcfff) AM_READ(ninjakid_bg_videoram_r)
AM_RANGE(0xd000, 0xd7ff) AM_READ(spriteram_r) /* shareram */
AM_RANGE(0xd800, 0xd9ff) AM_READ(paletteram_r)
AM_RANGE(0xe000, 0xe7ff) AM_READ(shareram_r)
ADDRESS_MAP_END
@ -135,7 +133,7 @@ static ADDRESS_MAP_START( ninjakid_secondary_writemem, ADDRESS_SPACE_PROGRAM, 8
AM_RANGE(0xa003, 0xa003) AM_WRITE(ninjakun_flipscreen_w)
AM_RANGE(0xc000, 0xc7ff) AM_WRITE(ninjakid_fg_videoram_w)
AM_RANGE(0xc800, 0xcfff) AM_WRITE(ninjakid_bg_videoram_w)
AM_RANGE(0xd000, 0xd7ff) AM_WRITE(spriteram_w) /* shareram */
AM_RANGE(0xd000, 0xd7ff) AM_RAM AM_SHARE(1)
AM_RANGE(0xd800, 0xd9ff) AM_WRITE(ninjakun_paletteram_w)
AM_RANGE(0xe000, 0xe7ff) AM_WRITE(shareram_w)
ADDRESS_MAP_END

View File

@ -138,7 +138,7 @@ static ADDRESS_MAP_START( writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x8000, 0x87ff) AM_WRITE(MWA8_RAM)
AM_RANGE(0x8800, 0x8fff) AM_WRITE(pitnrun_videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0x9000, 0x9fff) AM_WRITE(pitnrun_videoram2_w) AM_BASE(&pitnrun_videoram2)
AM_RANGE(0xa000, 0xa0ff) AM_WRITE(spriteram_w) AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
AM_RANGE(0xa000, 0xa0ff) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
AM_RANGE(0xa800, 0xa807) AM_WRITE(MWA8_NOP) /* Analog Sound */
AM_RANGE(0xb000, 0xb000) AM_WRITE(nmi_enable_w)
AM_RANGE(0xb001, 0xb001) AM_WRITE(pitnrun_color_select_w)

View File

@ -29,8 +29,8 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x7fff) AM_WRITE(MWA8_ROM)
AM_RANGE(0x8000, 0x87ff) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
AM_RANGE(0x8800, 0x8bff) AM_WRITE(videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0x8c00, 0x8fff) AM_WRITE(colorram_w) AM_BASE(&colorram)
AM_RANGE(0x8800, 0x8bff) AM_WRITE(MWA8_RAM) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0x8c00, 0x8fff) AM_WRITE(MWA8_RAM) AM_BASE(&colorram)
AM_RANGE(0xa000, 0xa000) AM_WRITE(&AY8910_control_port_0_w)
AM_RANGE(0xa001, 0xa001) AM_WRITE(&AY8910_write_port_0_w)
AM_RANGE(0xa002, 0xa002) AM_WRITE(&AY8910_control_port_1_w)
@ -184,7 +184,6 @@ static MACHINE_DRIVER_START( pkunwar )
MDRV_COLORTABLE_LENGTH(32*16)
MDRV_PALETTE_INIT(nova2001)
MDRV_VIDEO_START(generic)
MDRV_VIDEO_UPDATE(pkunwar)
/* sound hardware */

View File

@ -62,7 +62,7 @@ static ADDRESS_MAP_START( redalert_writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0200, 0x0fff) AM_WRITE(MWA8_RAM) /* ? */
AM_RANGE(0x1000, 0x1fff) AM_WRITE(MWA8_RAM) /* Scratchpad video RAM */
AM_RANGE(0x2000, 0x3fff) AM_WRITE(redalert_backram_w) AM_BASE(&redalert_backram)
AM_RANGE(0x4000, 0x43ff) AM_WRITE(videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0x4000, 0x43ff) AM_WRITE(MWA8_RAM) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0x4400, 0x47ff) AM_WRITE(redalert_spriteram1_w) AM_BASE(&redalert_spriteram1)
AM_RANGE(0x4800, 0x4bff) AM_WRITE(redalert_characterram_w) AM_BASE(&redalert_characterram)
AM_RANGE(0x4c00, 0x4fff) AM_WRITE(redalert_spriteram2_w) AM_BASE(&redalert_spriteram2)
@ -123,7 +123,7 @@ static ADDRESS_MAP_START( demoneye_writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x4400, 0x47ff) AM_WRITE(redalert_spriteram1_w) AM_BASE(&redalert_spriteram1)
AM_RANGE(0x4800, 0x4bff) AM_WRITE(redalert_characterram2_w) AM_BASE(&redalert_characterram2)
AM_RANGE(0x4c00, 0x4fff) AM_WRITE(redalert_spriteram2_w) AM_BASE(&redalert_spriteram2)
AM_RANGE(0x5000, 0x53ff) AM_WRITE(videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0x5000, 0x53ff) AM_WRITE(MWA8_RAM) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0x5400, 0x57ff) AM_WRITE(redalert_spriteram3_w) AM_BASE(&redalert_spriteram3)
AM_RANGE(0x5800, 0x5bff) AM_WRITE(MWA8_RAM) //???
AM_RANGE(0x5c00, 0x5fff) AM_WRITE(MWA8_RAM) //???

View File

@ -56,8 +56,8 @@ static ADDRESS_MAP_START( writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x8000, 0x9fff) AM_WRITE(MWA8_ROM)
AM_RANGE(0xc000, 0xcfff) AM_WRITE(MWA8_RAM)
AM_RANGE(0xd900, 0xd900) AM_WRITE(ra_fake_d800_w) /* protection ?? */
AM_RANGE(0xe000, 0xe3ff) AM_WRITE(videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0xe400, 0xe47f) AM_WRITE(colorram_w) AM_BASE(&colorram)
AM_RANGE(0xe000, 0xe3ff) AM_WRITE(MWA8_RAM) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0xe400, 0xe47f) AM_WRITE(MWA8_RAM) AM_BASE(&colorram)
AM_RANGE(0xe800, 0xe800) AM_WRITE(soundlatch_w)
AM_RANGE(0xec00, 0xec0f) AM_WRITE(MWA8_NOP) /* Analog sound effects ?? ec00 sound enable ?*/
AM_RANGE(0xf000, 0xf0ff) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size)

View File

@ -162,27 +162,22 @@ int offs;
for (offs = 0;offs <0x4000; offs++)
{
// if (dirtybuffer[offs])
int sx, sy, x, data1, data2, color, data;
sx = offs >> 8; /*00..0x3f (64*4=256)*/
sy = offs & 0xff; /*00..0xff*/
// if (flipscreen[0]) sx = 31 - sx;
// if (flipscreen[1]) sy = 31 - sy;
data1 = videoram[offs]; /* color */
data2 = videoram[0x4000 + offs]; /* pixel data */
for (x=0; x<4; x++) /*4 pixels per byte (2 bitplanes in 2 nibbles: 1st=bits 7-4, 2nd=bits 3-0)*/
{
int sx, sy, x, data1, data2, color, data;
color= ((data1>>x) & 1) | (((data1>>(4+x)) & 1)<<1);
data = ((data2>>x) & 1) | (((data2>>(4+x)) & 1)<<1);
// dirtybuffer[offs] = 0;
sx = offs >> 8; /*00..0x3f (64*4=256)*/
sy = offs & 0xff; /*00..0xff*/
// if (flipscreen[0]) sx = 31 - sx;
// if (flipscreen[1]) sy = 31 - sy;
data1 = videoram[offs]; /* color */
data2 = videoram[0x4000 + offs]; /* pixel data */
for (x=0; x<4; x++) /*4 pixels per byte (2 bitplanes in 2 nibbles: 1st=bits 7-4, 2nd=bits 3-0)*/
{
color= ((data1>>x) & 1) | (((data1>>(4+x)) & 1)<<1);
data = ((data2>>x) & 1) | (((data2>>(4+x)) & 1)<<1);
*BITMAP_ADDR16(bitmap, 255-sy, 255-(sx*4 + x)) = color*4 + data;
}
*BITMAP_ADDR16(bitmap, 255-sy, 255-(sx*4 + x)) = color*4 + data;
}
}
/* copy the character mapped graphics */
@ -301,7 +296,7 @@ static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 8 )
// AM_RANGE(0x7800, 0x78ff) AM_WRITE(cpu_sharedram_main_w) AM_BASE(&cpu_sharedram)/* sharedram main/sub */
// AM_RANGE(0x7800, 0x7bff) AM_READ(cpu_sharedram_r)/* 2114 x 2 (0x400 x 4bit each) */
AM_RANGE(0x8000, 0xffff) AM_WRITE(videoram_w) AM_READ(MRA8_RAM) AM_BASE(&videoram) AM_SIZE(&videoram_size) /* 4116 x 16 (32K) */
AM_RANGE(0x8000, 0xffff) AM_RAM AM_BASE(&videoram) AM_SIZE(&videoram_size) /* 4116 x 16 (32K) */
ADDRESS_MAP_END
/* sub */

View File

@ -170,7 +170,7 @@ static ADDRESS_MAP_START( skyarmy_writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x8000, 0x87FF) AM_WRITE(MWA8_RAM)
AM_RANGE(0x8800, 0x8BFF) AM_WRITE(skyarmy_videoram_w) AM_BASE(&skyarmy_videoram) /* Video RAM */
AM_RANGE(0x9000, 0x93FF) AM_WRITE(skyarmy_colorram_w) AM_BASE(&skyarmy_colorram) /* Color RAM */
AM_RANGE(0x9800, 0x983F) AM_WRITE(spriteram_w) AM_BASE(&spriteram) AM_SIZE(&spriteram_size) /* Sprites */
AM_RANGE(0x9800, 0x983F) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size) /* Sprites */
AM_RANGE(0x9840, 0x985F) AM_WRITE(skyarmy_scrollram_w) AM_BASE(&skyarmy_scrollram) /* Sprites */
AM_RANGE(0xa004, 0xa004) AM_WRITE(nmi_enable_w) // ???
AM_RANGE(0xa005, 0xa005) AM_WRITE(MWA8_NOP)

View File

@ -486,7 +486,7 @@ INTERRUPT_GEN( iremm15_interrupt )
static ADDRESS_MAP_START( iremm10_main, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x02ff) AM_RAM AM_BASE_MEMBER(irem_state, memory) /* scratch ram */
AM_RANGE(0x1000, 0x2fff) AM_READ(MRA8_ROM) AM_BASE_MEMBER(irem_state, rom)
AM_RANGE(0x4000, 0x43ff) AM_READWRITE(MRA8_RAM, videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0x4000, 0x43ff) AM_RAM AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0x4800, 0x4bff) AM_READWRITE(MRA8_RAM, skychut_colorram_w) AM_BASE(&colorram) /* foreground colour */
AM_RANGE(0x5000, 0x53ff) AM_RAM AM_BASE_MEMBER(irem_state, chargen) /* background ????? */
AM_RANGE(0xa200, 0xa200) AM_READ(input_port_1_r)
@ -500,7 +500,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( iremm11_main, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x02ff) AM_RAM AM_BASE_MEMBER(irem_state, memory) /* scratch ram */
AM_RANGE(0x1000, 0x2fff) AM_READ(MRA8_ROM) AM_BASE_MEMBER(irem_state, rom)
AM_RANGE(0x4000, 0x43ff) AM_READWRITE(MRA8_RAM, videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0x4000, 0x43ff) AM_RAM AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0x4800, 0x4bff) AM_READWRITE(MRA8_RAM, skychut_colorram_w) AM_BASE(&colorram) /* foreground colour */
AM_RANGE(0x5000, 0x53ff) AM_RAM AM_BASE_MEMBER(irem_state, chargen) /* background ????? */
AM_RANGE(0xa100, 0xa100) AM_WRITE(iremm11_a100_w) /* sound writes ???? */
@ -514,7 +514,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( iremm15_main, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x02ff) AM_RAM AM_BASE_MEMBER(irem_state, memory) /* scratch ram */
AM_RANGE(0x1000, 0x33ff) AM_READ(MRA8_ROM) AM_BASE_MEMBER(irem_state, rom)
AM_RANGE(0x4000, 0x43ff) AM_READWRITE(MRA8_RAM, videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0x4000, 0x43ff) AM_RAM AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0x4800, 0x4bff) AM_READWRITE(MRA8_RAM, skychut_colorram_w) AM_BASE(&colorram) /* foreground colour */
AM_RANGE(0x5000, 0x57ff) AM_READWRITE(MRA8_RAM, iremm15_chargen_w) AM_BASE_MEMBER(irem_state, chargen) /* background ????? */
AM_RANGE(0xa000, 0xa000) AM_READ(input_port_3_r)

View File

@ -68,9 +68,9 @@ static ADDRESS_MAP_START( writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x006a, 0x006b) AM_WRITE(subs_crash_w)
AM_RANGE(0x006c, 0x006d) AM_WRITE(subs_invert1_w)
AM_RANGE(0x006e, 0x006f) AM_WRITE(subs_invert2_w)
AM_RANGE(0x0090, 0x009f) AM_WRITE(spriteram_w) AM_BASE(&spriteram)
AM_RANGE(0x0090, 0x009f) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram)
AM_RANGE(0x0000, 0x07ff) AM_WRITE(MWA8_RAM)
AM_RANGE(0x0800, 0x0bff) AM_WRITE(videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0x0800, 0x0bff) AM_WRITE(MWA8_RAM) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0x2000, 0x3fff) AM_WRITE(MWA8_ROM)
ADDRESS_MAP_END

View File

@ -62,7 +62,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( troangel_writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x7fff) AM_WRITE(MWA8_ROM)
AM_RANGE(0x8000, 0x87ff) AM_WRITE(videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0x8000, 0x87ff) AM_WRITE(MWA8_RAM) AM_BASE(&videoram) AM_SIZE(&videoram_size)
// AM_RANGE(0x8800, 0x8fff) AM_WRITE(MWA8_RAM)
AM_RANGE(0x9000, 0x91ff) AM_WRITE(MWA8_RAM) AM_BASE(&troangel_scroll)
AM_RANGE(0xc820, 0xc8ff) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size)

View File

@ -55,7 +55,6 @@
UINT8 *tunhunt_ram;
extern WRITE8_HANDLER( tunhunt_videoram_w );
extern WRITE8_HANDLER( tunhunt_mott_w );
extern PALETTE_INIT( tunhunt );
extern VIDEO_START( tunhunt );
@ -165,7 +164,7 @@ static ADDRESS_MAP_START( writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x1a00, 0x1a00) AM_WRITE(MWA8_RAM) /* SHEL1H */
AM_RANGE(0x1c00, 0x1c00) AM_WRITE(MWA8_RAM) /* MOBJV */
AM_RANGE(0x1e00, 0x1eff) AM_WRITE(tunhunt_videoram_w) AM_BASE(&videoram) /* ALPHA */
AM_RANGE(0x2c00, 0x2fff) AM_WRITE(tunhunt_mott_w) AM_BASE(&spriteram)
AM_RANGE(0x2c00, 0x2fff) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram)
AM_RANGE(0x2000, 0x2000) AM_WRITE(MWA8_NOP) /* watchdog */
AM_RANGE(0x2400, 0x2400) AM_WRITE(MWA8_NOP) /* INT ACK */
AM_RANGE(0x2800, 0x2800) AM_WRITE(tunhunt_control_w)

View File

@ -82,7 +82,7 @@ static ADDRESS_MAP_START( vigilant_writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0xbfff) AM_WRITE(MWA8_ROM)
AM_RANGE(0xc020, 0xc0df) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
AM_RANGE(0xc800, 0xcfff) AM_WRITE(vigilant_paletteram_w) AM_BASE(&paletteram)
AM_RANGE(0xd000, 0xdfff) AM_WRITE(videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0xd000, 0xdfff) AM_WRITE(MWA8_RAM) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0xe000, 0xefff) AM_WRITE(MWA8_RAM)
ADDRESS_MAP_END
@ -118,7 +118,7 @@ static ADDRESS_MAP_START( kikcubic_writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0xbfff) AM_WRITE(MWA8_ROM)
AM_RANGE(0xc000, 0xc0ff) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
AM_RANGE(0xc800, 0xcaff) AM_WRITE(vigilant_paletteram_w) AM_BASE(&paletteram)
AM_RANGE(0xd000, 0xdfff) AM_WRITE(videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0xd000, 0xdfff) AM_WRITE(MWA8_RAM) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0xe000, 0xffff) AM_WRITE(MWA8_RAM)
ADDRESS_MAP_END

View File

@ -104,8 +104,8 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x5fff) AM_WRITE(MWA8_ROM)
AM_RANGE(0x8000, 0x83ff) AM_WRITE(videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0x8400, 0x87ff) AM_WRITE(colorram_w) AM_BASE(&colorram)
AM_RANGE(0x8000, 0x83ff) AM_WRITE(MWA8_RAM) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0x8400, 0x87ff) AM_WRITE(MWA8_RAM) AM_BASE(&colorram)
AM_RANGE(0x8800, 0x88ff) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
AM_RANGE(0x8900, 0x8bff) AM_WRITE(MWA8_RAM)
AM_RANGE(0x9000, 0x93ff) AM_WRITE(shared1_w) AM_BASE(&sharedram1)
@ -329,7 +329,6 @@ static MACHINE_DRIVER_START( wiping )
MDRV_COLORTABLE_LENGTH(64*4+64*4)
MDRV_PALETTE_INIT(wiping)
MDRV_VIDEO_START(generic)
MDRV_VIDEO_UPDATE(wiping)
/* sound hardware */

View File

@ -168,7 +168,6 @@ extern UINT8 *wiz_attributesram2;
extern UINT8 *wiz_sprite_bank;
WRITE8_HANDLER( wiz_char_bank_select_w );
WRITE8_HANDLER( wiz_attributes_w );
WRITE8_HANDLER( wiz_palettebank_w );
WRITE8_HANDLER( wiz_bgcolor_w );
WRITE8_HANDLER( wiz_flipx_w );
@ -246,9 +245,9 @@ static ADDRESS_MAP_START( writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0xd400, 0xd7ff) AM_WRITE(MWA8_RAM) AM_BASE(&wiz_colorram2)
AM_RANGE(0xd800, 0xd83f) AM_WRITE(MWA8_RAM) AM_BASE(&wiz_attributesram2)
AM_RANGE(0xd840, 0xd85f) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram_2) AM_SIZE(&spriteram_size)
AM_RANGE(0xe000, 0xe3ff) AM_WRITE(videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0xe400, 0xe7ff) AM_WRITE(colorram_w) AM_BASE(&colorram)
AM_RANGE(0xe800, 0xe83f) AM_WRITE(wiz_attributes_w) AM_BASE(&wiz_attributesram)
AM_RANGE(0xe000, 0xe3ff) AM_WRITE(MWA8_RAM) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0xe400, 0xe7ff) AM_WRITE(MWA8_RAM) AM_BASE(&colorram)
AM_RANGE(0xe800, 0xe83f) AM_WRITE(MWA8_RAM) AM_BASE(&wiz_attributesram)
AM_RANGE(0xe840, 0xe85f) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram)
AM_RANGE(0xf000, 0xf000) AM_WRITE(MWA8_RAM) AM_BASE(&wiz_sprite_bank)
AM_RANGE(0xf001, 0xf001) AM_WRITE(interrupt_enable_w)

View File

@ -246,8 +246,8 @@ static ADDRESS_MAP_START( yamato_writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x7000, 0x7fff) AM_WRITE(MWA8_ROM)
AM_RANGE(0x8800, 0x88ff) AM_WRITE(cclimber_bigsprite_videoram_w) AM_BASE(&cclimber_bsvideoram) AM_SIZE(&cclimber_bsvideoram_size)
AM_RANGE(0x8900, 0x8bff) AM_WRITE(MWA8_RAM) /* not used, but initialized */
AM_RANGE(0x9000, 0x93ff) AM_WRITE(videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size)
//AM_RANGE(0x9400, 0x97ff) AM_WRITE(videoram_w) /* mirror address, used by Crazy Climber to draw windows */
AM_RANGE(0x9000, 0x93ff) AM_WRITE(MWA8_RAM) AM_BASE(&videoram) AM_SIZE(&videoram_size)
//AM_RANGE(0x9400, 0x97ff) AM_WRITE(MWA8_RAM) /* mirror address, used by Crazy Climber to draw windows */
/* 9800-9bff and 9c00-9fff share the same RAM, interleaved */
/* (9800-981f for scroll, 9c20-9c3f for color RAM, and so on) */
AM_RANGE(0x9800, 0x981f) AM_WRITE(MWA8_RAM) AM_BASE(&cclimber_column_scroll)

View File

@ -6,7 +6,6 @@
/*----------- defined in video/jedi.c -----------*/
extern UINT8 *jedi_PIXIRAM;
extern UINT8 *jedi_backgroundram;
extern size_t jedi_backgroundram_size;
@ -15,7 +14,6 @@ VIDEO_UPDATE( jedi );
WRITE8_HANDLER( jedi_alpha_banksel_w );
WRITE8_HANDLER( jedi_paletteram_w );
WRITE8_HANDLER( jedi_backgroundram_w );
WRITE8_HANDLER( jedi_vscroll_w );
WRITE8_HANDLER( jedi_hscroll_w );
WRITE8_HANDLER( jedi_video_off_w );

View File

@ -27,7 +27,6 @@ extern UINT8 *naughtyb_videoram2;
extern UINT8 *naughtyb_scrollreg;
extern int naughtyb_cocktail;
WRITE8_HANDLER( naughtyb_videoram2_w );
WRITE8_HANDLER( naughtyb_videoreg_w );
WRITE8_HANDLER( popflame_videoreg_w );

View File

@ -28,12 +28,10 @@ PALETTE_INIT( buggychl )
VIDEO_START( buggychl )
{
dirtybuffer = auto_malloc(videoram_size);
dirtychar = auto_malloc(256 * sizeof(*dirtychar));
tmpbitmap1 = auto_bitmap_alloc(256,256,machine->screen[0].format);
tmpbitmap2 = auto_bitmap_alloc(256,256,machine->screen[0].format);
memset(dirtybuffer,1,videoram_size);
memset(dirtychar,0xff,256 * sizeof(*dirtychar));
}
@ -114,23 +112,18 @@ static void draw_bg(running_machine *machine, mame_bitmap *bitmap, const rectang
{
int code = videoram[0x400+offs];
if (dirtybuffer[0x400+offs] || dirtychar[code])
{
int sx = offs % 32;
int sy = offs / 32;
int sx = offs % 32;
int sy = offs / 32;
dirtybuffer[0x400+offs] = 0;
if (flip_screen_x) sx = 31 - sx;
if (flip_screen_y) sy = 31 - sy;
if (flip_screen_x) sx = 31 - sx;
if (flip_screen_y) sy = 31 - sy;
drawgfx(tmpbitmap1,machine->gfx[0],
code,
2,
flip_screen_x,flip_screen_y,
8*sx,8*sy,
NULL,TRANSPARENCY_NONE,0);
}
drawgfx(tmpbitmap1,machine->gfx[0],
code,
2,
flip_screen_x,flip_screen_y,
8*sx,8*sy,
NULL,TRANSPARENCY_NONE,0);
}
/* first copy to a temp bitmap doing column scroll */

View File

@ -54,8 +54,6 @@ WRITE8_HANDLER( carjmbre_bgcolor_w )
if(oldbg!=carjmbre_bgcolor)
{
memset(dirtybuffer,1,videoram_size);
for (i=0;i<64;i+=4)
palette_set_color_rgb(Machine, i, (carjmbre_bgcolor&0xff)*0x50, (carjmbre_bgcolor&0xff)*0x50, (carjmbre_bgcolor&0xff)!=0?0x50:0);
}

View File

@ -10,14 +10,11 @@
#define CPK_VIDEO_SIZE 0x800
static UINT8 * cpk_colorram;
static UINT8 * cpk_videoram;
UINT8 * cpk_colorram;
UINT8 * cpk_videoram;
UINT8 * cpk_expram;
static UINT8 * cpk_palette;
static UINT8 * cpk_palette2;
static UINT8 * cpk_expram;
static UINT8 * dirtybuffer1;
static mame_bitmap *tmpbitmap2;
static int hopperOK = 0;
static int intstate1 = 0; /* unknown */
@ -48,34 +45,6 @@ WRITE8_HANDLER( cpk_palette2_w )
/* Video handling */
READ8_HANDLER( cpk_videoram_r )
{
return cpk_videoram[offset];
}
WRITE8_HANDLER( cpk_videoram_w )
{
if (cpk_videoram[offset] != data)
{
cpk_videoram[offset] = data;
dirtybuffer[offset] = 1;
}
}
READ8_HANDLER( cpk_colorram_r )
{
return cpk_colorram[offset];
}
WRITE8_HANDLER( cpk_colorram_w )
{
if (cpk_colorram[offset] != data)
{
cpk_colorram[offset] = data;
dirtybuffer[offset] = 1;
}
}
READ8_HANDLER( cpk_expansion_r )
{
UINT8 * RAM = memory_region(REGION_GFX3);
@ -83,33 +52,15 @@ READ8_HANDLER( cpk_expansion_r )
}
WRITE8_HANDLER( cpk_expansion_w )
{
if (cpk_expram[offset] != data)
{
cpk_expram[offset] = data;
dirtybuffer1[offset] = 1;
}
}
/* Machine init/deinit */
VIDEO_START( cska )
{
int i;
dirtybuffer = auto_malloc(CPK_VIDEO_SIZE * sizeof(UINT8));
dirtybuffer1 = auto_malloc(CPK_VIDEO_SIZE * sizeof(UINT8));
cpk_colorram = auto_malloc(CPK_VIDEO_SIZE * sizeof(UINT8));
cpk_videoram = auto_malloc(CPK_VIDEO_SIZE * sizeof(UINT8));
cpk_expram = auto_malloc(CPK_VIDEO_SIZE * sizeof(UINT8));
cpk_palette = auto_malloc(0x800 * sizeof(UINT8));
cpk_palette2 = auto_malloc(0x800 * sizeof(UINT8));
tmpbitmap = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format);
tmpbitmap2 = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format);
/* leave everything at the default, but map all foreground 0 pens as transparent */
for (i = 0;i < 16;i++)
{
@ -144,8 +95,6 @@ MACHINE_RESET (cpk)
memset(cpk_videoram, 0, CPK_VIDEO_SIZE);
memset(cpk_colorram, 0, CPK_VIDEO_SIZE);
memset(cpk_expram, 0, CPK_VIDEO_SIZE);
memset(dirtybuffer, 1, CPK_VIDEO_SIZE);
memset(dirtybuffer1, 0, CPK_VIDEO_SIZE);
memset(cpk_palette, 0, 0x800);
memset(cpk_palette2, 0, 0x800);
@ -198,14 +147,6 @@ VIDEO_UPDATE( cska )
// memset(&palette_used_colors[64 * color + 1],PALETTE_COLOR_USED,63);
}
if (abilityflag)
// memset(&palette_used_colors[0], PALETTE_COLOR_USED, 64);
// if (palette_recalc())
{
memset(dirtybuffer, 1, CPK_VIDEO_SIZE);
}
#if 0
if (keyboard_pressed(KEYCODE_9))
{
@ -223,25 +164,19 @@ VIDEO_UPDATE( cska )
{
for (offs = (CPK_VIDEO_SIZE)-1; offs >= 0; offs--)
{
if (dirtybuffer1[offs] || dirtybuffer[offs])
{
int sx,sy;
int sx,sy;
dirtybuffer1[offs] = 0;
sx = offs % 64;
sy = offs / 64;
sx = offs % 64;
sy = offs / 64;
drawgfx(tmpbitmap2,machine->gfx[1+(offs % 4)],
cpk_expram[offs],
0,
0,0,
8*sx,32*sy,
0,TRANSPARENCY_NONE,0);
}
drawgfx(bitmap,machine->gfx[1+(offs % 4)],
cpk_expram[offs],
0,
0,0,
8*sx,32*sy,
cliprect,TRANSPARENCY_NONE,0);
}
copybitmap(bitmap,tmpbitmap2,0,0,0,0,cliprect,TRANSPARENCY_NONE,0);
}
for (offs = CPK_VIDEO_SIZE-1; offs >= 0; offs--)
@ -249,25 +184,20 @@ VIDEO_UPDATE( cska )
int tile = cpk_videoram[offs] + ((cpk_colorram[offs] & 0x1f) << 8);
int color = (tile != 0x1fff) ? (((cpk_colorram[offs] & 0xe0) >> 4) + 1) : 0;
if (dirtybuffer[offs])
{
int sx,sy;
int sx,sy;
dirtybuffer[offs] = 0;
sx = offs % 64;
sy = offs / 64;
sx = offs % 64;
sy = offs / 64;
drawgfx(tmpbitmap,machine->gfx[0],
tile,
color,
0,0,
8*sx,8*sy,
0, TRANSPARENCY_NONE, 0);
}
drawgfx(bitmap,machine->gfx[0],
tile,
color,
0,0,
8*sx,8*sy,
cliprect,
(abilityflag) ? TRANSPARENCY_COLOR : TRANSPARENCY_NONE, 0);
}
copybitmap(bitmap,tmpbitmap,0,0,0,0,cliprect, (abilityflag) ? TRANSPARENCY_COLOR : TRANSPARENCY_NONE, 0);
return 0;
}

View File

@ -68,12 +68,6 @@ PALETTE_INIT( finalizr )
VIDEO_START( finalizr )
{
dirtybuffer = 0;
tmpbitmap = 0;
dirtybuffer = auto_malloc(videoram_size);
memset(dirtybuffer,1,videoram_size);
tmpbitmap = auto_bitmap_alloc(256,256,machine->screen[0].format);
}
@ -81,11 +75,7 @@ VIDEO_START( finalizr )
WRITE8_HANDLER( finalizr_videoctrl_w )
{
if (charbank != (data & 3))
{
charbank = data & 3;
memset(dirtybuffer,1,videoram_size);
}
charbank = data & 3;
spriterambank = data & 8;
@ -99,27 +89,21 @@ VIDEO_UPDATE( finalizr )
int offs;
/* for every character in the Video RAM, check if it has been modified */
/* since last time and update it accordingly. */
/* for every character in the Video RAM */
for (offs = videoram_size - 1;offs >= 0;offs--)
{
if (dirtybuffer[offs])
{
int sx,sy;
int sx,sy;
dirtybuffer[offs] = 0;
sx = offs % 32;
sy = offs / 32;
sx = offs % 32;
sy = offs / 32;
drawgfx(tmpbitmap,machine->gfx[0],
videoram[offs] + ((colorram[offs] & 0xc0) << 2) + (charbank<<10),
(colorram[offs] & 0x0f),
colorram[offs] & 0x10,colorram[offs] & 0x20,
8*sx,8*sy,
0,TRANSPARENCY_NONE,0);
}
drawgfx(tmpbitmap,machine->gfx[0],
videoram[offs] + ((colorram[offs] & 0xc0) << 2) + (charbank<<10),
(colorram[offs] & 0x0f),
colorram[offs] & 0x10,colorram[offs] & 0x20,
8*sx,8*sy,
0,TRANSPARENCY_NONE,0);
}

View File

@ -14,7 +14,6 @@ UINT8 *goldstar_video1, *goldstar_video2, *goldstar_video3;
size_t goldstar_video_size;
UINT8 *goldstar_scroll1, *goldstar_scroll2, *goldstar_scroll3;
static UINT8 *dirtybuffer1, *dirtybuffer2, *dirtybuffer3;
static mame_bitmap *tmpbitmap1, *tmpbitmap2, *tmpbitmap3;
static int bgcolor;
@ -31,10 +30,6 @@ VIDEO_START( goldstar )
video_start_generic(machine);
dirtybuffer1 = auto_malloc(3 * goldstar_video_size * sizeof(UINT8));
dirtybuffer2 = dirtybuffer1 + goldstar_video_size;
dirtybuffer3 = dirtybuffer2 + goldstar_video_size;
/* the background area is half as high as the screen */
tmpbitmap1 = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format);
tmpbitmap2 = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format);
@ -47,45 +42,12 @@ VIDEO_START( goldstar )
WRITE8_HANDLER( goldstar_video1_w )
{
if (goldstar_video1[offset] != data)
{
dirtybuffer1[offset] = 1;
goldstar_video1[offset] = data;
}
}
WRITE8_HANDLER( goldstar_video2_w )
{
if (goldstar_video2[offset] != data)
{
dirtybuffer2[offset] = 1;
goldstar_video2[offset] = data;
}
}
WRITE8_HANDLER( goldstar_video3_w )
{
if (goldstar_video3[offset] != data)
{
dirtybuffer3[offset] = 1;
goldstar_video3[offset] = data;
}
}
WRITE8_HANDLER( goldstar_fa00_w )
{
/* bit 1 toggles continuously - might be irq enable or watchdog reset */
/* bit 2 selects background gfx color (I think) */
if (bgcolor != ((data & 0x04) >> 2))
{
bgcolor = (data & 0x04) >> 2;
memset(dirtybuffer1,1,goldstar_video_size);
memset(dirtybuffer2,1,goldstar_video_size);
memset(dirtybuffer3,1,goldstar_video_size);
}
bgcolor = (data & 0x04) >> 2;
}
@ -100,33 +62,20 @@ VIDEO_UPDATE( goldstar )
int offs;
// if (palette_recalc())
{
memset(dirtybuffer,1,videoram_size);
memset(dirtybuffer1,1,goldstar_video_size);
memset(dirtybuffer2,1,goldstar_video_size);
memset(dirtybuffer3,1,goldstar_video_size);
}
for (offs = videoram_size - 1;offs >= 0;offs--)
{
if (dirtybuffer[offs])
{
int sx,sy;
int sx,sy;
dirtybuffer[offs] = 0;
sx = offs % 64;
sy = offs / 64;
sx = offs % 64;
sy = offs / 64;
drawgfx(tmpbitmap,machine->gfx[0],
videoram[offs] + ((colorram[offs] & 0xf0) << 4),
colorram[offs] & 0x0f,
0,0,
8*sx,8*sy,
0,TRANSPARENCY_NONE,0);
}
drawgfx(tmpbitmap,machine->gfx[0],
videoram[offs] + ((colorram[offs] & 0xf0) << 4),
colorram[offs] & 0x0f,
0,0,
8*sx,8*sy,
0,TRANSPARENCY_NONE,0);
}
copybitmap(bitmap,tmpbitmap,0,0,0,0,cliprect,TRANSPARENCY_NONE,0);
@ -138,41 +87,26 @@ VIDEO_UPDATE( goldstar )
int sy = offs / 64;
if (dirtybuffer1[offs])
{
dirtybuffer1[offs] = 0;
drawgfx(tmpbitmap1,machine->gfx[1],
goldstar_video1[offs],
bgcolor,
0,0,
sx*8,sy*32,
0,TRANSPARENCY_NONE,0);
drawgfx(tmpbitmap1,machine->gfx[1],
goldstar_video1[offs],
bgcolor,
0,0,
sx*8,sy*32,
0,TRANSPARENCY_NONE,0);
}
drawgfx(tmpbitmap2,machine->gfx[1],
goldstar_video2[offs],
bgcolor,
0,0,
sx*8,sy*32,
0,TRANSPARENCY_NONE,0);
if (dirtybuffer2[offs])
{
dirtybuffer2[offs] = 0;
drawgfx(tmpbitmap2,machine->gfx[1],
goldstar_video2[offs],
bgcolor,
0,0,
sx*8,sy*32,
0,TRANSPARENCY_NONE,0);
}
if (dirtybuffer3[offs])
{
dirtybuffer3[offs] = 0;
drawgfx(tmpbitmap3,machine->gfx[1],
goldstar_video3[offs],
bgcolor,
0,0,
sx*8,sy*32,
0,TRANSPARENCY_NONE,0);
}
drawgfx(tmpbitmap3,machine->gfx[1],
goldstar_video3[offs],
bgcolor,
0,0,
sx*8,sy*32,
0,TRANSPARENCY_NONE,0);
}
{

View File

@ -11,7 +11,6 @@
/* globals */
UINT8 *jedi_backgroundram;
size_t jedi_backgroundram_size;
UINT8 *jedi_PIXIRAM;
/* local variables */
@ -19,7 +18,6 @@ static UINT32 jedi_vscroll;
static UINT32 jedi_hscroll;
static UINT32 jedi_alpha_bank;
static UINT8 video_off, smooth_table;
static UINT8 *fgdirty, *bgdirty;
static mame_bitmap *fgbitmap, *mobitmap, *bgbitmap, *bgexbitmap;
@ -30,19 +28,8 @@ static mame_bitmap *fgbitmap, *mobitmap, *bgbitmap, *bgexbitmap;
*
*************************************/
static void jedi_postload(void)
{
memset(fgdirty, 1, videoram_size);
memset(bgdirty, 1, jedi_backgroundram_size);
}
VIDEO_START( jedi )
{
/* allocate dirty buffer for the foreground characters */
fgdirty = dirtybuffer = auto_malloc(videoram_size);
memset(fgdirty, 1, videoram_size);
/* allocate an 8bpp bitmap for the raw foreground characters */
fgbitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
@ -50,10 +37,6 @@ VIDEO_START( jedi )
mobitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
fillbitmap(mobitmap, 0, &machine->screen[0].visarea);
/* allocate dirty buffer for the background characters */
bgdirty = auto_malloc(jedi_backgroundram_size);
memset(bgdirty, 1, jedi_backgroundram_size);
/* the background area is 256x256, doubled by the hardware*/
bgbitmap = auto_bitmap_alloc(256, 256, machine->screen[0].format);
@ -69,7 +52,6 @@ VIDEO_START( jedi )
state_save_register_global(jedi_alpha_bank);
state_save_register_global(video_off);
state_save_register_global(smooth_table);
state_save_register_func_postload(jedi_postload);
}
@ -121,23 +103,6 @@ WRITE8_HANDLER( jedi_paletteram_w )
/*************************************
*
* Background access
*
*************************************/
WRITE8_HANDLER( jedi_backgroundram_w )
{
if (jedi_backgroundram[offset] != data)
{
bgdirty[offset] = 1;
jedi_backgroundram[offset] = data;
}
}
/*************************************
*
* Foreground banking
@ -146,11 +111,7 @@ WRITE8_HANDLER( jedi_backgroundram_w )
WRITE8_HANDLER( jedi_alpha_banksel_w )
{
if (jedi_alpha_bank != 2 * (data & 0x80))
{
jedi_alpha_bank = 2 * (data & 0x80);
memset(fgdirty, 1, videoram_size);
}
jedi_alpha_bank = 2 * (data & 0x80);
}
@ -189,7 +150,6 @@ WRITE8_HANDLER( jedi_video_off_w )
WRITE8_HANDLER( jedi_PIXIRAM_w )
{
smooth_table = data & 0x03;
memset(bgdirty, 1, jedi_backgroundram_size);
}
@ -200,12 +160,12 @@ WRITE8_HANDLER( jedi_PIXIRAM_w )
*
*************************************/
static void update_smoothing(int bgtilerow, int first, int last)
static void update_smoothing(int bgtilerow)
{
UINT8 *prom = memory_region(REGION_PROMS) + smooth_table * 0x100;
UINT8 bgscan[2][256];
UINT8 *bgcurr = bgscan[0], *bglast = bgscan[1];
int xstart, xstop, x, y;
int x, y;
/*
smoothing notes:
@ -218,10 +178,6 @@ static void update_smoothing(int bgtilerow, int first, int last)
* therefore, if we modify source pixels 8-15, we must update dest pixels 15-31
*/
/* compute x start/stop in destination coordinates */
xstart = first * 16 - 1;
xstop = last * 16 + 15;
/* extract the previous bg scanline */
extract_scanline8(bgbitmap, 0, ((bgtilerow * 16 - 1) & 0x1ff) / 2, 256, bgcurr);
@ -239,7 +195,7 @@ static void update_smoothing(int bgtilerow, int first, int last)
extract_scanline8(bgbitmap, 0, curry / 2, 256, bgcurr);
/* loop over columns */
for (x = xstart; x <= xstop; x++)
for (x = -1; x <= 511; x++)
{
int tr = bglast[((x + 1) & 0x1ff) / 2];
int br = bgcurr[((x + 1) & 0x1ff) / 2];
@ -269,7 +225,6 @@ static void update_smoothing(int bgtilerow, int first, int last)
VIDEO_UPDATE( jedi )
{
int bgexdirty[32][2];
int offs;
@ -289,50 +244,34 @@ VIDEO_UPDATE( jedi )
/* update foreground bitmap as a raw bitmap*/
for (offs = videoram_size - 1; offs >= 0; offs--)
if (fgdirty[offs])
{
int sx = offs % 64;
int sy = offs / 64;
{
int sx = offs % 64;
int sy = offs / 64;
fgdirty[offs] = 0;
drawgfx(fgbitmap, machine->gfx[0], videoram[offs] + jedi_alpha_bank,
0, 0, 0, 8*sx, 8*sy, &machine->screen[0].visarea, TRANSPARENCY_NONE_RAW, 0);
}
/* reset the expanded dirty array */
for (offs = 0; offs < 32; offs++)
bgexdirty[offs][0] = bgexdirty[offs][1] = -1;
drawgfx(fgbitmap, machine->gfx[0], videoram[offs] + jedi_alpha_bank,
0, 0, 0, 8*sx, 8*sy, &machine->screen[0].visarea, TRANSPARENCY_NONE_RAW, 0);
}
/* update background bitmap as a raw bitmap */
for (offs = jedi_backgroundram_size / 2 - 1; offs >= 0; offs--)
if (bgdirty[offs] || bgdirty[offs + 0x400])
{
int sx = offs % 32;
int sy = offs / 32;
int code = (jedi_backgroundram[offs] & 0xFF);
int bank = (jedi_backgroundram[offs + 0x400] & 0x0F);
{
int sx = offs % 32;
int sy = offs / 32;
int code = (jedi_backgroundram[offs] & 0xFF);
int bank = (jedi_backgroundram[offs + 0x400] & 0x0F);
/* shuffle the bank bits in */
code |= (bank & 0x01) << 8;
code |= (bank & 0x08) << 6;
code |= (bank & 0x02) << 9;
/* shuffle the bank bits in */
code |= (bank & 0x01) << 8;
code |= (bank & 0x08) << 6;
code |= (bank & 0x02) << 9;
bgdirty[offs] = bgdirty[offs + 0x400] = 0;
/* update expanded dirty status (assumes we go right-to-left) */
if (bgexdirty[sy][1] == -1)
bgexdirty[sy][1] = sx;
bgexdirty[sy][0] = sx;
drawgfx(bgbitmap, machine->gfx[1], code,
0, bank & 0x04, 0, 8*sx, 8*sy, 0, TRANSPARENCY_NONE_RAW, 0);
}
drawgfx(bgbitmap, machine->gfx[1], code,
0, bank & 0x04, 0, 8*sx, 8*sy, 0, TRANSPARENCY_NONE_RAW, 0);
}
/* update smoothed version of background */
for (offs = 0; offs < 32; offs++)
if (bgexdirty[offs][1] != -1)
update_smoothing(offs, bgexdirty[offs][0], bgexdirty[offs][1]);
update_smoothing(offs);
/* draw the motion objects */
for (offs = 0; offs < 0x30; offs++)

View File

@ -22,7 +22,6 @@ UINT8 *matmania_videoram3,*matmania_colorram3;
size_t matmania_videoram3_size;
UINT8 *matmania_scroll;
static mame_bitmap *tmpbitmap2;
static UINT8 *dirtybuffer2;
UINT8 *matmania_pageselect;
@ -125,12 +124,6 @@ WRITE8_HANDLER( matmania_paletteram_w )
***************************************************************************/
VIDEO_START( matmania )
{
dirtybuffer = auto_malloc(videoram_size);
memset(dirtybuffer,1,videoram_size);
dirtybuffer2 = auto_malloc(matmania_videoram3_size);
memset(dirtybuffer2,1,matmania_videoram3_size);
/* Mat Mania has a virtual screen twice as large as the visible screen */
tmpbitmap = auto_bitmap_alloc(machine->screen[0].width,2* machine->screen[0].height,machine->screen[0].format);
@ -140,29 +133,6 @@ VIDEO_START( matmania )
WRITE8_HANDLER( matmania_videoram3_w )
{
if (matmania_videoram3[offset] != data)
{
dirtybuffer2[offset] = 1;
matmania_videoram3[offset] = data;
}
}
WRITE8_HANDLER( matmania_colorram3_w )
{
if (matmania_colorram3[offset] != data)
{
dirtybuffer2[offset] = 1;
matmania_colorram3[offset] = data;
}
}
VIDEO_UPDATE( matmania )
{
int offs;
@ -171,45 +141,35 @@ VIDEO_UPDATE( matmania )
/* Update the tiles in the left tile ram bank */
for (offs = videoram_size - 1;offs >= 0;offs--)
{
if (dirtybuffer[offs])
{
int sx,sy;
int sx,sy;
dirtybuffer[offs] = 0;
sx = 15 - offs / 32;
sy = offs % 32;
sx = 15 - offs / 32;
sy = offs % 32;
drawgfx(tmpbitmap,machine->gfx[1],
videoram[offs] + ((colorram[offs] & 0x08) << 5),
(colorram[offs] & 0x30) >> 4,
0,sy >= 16, /* flip horizontally tiles on the right half of the bitmap */
16*sx,16*sy,
0,TRANSPARENCY_NONE,0);
}
drawgfx(tmpbitmap,machine->gfx[1],
videoram[offs] + ((colorram[offs] & 0x08) << 5),
(colorram[offs] & 0x30) >> 4,
0,sy >= 16, /* flip horizontally tiles on the right half of the bitmap */
16*sx,16*sy,
0,TRANSPARENCY_NONE,0);
}
/* Update the tiles in the right tile ram bank */
for (offs = matmania_videoram3_size - 1;offs >= 0;offs--)
{
if (dirtybuffer2[offs])
{
int sx,sy;
dirtybuffer2[offs] = 0;
sx = 15 - offs / 32;
sy = offs % 32;
sx = 15 - offs / 32;
sy = offs % 32;
drawgfx(tmpbitmap2,machine->gfx[1],
matmania_videoram3[offs] + ((matmania_colorram3[offs] & 0x08) << 5),
(matmania_colorram3[offs] & 0x30) >> 4,
0,sy >= 16, /* flip horizontally tiles on the right half of the bitmap */
16*sx,16*sy,
0,TRANSPARENCY_NONE,0);
}
drawgfx(tmpbitmap2,machine->gfx[1],
matmania_videoram3[offs] + ((matmania_colorram3[offs] & 0x08) << 5),
(matmania_colorram3[offs] & 0x30) >> 4,
0,sy >= 16, /* flip horizontally tiles on the right half of the bitmap */
16*sx,16*sy,
0,TRANSPARENCY_NONE,0);
}
@ -268,45 +228,35 @@ VIDEO_UPDATE( maniach )
/* Update the tiles in the left tile ram bank */
for (offs = videoram_size - 1;offs >= 0;offs--)
{
if (dirtybuffer[offs])
{
int sx,sy;
int sx,sy;
dirtybuffer[offs] = 0;
sx = 15 - offs / 32;
sy = offs % 32;
sx = 15 - offs / 32;
sy = offs % 32;
drawgfx(tmpbitmap,machine->gfx[1],
videoram[offs] + ((colorram[offs] & 0x03) << 8),
(colorram[offs] & 0x30) >> 4,
0,sy >= 16, /* flip horizontally tiles on the right half of the bitmap */
16*sx,16*sy,
0,TRANSPARENCY_NONE,0);
}
drawgfx(tmpbitmap,machine->gfx[1],
videoram[offs] + ((colorram[offs] & 0x03) << 8),
(colorram[offs] & 0x30) >> 4,
0,sy >= 16, /* flip horizontally tiles on the right half of the bitmap */
16*sx,16*sy,
0,TRANSPARENCY_NONE,0);
}
/* Update the tiles in the right tile ram bank */
for (offs = matmania_videoram3_size - 1;offs >= 0;offs--)
{
if (dirtybuffer2[offs])
{
int sx,sy;
int sx,sy;
dirtybuffer2[offs] = 0;
sx = 15 - offs / 32;
sy = offs % 32;
sx = 15 - offs / 32;
sy = offs % 32;
drawgfx(tmpbitmap2,machine->gfx[1],
matmania_videoram3[offs] + ((matmania_colorram3[offs] & 0x03) << 8),
(matmania_colorram3[offs] & 0x30) >> 4,
0,sy >= 16, /* flip horizontally tiles on the right half of the bitmap */
16*sx,16*sy,
0,TRANSPARENCY_NONE,0);
}
drawgfx(tmpbitmap2,machine->gfx[1],
matmania_videoram3[offs] + ((matmania_colorram3[offs] & 0x03) << 8),
(matmania_colorram3[offs] & 0x30) >> 4,
0,sy >= 16, /* flip horizontally tiles on the right half of the bitmap */
16*sx,16*sy,
0,TRANSPARENCY_NONE,0);
}

View File

@ -85,21 +85,11 @@ PALETTE_INIT( megazone )
WRITE8_HANDLER( megazone_flipscreen_w )
{
if (flipscreen != (data & 1))
{
flipscreen = data & 1;
memset(dirtybuffer,1,videoram_size);
}
flipscreen = data & 1;
}
VIDEO_START( megazone )
{
dirtybuffer = 0;
tmpbitmap = 0;
dirtybuffer = auto_malloc(videoram_size);
memset(dirtybuffer,1,videoram_size);
tmpbitmap = auto_bitmap_alloc(256,256,machine->screen[0].format);
}
@ -109,35 +99,29 @@ VIDEO_UPDATE( megazone )
int offs;
int x,y;
/* for every character in the Video RAM, check if it has been modified */
/* since last time and update it accordingly. */
/* for every character in the Video RAM */
for (offs = videoram_size - 1;offs >= 0;offs--)
{
if (dirtybuffer[offs])
int sx,sy,flipx,flipy;
sx = offs % 32;
sy = offs / 32;
flipx = colorram[offs] & (1<<6);
flipy = colorram[offs] & (1<<5);
if (flipscreen)
{
int sx,sy,flipx,flipy;
dirtybuffer[offs] = 0;
sx = offs % 32;
sy = offs / 32;
flipx = colorram[offs] & (1<<6);
flipy = colorram[offs] & (1<<5);
if (flipscreen)
{
sx = 31 - sx;
sy = 31 - sy;
flipx = !flipx;
flipy = !flipy;
}
drawgfx(tmpbitmap,machine->gfx[0],
((int)videoram[offs]) + ((colorram[offs] & (1<<7) ? 256 : 0) ),
(colorram[offs] & 0x0f) + 0x10,
flipx,flipy,
8*sx,8*sy,
0,TRANSPARENCY_NONE,0);
sx = 31 - sx;
sy = 31 - sy;
flipx = !flipx;
flipy = !flipy;
}
drawgfx(tmpbitmap,machine->gfx[0],
((int)videoram[offs]) + ((colorram[offs] & (1<<7) ? 256 : 0) ),
(colorram[offs] & 0x0f) + 0x10,
flipx,flipy,
8*sx,8*sy,
0,TRANSPARENCY_NONE,0);
}
/* copy the temporary bitmap to the screen */

View File

@ -53,76 +53,47 @@ WRITE8_HANDLER( mouser_flip_screen_y_w )
flip_screen_y_set(~data & 1);
}
WRITE8_HANDLER( mouser_spriteram_w )
{
/* Mark the entire row as dirty if row scrollram is written */
/* Only used by the MOUSER logo */
int i;
if (offset < 32)
{
for(i=0;i<32;i++)
dirtybuffer[offset+i*32] = 1;
}
spriteram_w(offset, data);
}
WRITE8_HANDLER( mouser_colorram_w )
{
dirtybuffer[offset] = 1;
colorram_w(offset, data);
}
VIDEO_UPDATE( mouser )
{
int offs;
int sx,sy;
int flipx,flipy;
/* for every character in the Video RAM, check if it has been modified */
/* since last time and update it accordingly. */
/* for every character in the Video RAM */
for (offs = videoram_size - 1;offs >= 0;offs--)
{
int scrolled_y_position;
int color_offs;
if (dirtybuffer[offs])
sx = offs % 32;
sy = offs / 32;
if (flip_screen_x)
{
dirtybuffer[offs] = 0;
sx = offs % 32;
sy = offs / 32;
if (flip_screen_x)
{
sx = 31 - sx;
}
if (flip_screen_y)
{
sy = 31 - sy;
}
/* This bit of spriteram appears to be for row scrolling */
/* Note: this is dependant on flipping in y */
scrolled_y_position = (256 + 8*sy - spriteram[offs%32])%256;
/* I think we still need to fetch the colorram bits to from the ram underneath, which is not scrolled */
/* Ideally we would merge these on a pixel-by-pixel basis, but it's ok to do this char-by-char, */
/* Since it's only for the MOUSER logo and it looks fine */
/* Note: this is _not_ dependant on flipping */
color_offs = offs%32 + ((256 + 8*(offs/32) - spriteram[offs%32])%256)/8*32;
drawgfx(tmpbitmap,machine->gfx[0],
videoram[offs] | (colorram[color_offs]>>5)*256 | ((colorram[color_offs]>>4)&1)*512,
colorram[color_offs]%16,
flip_screen_x,flip_screen_y,
8*sx,scrolled_y_position,
0,TRANSPARENCY_NONE,0);
sx = 31 - sx;
}
}
copyscrollbitmap(bitmap,tmpbitmap,0,0,0,0,&machine->screen[0].visarea,TRANSPARENCY_NONE,0);
if (flip_screen_y)
{
sy = 31 - sy;
}
/* This bit of spriteram appears to be for row scrolling */
/* Note: this is dependant on flipping in y */
scrolled_y_position = (256 + 8*sy - spriteram[offs%32])%256;
/* I think we still need to fetch the colorram bits to from the ram underneath, which is not scrolled */
/* Ideally we would merge these on a pixel-by-pixel basis, but it's ok to do this char-by-char, */
/* Since it's only for the MOUSER logo and it looks fine */
/* Note: this is _not_ dependant on flipping */
color_offs = offs%32 + ((256 + 8*(offs/32) - spriteram[offs%32])%256)/8*32;
drawgfx(bitmap,machine->gfx[0],
videoram[offs] | (colorram[color_offs]>>5)*256 | ((colorram[color_offs]>>4)&1)*512,
colorram[color_offs]%16,
flip_screen_x,flip_screen_y,
8*sx,scrolled_y_position,
cliprect,TRANSPARENCY_NONE,0);
}
/* There seem to be two sets of sprites, each decoded identically */
@ -153,7 +124,7 @@ VIDEO_UPDATE( mouser )
spriteram[offs+1]%16,
flipx,flipy,
sx,sy,
&machine->screen[0].visarea,TRANSPARENCY_PEN,0);
cliprect,TRANSPARENCY_PEN,0);
}
/* This is the second set of 8 sprites */
@ -183,7 +154,7 @@ VIDEO_UPDATE( mouser )
spriteram[offs+1]%16,
flipx,flipy,
sx,sy,
&machine->screen[0].visarea,TRANSPARENCY_PEN,0);
cliprect,TRANSPARENCY_PEN,0);
}
return 0;

View File

@ -39,20 +39,12 @@ PALETTE_INIT( mnchmobl )
WRITE8_HANDLER( mnchmobl_palette_bank_w )
{
if( mnchmobl_palette_bank!=(data&0x3) )
{
memset( dirtybuffer, 1, 0x100 );
mnchmobl_palette_bank = data&0x3;
}
mnchmobl_palette_bank = data&0x3;
}
WRITE8_HANDLER( mnchmobl_flipscreen_w )
{
if( flipscreen!=data )
{
memset( dirtybuffer, 1, 0x100 );
flipscreen = data;
}
flipscreen = data;
}
@ -67,26 +59,9 @@ WRITE8_HANDLER( mnchmobl_sprite_tile_w ){ mnchmobl_sprite_tile[offset] = data; }
VIDEO_START( mnchmobl )
{
dirtybuffer = auto_malloc(0x100);
memset( dirtybuffer, 1, 0x100 );
tmpbitmap = auto_bitmap_alloc(512,512,machine->screen[0].format);
}
READ8_HANDLER( mnchmobl_videoram_r )
{
return videoram[offset];
}
WRITE8_HANDLER( mnchmobl_videoram_w )
{
offset = offset&0xff; /* mirror the two banks? */
if( videoram[offset]!=data )
{
videoram[offset] = data;
dirtybuffer[offset] = 1;
}
}
static void draw_status(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect)
{
const gfx_element *gfx = machine->gfx[0];
@ -126,24 +101,21 @@ static void draw_background(running_machine *machine, mame_bitmap *bitmap, const
for( offs=0; offs<0x100; offs++ )
{
if( dirtybuffer[offs] )
int sy = (offs%16)*32;
int sx = (offs/16)*32;
int tile_number = videoram[offs];
int row,col;
for( row=0; row<4; row++ )
{
int sy = (offs%16)*32;
int sx = (offs/16)*32;
int tile_number = videoram[offs];
int row,col;
dirtybuffer[offs] = 0;
for( row=0; row<4; row++ )
for( col=0; col<4; col++ )
{
for( col=0; col<4; col++ )
{
drawgfx( tmpbitmap,gfx,
rom[col+tile_number*4+row*0x400],
mnchmobl_palette_bank,
0,0, /* flip */
sx+col*8, sy+row*8,
0, TRANSPARENCY_NONE, 0 );
}
drawgfx( tmpbitmap,gfx,
rom[col+tile_number*4+row*0x400],
mnchmobl_palette_bank,
0,0, /* flip */
sx+col*8, sy+row*8,
0, TRANSPARENCY_NONE, 0 );
}
}
}

View File

@ -12,8 +12,6 @@
UINT8 *naughtyb_videoram2;
static int videoreg;
/* use these to draw charset B */
UINT8 *naughtyb_scrollreg;
@ -150,48 +148,26 @@ PALETTE_INIT( naughtyb )
***************************************************************************/
VIDEO_START( naughtyb )
{
videoreg = palreg = bankreg = 0;
palreg = bankreg = 0;
/* Naughty Boy has a virtual screen twice as large as the visible screen */
dirtybuffer = auto_malloc(videoram_size);
memset(dirtybuffer, 1, videoram_size);
tmpbitmap = auto_bitmap_alloc(68*8,28*8,machine->screen[0].format);
}
WRITE8_HANDLER( naughtyb_videoram2_w )
{
if (naughtyb_videoram2[offset] != data)
{
dirtybuffer[offset] = 1;
naughtyb_videoram2[offset] = data;
}
}
WRITE8_HANDLER( naughtyb_videoreg_w )
{
// bits 4+5 control the sound circuit
pleiads_sound_control_c_w(offset,data);
if ((videoreg & 0x0f) != (data & 0x0f))
{
videoreg = data;
naughtyb_cocktail =
( ( input_port_2_r(0) & 0x80 ) && // cabinet == cocktail
( data & 0x01 ) ); // handling player 2
palreg = (data >> 1) & 0x03; // pallette sel is bit 1 & 2
bankreg = (data >> 2) & 0x01; // banksel is just bit 2
memset (dirtybuffer, 1, videoram_size);
}
naughtyb_cocktail =
( ( input_port_2_r(0) & 0x80 ) && // cabinet == cocktail
( data & 0x01 ) ); // handling player 2
palreg = (data >> 1) & 0x03; // pallette sel is bit 1 & 2
bankreg = (data >> 2) & 0x01; // banksel is just bit 2
}
WRITE8_HANDLER( popflame_videoreg_w )
@ -200,18 +176,11 @@ WRITE8_HANDLER( popflame_videoreg_w )
pleiads_sound_control_c_w(offset,data);
if ((videoreg & 0x0f) != (data & 0x0f))
{
videoreg = data;
naughtyb_cocktail =
( ( input_port_2_r(0) & 0x80 ) && // cabinet == cocktail
( data & 0x01 ) ); // handling player 2
palreg = (data >> 1) & 0x03; // pallette sel is bit 1 & 2
bankreg = (data >> 3) & 0x01; // banksel is just bit 3
memset (dirtybuffer, 1, videoram_size);
}
naughtyb_cocktail =
( ( input_port_2_r(0) & 0x80 ) && // cabinet == cocktail
( data & 0x01 ) ); // handling player 2
palreg = (data >> 1) & 0x03; // pallette sel is bit 1 & 2
bankreg = (data >> 3) & 0x01; // banksel is just bit 3
}
@ -264,58 +233,52 @@ VIDEO_UPDATE( naughtyb )
{
int offs;
// for every character in the Video RAM, check if it has been modified
// since last time and update it accordingly.
// for every character in the Video RAM
for (offs = videoram_size - 1;offs >= 0;offs--)
{
if (dirtybuffer[offs])
int sx,sy;
if ( naughtyb_cocktail )
{
int sx,sy;
dirtybuffer[offs] = 0;
if ( naughtyb_cocktail )
if (offs < 0x700)
{
if (offs < 0x700)
{
sx = 63 - offs % 64;
sy = 27 - offs / 64;
}
else
{
sx = 64 + ( 3 - (offs - 0x700) % 4 );
sy = 27 - (offs - 0x700) / 4;
}
sx = 63 - offs % 64;
sy = 27 - offs / 64;
}
else
{
if (offs < 0x700)
{
sx = offs % 64;
sy = offs / 64;
}
else
{
sx = 64 + (offs - 0x700) % 4;
sy = (offs - 0x700) / 4;
}
sx = 64 + ( 3 - (offs - 0x700) % 4 );
sy = 27 - (offs - 0x700) / 4;
}
drawgfx(tmpbitmap,machine->gfx[0],
naughtyb_videoram2[offs] + 256 * bankreg,
(naughtyb_videoram2[offs] >> 5) + 8 * palreg,
naughtyb_cocktail,naughtyb_cocktail,
8*sx,8*sy,
0,TRANSPARENCY_NONE,0);
drawgfx(tmpbitmap,machine->gfx[1],
videoram[offs] + 256*bankreg,
(videoram[offs] >> 5) + 8 * palreg,
naughtyb_cocktail,naughtyb_cocktail,
8*sx,8*sy,
0,TRANSPARENCY_PEN,0);
}
else
{
if (offs < 0x700)
{
sx = offs % 64;
sy = offs / 64;
}
else
{
sx = 64 + (offs - 0x700) % 4;
sy = (offs - 0x700) / 4;
}
}
drawgfx(tmpbitmap,machine->gfx[0],
naughtyb_videoram2[offs] + 256 * bankreg,
(naughtyb_videoram2[offs] >> 5) + 8 * palreg,
naughtyb_cocktail,naughtyb_cocktail,
8*sx,8*sy,
0,TRANSPARENCY_NONE,0);
drawgfx(tmpbitmap,machine->gfx[1],
videoram[offs] + 256*bankreg,
(videoram[offs] >> 5) + 8 * palreg,
naughtyb_cocktail,naughtyb_cocktail,
8*sx,8*sy,
0,TRANSPARENCY_PEN,0);
}
// copy the temporary bitmap to the screen

View File

@ -14,16 +14,8 @@ static int flipscreen[2];
WRITE8_HANDLER( pkunwar_flipscreen_w )
{
if (flipscreen[0] != (data & 1))
{
flipscreen[0] = data & 1;
memset(dirtybuffer,1,videoram_size);
}
if (flipscreen[1] != (data & 2))
{
flipscreen[1] = data & 2;
memset(dirtybuffer,1,videoram_size);
}
flipscreen[0] = data & 1;
flipscreen[1] = data & 2;
}
@ -33,34 +25,25 @@ VIDEO_UPDATE( pkunwar )
int offs;
/* for every character in the Video RAM, check if it has been modified */
/* since last time and update it accordingly. */
/* for every character in the Video RAM */
for (offs = videoram_size - 1;offs >= 0;offs--)
{
if (dirtybuffer[offs])
{
int sx,sy;
int sx,sy;
dirtybuffer[offs] = 0;
sx = offs % 32;
sy = offs / 32;
if (flipscreen[0]) sx = 31 - sx;
if (flipscreen[1]) sy = 31 - sy;
sx = offs % 32;
sy = offs / 32;
if (flipscreen[0]) sx = 31 - sx;
if (flipscreen[1]) sy = 31 - sy;
drawgfx(tmpbitmap,machine->gfx[0],
videoram[offs] + ((colorram[offs] & 0x07) << 8),
(colorram[offs] & 0xf0) >> 4,
flipscreen[0],flipscreen[1],
8*sx,8*sy,
&machine->screen[0].visarea,TRANSPARENCY_NONE,0);
}
drawgfx(bitmap,machine->gfx[0],
videoram[offs] + ((colorram[offs] & 0x07) << 8),
(colorram[offs] & 0xf0) >> 4,
flipscreen[0],flipscreen[1],
8*sx,8*sy,
cliprect,TRANSPARENCY_NONE,0);
}
/* copy the character mapped graphics */
copybitmap(bitmap,tmpbitmap,0,0,0,0,&machine->screen[0].visarea,TRANSPARENCY_NONE,0);
/* Draw the sprites. */
for (offs = 0;offs < spriteram_size;offs += 32)

View File

@ -90,7 +90,6 @@ WRITE8_HANDLER( redalert_backram_w )
(redalert_backcolor[charnum] != backcolor))
{
redalert_dirtyback[charnum] = 1;
dirtybuffer[charnum] = 1;
redalert_backcolor[charnum] = backcolor;
redalert_backram[offset] = data;
@ -166,114 +165,104 @@ VIDEO_UPDATE( redalert )
{
int offs,i;
/* for every character in the Video RAM, check if it has been modified */
/* since last time and update it accordingly. */
/* for every character in the Video RAM */
for (offs = videoram_size - 1;offs >= 0;offs--)
{
int charcode;
int stat_transparent;
int sx,sy,color;
charcode = videoram[offs];
if (dirtybuffer[offs] || redalert_dirtycharacter[charcode] || redalert_dirtycharacter2[charcode])
/* decode modified background */
if (redalert_dirtyback[offs] == 1)
{
int sx,sy,color;
decodechar(machine->gfx[0],offs,redalert_backram);
redalert_dirtyback[offs] = 2;
}
/* decode modified characters */
if (redalert_dirtycharacter[charcode] == 1)
{
if (charcode < 0x80)
decodechar(machine->gfx[1],charcode,redalert_characterram);
else
decodechar(machine->gfx[2],charcode-0x80,redalert_spriteram1);
redalert_dirtycharacter[charcode] = 2;
}
/* decode modified background */
if (redalert_dirtyback[offs] == 1)
{
decodechar(machine->gfx[0],offs,redalert_backram);
redalert_dirtyback[offs] = 2;
}
if (redalert_dirtycharacter2[charcode] == 1)
{
decodechar(machine->gfx[3],charcode-0x80,redalert_spriteram3);
redalert_dirtycharacter2[charcode] = 2;
}
/* decode modified characters */
if (redalert_dirtycharacter[charcode] == 1)
{
if (charcode < 0x80)
decodechar(machine->gfx[1],charcode,redalert_characterram);
else
decodechar(machine->gfx[2],charcode-0x80,redalert_spriteram1);
redalert_dirtycharacter[charcode] = 2;
}
sx = 31 - offs / 32;
sy = offs % 32;
if (redalert_dirtycharacter2[charcode] == 1)
{
decodechar(machine->gfx[3],charcode-0x80,redalert_spriteram3);
redalert_dirtycharacter2[charcode] = 2;
}
stat_transparent = TRANSPARENCY_NONE;
dirtybuffer[offs] = 0;
/* First layer of color */
if (charcode >= 0xC0)
{
stat_transparent = TRANSPARENCY_COLOR;
sx = 31 - offs / 32;
sy = offs % 32;
color = color_lookup[charcode];
stat_transparent = TRANSPARENCY_NONE;
/* First layer of color */
if (charcode >= 0xC0)
{
stat_transparent = TRANSPARENCY_COLOR;
color = color_lookup[charcode];
drawgfx(tmpbitmap,machine->gfx[2],
charcode-0x80,
color,
0,0,
8*sx,8*sy,
&machine->screen[0].visarea,TRANSPARENCY_NONE,0);
if( redalert_dirtycharacter2[charcode] != 0 )
drawgfx(tmpbitmap,machine->gfx[3],
charcode-0x80,
color,
0,0,
8*sx,8*sy,
&machine->screen[0].visarea,TRANSPARENCY_COLOR,0);
}
/* Second layer - background */
color = redalert_backcolor[offs];
drawgfx(tmpbitmap,machine->gfx[0],
offs,
drawgfx(tmpbitmap,machine->gfx[2],
charcode-0x80,
color,
0,0,
8*sx,8*sy,
&machine->screen[0].visarea,stat_transparent,0);
&machine->screen[0].visarea,TRANSPARENCY_NONE,0);
/* Third layer - alphanumerics & sprites */
if (charcode < 0x80)
{
color = color_lookup[charcode];
drawgfx(tmpbitmap,machine->gfx[1],
charcode,
color,
0,0,
8*sx,8*sy,
&machine->screen[0].visarea,TRANSPARENCY_COLOR,0);
}
else if (charcode < 0xC0)
{
color = color_lookup[charcode];
drawgfx(tmpbitmap,machine->gfx[2],
if( redalert_dirtycharacter2[charcode] != 0 )
drawgfx(tmpbitmap,machine->gfx[3],
charcode-0x80,
color,
0,0,
8*sx,8*sy,
&machine->screen[0].visarea,TRANSPARENCY_COLOR,0);
if( redalert_dirtycharacter2[charcode] != 0 )
drawgfx(tmpbitmap,machine->gfx[3],
charcode-0x80,
color,
0,0,
8*sx,8*sy,
&machine->screen[0].visarea,TRANSPARENCY_COLOR,0);
}
}
/* Second layer - background */
color = redalert_backcolor[offs];
drawgfx(tmpbitmap,machine->gfx[0],
offs,
color,
0,0,
8*sx,8*sy,
&machine->screen[0].visarea,stat_transparent,0);
/* Third layer - alphanumerics & sprites */
if (charcode < 0x80)
{
color = color_lookup[charcode];
drawgfx(tmpbitmap,machine->gfx[1],
charcode,
color,
0,0,
8*sx,8*sy,
&machine->screen[0].visarea,TRANSPARENCY_COLOR,0);
}
else if (charcode < 0xC0)
{
color = color_lookup[charcode];
drawgfx(tmpbitmap,machine->gfx[2],
charcode-0x80,
color,
0,0,
8*sx,8*sy,
&machine->screen[0].visarea,TRANSPARENCY_COLOR,0);
if( redalert_dirtycharacter2[charcode] != 0 )
drawgfx(tmpbitmap,machine->gfx[3],
charcode-0x80,
color,
0,0,
8*sx,8*sy,
&machine->screen[0].visarea,TRANSPARENCY_COLOR,0);
}
}
@ -294,7 +283,7 @@ VIDEO_UPDATE( redalert )
}
/* copy the character mapped graphics */
copybitmap(bitmap,tmpbitmap,flip,flip,0,0,&machine->screen[0].visarea,TRANSPARENCY_NONE,0);
copybitmap(bitmap,tmpbitmap,flip,flip,0,0,cliprect,TRANSPARENCY_NONE,0);
return 0;
}

View File

@ -67,11 +67,7 @@ VIDEO_START( snk )
{
snk_blink_parity = 0;
dirtybuffer = auto_malloc( MAX_VRAM_SIZE );
tmpbitmap = auto_bitmap_alloc( 512, 512, machine->screen[0].format );
memset( dirtybuffer, 0xff, MAX_VRAM_SIZE );
}
/**************************************************************************************/
@ -91,29 +87,23 @@ static void tnk3_draw_background(running_machine *machine, mame_bitmap *bitmap,
tile_number = videoram[offs];
attributes = videoram[offs+1];
if(tile_number != dirtybuffer[offs] || attributes != dirtybuffer[offs+1])
if(bg_type == 0)
{
dirtybuffer[offs] = tile_number;
dirtybuffer[offs+1] = attributes;
if(bg_type == 0)
{
/* type tnk3 */
tile_number |= (attributes & 0x30) << 4;
color = (attributes & 0xf) ^ 8;
}
else
{
/* type ikari */
tile_number |= (attributes & 0x03) << 8;
color = attributes >> 4;
}
sx = x * 512 / x_size;
sy = y * 512 / y_size;
drawgfx(tmpbitmap,gfx,tile_number,color,0,0,sx,sy,0,TRANSPARENCY_NONE,0);
/* type tnk3 */
tile_number |= (attributes & 0x30) << 4;
color = (attributes & 0xf) ^ 8;
}
else
{
/* type ikari */
tile_number |= (attributes & 0x03) << 8;
color = attributes >> 4;
}
sx = x * 512 / x_size;
sy = y * 512 / y_size;
drawgfx(tmpbitmap,gfx,tile_number,color,0,0,sx,sy,0,TRANSPARENCY_NONE,0);
}
copyscrollbitmap(bitmap,tmpbitmap,1,&scrollx,1,&scrolly,cliprect,TRANSPARENCY_NONE,0);
}
@ -251,9 +241,7 @@ VIDEO_UPDATE( tnk3 )
VIDEO_START( sgladiat )
{
dirtybuffer = auto_malloc( MAX_VRAM_SIZE );
tmpbitmap = auto_bitmap_alloc( 512, 256, machine->screen[0].format );
memset( dirtybuffer, 0xff, MAX_VRAM_SIZE );
}
static void sgladiat_draw_background(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect, int scrollx, int scrolly )
@ -268,16 +256,11 @@ static void sgladiat_draw_background(running_machine *machine, mame_bitmap *bitm
offs = (x<<5)+y;
tile_number = videoram[offs];
if(tile_number != dirtybuffer[offs])
{
dirtybuffer[offs] = tile_number;
color = 0;
sx = x << 3;
sy = y << 3;
color = 0;
sx = x << 3;
sy = y << 3;
drawgfx(tmpbitmap,gfx,tile_number,color,0,0,sx,sy,0,TRANSPARENCY_NONE,0);
}
drawgfx(tmpbitmap,gfx,tile_number,color,0,0,sx,sy,0,TRANSPARENCY_NONE,0);
}
copyscrollbitmap(bitmap,tmpbitmap,1,&scrollx,1,&scrolly,cliprect,TRANSPARENCY_NONE,0);
}
@ -391,22 +374,17 @@ static void tdfever_draw_bg(running_machine *machine, mame_bitmap *bitmap, const
tile_number = source[offs];
attributes = source[offs+1];
if(tile_number != dirtybuffer[offs] || attributes != dirtybuffer[offs+1])
{
dirtybuffer[offs] = tile_number;
dirtybuffer[offs+1] = attributes;
tile_number |= (attributes & 0xf) << 8;
tile_number |= (attributes & 0xf) << 8;
color = attributes >> 4;
sx = x << 4;
sy = y << 4;
color = attributes >> 4;
sx = x << 4;
sy = y << 4;
// intercept overflown tile indices
if(tile_number >= gfx->total_elements)
plot_box(tmpbitmap, sx, sy, gfx->width, gfx->height, get_black_pen(machine));
else
drawgfx(tmpbitmap,gfx,tile_number,color,0,0,sx,sy,0,TRANSPARENCY_NONE,0);
}
// intercept overflown tile indices
if(tile_number >= gfx->total_elements)
plot_box(tmpbitmap, sx, sy, gfx->width, gfx->height, get_black_pen(machine));
else
drawgfx(tmpbitmap,gfx,tile_number,color,0,0,sx,sy,0,TRANSPARENCY_NONE,0);
}
copyscrollbitmap(bitmap,tmpbitmap,1,&xscroll,1,&yscroll,cliprect,TRANSPARENCY_NONE,0);
}

View File

@ -4,9 +4,6 @@
#include "driver.h"
static mame_bitmap *thief_page0;
static mame_bitmap *thief_page1;
static UINT8 thief_read_mask, thief_write_mask;
static UINT8 thief_video_control;
@ -46,11 +43,6 @@ WRITE8_HANDLER( thief_context_bank_w ){
/***************************************************************************/
WRITE8_HANDLER( thief_video_control_w ){
if( (data^thief_video_control)&1 ){
/* screen flipped */
memset( dirtybuffer, 0x00, 0x2000*2 );
}
thief_video_control = data;
/*
bit 0: screen flip
@ -97,13 +89,8 @@ READ8_HANDLER( thief_videoram_r ){
WRITE8_HANDLER( thief_videoram_w ){
UINT8 *dest = &videoram[offset];
if( thief_video_control&0x02 ){
if( thief_video_control&0x02 )
dest+=0x2000*4; /* foreground/background */
dirtybuffer[offset+0x2000] = 1;
}
else {
dirtybuffer[offset] = 1;
}
if( thief_write_mask&0x1 ) dest[0x2000*0] = data;
if( thief_write_mask&0x2 ) dest[0x2000*1] = data;
if( thief_write_mask&0x4 ) dest[0x2000*2] = data;
@ -115,15 +102,9 @@ WRITE8_HANDLER( thief_videoram_w ){
VIDEO_START( thief ){
memset( &thief_coprocessor, 0x00, sizeof(thief_coprocessor) );
thief_page0 = auto_bitmap_alloc( 256,256,machine->screen[0].format );
thief_page1 = auto_bitmap_alloc( 256,256,machine->screen[0].format );
videoram = auto_malloc( 0x2000*4*2 );
memset( videoram, 0, 0x2000*4*2 );
dirtybuffer = auto_malloc( 0x2000*2 );
memset( dirtybuffer, 1, 0x2000*2 );
thief_coprocessor.image_ram = auto_malloc( 0x2000 );
thief_coprocessor.context_ram = auto_malloc( 0x400 );
}
@ -132,52 +113,40 @@ VIDEO_UPDATE( thief ){
UINT32 offs;
int flipscreen = thief_video_control&1;
const pen_t *pal_data = machine->pens;
UINT8 *dirty = dirtybuffer;
const UINT8 *source = videoram;
mame_bitmap *page;
if( thief_video_control&4 ){ /* visible page */
dirty += 0x2000;
if( thief_video_control&4 ) /* visible page */
source += 0x2000*4;
page = thief_page1;
}
else {
page = thief_page0;
}
for( offs=0; offs<0x2000; offs++ ){
if( dirty[offs] ){
int ypos = offs/32;
int xpos = (offs%32)*8;
int plane0 = source[0x2000*0+offs];
int plane1 = source[0x2000*1+offs];
int plane2 = source[0x2000*2+offs];
int plane3 = source[0x2000*3+offs];
int bit;
if( flipscreen ){
for( bit=0; bit<8; bit++ ){
*BITMAP_ADDR16(page, 0xff - ypos, 0xff - (xpos+bit)) =
pal_data[
(((plane0<<bit)&0x80)>>7) |
(((plane1<<bit)&0x80)>>6) |
(((plane2<<bit)&0x80)>>5) |
(((plane3<<bit)&0x80)>>4)];
}
int ypos = offs/32;
int xpos = (offs%32)*8;
int plane0 = source[0x2000*0+offs];
int plane1 = source[0x2000*1+offs];
int plane2 = source[0x2000*2+offs];
int plane3 = source[0x2000*3+offs];
int bit;
if( flipscreen ){
for( bit=0; bit<8; bit++ ){
*BITMAP_ADDR16(bitmap, 0xff - ypos, 0xff - (xpos+bit)) =
pal_data[
(((plane0<<bit)&0x80)>>7) |
(((plane1<<bit)&0x80)>>6) |
(((plane2<<bit)&0x80)>>5) |
(((plane3<<bit)&0x80)>>4)];
}
else {
for( bit=0; bit<8; bit++ ){
*BITMAP_ADDR16(page, ypos, xpos+bit) =
pal_data[
(((plane0<<bit)&0x80)>>7) |
(((plane1<<bit)&0x80)>>6) |
(((plane2<<bit)&0x80)>>5) |
(((plane3<<bit)&0x80)>>4)];
}
}
else {
for( bit=0; bit<8; bit++ ){
*BITMAP_ADDR16(bitmap, ypos, xpos+bit) =
pal_data[
(((plane0<<bit)&0x80)>>7) |
(((plane1<<bit)&0x80)>>6) |
(((plane2<<bit)&0x80)>>5) |
(((plane3<<bit)&0x80)>>4)];
}
dirty[offs] = 0;
}
}
copybitmap(bitmap,page,0,0,0,0,&machine->screen[0].visarea,TRANSPARENCY_NONE,0);
return 0;
}

View File

@ -110,11 +110,7 @@ WRITE8_HANDLER( troangel_flipscreen_w )
/* screen flip is handled both by software and hardware */
data ^= ~readinputport(4) & 1;
if (flipscreen != (data & 1))
{
flipscreen = data & 1;
memset(dirtybuffer,1,videoram_size);
}
flipscreen = data & 1;
coin_counter_w(0,data & 0x02);
coin_counter_w(1,data & 0x20);
@ -130,35 +126,30 @@ static void draw_background(running_machine *machine, mame_bitmap *bitmap, const
for (offs = videoram_size - 2;offs >= 0;offs -= 2)
{
if (dirtybuffer[offs] || dirtybuffer[offs+1])
int sx,sy,code,attr,flipx,flipy;
sx = (offs/2) % 32;
sy = (offs/2) / 32;
attr = videoram[offs+0];
code = videoram[offs+1] | ((attr & 0xc0) << 2);
flipx = attr & 0x20;
flipy = (attr & 0x10) >> 4;
if (flipscreen)
{
int sx,sy,code,attr,flipx,flipy;
dirtybuffer[offs] = dirtybuffer[offs+1] = 0;
sx = (offs/2) % 32;
sy = (offs/2) / 32;
attr = videoram[offs+0];
code = videoram[offs+1] | ((attr & 0xc0) << 2);
flipx = attr & 0x20;
flipy = (attr & 0x10) >> 4;
if (flipscreen)
{
sx = 31 - sx;
sy = 31 - sy;
flipx = !flipx;
}
drawgfx(tmpbitmap,gfx,
code,
attr & 0x0f,
flipx,flipy ^ flipscreen,
8*sx,8*sy,
0,TRANSPARENCY_NONE,0);
sx = 31 - sx;
sy = 31 - sy;
flipx = !flipx;
}
drawgfx(tmpbitmap,gfx,
code,
attr & 0x0f,
flipx,flipy ^ flipscreen,
8*sx,8*sy,
0,TRANSPARENCY_NONE,0);
}
{

View File

@ -55,15 +55,6 @@ WRITE8_HANDLER( tunhunt_videoram_w )
tilemap_mark_tile_dirty(fg_tilemap, offset);
}
WRITE8_HANDLER( tunhunt_mott_w )
{
if( spriteram[offset]!=data )
{
spriteram[offset] = data;
dirtybuffer[offset>>4] = 1;
}
}
static TILE_GET_INFO( get_fg_tile_info )
{
int attr = videoram[tile_index];
@ -81,9 +72,6 @@ VIDEO_START( tunhunt )
We keep track of dirty lines and cache the expanded bitmap.
With max RLE expansion, bitmap size is 256x64.
*/
dirtybuffer = auto_malloc(64);
memset( dirtybuffer, 1, 64 );
tmpbitmap = auto_bitmap_alloc( 256, 64, machine->screen[0].format );
fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_cols,
@ -226,27 +214,19 @@ static void draw_motion_object(running_machine *machine, mame_bitmap *bitmap, co
for( line=0; line<64; line++ )
{
if( dirtybuffer[line] )
x = 0;
source = &spriteram[line*0x10];
for( span=0; span<0x10; span++ )
{
dirtybuffer[line] = 0;
x = 0;
source = &spriteram[line*0x10];
for( span=0; span<0x10; span++ )
{
span_data = source[span];
if( span_data == 0xff ) break;
color = ((span_data>>6)&0x3)^0x3;
count = (span_data&0x1f)+1;
while( count-- && x < 256 )
{
*BITMAP_ADDR16(tmpbitmap, line, x++) = machine->pens[color];
}
}
while( x<256 )
{
*BITMAP_ADDR16(tmpbitmap, line, x++) = machine->pens[0];
}
} /* dirty line */
span_data = source[span];
if( span_data == 0xff ) break;
color = ((span_data>>6)&0x3)^0x3;
count = (span_data&0x1f)+1;
while( count-- && x < 256 )
*BITMAP_ADDR16(tmpbitmap, line, x++) = machine->pens[color];
}
while( x<256 )
*BITMAP_ADDR16(tmpbitmap, line, x++) = machine->pens[0];
} /* next line */
switch( tunhunt_ram[VSTRLO] )

View File

@ -40,8 +40,6 @@ static mame_bitmap *bg_bitmap;
VIDEO_START( vigilant )
{
video_start_generic(machine);
bg_bitmap = auto_bitmap_alloc(512*4,256,machine->screen[0].format);
}
@ -322,21 +320,14 @@ VIDEO_UPDATE( kikcubic )
int color = (attributes & 0xF0) >> 4;
int tile_number = videoram[offs] | ((attributes & 0x0F) << 8);
if (dirtybuffer[offs] || dirtybuffer[offs+1])
{
dirtybuffer[offs] = dirtybuffer[offs+1] = 0;
drawgfx(tmpbitmap,machine->gfx[0],
tile_number,
color,
0,0,
sx,sy,
0,TRANSPARENCY_NONE,0);
}
drawgfx(bitmap,machine->gfx[0],
tile_number,
color,
0,0,
sx,sy,
cliprect,TRANSPARENCY_NONE,0);
}
copybitmap(bitmap,tmpbitmap,0,0,0,0,cliprect,TRANSPARENCY_NONE,0);
draw_sprites(machine,bitmap,cliprect);
return 0;
}

View File

@ -64,11 +64,7 @@ PALETTE_INIT( wiping )
WRITE8_HANDLER( wiping_flipscreen_w )
{
if (flipscreen != (data & 1))
{
flipscreen = (data & 1);
memset(dirtybuffer,1,videoram_size);
}
flipscreen = (data & 1);
}
@ -78,46 +74,40 @@ VIDEO_UPDATE( wiping )
for (offs = videoram_size - 1; offs > 0; offs--)
{
if (dirtybuffer[offs])
int mx,my,sx,sy;
mx = offs % 32;
my = offs / 32;
if (my < 2)
{
int mx,my,sx,sy;
sx = my + 34;
sy = mx - 2;
}
else if (my >= 30)
{
sx = my - 30;
sy = mx - 2;
}
else
{
sx = mx + 2;
sy = my - 2;
}
dirtybuffer[offs] = 0;
if (flipscreen)
{
sx = 35 - sx;
sy = 27 - sy;
}
mx = offs % 32;
my = offs / 32;
if (my < 2)
{
sx = my + 34;
sy = mx - 2;
}
else if (my >= 30)
{
sx = my - 30;
sy = mx - 2;
}
else
{
sx = mx + 2;
sy = my - 2;
}
if (flipscreen)
{
sx = 35 - sx;
sy = 27 - sy;
}
drawgfx(tmpbitmap,machine->gfx[0],
videoram[offs],
colorram[offs] & 0x3f,
flipscreen,flipscreen,
sx*8,sy*8,
&machine->screen[0].visarea,TRANSPARENCY_NONE,0);
}
drawgfx(bitmap,machine->gfx[0],
videoram[offs],
colorram[offs] & 0x3f,
flipscreen,flipscreen,
sx*8,sy*8,
cliprect,TRANSPARENCY_NONE,0);
}
copybitmap(bitmap,tmpbitmap,0,0,0,0,&machine->screen[0].visarea,TRANSPARENCY_NONE,0);
/* Note, we're counting up on purpose ! */
/* This way the vacuum cleaner is always on top */

View File

@ -91,31 +91,10 @@ PALETTE_INIT( wiz )
}
}
WRITE8_HANDLER( wiz_attributes_w )
{
if ((offset & 1) && wiz_attributesram[offset] != data)
{
int i;
for (i = offset / 2;i < videoram_size;i += 32)
{
dirtybuffer[i] = 1;
}
}
wiz_attributesram[offset] = data;
}
WRITE8_HANDLER( wiz_palettebank_w )
{
if (palbank[offset] != (data & 1))
{
palbank[offset] = data & 1;
palette_bank = palbank[0] + 2 * palbank[1];
memset(dirtybuffer,1,videoram_size);
}
palbank[offset] = data & 1;
palette_bank = palbank[0] + 2 * palbank[1];
}
WRITE8_HANDLER( wiz_bgcolor_w )
@ -125,32 +104,18 @@ WRITE8_HANDLER( wiz_bgcolor_w )
WRITE8_HANDLER( wiz_char_bank_select_w )
{
if (char_bank[offset] != (data & 1))
{
char_bank[offset] = data & 1;
memset(dirtybuffer,1,videoram_size);
}
char_bank[offset] = data & 1;
}
WRITE8_HANDLER( wiz_flipx_w )
{
if (flipx != data)
{
flipx = data;
memset(dirtybuffer, 1, videoram_size);
}
flipx = data;
}
WRITE8_HANDLER( wiz_flipy_w )
{
if (flipy != data)
{
flipy = data;
memset(dirtybuffer, 1, videoram_size);
}
flipy = data;
}
static void draw_background(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect, int bank, int colortype)

View File

@ -14,7 +14,6 @@ UINT8 *xxmissio_fgram;
static UINT8 xxmissio_xscroll,xxmissio_yscroll;
static UINT8 flipscreen;
static UINT8 xxmissio_bg_redraw;
WRITE8_HANDLER( xxmissio_scroll_x_w )
@ -28,11 +27,7 @@ WRITE8_HANDLER( xxmissio_scroll_y_w )
WRITE8_HANDLER( xxmissio_flipscreen_w )
{
if ((data & 0x01) != flipscreen)
{
flipscreen = data & 0x01;
xxmissio_bg_redraw = 1;
}
flipscreen = data & 0x01;
}
WRITE8_HANDLER( xxmissio_videoram_w )
@ -42,7 +37,6 @@ WRITE8_HANDLER( xxmissio_videoram_w )
offs |= x;
videoram[offs] = data;
dirtybuffer[offs & 0x3ff] = 1;
}
READ8_HANDLER( xxmissio_videoram_r )
{
@ -56,9 +50,6 @@ READ8_HANDLER( xxmissio_videoram_r )
WRITE8_HANDLER( xxmissio_paletteram_w )
{
paletteram_BBGGRRII_w(offset,data);
if (offset >= 0x200)
xxmissio_bg_redraw = 1;
}
/****************************************************************************/
@ -71,9 +62,6 @@ VIDEO_UPDATE( xxmissio )
int size = videoram_size/2;
if (xxmissio_bg_redraw==1)
memset(dirtybuffer,1,size);
/* draw BG layer */
for (y=0; y<32; y++)
@ -85,25 +73,20 @@ VIDEO_UPDATE( xxmissio )
if (flipscreen!=0)
offs = (size-1)-offs;
if (dirtybuffer[offs] != 0)
{
dirtybuffer[offs]=0;
px = x*16;
py = y*8;
px = x*16;
py = y*8;
chr = videoram[ offs ] ;
col = videoram[ offs + size];
chr = chr + ((col & 0xc0) << 2 );
col = col & 0x0f;
chr = videoram[ offs ] ;
col = videoram[ offs + size];
chr = chr + ((col & 0xc0) << 2 );
col = col & 0x0f;
drawgfx(tmpbitmap,machine->gfx[2],
chr,
col,
flipscreen,flipscreen,
px,py,
&machine->screen[0].visarea,TRANSPARENCY_NONE,0);
}
drawgfx(tmpbitmap,machine->gfx[2],
chr,
col,
flipscreen,flipscreen,
px,py,
&machine->screen[0].visarea,TRANSPARENCY_NONE,0);
}
}
@ -119,7 +102,6 @@ VIDEO_UPDATE( xxmissio )
}
copyscrollbitmap(bitmap,tmpbitmap,1,&sx,1,&sy,&machine->screen[0].visarea,TRANSPARENCY_NONE,0);
xxmissio_bg_redraw = 0;
/* draw sprites */