From 9069e83f96f31e8b0411ee097945e3c60f13fda4 Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Wed, 14 Oct 2015 17:31:35 +0200 Subject: [PATCH] galaxian.c (froggermc): fixed MT00100 (nw) sound doesn't cut off anymore after starting a game, but it surely isn't perfect. Should be checked against 0.37b15 if there's another regression or if it was this way even then. --- src/mame/drivers/galaxian.c | 15 +++++++++++++-- src/mame/includes/galaxian.h | 1 + 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/mame/drivers/galaxian.c b/src/mame/drivers/galaxian.c index a09600ab86f..6d5b90c81ff 100644 --- a/src/mame/drivers/galaxian.c +++ b/src/mame/drivers/galaxian.c @@ -5758,7 +5758,18 @@ void galaxian_state::decode_frogger_sound() UINT32 offs; /* the first ROM of the sound CPU has data lines D0 and D1 swapped */ - for (offs = 0; offs < 0x0800; offs++) + for (offs = 0; offs < 0x800; offs++) + rombase[offs] = BITSWAP8(rombase[offs], 7,6,5,4,3,2,0,1); +} + +// froggrmc has a bigger first ROM of the sound CPU, thus a different decode +void galaxian_state::decode_froggermc_sound() +{ + UINT8 *rombase = memregion("audiocpu")->base(); + UINT32 offs; + + /* the first ROM of the sound CPU has data lines D0 and D1 swapped */ + for (offs = 0; offs < 0x1000; offs++) rombase[offs] = BITSWAP8(rombase[offs], 7,6,5,4,3,2,0,1); } @@ -6592,7 +6603,7 @@ DRIVER_INIT_MEMBER(galaxian_state,froggrmc) space.install_ram(0x8000, 0x87ff); /* decrypt */ - decode_frogger_sound(); + decode_froggermc_sound(); } diff --git a/src/mame/includes/galaxian.h b/src/mame/includes/galaxian.h index 01d55cdea11..7482ae87c1b 100644 --- a/src/mame/includes/galaxian.h +++ b/src/mame/includes/galaxian.h @@ -313,6 +313,7 @@ public: void decode_checkman(); void decode_dingoe(); void decode_frogger_sound(); + void decode_froggermc_sound(); void decode_frogger_gfx(); void decode_anteater_gfx(); void decode_losttomb_gfx();