src/mame/audio/snes.c
| r5456 | r5457 | |
| 1241 | 1241 | { |
| 1242 | 1242 | switch( offset ) /* Offset is from 0x00f0 */ |
| 1243 | 1243 | { |
| 1244 | case 0x0: //FIXME: Super Bomberman PBW reads from there, is it really write-only? |
| 1245 | return 0; |
| 1244 | 1246 | case 0x1: |
| 1245 | 1247 | return 0; //Super Kick Boxing reads port 1 and wants it to be zero. |
| 1246 | 1248 | case 0x2: /* Register address */ |
| r5456 | r5457 | |
| 1253 | 1255 | case 0x7: /* Port 3 */ |
| 1254 | 1256 | // mame_printf_debug("SPC: rd %02x @ %d, PC=%x\n", spc_port_in[offset-4], offset-4, cpu_get_pc(space->cpu)); |
| 1255 | 1257 | return spc_port_in[offset - 4]; |
| 1258 | case 0x8: //normal RAM, can be read even if the ram disabled flag ($f0 bit 1) is active |
| 1259 | case 0x9: |
| 1260 | return spc_ram[0xf0 + offset]; |
| 1256 | 1261 | case 0xA: /* Timer 0 */ |
| 1257 | 1262 | case 0xB: /* Timer 1 */ |
| 1258 | 1263 | case 0xC: /* Timer 2 */ |
| r5456 | r5457 | |
| 1267 | 1272 | } |
| 1268 | 1273 | } |
| 1269 | 1274 | |
| 1270 | | return 0xff; |
| 1275 | return 0; |
| 1271 | 1276 | } |
| 1272 | 1277 | |
| 1273 | 1278 | WRITE8_HANDLER( spc_io_w ) |
| 1274 | 1279 | { |
| 1275 | 1280 | switch( offset ) /* Offset is from 0x00f0 */ |
| 1276 | 1281 | { |
| 1282 | case 0x0: |
| 1283 | printf("Warning: write to SOUND TEST register with data %02x!\n",data); |
| 1284 | break; |
| 1277 | 1285 | case 0x1: /* Control */ |
| 1278 | 1286 | if( data & 0x1 && !timers[0].enabled ) |
| 1279 | 1287 | { |