From 03728b53785da13899d0d4317443248017f628e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Banaan=20Ananas?= Date: Wed, 27 Jul 2011 19:40:01 +0000 Subject: [PATCH] MT bug 4392 fix (regression in polepos memorymap) --- src/emu/sound/namco.c | 6 ++++++ src/emu/sound/namco.h | 1 + src/mame/drivers/polepos.c | 9 ++++----- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/emu/sound/namco.c b/src/emu/sound/namco.c index 48f0f049eac..baf66ed1042 100644 --- a/src/emu/sound/namco.c +++ b/src/emu/sound/namco.c @@ -555,6 +555,12 @@ void polepos_sound_enable(device_t *device, int enable) chip->sound_enable = enable; } +READ8_DEVICE_HANDLER( polepos_sound_r ) +{ + namco_sound *chip = get_safe_token(device); + return chip->soundregs[offset]; +} + WRITE8_DEVICE_HANDLER( polepos_sound_w ) { namco_sound *chip = get_safe_token(device); diff --git a/src/emu/sound/namco.h b/src/emu/sound/namco.h index 3bdcd24dec9..533abb06cc6 100644 --- a/src/emu/sound/namco.h +++ b/src/emu/sound/namco.h @@ -16,6 +16,7 @@ WRITE8_DEVICE_HANDLER( pacman_sound_enable_w ); WRITE8_DEVICE_HANDLER( pacman_sound_w ); void polepos_sound_enable(device_t *device, int enable); +READ8_DEVICE_HANDLER( polepos_sound_r ); WRITE8_DEVICE_HANDLER( polepos_sound_w ); void mappy_sound_enable(device_t *device, int enable); diff --git a/src/mame/drivers/polepos.c b/src/mame/drivers/polepos.c index 38d4de23c0b..bedaee9381b 100644 --- a/src/mame/drivers/polepos.c +++ b/src/mame/drivers/polepos.c @@ -493,15 +493,14 @@ static MACHINE_RESET( polepos ) static ADDRESS_MAP_START( z80_map, AS_PROGRAM, 8 ) AM_RANGE(0x0000, 0x2fff) AM_ROM - AM_RANGE(0x3000, 0x37ff) AM_MIRROR(0x0800) AM_RAM AM_SHARE("nvram") /* Battery Backup */ - AM_RANGE(0x4000, 0x47ff) AM_READWRITE(polepos_sprite_r, polepos_sprite_w) /* Motion Object */ + AM_RANGE(0x3000, 0x37ff) AM_MIRROR(0x0800) AM_RAM AM_SHARE("nvram") /* Battery Backup */ + AM_RANGE(0x4000, 0x47ff) AM_READWRITE(polepos_sprite_r, polepos_sprite_w) /* Motion Object */ AM_RANGE(0x4800, 0x4bff) AM_READWRITE(polepos_road_r, polepos_road_w) /* Road Memory */ AM_RANGE(0x4c00, 0x4fff) AM_READWRITE(polepos_alpha_r, polepos_alpha_w) /* Alphanumeric (char ram) */ AM_RANGE(0x5000, 0x57ff) AM_READWRITE(polepos_view_r, polepos_view_w) /* Background Memory */ - AM_RANGE(0x8000, 0x83ff) AM_MIRROR(0x0c00) AM_READONLY /* Sound Memory */ - AM_RANGE(0x8000, 0x83bf) AM_MIRROR(0x0c00) AM_WRITEONLY /* Sound Memory */ - AM_RANGE(0x83c0, 0x83ff) AM_MIRROR(0x0c00) AM_DEVWRITE("namco", polepos_sound_w) /* Sound data */ + AM_RANGE(0x8000, 0x83bf) AM_MIRROR(0x0c00) AM_RAM /* Sound Memory */ + AM_RANGE(0x83c0, 0x83ff) AM_MIRROR(0x0c00) AM_DEVREADWRITE("namco", polepos_sound_r, polepos_sound_w) /* Sound data */ AM_RANGE(0x9000, 0x9000) AM_MIRROR(0x0eff) AM_DEVREADWRITE("06xx", namco_06xx_data_r, namco_06xx_data_w) AM_RANGE(0x9100, 0x9100) AM_MIRROR(0x0eff) AM_DEVREADWRITE("06xx", namco_06xx_ctrl_r, namco_06xx_ctrl_w)