trunk/src/mess/machine/sns_sa1.c
| r23882 | r23883 | |
| 203 | 203 | return read_h(space, (offset & 0x7fffff)); |
| 204 | 204 | |
| 205 | 205 | if ((offset & 0x40e000) == 0x006000) //$00-3f|80-bf:6000-7fff |
| 206 | | return read_bwram(offset); |
| 206 | return read_bwram(offset & 0x1fff); |
| 207 | 207 | |
| 208 | 208 | if ((offset & 0xf00000) == 0x400000) //$40-4f:0000-ffff |
| 209 | | return read_bwram(offset); |
| 209 | return read_bwram(offset & 0xfffff); |
| 210 | 210 | |
| 211 | 211 | if ((offset & 0x40f800) == 0x000000) //$00-3f|80-bf:0000-07ff |
| 212 | 212 | return read_iram(offset); |
| r23882 | r23883 | |
| 841 | 841 | return read_bwram((m_bwram_snes * 0x2000) + (offset & 0x1fff)); // SA-1 BWRAM |
| 842 | 842 | |
| 843 | 843 | 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) |
| 845 | 845 | |
| 846 | 846 | return 0xff; |
| 847 | 847 | } |
| r23882 | r23883 | |
| 861 | 861 | write_bwram((m_bwram_snes * 0x2000) + (offset & 0x1fff), data); // SA-1 BWRAM |
| 862 | 862 | |
| 863 | 863 | 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) |
| 865 | 865 | } |
| 866 | 866 | |
| 867 | 867 | |
| r23882 | r23883 | |
| 946 | 946 | return 0xff; // maybe open bus? same as the main system one or diff? (currently not accessible from carts anyway...) |
| 947 | 947 | } |
| 948 | 948 | 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!) |
| 950 | 950 | else if (offset >= 0x600000 && offset < 0x700000) |
| 951 | 951 | return read_bwram((offset & 0xfffff) + 0x100000); // SA-1 BWRAM Bitmap mode |
| 952 | 952 | else |