Previous 15994 Revisions Next

r13263 Tuesday 15th November, 2011 at 13:52:59 UTC by Fabio Priuli
snes: fixed another SRAM issue (Secret of Mana was affected, but probably other games too) [Fabio Priuli]

out of whatsnew, many thanks to Shoegazer for reporting this bug and for the periodic reminders about it. it would have stayed unsolved for longer without you :)
[src/mame/machine]snes.c

src/mame/machine/snes.c
r13262r13263
10501050      }
10511051      else if ((state->m_cart[0].mode == SNES_MODE_21) && (state->m_cart[0].sram > 0))
10521052      {
1053         /* Donkey Kong Country checks this */
1054         int mask = state->m_cart[0].sram - 1; /* Limit SRAM size to what's actually present */
1053         /* Donkey Kong Country checks this and detects a copier if 0x800 is not masked out due to sram size */
1054         /* OTOH Secret of Mana does not work properly if sram is not mirrored on later banks */
1055         int mask = (state->m_cart[0].sram - 1) | 0xffe000; /* Limit SRAM size to what's actually present */
10551056         value = snes_ram[0x300000 + (offset & mask)];
10561057      }
10571058      else
r13262r13263
14111412      }
14121413      else if ((state->m_cart[0].mode == SNES_MODE_21) && (state->m_cart[0].sram > 0))
14131414      {
1414         /* Donkey Kong Country checks this */
1415         int mask = state->m_cart[0].sram - 1; /* Limit SRAM size to what's actually present */
1415         /* Donkey Kong Country checks this and detects a copier if 0x800 is not masked out due to sram size */
1416         /* OTOH Secret of Mana does not work properly if sram is not mirrored on later banks */
1417         int mask = (state->m_cart[0].sram - 1) | 0xffe000; /* Limit SRAM size to what's actually present */
14161418         snes_ram[0x300000 + (offset & mask)] = data;
14171419      }
14181420      else

Previous 15994 Revisions Next


© 1998-2018 The MESS Team