diff options
| author | 2008-02-27 19:58:53 +0000 | |
|---|---|---|
| committer | 2008-02-27 19:58:53 +0000 | |
| commit | b0735fe3180ddcb4fedbdd6e2558db03fcbbb42a (patch) | |
| tree | 3d9276b1b7ec6494adaa5b62cd6114d95d808c5a | |
| parent | 210af56aa824b28695903dfe6ec876fbbf955d1e (diff) | |
BITSWAP macro used.
| -rw-r--r-- | src/mame/drivers/omegrace.c | 26 | ||||
| -rw-r--r-- | src/mame/video/avgdvg.c | 17 | ||||
| -rw-r--r-- | src/mame/video/avgdvg.h | 1 |
3 files changed, 23 insertions, 21 deletions
diff --git a/src/mame/drivers/omegrace.c b/src/mame/drivers/omegrace.c index 33a2fed7754..f86174ce210 100644 --- a/src/mame/drivers/omegrace.c +++ b/src/mame/drivers/omegrace.c @@ -503,7 +503,7 @@ static MACHINE_DRIVER_START( omegrace ) MDRV_SCREEN_SIZE(400, 300) MDRV_SCREEN_VISIBLE_AREA(522, 1566, 522, 1566) - MDRV_VIDEO_START(dvg_omegrace) + MDRV_VIDEO_START(dvg) MDRV_VIDEO_UPDATE(vector) /* sound hardware */ @@ -561,6 +561,26 @@ ROM_START( deltrace ) ROM_END +/************************************* + * + * Game specific initalization + * + *************************************/ + +static DRIVER_INIT( omegrace ) +{ + int i; + UINT8 *prom = memory_region(REGION_USER1); + + /* Omega Race has two pairs of the state PROM output + * lines swapped before going into the decoder. + * Since all other avg/dvg games connect the PROM + * in a consistent way to the decoder, we swap the bits + * here. */ + for (i=0; i<memory_region_length(REGION_USER1); i++) + prom[i] = BITSWAP8(prom[i],7,6,5,4,1,0,3,2); +} + /************************************* * @@ -568,5 +588,5 @@ ROM_END * *************************************/ -GAMEL(1981, omegrace, 0, omegrace, omegrace, 0, ROT0, "Midway", "Omega Race", GAME_NO_COCKTAIL, layout_hoffe457 ) -GAMEL(1981, deltrace, omegrace, omegrace, omegrace, 0, ROT0, "Allied Leisure", "Delta Race", GAME_NO_COCKTAIL, layout_hoffe457 ) +GAMEL(1981, omegrace, 0, omegrace, omegrace, omegrace, ROT0, "Midway", "Omega Race", GAME_NO_COCKTAIL, layout_hoffe457 ) +GAMEL(1981, deltrace, omegrace, omegrace, omegrace, omegrace, ROT0, "Allied Leisure", "Delta Race", GAME_NO_COCKTAIL, layout_hoffe457 ) diff --git a/src/mame/video/avgdvg.c b/src/mame/video/avgdvg.c index 67ce48d280d..275eb0151ec 100644 --- a/src/mame/video/avgdvg.c +++ b/src/mame/video/avgdvg.c @@ -1485,23 +1485,6 @@ VIDEO_START( dvg ) VIDEO_START_CALL(vector); } -VIDEO_START( dvg_omegrace ) -{ - int i; - UINT8 *prom = memory_region(REGION_USER1); - - /* Omega Race has two pairs of the state PROM output - * lines swapped before going into the decoder. - * Since all other avg/dvg games connect the PROM - * in a consistent way to the decoder, we swap the bits - * here. */ - for (i=0; i < 256; i++) - prom[i] = ((prom[i] & 0x3) << 2) | - ((prom[i] & 0xc) >> 2); - - VIDEO_START_CALL(dvg); -} - VIDEO_START( avg ) { vgc = &avg_default; diff --git a/src/mame/video/avgdvg.h b/src/mame/video/avgdvg.h index 2074f34e105..065c0cd28d1 100644 --- a/src/mame/video/avgdvg.h +++ b/src/mame/video/avgdvg.h @@ -17,7 +17,6 @@ void avg_set_flip_x(int flip); void avg_set_flip_y(int flip); VIDEO_START( dvg ); -VIDEO_START( dvg_omegrace ); VIDEO_START( avg ); VIDEO_START( avg_tempest ); VIDEO_START( avg_mhavoc ); |
