diff options
author | Aaron Giles <aaron@aarongiles.com> | 2008-09-11 15:14:39 +0000 |
---|---|---|
committer | Aaron Giles <aaron@aarongiles.com> | 2008-09-11 15:14:39 +0000 |
commit | b10a182054d9b10b8d88fc007819a9b6b8218a9b (patch) | |
tree | 893e4a736b8aa64826dbe43de10533dde1433927 /src/mame/drivers/raiden2.c | |
parent | 746ab44148c5013bfe6142e9f3e267b3411e16ad (diff) |
From: Atari Ace [mailto:atari_ace@verizon.net]
Subject: [patch] Even more reset/multisession cleanup
Hi mamedev,
These two patches try to reduce the amount of variable in .data, which
usually point to multisession/reset bugs or missing const qualifiers.
The first patch just adds const to a number of items, moving them from
.data to .rdata. The second patch sets other items to zero (moving
them to .bss), adding reset/init code where appropriate.
~aa
Diffstat (limited to 'src/mame/drivers/raiden2.c')
-rw-r--r-- | src/mame/drivers/raiden2.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/mame/drivers/raiden2.c b/src/mame/drivers/raiden2.c index 7e50620ab07..e9ff6b6b8c6 100644 --- a/src/mame/drivers/raiden2.c +++ b/src/mame/drivers/raiden2.c @@ -146,7 +146,8 @@ Current Problem(s) - in order of priority static tilemap *background_layer,*midground_layer,*foreground_layer,*text_layer; static UINT16 *back_data,*fore_data,*mid_data, *w1ram; -static int bg_bank=0, fg_bank=6, mid_bank=1, bg_col=0, fg_col=1, mid_col=2; +static int bg_bank, fg_bank, mid_bank; +static int bg_col, fg_col, mid_col; static int tick; static UINT16 *mainram; @@ -812,8 +813,19 @@ static void r2_6f6c(UINT16 cc, UINT16 v1, UINT16 v2) } #endif +static void common_reset(void) +{ + bg_bank=0; + fg_bank=6; + mid_bank=1; + bg_col=0; + fg_col=1; + mid_col=2; +} + static MACHINE_RESET(raiden2) { + common_reset(); sprcpt_init(); MACHINE_RESET_CALL(seibu_sound); @@ -2041,6 +2053,11 @@ static INTERRUPT_GEN( rdx_v33_interrupt ) logerror("VSYNC\n"); } +static MACHINE_RESET( rdx_v33 ) +{ + common_reset(); +} + static MACHINE_DRIVER_START( rdx_v33 ) /* basic machine hardware */ @@ -2048,6 +2065,7 @@ static MACHINE_DRIVER_START( rdx_v33 ) MDRV_CPU_PROGRAM_MAP(rdx_v33_map, 0) MDRV_CPU_VBLANK_INT("main", rdx_v33_interrupt) + MDRV_MACHINE_RESET(rdx_v33) MDRV_NVRAM_HANDLER(rdx_v33) /* video hardware */ |