Previous 15994 Revisions Next

r7794 Monday 12th April, 2010 at 13:45:08 UTC by Angelo Salese
[SNES]: fixed a write bug with srams, fixes Fushigi no Dungeon 2 saving
[src/mame/machine]snes.c

src/mame/machine/snes.c
r7793r7794
13041304      }
13051305      else if ((snes_cart.mode == SNES_MODE_21) && (snes_cart.sram > 0))
13061306      {
1307         int mask = (snes_cart.sram - 1);         /* Limit SRAM size to what's actually present */
1308         offset -= 0x6000;
1309         snes_ram[0x306000 + (offset & mask)] = data;
1307         snes_ram[0x300000 + offset] = data;
13101308      }
13111309      else
13121310         logerror("snes_w_bank2: Attempt to write to reserved address: %X = %02x\n", offset + 0x300000, data);
r7793r7794
14011399            memory_write_byte(space, offset, data);
14021400         else if ((offset >= 0x300000) && (snes_cart.sram > 0))
14031401         {
1404            int mask = (snes_cart.sram - 1);         /* Limit SRAM size to what's actually present */
1405            offset -= 0x6000;
1406            snes_ram[0xb06000 + (offset & mask)] = data;
1402            snes_ram[0xb00000 + offset] = data;
14071403         }
14081404         else   /* Area in 0x6000-0x8000 && offset < 0x300000 is Reserved! */
14091405            logerror("snes_w_bank6: Attempt to write to reserved address: %X = %02x\n", offset + 0x800000, data);

Previous 15994 Revisions Next


© 1998-2018 The MESS Team