From 85147183e9daff174038b3d49b53c69ce87a1709 Mon Sep 17 00:00:00 2001 From: Fabio Priuli Date: Sun, 30 Mar 2014 13:30:20 +0000 Subject: [PATCH] (MESS) nes.c: fixed prgram access out-of-bounds for one of the bootleg boards. nw. --- src/emu/bus/nes/bootleg.c | 4 ++-- src/emu/bus/nes/nes_carts.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/emu/bus/nes/bootleg.c b/src/emu/bus/nes/bootleg.c index bdbd7d1b545..88933a9bba5 100644 --- a/src/emu/bus/nes/bootleg.c +++ b/src/emu/bus/nes/bootleg.c @@ -1538,7 +1538,7 @@ READ8_MEMBER(nes_mmalee_device::read_m) if (offset < 0x0800) return m_prg[0x8000 + offset]; else if (m_prgram && offset >= 0x1000 && offset < 0x1800) // WRAM only in these 2K - return m_prgram[offset]; + return m_prgram[offset & 0x800]; return ((offset + 0x6000) & 0xff00) >> 8; } @@ -1548,7 +1548,7 @@ WRITE8_MEMBER(nes_mmalee_device::write_m) LOG_MMC(("mmalee write_m, offset: %04x, data: %02x\n", offset, data)); if (m_prgram && offset >= 0x1000 && offset < 0x1800) // WRAM only in these 2K - m_prgram[offset] = data; + m_prgram[offset & 0x800] = data; } /*------------------------------------------------- diff --git a/src/emu/bus/nes/nes_carts.c b/src/emu/bus/nes/nes_carts.c index 30ccbc457bd..047683d4103 100644 --- a/src/emu/bus/nes/nes_carts.c +++ b/src/emu/bus/nes/nes_carts.c @@ -336,6 +336,8 @@ SLOT_INTERFACE_START(nes_cart) SLOT_INTERFACE_INTERNAL("ninjaryu", NES_NROM) // mapper 111 - UNSUPPORTED SLOT_INTERFACE_INTERNAL("unl_dance", NES_NROM) // UNSUPPORTED SLOT_INTERFACE_INTERNAL("onebus", NES_NROM) // UNSUPPORTED + SLOT_INTERFACE_INTERNAL("dance2k", NES_NROM) // UNSUPPORTED + SLOT_INTERFACE_INTERNAL("pec586", NES_NROM) // UNSUPPORTED // are there dumps of games with these boards? SLOT_INTERFACE_INTERNAL("bmc_hik_kof", NES_NROM) // mapper 251 - UNSUPPORTED SLOT_INTERFACE_INTERNAL("bmc_13in1jy110", NES_NROM) // [mentioned in FCEUMM source - we need more info] - UNSUPPORTED @@ -343,7 +345,6 @@ SLOT_INTERFACE_START(nes_cart) SLOT_INTERFACE_INTERNAL("konami_qtai", NES_NROM) // [mentioned in FCEUMM source - we need more info] - UNSUPPORTED SLOT_INTERFACE_INTERNAL("unl_3d_block", NES_NROM) // [mentioned in FCEUMM source - we need more info] - UNSUPPORTED SLOT_INTERFACE_INTERNAL("unl_c_n22m", NES_NROM) // [mentioned in FCEUMM source - we need more info] - UNSUPPORTED - SLOT_INTERFACE_INTERNAL("unl_pec_586", NES_NROM) // [mentioned in FCEUMM source - we need more info] - UNSUPPORTED SLOT_INTERFACE_INTERNAL("a9746", NES_NROM) // mapper 219 - UNSUPPORTED (no dump available) // legacy boards for FFE copier mappers (are there images available to fix/improve emulation?) SLOT_INTERFACE_INTERNAL("ffe3", NES_FFE3)