trunk/src/emu/cpu/t11/t11.c
| r249060 | r249061 | |
| 36 | 36 | |
| 37 | 37 | |
| 38 | 38 | const device_type T11 = &device_creator<t11_device>; |
| 39 | const device_type K1801VM2 = &device_creator<k1801vm2_device>; |
| 39 | 40 | |
| 40 | 41 | |
| 42 | k1801vm2_device::k1801vm2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 43 | : t11_device(mconfig, K1801VM2, "K1801VM2", tag, owner, clock, "k1801vm2", __FILE__) |
| 44 | { |
| 45 | } |
| 46 | |
| 47 | t11_device::t11_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) |
| 48 | : cpu_device(mconfig, type, name, tag, owner, clock, shortname, source) |
| 49 | , m_program_config("program", ENDIANNESS_LITTLE, 16, 16, 0) |
| 50 | , c_initial_mode(0) |
| 51 | { |
| 52 | m_is_octal = true; |
| 53 | memset(m_reg, 0x00, sizeof(m_reg)); |
| 54 | memset(&m_psw, 0x00, sizeof(m_psw)); |
| 55 | } |
| 56 | |
| 41 | 57 | t11_device::t11_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 42 | 58 | : cpu_device(mconfig, T11, "T11", tag, owner, clock, "t11", __FILE__) |
| 43 | 59 | , m_program_config("program", ENDIANNESS_LITTLE, 16, 16, 0) |
| r249060 | r249061 | |
| 294 | 310 | } |
| 295 | 311 | } |
| 296 | 312 | |
| 313 | void k1801vm2_device::state_string_export(const device_state_entry &entry, std::string &str) |
| 314 | { |
| 315 | switch (entry.index()) |
| 316 | { |
| 317 | case STATE_GENFLAGS: |
| 318 | strprintf(str, "%c%c%c%c%c%c%c%c%c", |
| 319 | m_psw.b.l & 0x100 ? 'H':'.', |
| 320 | m_psw.b.l & 0x80 ? 'P':'.', |
| 321 | m_psw.b.l & 0x40 ? '?':'.', |
| 322 | m_psw.b.l & 0x20 ? '?':'.', |
| 323 | m_psw.b.l & 0x10 ? 'T':'.', |
| 324 | m_psw.b.l & 0x08 ? 'N':'.', |
| 325 | m_psw.b.l & 0x04 ? 'Z':'.', |
| 326 | m_psw.b.l & 0x02 ? 'V':'.', |
| 327 | m_psw.b.l & 0x01 ? 'C':'.' |
| 328 | ); |
| 329 | break; |
| 330 | } |
| 331 | } |
| 297 | 332 | |
| 333 | |
| 298 | 334 | /************************************* |
| 299 | 335 | * |
| 300 | 336 | * CPU reset |
| r249060 | r249061 | |
| 326 | 362 | m_wait_state = 0; |
| 327 | 363 | } |
| 328 | 364 | |
| 365 | void k1801vm2_device::device_reset() |
| 366 | { |
| 367 | t11_device::device_reset(); |
| 368 | |
| 369 | PC = RWORD(c_initial_mode); |
| 370 | PSW = RWORD(c_initial_mode+2); |
| 371 | } |
| 329 | 372 | |
| 330 | 373 | |
| 331 | 374 | /************************************* |
trunk/src/emu/cpu/t11/t11.h
| r249060 | r249061 | |
| 37 | 37 | public: |
| 38 | 38 | // construction/destruction |
| 39 | 39 | t11_device(const machine_config &mconfig, const char *_tag, device_t *_owner, UINT32 _clock); |
| 40 | t11_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); |
| 40 | 41 | |
| 41 | 42 | // static configuration helpers |
| 42 | 43 | static void set_initial_mode(device_t &device, const UINT16 mode) { downcast<t11_device &>(device).c_initial_mode = mode; } |
| r249060 | r249061 | |
| 1133 | 1134 | void sub_ixd_ixd(UINT16 op); |
| 1134 | 1135 | }; |
| 1135 | 1136 | |
| 1137 | class k1801vm2_device : public t11_device |
| 1138 | { |
| 1139 | public: |
| 1140 | // construction/destruction |
| 1141 | k1801vm2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 1136 | 1142 | |
| 1143 | protected: |
| 1144 | // device-level overrides |
| 1145 | virtual void device_reset(); |
| 1146 | |
| 1147 | // device_state_interface overrides |
| 1148 | void state_string_export(const device_state_entry &entry, std::string &str); |
| 1149 | }; |
| 1150 | |
| 1151 | |
| 1137 | 1152 | extern const device_type T11; |
| 1153 | extern const device_type K1801VM2; |
| 1138 | 1154 | |
| 1139 | 1155 | |
| 1140 | 1156 | #endif /* __T11_H__ */ |
trunk/src/mess/drivers/uknc.c
| r249060 | r249061 | |
| 58 | 58 | |
| 59 | 59 | static MACHINE_CONFIG_START( uknc, uknc_state ) |
| 60 | 60 | /* basic machine hardware */ |
| 61 | | MCFG_CPU_ADD("maincpu", T11, 8000000) |
| 62 | | MCFG_T11_INITIAL_MODE(0x36ff) /* initial mode word has DAL15,14,11,8 pulled low */ |
| 61 | MCFG_CPU_ADD("maincpu", K1801VM2, 8000000) |
| 62 | MCFG_T11_INITIAL_MODE(0x8000) |
| 63 | 63 | MCFG_CPU_PROGRAM_MAP(uknc_mem) |
| 64 | 64 | |
| 65 | | MCFG_CPU_ADD("subcpu", T11, 6000000) |
| 66 | | MCFG_T11_INITIAL_MODE(0x36ff) /* initial mode word has DAL15,14,11,8 pulled low */ |
| 65 | MCFG_CPU_ADD("subcpu", K1801VM2, 6000000) |
| 66 | MCFG_T11_INITIAL_MODE(0x8000) |
| 67 | 67 | MCFG_CPU_PROGRAM_MAP(uknc_sub_mem) |
| 68 | 68 | |
| 69 | 69 | |