trunk/src/emu/cpu/tms0980/tms0980.c
| r242229 | r242230 | |
| 129 | 129 | const device_type TMS1000 = &device_creator<tms1000_cpu_device>; // 28-pin DIP, 11 R pins |
| 130 | 130 | const device_type TMS1200 = &device_creator<tms1200_cpu_device>; // 40-pin DIP, 13 R pins |
| 131 | 131 | const device_type TMS1070 = &device_creator<tms1070_cpu_device>; // same as tms1000, just supports higher voltage |
| 132 | // TMS1270 has 10 O pins, how does that work? |
| 132 | 133 | |
| 133 | 134 | // TMS1100 is nearly the same as TMS1000, some different opcodes, and with double the RAM and ROM |
| 134 | 135 | const device_type TMS1100 = &device_creator<tms1100_cpu_device>; // 28-pin DIP, 11 R pins |
| r242229 | r242230 | |
| 142 | 143 | // - 16-term output PLA and segment PLA above the RAM |
| 143 | 144 | const device_type TMS0980 = &device_creator<tms0980_cpu_device>; // 28-pin DIP, 9 R pins |
| 144 | 145 | |
| 145 | | |
| 146 | 146 | // TMS0970 is a stripped-down version of the TMS0980, itself acting more like a TMS1000 |
| 147 | 147 | // - 64x4bit RAM array at the bottom-left |
| 148 | 148 | // - 1024x8bit ROM array at the bottom-right |
| r242229 | r242230 | |
| 152 | 152 | const device_type TMS0970 = &device_creator<tms0970_cpu_device>; // 28-pin DIP, 11 R pins |
| 153 | 153 | |
| 154 | 154 | |
| 155 | | |
| 156 | 155 | static ADDRESS_MAP_START(program_11bit_9, AS_PROGRAM, 16, tms1xxx_cpu_device) |
| 157 | 156 | AM_RANGE(0x000, 0xfff) AM_ROM |
| 158 | 157 | ADDRESS_MAP_END |
| r242229 | r242230 | |
| 307 | 306 | return CPU_DISASSEMBLE_NAME(tms0980)(this, buffer, pc, oprom, opram, options); |
| 308 | 307 | } |
| 309 | 308 | |
| 310 | | |
| 311 | | void tms1000_cpu_device::state_string_export(const device_state_entry &entry, astring &string) |
| 309 | void tms1xxx_cpu_device::state_string_export(const device_state_entry &entry, astring &string) |
| 312 | 310 | { |
| 313 | 311 | switch (entry.index()) |
| 314 | 312 | { |
| 315 | 313 | case STATE_GENPC: |
| 316 | | string.printf("%03X", (m_pa << 6) | m_pc); |
| 314 | string.printf("%03X", m_rom_address << ((m_byte_bits > 8) ? 1 : 0)); |
| 317 | 315 | break; |
| 318 | 316 | } |
| 319 | 317 | } |
| 320 | 318 | |
| 321 | | void tms1100_cpu_device::state_string_export(const device_state_entry &entry, astring &string) |
| 322 | | { |
| 323 | | switch (entry.index()) |
| 324 | | { |
| 325 | | case STATE_GENPC: |
| 326 | | string.printf("%03X", (m_ca << 10) | (m_pa << 6) | m_pc); |
| 327 | | break; |
| 328 | | } |
| 329 | | } |
| 330 | 319 | |
| 331 | | void tms0980_cpu_device::state_string_export(const device_state_entry &entry, astring &string) |
| 332 | | { |
| 333 | | switch (entry.index()) |
| 334 | | { |
| 335 | | case STATE_GENPC: |
| 336 | | string.printf("%03X", ((m_pa << 7) | m_pc) << 1); |
| 337 | | break; |
| 338 | | } |
| 339 | | } |
| 340 | 320 | |
| 341 | | |
| 342 | | |
| 343 | 321 | //------------------------------------------------- |
| 344 | 322 | // device_start - device-specific startup |
| 345 | 323 | //------------------------------------------------- |
| r242229 | r242230 | |
| 450 | 428 | state_add(TMS0980_Y, "Y", m_y ).formatstr("%01X"); |
| 451 | 429 | state_add(TMS0980_STATUS, "STATUS", m_status).formatstr("%01X"); |
| 452 | 430 | |
| 453 | | state_add(STATE_GENPC, "curpc", m_pc).formatstr("%8s").noshow(); |
| 431 | state_add(STATE_GENPC, "curpc", m_rom_address).formatstr("%03X").noshow(); |
| 454 | 432 | state_add(STATE_GENFLAGS, "GENFLAGS", m_sr).formatstr("%8s").noshow(); |
| 455 | 433 | |
| 456 | 434 | m_icountptr = &m_icount; |
trunk/src/emu/cpu/tms0980/tms0980.h
| r242229 | r242230 | |
| 80 | 80 | virtual UINT32 disasm_min_opcode_bytes() const { return 1; } |
| 81 | 81 | virtual UINT32 disasm_max_opcode_bytes() const { return 1; } |
| 82 | 82 | |
| 83 | void state_string_export(const device_state_entry &entry, astring &string); |
| 84 | |
| 83 | 85 | void next_pc(); |
| 84 | 86 | void execute_fixed_opcode(); |
| 85 | 87 | |
| r242229 | r242230 | |
| 193 | 195 | virtual void device_reset(); |
| 194 | 196 | virtual machine_config_constructor device_mconfig_additions() const; |
| 195 | 197 | |
| 196 | | void state_string_export(const device_state_entry &entry, astring &string); |
| 197 | 198 | |
| 198 | 199 | virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options); |
| 199 | 200 | }; |
| r242229 | r242230 | |
| 222 | 223 | // overrides |
| 223 | 224 | virtual void device_reset(); |
| 224 | 225 | |
| 225 | | void state_string_export(const device_state_entry &entry, astring &string); |
| 226 | | |
| 227 | 226 | virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options); |
| 228 | 227 | |
| 229 | 228 | virtual void op_setr(); |
| r242229 | r242230 | |
| 264 | 263 | // overrides |
| 265 | 264 | virtual void device_reset(); |
| 266 | 265 | |
| 267 | | void state_string_export(const device_state_entry &entry, astring &string); |
| 268 | 266 | virtual machine_config_constructor device_mconfig_additions() const; |
| 269 | 267 | |
| 270 | 268 | virtual UINT32 disasm_min_opcode_bytes() const { return 2; } |