Previous 199869 Revisions Next

r36722 Saturday 28th March, 2015 at 00:12:44 UTC by hap
ssimon speed switch
[src/mess/drivers]hh_tms1k.c hh_ucom4.c
[src/mess/includes]hh_tms1k.h

trunk/src/mess/drivers/hh_tms1k.c
r245233r245234
10511051   // MCU clock is from an RC circuit(R=47K, C=33pf) oscillating by default at ~340kHz,
10521052   // but on PRO, the difficulty switch adds an extra 150K resistor to Vdd to speed
10531053   // it up to around ~440kHz.
1054   m_maincpu->set_unscaled_clock(m_inp_matrix[3]->read() & 1 ? 440000 : 340000);
1054   m_maincpu->set_unscaled_clock((m_inp_matrix[3]->read() & 1) ? 440000 : 340000);
10551055}
10561056
10571057INPUT_CHANGED_MEMBER(hh_tms1k_state::ebball3_difficulty_switch)
r245233r245234
15701570   PORT_BIT( 0x0d, IP_ACTIVE_HIGH, IPT_UNUSED )
15711571
15721572   PORT_START("IN.6") // fake
1573   PORT_CONFNAME( 0x03, 0x00, "Speed" ) //PORT_CHANGED_MEMBER(DEVICE_SELF, hh_tms1k_state, ssimon_speed_switch, NULL)
1573   PORT_CONFNAME( 0x03, 0x01, "Speed" ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_tms1k_state, ssimon_speed_switch, NULL)
15741574   PORT_CONFSETTING(    0x00, "Simple" )
15751575   PORT_CONFSETTING(    0x01, "Normal" )
15761576   PORT_CONFSETTING(    0x02, "Super" )
15771577INPUT_PORTS_END
15781578
15791579
1580void hh_tms1k_state::ssimon_set_clock()
1581{
1582   // MCU clock is from an RC circuit with C=100pf, R=x depending on speed switch:
1583   // 0 Simple: R=51K -> ~200kHz
1584   // 1 Normal: R=37K -> ~275kHz
1585   // 2 Super:  R=22K -> ~400kHz
1586   UINT8 inp = m_inp_matrix[6]->read();
1587   m_maincpu->set_unscaled_clock((inp & 2) ? 400000 : ((inp & 1) ? 275000 : 200000));
1588}
1589
1590INPUT_CHANGED_MEMBER(hh_tms1k_state::ssimon_speed_switch)
1591{
1592   ssimon_set_clock();
1593}
1594
1595MACHINE_RESET_MEMBER(hh_tms1k_state, ssimon)
1596{
1597   machine_reset();
1598   ssimon_set_clock();
1599}
1600
15801601static MACHINE_CONFIG_START( ssimon, hh_tms1k_state )
15811602
15821603   /* basic machine hardware */
1583   MCFG_CPU_ADD("maincpu", TMS1100, 350000) // x
1604   MCFG_CPU_ADD("maincpu", TMS1100, 275000) // see ssimon_set_clock
15841605   MCFG_TMS1XXX_READ_K_CB(READ8(hh_tms1k_state, ssimon_read_k))
15851606   MCFG_TMS1XXX_WRITE_R_CB(WRITE16(hh_tms1k_state, ssimon_write_r))
15861607   MCFG_TMS1XXX_WRITE_O_CB(WRITE16(hh_tms1k_state, ssimon_write_o))
r245233r245234
15881609   MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1))
15891610   MCFG_DEFAULT_LAYOUT(layout_ssimon)
15901611
1612   MCFG_MACHINE_RESET_OVERRIDE(hh_tms1k_state, ssimon)
1613
15911614   /* no video! */
15921615
15931616   /* sound hardware */
trunk/src/mess/drivers/hh_ucom4.c
r245233r245234
770770   // MCU clock is from an LC circuit oscillating by default at ~360kHz,
771771   // but on PRO1, the difficulty switch puts a capacitor across the LC circuit
772772   // to slow it down to ~260kHz.
773   m_maincpu->set_unscaled_clock(m_inp_matrix[1]->read() & 0x100 ? 260000 : 360000);
773   m_maincpu->set_unscaled_clock((m_inp_matrix[1]->read() & 0x100) ? 260000 : 360000);
774774}
775775
776776INPUT_CHANGED_MEMBER(hh_ucom4_state::tmtennis_difficulty_switch)
trunk/src/mess/includes/hh_tms1k.h
r245233r245234
112112   DECLARE_WRITE16_MEMBER(ssimon_write_r);
113113   DECLARE_WRITE16_MEMBER(ssimon_write_o);
114114   DECLARE_READ8_MEMBER(ssimon_read_k);
115   void ssimon_set_clock();
116   DECLARE_INPUT_CHANGED_MEMBER(ssimon_speed_switch);
117   DECLARE_MACHINE_RESET(ssimon);
115118
116119   DECLARE_WRITE16_MEMBER(cnsector_write_r);
117120   DECLARE_WRITE16_MEMBER(cnsector_write_o);


Previous 199869 Revisions Next


© 1997-2024 The MAME Team