Previous 199869 Revisions Next

r36244 Wednesday 4th March, 2015 at 18:10:36 UTC by Osso
mpu4hw.c: reduced tagmap lookups (nw)

C:\mame>mame64d0159 m4twintm -str 2 -w
533317 tagmap lookups

C:\mame>mame64d m4twintm -str 2 -w
6464 tagmap lookups
[src/mame/drivers]mpu4hw.c

trunk/src/mame/drivers/mpu4hw.c
r244755r244756
13881388*/
13891389
13901390//O3 -> G1  O1 -> c2 o2 -> c1
1391WRITE8_MEMBER(mpu4_state::ic3ss_o1_callback)
1392{
1393   device_t * device = machine().device("ptm_ic3ss");
1394   downcast<ptm6840_device *>(device)->set_c2(data);
1395}
13961391
1397
1398WRITE8_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
1405WRITE8_MEMBER(mpu4_state::ic3ss_o3_callback)
1406{
1407   //downcast<ptm6840_device *>(device)->set_g1(data); /* this output is the clock for timer1 */
1408}
1409
14101392/* This is a bit of a cheat - since we don't clock into the OKI chip directly, we need to
14111393calculate the oscillation frequency in advance. We're running the timer for interrupt
14121394purposes, but the frequency calculation is done by plucking the values out as they are written.*/
r244755r244756
26612643   MCFG_DEVICE_ADD("ptm_ic3ss", PTM6840, 0)
26622644   MCFG_PTM6840_INTERNAL_CLOCK(MPU4_MASTER_CLOCK / 4)
26632645   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))
26672649   //MCFG_PTM6840_IRQ_CB(WRITELINE(mpu4_state, cpu1_ptm_irq))
26682650
26692651   MCFG_DEVICE_ADD("pia_ic4ss", PIA6821, 0)


Previous 199869 Revisions Next


© 1997-2024 The MAME Team