src/mame/machine/snes.c
| r7727 | r7728 | |
| 842 | 842 | } |
| 843 | 843 | else |
| 844 | 844 | { |
| 845 | | logerror("snes_r_bank1: Unmapped external chip read: %04x\n", address); |
| 845 | logerror("(PC=%06x) snes_r_bank1: Unmapped external chip read: %04x\n",cpu_get_pc(space->cpu),address); |
| 846 | 846 | value = snes_open_bus_r(space, 0); /* Reserved */ |
| 847 | 847 | } |
| 848 | 848 | } |
| r7727 | r7728 | |
| 895 | 895 | } |
| 896 | 896 | else |
| 897 | 897 | { |
| 898 | | logerror( "snes_r_bank2: Unmapped external chip read: %04x\n", address ); |
| 898 | logerror( "(PC=%06x) snes_r_bank2: Unmapped external chip read: %04x\n",cpu_get_pc(space->cpu),address ); |
| 899 | 899 | value = snes_open_bus_r(space, 0); |
| 900 | 900 | } |
| 901 | 901 | } |
| r7727 | r7728 | |
| 977 | 977 | value = (address >= 0x4000) ? dsp1_get_sr() : dsp1_get_dr(); |
| 978 | 978 | else |
| 979 | 979 | { |
| 980 | | logerror("snes_r_bank4: Unmapped external chip read: %04x\n", address); |
| 980 | logerror("(PC=%06x) snes_r_bank4: Unmapped external chip read: %04x\n",cpu_get_pc(space->cpu),address); |
| 981 | 981 | value = snes_open_bus_r(space, 0); /* Reserved */ |
| 982 | 982 | } |
| 983 | 983 | } |
| r7727 | r7728 | |
| 1010 | 1010 | } |
| 1011 | 1011 | else |
| 1012 | 1012 | { |
| 1013 | | logerror("snes_r_bank5: Unmapped external chip read: %04x\n", address); |
| 1013 | logerror("(PC=%06x) snes_r_bank5: Unmapped external chip read: %04x\n",cpu_get_pc(space->cpu),address); |
| 1014 | 1014 | value = snes_open_bus_r(space, 0); /* Reserved */ |
| 1015 | 1015 | } |
| 1016 | 1016 | } |
| r7727 | r7728 | |
| 1046 | 1046 | } |
| 1047 | 1047 | else /* Area 0x6000-0x8000 with offset < 0x300000 is reserved */ |
| 1048 | 1048 | { |
| 1049 | | logerror("snes_r_bank6: Unmapped external chip read: %04x\n", address); |
| 1049 | logerror("(PC=%06x) snes_r_bank6: Unmapped external chip read: %04x\n",cpu_get_pc(space->cpu),address); |
| 1050 | 1050 | value = snes_open_bus_r(space, 0); |
| 1051 | 1051 | } |
| 1052 | 1052 | } |
| r7727 | r7728 | |
| 1155 | 1155 | else if ((snes_has_addon_chip == HAS_DSP3) && (offset >= 0x200000)) |
| 1156 | 1156 | dsp3_write(address, data); |
| 1157 | 1157 | else |
| 1158 | | logerror( "Attempt to write to ROM address: %X\n", offset ); |
| 1158 | logerror( "(PC=%06x) Attempt to write to ROM address: %X\n",cpu_get_pc(space->cpu),offset ); |
| 1159 | 1159 | } |
| 1160 | 1160 | |
| 1161 | 1161 | /* 0x300000 - 0x3fffff */ |
| r7727 | r7728 | |
| 1204 | 1204 | else if ((snes_has_addon_chip == HAS_DSP4) && (address < 0xc000)) |
| 1205 | 1205 | dsp4_write(data); |
| 1206 | 1206 | else |
| 1207 | | logerror("Attempt to write to ROM address: %X\n", offset + 0x300000); |
| 1207 | logerror("(PC=%06x) Attempt to write to ROM address: %X\n",cpu_get_pc(space->cpu),offset + 0x300000); |
| 1208 | 1208 | } |
| 1209 | 1209 | |
| 1210 | 1210 | /* 0x600000 - 0x6fffff */ |
| r7727 | r7728 | |
| 1219 | 1219 | else if (snes_cart.mode & 5) /* Mode 20 & 22 */ |
| 1220 | 1220 | { |
| 1221 | 1221 | if (address >= 0x8000) |
| 1222 | | logerror("Attempt to write to ROM address: %X\n", offset + 0x600000); |
| 1222 | logerror("(PC=%06x) Attempt to write to ROM address: %X\n",cpu_get_pc(space->cpu),offset + 0x600000); |
| 1223 | 1223 | else if (snes_has_addon_chip == HAS_DSP1) |
| 1224 | 1224 | dsp1_set_dr(data); |
| 1225 | 1225 | else |
| 1226 | 1226 | logerror("snes_w_bank4: Attempt to write to reserved address: %X = %02x\n", offset + 0x600000, data); |
| 1227 | 1227 | } |
| 1228 | 1228 | else if (snes_cart.mode & 0x0a) |
| 1229 | | logerror("Attempt to write to ROM address: %X\n", offset + 0x600000); |
| 1229 | logerror("(PC=%06x) Attempt to write to ROM address: %X\n",cpu_get_pc(space->cpu),offset + 0x600000); |
| 1230 | 1230 | } |
| 1231 | 1231 | |
| 1232 | 1232 | /* 0x700000 - 0x7dffff */ |
| r7727 | r7728 | |
| 1247 | 1247 | logerror("snes_w_bank5: Attempt to write to reserved address: %X = %02x\n", offset + 0x700000, data); |
| 1248 | 1248 | } |
| 1249 | 1249 | else if (snes_cart.mode & 0x0a) |
| 1250 | | logerror("Attempt to write to ROM address: %X\n", offset + 0x700000); |
| 1250 | logerror("(PC=%06x) Attempt to write to ROM address: %X\n",cpu_get_pc(space->cpu),offset + 0x700000); |
| 1251 | 1251 | } |
| 1252 | 1252 | |
| 1253 | 1253 | |
| r7727 | r7728 | |
| 1292 | 1292 | else if ((snes_has_addon_chip == HAS_DSP4) && (offset >= 0x300000) && (address < 0xc000)) |
| 1293 | 1293 | dsp4_write(data); |
| 1294 | 1294 | else |
| 1295 | | logerror("Attempt to write to ROM address: %X\n", offset + 0x800000); |
| 1295 | logerror("(PC=%06x) Attempt to write to ROM address: %X\n",cpu_get_pc(space->cpu),offset + 0x800000); |
| 1296 | 1296 | } |
| 1297 | 1297 | |
| 1298 | 1298 | |
| r7727 | r7728 | |
| 1309 | 1309 | snes_ram[0xe00000 + offset] = data; // SFX RAM |
| 1310 | 1310 | } |
| 1311 | 1311 | else |
| 1312 | | logerror("Attempt to write to ROM address: %X\n", offset + 0xc00000); |
| 1312 | logerror("(PC=%06x) Attempt to write to ROM address: %X\n",cpu_get_pc(space->cpu),offset + 0xc00000); |
| 1313 | 1313 | } |
| 1314 | 1314 | else if (snes_has_addon_chip == HAS_ST010 && offset >= 0x280000 && offset < 0x300000 && address < 0x1000) |
| 1315 | 1315 | st010_write(address, data); |
| r7727 | r7728 | |
| 1325 | 1325 | snes_w_bank4(space, offset - 0x200000, data); |
| 1326 | 1326 | } |
| 1327 | 1327 | else |
| 1328 | | logerror("snes_w_bank7: Attempt to write to ROM address: %X = %02x\n", offset + 0xc00000, data); |
| 1328 | logerror("(PC=%06x) snes_w_bank7: Attempt to write to ROM address: %X = %02x\n",cpu_get_pc(space->cpu),offset + 0xc00000, data); |
| 1329 | 1329 | } |
| 1330 | 1330 | else if (snes_cart.mode & 0x0a) |
| 1331 | | logerror("Attempt to write to ROM address: %X\n", offset + 0xc00000); |
| 1331 | logerror("(PC=%06x) Attempt to write to ROM address: %X\n",cpu_get_pc(space->cpu),offset + 0xc00000); |
| 1332 | 1332 | } |
| 1333 | 1333 | |
| 1334 | 1334 | |