trunk/src/emu/cpu/tms7000/tms7000.c
| r31433 | r31434 | |
| 20 | 20 | * |
| 21 | 21 | * TODO: |
| 22 | 22 | * - dump CROM and emulate cpu at microinstruction level |
| 23 | | * - memory modes with IOCNT0, currently always running in full expansion mode |
| 23 | * - memory modes with IOCNT0, currently always running in faked full expansion mode |
| 24 | 24 | * - timer event counter mode (timer control register, bit 6) |
| 25 | 25 | * - TMS70x1/2 serial port and timer 3 |
| 26 | 26 | * - TMS70C46 DOCK-BUS comms with external pins |
| r31433 | r31434 | |
| 55 | 55 | const device_type TMS7002 = &device_creator<tms7002_device>; |
| 56 | 56 | const device_type TMS7042 = &device_creator<tms7042_device>; |
| 57 | 57 | |
| 58 | | // TMS70C46 is a TMS70C40, plus support for external memory bus, clock divider |
| 59 | | // on slow memory, and wake-up on keypress. |
| 58 | // TMS70C46 is literally a shell around a TMS70C40, with support for external |
| 59 | // memory bus, auto external clock divider on slow memory, and wake-up on keypress. |
| 60 | 60 | const device_type TMS70C46 = &device_creator<tms70c46_device>; |
| 61 | 61 | |
| 62 | 62 | // TMS70Cx2 is an update to TMS70x2 with some extra features. Due to some changes |
| r31433 | r31434 | |
| 333 | 333 | if (chip_is_family_70x2()) |
| 334 | 334 | write_p(0x10, 0x00); // IOCNT1 |
| 335 | 335 | |
| 336 | | write_mem16(0, m_pc); // previous PC |
| 337 | | m_sp = 0x01; |
| 338 | | m_pc = read_mem16(0xfffe); |
| 339 | | m_icount -= 17; |
| 336 | m_sp = 0xff; |
| 337 | m_op = 0xff; |
| 338 | execute_one(m_op); |
| 339 | m_icount -= 3; // 17 total |
| 340 | 340 | } |
| 341 | 341 | |
| 342 | 342 | |
| r31433 | r31434 | |
| 449 | 449 | // run automatic timer if source is internal |
| 450 | 450 | if ((m_timer_control[tmr] & 0xe0) == 0x80) |
| 451 | 451 | { |
| 452 | | attotime period = attotime::from_hz(clock()) * 16 * (m_timer_prescaler[tmr] + 1); // fOSC/16 |
| 452 | attotime period = attotime::from_hz(clock()) * 8 * (m_timer_prescaler[tmr] + 1); // fOSC/16 - fOSC is freq _before_ internal clockdivider |
| 453 | 453 | m_timer_handle[tmr]->adjust(period, tmr); |
| 454 | 454 | } |
| 455 | 455 | } |