trunk/src/emu/cpu/tms7000/tms7000.c
| r31336 | r31337 | |
| 23 | 23 | * - memory modes with IOCNT0, currently ignored |
| 24 | 24 | * - timer event counter mode (timer control register, bit 6) |
| 25 | 25 | * - TMS70x1/2 serial port and timer 3 |
| 26 | | * - TMS70C46 is same as TMS70C40, except with support for memory mapped I/O? |
| 27 | 26 | * - when they're needed, add TMS70Cx2, TMS7742, TMS77C82, SE70xxx |
| 28 | 27 | * |
| 29 | 28 | *****************************************************************************/ |
| r31336 | r31337 | |
| 31 | 30 | #include "debugger.h" |
| 32 | 31 | #include "tms7000.h" |
| 33 | 32 | |
| 33 | // 7000 is the most basic one, 128 bytes internal RAM and no internal ROM. |
| 34 | // 7020 and 7040 are same, but with 2KB and 4KB internal ROM respectively. |
| 35 | const device_type TMS7000 = &device_creator<tms7000_device>; |
| 36 | const device_type TMS7020 = &device_creator<tms7020_device>; |
| 37 | const device_type TMS7040 = &device_creator<tms7040_device>; |
| 34 | 38 | |
| 39 | // Exelvision (spinoff of TI) 7020 added one custom opcode. |
| 40 | const device_type TMS7020_EXL = &device_creator<tms7020_exl_device>; |
| 41 | |
| 42 | // CMOS devices biggest difference in a 'real world' setting is that the power |
| 43 | // requirements are much lower. This obviously has no use in software emulation. |
| 44 | const device_type TMS70C00 = &device_creator<tms70c00_device>; |
| 45 | const device_type TMS70C20 = &device_creator<tms70c20_device>; |
| 46 | const device_type TMS70C40 = &device_creator<tms70c40_device>; |
| 47 | |
| 48 | // 70C46 is same as 70C40, except with support for memory mapped I/O? |
| 49 | const device_type TMS70C46 = &device_creator<tms70c46_device>; |
| 50 | |
| 51 | // 70x1 features more peripheral I/O, the main addition being a serial port. |
| 52 | // 70x2 is the same, just with twice more RAM (256 bytes) |
| 53 | const device_type TMS7001 = &device_creator<tms7001_device>; |
| 54 | const device_type TMS7041 = &device_creator<tms7041_device>; |
| 55 | const device_type TMS7002 = &device_creator<tms7002_device>; |
| 56 | const device_type TMS7042 = &device_creator<tms7042_device>; |
| 57 | |
| 58 | |
| 35 | 59 | // flag helpers |
| 36 | 60 | #define SR_C 0x80 /* Carry */ |
| 37 | 61 | #define SR_N 0x40 /* Negative */ |
| r31336 | r31337 | |
| 44 | 68 | #define SET_CNZ(x) m_sr = (m_sr & 0x1f) | ((x) >> 1 & 0xc0) | (((x) & 0xff) ? 0 : 0x20) |
| 45 | 69 | |
| 46 | 70 | |
| 47 | | const device_type TMS7000 = &device_creator<tms7000_device>; |
| 48 | | const device_type TMS7020 = &device_creator<tms7020_device>; |
| 49 | | const device_type TMS7020_EXL = &device_creator<tms7020_exl_device>; |
| 50 | | const device_type TMS7040 = &device_creator<tms7040_device>; |
| 51 | | const device_type TMS70C00 = &device_creator<tms70c00_device>; |
| 52 | | const device_type TMS70C20 = &device_creator<tms70c20_device>; |
| 53 | | const device_type TMS70C40 = &device_creator<tms70c40_device>; |
| 54 | | const device_type TMS70C46 = &device_creator<tms70c46_device>; |
| 55 | | const device_type TMS7001 = &device_creator<tms7001_device>; |
| 56 | | const device_type TMS7041 = &device_creator<tms7041_device>; |
| 57 | | const device_type TMS7002 = &device_creator<tms7002_device>; |
| 58 | | const device_type TMS7042 = &device_creator<tms7042_device>; |
| 59 | | |
| 60 | | |
| 61 | 71 | // internal memory maps |
| 62 | 72 | static ADDRESS_MAP_START(tms7000_io, AS_IO, 8, tms7000_device) |
| 63 | 73 | AM_RANGE(TMS7000_PORTB, TMS7000_PORTB) AM_READNOP |