Previous 199869 Revisions Next

r23883 Sunday 23rd June, 2013 at 16:11:37 UTC by Fabio Priuli
(MESS) sns_sa1: properly masking BWRAM accesses fixes Super Mario RPG... my bad for not spotting the mistake before. nw.
[src/mess/machine]sns_sa1.c

trunk/src/mess/machine/sns_sa1.c
r23882r23883
203203      return read_h(space, (offset & 0x7fffff));
204204
205205   if ((offset & 0x40e000) == 0x006000)  //$00-3f|80-bf:6000-7fff
206      return read_bwram(offset);
206      return read_bwram(offset & 0x1fff);
207207
208208   if ((offset & 0xf00000) == 0x400000)  //$40-4f:0000-ffff
209      return read_bwram(offset);
209      return read_bwram(offset & 0xfffff);
210210
211211   if ((offset & 0x40f800) == 0x000000)  //$00-3f|80-bf:0000-07ff
212212      return read_iram(offset);
r23882r23883
841841      return read_bwram((m_bwram_snes * 0x2000) + (offset & 0x1fff)); // SA-1 BWRAM
842842
843843   if (offset >= 0x400000 && offset < 0x500000)
844      return read_bwram(offset);  // SA-1 BWRAM again (but not called for the [c0-cf] range, because it's not mirrored)
844      return read_bwram(offset & 0xfffff);  // SA-1 BWRAM again (but not called for the [c0-cf] range, because it's not mirrored)
845845
846846   return 0xff;
847847}
r23882r23883
861861      write_bwram((m_bwram_snes * 0x2000) + (offset & 0x1fff), data); // SA-1 BWRAM
862862
863863   if (offset >= 0x400000 && offset < 0x500000)
864      write_bwram(offset, data);  // SA-1 BWRAM again (but not called for the [c0-cf] range, because it's not mirrored)
864      write_bwram(offset & 0xfffff, data);  // SA-1 BWRAM again (but not called for the [c0-cf] range, because it's not mirrored)
865865}
866866
867867
r23882r23883
946946      return 0xff;    // maybe open bus? same as the main system one or diff? (currently not accessible from carts anyway...)
947947   }
948948   else if (offset < 0x500000)
949      return read_bwram(offset);      // SA-1 BWRAM (not mirrored above!)
949      return read_bwram(offset & 0xfffff);      // SA-1 BWRAM (not mirrored above!)
950950   else if (offset >= 0x600000 && offset < 0x700000)
951951      return read_bwram((offset & 0xfffff) + 0x100000);       // SA-1 BWRAM Bitmap mode
952952   else

Previous 199869 Revisions Next


© 1997-2024 The MAME Team