trunk/src/emu/cpu/tms0980/tms0980.c
| r242393 | r242394 | |
| 92 | 92 | #define M_SSE 0x00080000 /* Special Status Enable */ |
| 93 | 93 | #define M_SSS 0x00100000 /* Special Status Sample */ |
| 94 | 94 | |
| 95 | | #define M_RSTR 0x00200000 /* -> line #36, F_RSTR (TMS02x0 custom) */ |
| 96 | | #define M_UNK1 0x00400000 /* -> line #37, F_???? (TMS0270 custom) */ |
| 95 | #define M_RSTR 0x00200000 /* -> line #36, F_RSTR (TMC02x0 custom) */ |
| 96 | #define M_UNK1 0x00400000 /* -> line #37, F_???? (TMC0270 custom) */ |
| 97 | 97 | |
| 98 | 98 | /* Standard/fixed instructions - these are documented more in their specific handlers below */ |
| 99 | 99 | #define F_BR 0x00000001 |
| r242393 | r242394 | |
| 154 | 154 | // - 32-term microinstructions PLA between the RAM and ROM, supporting 15 microinstructions |
| 155 | 155 | // - 16-term output PLA and segment PLA above the RAM (rotate opla 90 degrees) |
| 156 | 156 | const device_type TMS0970 = &device_creator<tms0970_cpu_device>; // 28-pin DIP, 11 R pins |
| 157 | | // TMS0950 is same? |
| 158 | 157 | |
| 159 | | // TMS0270 on the other hand, is a TMS0980 with earrings and a new hat. The new changes look like a quick afterthought, almost hacky |
| 158 | // TMC0270 on the other hand, is a TMS0980 with earrings and a new hat. The new changes look like a quick afterthought, almost hacky |
| 160 | 159 | // - RAM, ROM, and main instructions PLA is exactly the same as TMS0980 |
| 161 | 160 | // - 64-term microinstructions PLA between the RAM and ROM, supporting 20 microinstructions plus optional separate lines for custom opcode handling |
| 162 | 161 | // - 48-term output PLA above the RAM (rotate opla 90 degrees) |
| 163 | | const device_type TMS0270 = &device_creator<tms0270_cpu_device>; // 40-pin DIP, 16 O pins, 8+ R pins (some R pins are internally hooked up to support more I/O) |
| 164 | | // TMS0260 is same? except opla is 32 instead of 48 terms |
| 162 | const device_type TMC0270 = &device_creator<tmc0270_cpu_device>; // 40-pin DIP, 16 O pins, 8+ R pins (some R pins are internally hooked up to support more I/O) |
| 163 | // TMC0260 is same? except opla is 32 instead of 48 terms |
| 165 | 164 | |
| 166 | 165 | |
| 167 | 166 | static ADDRESS_MAP_START(program_11bit_9, AS_PROGRAM, 16, tms1xxx_cpu_device) |
| r242393 | r242394 | |
| 250 | 249 | } |
| 251 | 250 | |
| 252 | 251 | |
| 253 | | tms0270_cpu_device::tms0270_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 254 | | : tms0980_cpu_device(mconfig, TMS0270, "TMS0270", tag, owner, clock, 16, 16, 4, 7, 9, 4, 12, ADDRESS_MAP_NAME(program_11bit_9), 8, ADDRESS_MAP_NAME(data_64x9_as4), "tms0270", __FILE__) |
| 252 | tmc0270_cpu_device::tmc0270_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 253 | : tms0980_cpu_device(mconfig, TMC0270, "TMC0270", tag, owner, clock, 16, 16, 4, 7, 9, 4, 12, ADDRESS_MAP_NAME(program_11bit_9), 8, ADDRESS_MAP_NAME(data_64x9_as4), "tmc0270", __FILE__) |
| 255 | 254 | { |
| 256 | 255 | } |
| 257 | 256 | |
| r242393 | r242394 | |
| 310 | 309 | } |
| 311 | 310 | |
| 312 | 311 | |
| 313 | | static MACHINE_CONFIG_FRAGMENT(tms0270) |
| 312 | static MACHINE_CONFIG_FRAGMENT(tmc0270) |
| 314 | 313 | |
| 315 | 314 | // main opcodes PLA, microinstructions PLA, output PLA |
| 316 | 315 | MCFG_PLA_ADD("ipla", 9, 22, 24) |
| r242393 | r242394 | |
| 321 | 320 | MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY) |
| 322 | 321 | MACHINE_CONFIG_END |
| 323 | 322 | |
| 324 | | machine_config_constructor tms0270_cpu_device::device_mconfig_additions() const |
| 323 | machine_config_constructor tmc0270_cpu_device::device_mconfig_additions() const |
| 325 | 324 | { |
| 326 | | return MACHINE_CONFIG_NAME(tms0270); |
| 325 | return MACHINE_CONFIG_NAME(tmc0270); |
| 327 | 326 | } |
| 328 | 327 | |
| 329 | 328 | |
| r242393 | r242394 | |
| 397 | 396 | m_cs = 0; |
| 398 | 397 | m_r = 0; |
| 399 | 398 | m_o = 0; |
| 399 | m_o_index = 0; |
| 400 | 400 | m_cki_bus = 0; |
| 401 | 401 | m_c4 = 0; |
| 402 | 402 | m_p = 0; |
| r242393 | r242394 | |
| 434 | 434 | save_item(NAME(m_cs)); |
| 435 | 435 | save_item(NAME(m_r)); |
| 436 | 436 | save_item(NAME(m_o)); |
| 437 | save_item(NAME(m_o_index)); |
| 437 | 438 | save_item(NAME(m_cki_bus)); |
| 438 | 439 | save_item(NAME(m_c4)); |
| 439 | 440 | save_item(NAME(m_p)); |
| r242393 | r242394 | |
| 474 | 475 | m_icountptr = &m_icount; |
| 475 | 476 | } |
| 476 | 477 | |
| 477 | | void tms0270_cpu_device::device_start() |
| 478 | void tmc0270_cpu_device::device_start() |
| 478 | 479 | { |
| 479 | 480 | // common init |
| 480 | 481 | tms1xxx_cpu_device::device_start(); |
| r242393 | r242394 | |
| 634 | 635 | UINT32 mask = m_mpla->read(sel); |
| 635 | 636 | mask ^= 0x43fc3; // invert active-negative |
| 636 | 637 | |
| 637 | | // M_RSTR is specific to TMS02x0, it redirects to F_RSTR |
| 638 | | // M_UNK1 is specific to TMS0270, unknown yet |
| 638 | // M_RSTR is specific to TMC02x0, it redirects to F_RSTR |
| 639 | // M_UNK1 is specific to TMC0270, unknown yet |
| 639 | 640 | // _______ ______ _____ _____ _____ _____ ______ _____ ______ _____ _____ |
| 640 | 641 | const UINT32 md[22] = { M_NDMTP, M_DMTP, M_AUTY, M_AUTA, M_CKM, M_SSE, M_CKP, M_YTP, M_MTP, M_ATN, M_NATN, M_MTN, M_15TN, M_CKN, M_NE, M_C8, M_SSS, M_CME, M_CIN, M_STO, M_RSTR, M_UNK1 }; |
| 641 | 642 | |
| r242393 | r242394 | |
| 682 | 683 | m_micro_direct[op] = decode_micro(op); |
| 683 | 684 | } |
| 684 | 685 | |
| 685 | | void tms0270_cpu_device::device_reset() |
| 686 | void tmc0270_cpu_device::device_reset() |
| 686 | 687 | { |
| 687 | 688 | // common reset |
| 688 | 689 | tms0980_cpu_device::device_reset(); |
| r242393 | r242394 | |
| 746 | 747 | next_pc(); |
| 747 | 748 | } |
| 748 | 749 | |
| 749 | | void tms0270_cpu_device::read_opcode() |
| 750 | void tmc0270_cpu_device::read_opcode() |
| 750 | 751 | { |
| 751 | 752 | tms0980_cpu_device::read_opcode(); |
| 752 | 753 | |
| r242393 | r242394 | |
| 763 | 764 | |
| 764 | 765 | void tms1xxx_cpu_device::write_o_output(UINT8 index) |
| 765 | 766 | { |
| 767 | m_o_index = index; |
| 768 | |
| 766 | 769 | // a hardcoded table is supported if the output pla is unknown |
| 767 | 770 | m_o = (c_output_pla == NULL) ? m_opla->read(index) : c_output_pla[index]; |
| 768 | 771 | m_write_o(0, m_o & m_o_mask, 0xffff); |
| r242393 | r242394 | |
| 770 | 773 | |
| 771 | 774 | void tms0970_cpu_device::write_o_output(UINT8 index) |
| 772 | 775 | { |
| 776 | m_o_index = index; |
| 777 | |
| 773 | 778 | m_o = m_spla->read(index); |
| 774 | 779 | m_write_o(0, m_o & m_o_mask, 0xffff); |
| 775 | 780 | } |
| 776 | 781 | |
| 777 | 782 | |
| 778 | | void tms0270_cpu_device::dynamic_output() |
| 783 | void tmc0270_cpu_device::dynamic_output() |
| 779 | 784 | { |
| 780 | 785 | // TODO.. |
| 781 | 786 | |
| r242393 | r242394 | |
| 793 | 798 | return (k & 0xf) | k3; |
| 794 | 799 | } |
| 795 | 800 | |
| 796 | | UINT8 tms0270_cpu_device::read_k_input() |
| 801 | UINT8 tmc0270_cpu_device::read_k_input() |
| 797 | 802 | { |
| 798 | 803 | // TODO.. |
| 799 | 804 | |
| r242393 | r242394 | |
| 1014 | 1019 | } |
| 1015 | 1020 | |
| 1016 | 1021 | |
| 1017 | | // TMS0270-specific |
| 1018 | | void tms0270_cpu_device::op_tdo() |
| 1022 | // TMC0270-specific |
| 1023 | void tmc0270_cpu_device::op_tdo() |
| 1019 | 1024 | { |
| 1020 | 1025 | // TDO: transfer data out |
| 1021 | 1026 | if (m_status) |
| r242393 | r242394 | |
| 1026 | 1031 | // write to output is done in dynamic_output |
| 1027 | 1032 | } |
| 1028 | 1033 | |
| 1029 | | void tms0270_cpu_device::op_setr() |
| 1034 | void tmc0270_cpu_device::op_setr() |
| 1030 | 1035 | { |
| 1031 | 1036 | // same as default, but handle write to output in dynamic_output |
| 1032 | 1037 | m_r = m_r | (1 << m_y); |
| 1033 | 1038 | } |
| 1034 | 1039 | |
| 1035 | | void tms0270_cpu_device::op_rstr() |
| 1040 | void tmc0270_cpu_device::op_rstr() |
| 1036 | 1041 | { |
| 1037 | 1042 | // same as default, but handle write to output in dynamic_output |
| 1038 | 1043 | m_r = m_r & ~(1 << m_y); |
trunk/src/emu/cpu/tms0980/tms0980.h
| r242393 | r242394 | |
| 5 | 5 | TMS0980/TMS1000-family MCU cores |
| 6 | 6 | |
| 7 | 7 | */ |
| 8 | | |
| 9 | 8 | #ifndef _TMS0980_H_ |
| 10 | 9 | #define _TMS0980_H_ |
| 11 | 10 | |
| r242393 | r242394 | |
| 13 | 12 | #include "machine/pla.h" |
| 14 | 13 | |
| 15 | 14 | |
| 16 | | // K input pins |
| 15 | #define MCFG_TMS1XXX_OUTPUT_PLA(_pla) \ |
| 16 | tms1xxx_cpu_device::set_output_pla(*device, _pla); |
| 17 | |
| 17 | 18 | #define MCFG_TMS1XXX_READ_K_CB(_devcb) \ |
| 18 | 19 | tms1xxx_cpu_device::set_read_k_callback(*device, DEVCB_##_devcb); |
| 19 | 20 | |
| 20 | | // O/Segment output pins |
| 21 | 21 | #define MCFG_TMS1XXX_WRITE_O_CB(_devcb) \ |
| 22 | 22 | tms1xxx_cpu_device::set_write_o_callback(*device, DEVCB_##_devcb); |
| 23 | 23 | |
| 24 | | // R output pins (also called D on some chips) |
| 25 | 24 | #define MCFG_TMS1XXX_WRITE_R_CB(_devcb) \ |
| 26 | 25 | tms1xxx_cpu_device::set_write_r_callback(*device, DEVCB_##_devcb); |
| 27 | 26 | |
| 28 | | // OFF opcode on TMS0980 and up |
| 29 | 27 | #define MCFG_TMS1XXX_POWER_OFF_CB(_devcb) \ |
| 30 | 28 | tms1xxx_cpu_device::set_power_off_callback(*device, DEVCB_##_devcb); |
| 31 | 29 | |
| 32 | | // Use this if the output PLA is unknown: |
| 33 | | // If the microinstructions (or other) PLA is unknown, try using one from another romset. |
| 34 | | #define MCFG_TMS1XXX_OUTPUT_PLA(_pla) \ |
| 35 | | tms1xxx_cpu_device::set_output_pla(*device, _pla); |
| 36 | 30 | |
| 37 | | |
| 38 | | |
| 39 | 31 | class tms1xxx_cpu_device : public cpu_device |
| 40 | 32 | { |
| 41 | 33 | public: |
| r242393 | r242394 | |
| 70 | 62 | template<class _Object> static devcb_base &set_power_off_callback(device_t &device, _Object object) { return downcast<tms1xxx_cpu_device &>(device).m_power_off.set_callback(object); } |
| 71 | 63 | static void set_output_pla(device_t &device, const UINT16 *output_pla) { downcast<tms1xxx_cpu_device &>(device).c_output_pla = output_pla; } |
| 72 | 64 | |
| 65 | // driver debugging |
| 66 | UINT8 debug_peek_o_index() { return m_o_index; } |
| 67 | |
| 73 | 68 | protected: |
| 74 | 69 | // device-level overrides |
| 75 | 70 | virtual void device_start(); |
| r242393 | r242394 | |
| 137 | 132 | UINT8 m_cs; // chapter subroutine bit |
| 138 | 133 | UINT16 m_r; |
| 139 | 134 | UINT16 m_o; |
| 135 | UINT8 m_o_index; |
| 140 | 136 | UINT8 m_cki_bus; |
| 141 | 137 | UINT8 m_c4; |
| 142 | 138 | UINT8 m_p; // 4-bit adder p(lus)-input |
| r242393 | r242394 | |
| 287 | 283 | }; |
| 288 | 284 | |
| 289 | 285 | |
| 290 | | class tms0270_cpu_device : public tms0980_cpu_device |
| 286 | class tmc0270_cpu_device : public tms0980_cpu_device |
| 291 | 287 | { |
| 292 | 288 | public: |
| 293 | | tms0270_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 289 | tmc0270_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 294 | 290 | |
| 295 | 291 | protected: |
| 296 | 292 | // overrides |
| r242393 | r242394 | |
| 326 | 322 | extern const device_type TMS1300; |
| 327 | 323 | extern const device_type TMS0970; |
| 328 | 324 | extern const device_type TMS0980; |
| 329 | | extern const device_type TMS0270; |
| 325 | extern const device_type TMC0270; |
| 330 | 326 | |
| 331 | 327 | |
| 332 | 328 | #endif /* _TMS0980_H_ */ |
trunk/src/mess/drivers/tandy12.c
| r242393 | r242394 | |
| 2 | 2 | // copyright-holders:hap |
| 3 | 3 | /*************************************************************************** |
| 4 | 4 | |
| 5 | | Tandy Radio Shack Computerized Arcade (1981, 1982, 1995) |
| 5 | Tandy Radio Shack Tandy-12 - Computerized Arcade |
| 6 | 6 | * TMS1100 CD7282SL |
| 7 | 7 | |
| 8 | | This handheld contains 12 minigames. It looks and plays like "Fabulous Fred" |
| 9 | | by the Japanese company Mego Corp. in 1980, which in turn is a mix of Merlin |
| 10 | | and Simon. Unlike Merlin and Simon, spin-offs like these were not successful. |
| 11 | | There were releases with and without the prefix "Tandy-12", I don't know |
| 12 | | which name was more common. Also not worth noting is that it needed five |
| 13 | | batteries; 4 C-cells and a 9-volt. |
| 8 | This tabletop game looks and plays like "Fabulous Fred" by the Japanese |
| 9 | company Mego Corp. in 1980, which in turn is a mix of Merlin and Simon. |
| 10 | Unlike Merlin and Simon, these spin-offs were not successful. |
| 14 | 11 | |
| 15 | | Some of the games require accessories included with the toy (eg. the Baseball |
| 16 | | game is played with a board representing the playing field). To start a game, |
| 17 | | hold the [SELECT] button, then press [START] when the game button lights up. |
| 18 | | As always, refer to the official manual for more information. |
| 19 | | |
| 20 | | See below at the input defs for a list of the games. |
| 21 | | |
| 22 | | |
| 23 | | TODO: |
| 24 | | - output PLA is not verified |
| 25 | | - microinstructions PLA is not verified |
| 26 | | |
| 27 | 12 | ***************************************************************************/ |
| 28 | 13 | |
| 29 | 14 | #include "emu.h" |
| r242393 | r242394 | |
| 43 | 28 | tandy12_state(const machine_config &mconfig, device_type type, const char *tag) |
| 44 | 29 | : driver_device(mconfig, type, tag), |
| 45 | 30 | m_maincpu(*this, "maincpu"), |
| 46 | | m_button_matrix(*this, "IN"), |
| 47 | 31 | m_speaker(*this, "speaker") |
| 48 | 32 | { } |
| 49 | 33 | |
| 50 | 34 | required_device<tms1xxx_cpu_device> m_maincpu; |
| 51 | | required_ioport_array<5> m_button_matrix; |
| 52 | 35 | required_device<speaker_sound_device> m_speaker; |
| 53 | 36 | |
| 37 | UINT16 m_o; |
| 54 | 38 | UINT16 m_r; |
| 55 | 39 | |
| 56 | 40 | DECLARE_READ8_MEMBER(read_k); |
| r242393 | r242394 | |
| 69 | 53 | |
| 70 | 54 | READ8_MEMBER(tandy12_state::read_k) |
| 71 | 55 | { |
| 72 | | UINT8 k = 0; |
| 73 | | |
| 74 | | // read selected button rows |
| 75 | | for (int i = 0; i < 5; i++) |
| 76 | | if (m_r >> (i+5) & 1) |
| 77 | | k |= m_button_matrix[i]->read(); |
| 78 | | |
| 79 | | return k; |
| 56 | return 0; |
| 80 | 57 | } |
| 81 | 58 | |
| 82 | 59 | WRITE16_MEMBER(tandy12_state::write_o) |
| 83 | 60 | { |
| 84 | | // O0-O7: button lamps 1-8 |
| 85 | | for (int i = 0; i < 8; i++) |
| 86 | | output_set_lamp_value(i, data >> i & 1); |
| 61 | m_o = data; |
| 87 | 62 | } |
| 88 | 63 | |
| 89 | 64 | WRITE16_MEMBER(tandy12_state::write_r) |
| 90 | 65 | { |
| 91 | | // R0-R3: button lamps 9-12 |
| 92 | | for (int i = 0; i < 4; i++) |
| 93 | | output_set_lamp_value(i + 8, data >> i & 1); |
| 94 | | |
| 95 | 66 | // R10: speaker out |
| 96 | 67 | m_speaker->level_w(data >> 10 & 1); |
| 97 | | |
| 98 | | // R5-R9: input mux |
| 68 | |
| 99 | 69 | m_r = data; |
| 100 | 70 | } |
| 101 | 71 | |
| r242393 | r242394 | |
| 107 | 77 | |
| 108 | 78 | ***************************************************************************/ |
| 109 | 79 | |
| 110 | | /* physical button layout and labels is like this: |
| 111 | | |
| 112 | | REPEAT-2 SPACE-2 |
| 113 | | [O] OFF--ON [O] |
| 114 | | |
| 115 | | [purple]1 [blue]5 [l-green]9 |
| 116 | | ORGAN TAG-IT TREASURE HUNT |
| 117 | | |
| 118 | | [l-orange]2 [turquoise]6 [red]10 |
| 119 | | SONG WRITER ROULETTE COMPETE |
| 120 | | |
| 121 | | [pink]3 [yellow]7 [violet]11 |
| 122 | | REPEAT BASEBALL FIRE AWAY |
| 123 | | |
| 124 | | [green]4 [orange]8 [brown]12 |
| 125 | | TORPEDO REPEAT PLUS HIDE 'N SEEK |
| 126 | | |
| 127 | | [O] [O] [O] |
| 128 | | START SELECT PLAY-2/HIT-7 |
| 129 | | */ |
| 130 | | |
| 131 | 80 | static INPUT_PORTS_START( tandy12 ) |
| 132 | | PORT_START("IN.0") // R5 |
| 133 | | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_EQUALS) PORT_CODE(KEYCODE_PLUS_PAD) PORT_NAME("12") |
| 134 | | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_CODE(KEYCODE_MINUS_PAD) PORT_NAME("11") |
| 135 | | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("10") |
| 136 | | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("9") |
| 137 | | |
| 138 | | PORT_START("IN.1") // R6 |
| 139 | | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_T) PORT_NAME("Space-2") |
| 140 | | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_NAME("Play-2/Hit-7") |
| 141 | | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W) PORT_NAME("Select") |
| 142 | | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_NAME("Start") |
| 143 | | |
| 144 | | PORT_START("IN.2") // R7 |
| 145 | | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R) PORT_NAME("Repeat-2") |
| 146 | | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 147 | | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 148 | | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 149 | | |
| 150 | | PORT_START("IN.3") // R8 |
| 151 | | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("4") |
| 152 | | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("3") |
| 153 | | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("2") |
| 154 | | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("1") |
| 155 | | |
| 156 | | PORT_START("IN.4") // R9 |
| 157 | | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("8") |
| 158 | | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("7") |
| 159 | | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("6") |
| 160 | | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("5") |
| 161 | 81 | INPUT_PORTS_END |
| 162 | 82 | |
| 163 | 83 | |
| r242393 | r242394 | |
| 170 | 90 | |
| 171 | 91 | void tandy12_state::machine_start() |
| 172 | 92 | { |
| 93 | m_o = 0; |
| 173 | 94 | m_r = 0; |
| 95 | |
| 96 | save_item(NAME(m_o)); |
| 174 | 97 | save_item(NAME(m_r)); |
| 175 | 98 | } |
| 176 | 99 | |
| 177 | 100 | |
| 178 | 101 | static const UINT16 tandy12_output_pla[0x20] = |
| 179 | 102 | { |
| 180 | | // these are certain |
| 181 | | 0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, |
| 182 | | 0x80, 0x00, 0x00, 0x00, 0x00, |
| 183 | | |
| 184 | | // rest is unused? |
| 185 | | 0x00, 0x00, 0x00, |
| 186 | | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 187 | | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 |
| 103 | /* O output PLA configuration currently unknown */ |
| 104 | 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 105 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, |
| 106 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, |
| 107 | 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f |
| 188 | 108 | }; |
| 189 | 109 | |
| 190 | 110 | |
| r242393 | r242394 | |
| 226 | 146 | ROM_END |
| 227 | 147 | |
| 228 | 148 | |
| 229 | | CONS( 1981, tandy12, 0, 0, tandy12, tandy12, driver_device, 0, "Tandy Radio Shack", "Tandy-12 - Computerized Arcade", GAME_SUPPORTS_SAVE ) |
| 149 | CONS( 1981, tandy12, 0, 0, tandy12, tandy12, driver_device, 0, "Tandy Radio Shack", "Tandy-12 - Computerized Arcade", GAME_SUPPORTS_SAVE | GAME_NOT_WORKING ) |