trunk/src/mame/drivers/mpu4hw.c
r244755 | r244756 | |
1388 | 1388 | */ |
1389 | 1389 | |
1390 | 1390 | //O3 -> G1 O1 -> c2 o2 -> c1 |
1391 | | WRITE8_MEMBER(mpu4_state::ic3ss_o1_callback) |
1392 | | { |
1393 | | device_t * device = machine().device("ptm_ic3ss"); |
1394 | | downcast<ptm6840_device *>(device)->set_c2(data); |
1395 | | } |
1396 | 1391 | |
1397 | | |
1398 | | WRITE8_MEMBER(mpu4_state::ic3ss_o2_callback)//Generates 'beep' tone |
1399 | | { |
1400 | | device_t * device = machine().device("ptm_ic3ss"); |
1401 | | downcast<ptm6840_device *>(device)->set_c1(data);//? |
1402 | | } |
1403 | | |
1404 | | |
1405 | | WRITE8_MEMBER(mpu4_state::ic3ss_o3_callback) |
1406 | | { |
1407 | | //downcast<ptm6840_device *>(device)->set_g1(data); /* this output is the clock for timer1 */ |
1408 | | } |
1409 | | |
1410 | 1392 | /* This is a bit of a cheat - since we don't clock into the OKI chip directly, we need to |
1411 | 1393 | calculate the oscillation frequency in advance. We're running the timer for interrupt |
1412 | 1394 | purposes, but the frequency calculation is done by plucking the values out as they are written.*/ |
r244755 | r244756 | |
2661 | 2643 | MCFG_DEVICE_ADD("ptm_ic3ss", PTM6840, 0) |
2662 | 2644 | MCFG_PTM6840_INTERNAL_CLOCK(MPU4_MASTER_CLOCK / 4) |
2663 | 2645 | MCFG_PTM6840_EXTERNAL_CLOCKS(0, 0, 0) |
2664 | | MCFG_PTM6840_OUT0_CB(WRITE8(mpu4_state, ic3ss_o1_callback)) |
2665 | | MCFG_PTM6840_OUT1_CB(WRITE8(mpu4_state, ic3ss_o2_callback)) |
2666 | | MCFG_PTM6840_OUT2_CB(WRITE8(mpu4_state, ic3ss_o3_callback)) |
| 2646 | MCFG_PTM6840_OUT0_CB(DEVWRITELINE("ptm_ic3ss", ptm6840_device, set_c2)) |
| 2647 | MCFG_PTM6840_OUT1_CB(DEVWRITELINE("ptm_ic3ss", ptm6840_device, set_c1)) |
| 2648 | //MCFG_PTM6840_OUT2_CB(DEVWRITELINE("ptm_ic3ss", ptm6840_device, set_g1)) |
2667 | 2649 | //MCFG_PTM6840_IRQ_CB(WRITELINE(mpu4_state, cpu1_ptm_irq)) |
2668 | 2650 | |
2669 | 2651 | MCFG_DEVICE_ADD("pia_ic4ss", PIA6821, 0) |