trunk/src/emu/cpu/tms0980/tms0980.c
| r242390 | r242391 | |
| 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 (TMC02x0 custom) */ |
| 96 | | #define M_UNK1 0x00400000 /* -> line #37, F_???? (TMC0270 custom) */ |
| 95 | #define M_RSTR 0x00200000 /* -> line #36, F_RSTR (TMS02x0 custom) */ |
| 96 | #define M_UNK1 0x00400000 /* -> line #37, F_???? (TMS0270 custom) */ |
| 97 | 97 | |
| 98 | 98 | /* Standard/fixed instructions - these are documented more in their specific handlers below */ |
| 99 | 99 | #define F_BR 0x00000001 |
| r242390 | r242391 | |
| 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? |
| 157 | 158 | |
| 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 |
| 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 |
| 159 | 160 | // - RAM, ROM, and main instructions PLA is exactly the same as TMS0980 |
| 160 | 161 | // - 64-term microinstructions PLA between the RAM and ROM, supporting 20 microinstructions plus optional separate lines for custom opcode handling |
| 161 | 162 | // - 48-term output PLA above the RAM (rotate opla 90 degrees) |
| 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 |
| 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 |
| 164 | 165 | |
| 165 | 166 | |
| 166 | 167 | static ADDRESS_MAP_START(program_11bit_9, AS_PROGRAM, 16, tms1xxx_cpu_device) |
| r242390 | r242391 | |
| 249 | 250 | } |
| 250 | 251 | |
| 251 | 252 | |
| 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__) |
| 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__) |
| 254 | 255 | { |
| 255 | 256 | } |
| 256 | 257 | |
| r242390 | r242391 | |
| 309 | 310 | } |
| 310 | 311 | |
| 311 | 312 | |
| 312 | | static MACHINE_CONFIG_FRAGMENT(tmc0270) |
| 313 | static MACHINE_CONFIG_FRAGMENT(tms0270) |
| 313 | 314 | |
| 314 | 315 | // main opcodes PLA, microinstructions PLA, output PLA |
| 315 | 316 | MCFG_PLA_ADD("ipla", 9, 22, 24) |
| r242390 | r242391 | |
| 320 | 321 | MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY) |
| 321 | 322 | MACHINE_CONFIG_END |
| 322 | 323 | |
| 323 | | machine_config_constructor tmc0270_cpu_device::device_mconfig_additions() const |
| 324 | machine_config_constructor tms0270_cpu_device::device_mconfig_additions() const |
| 324 | 325 | { |
| 325 | | return MACHINE_CONFIG_NAME(tmc0270); |
| 326 | return MACHINE_CONFIG_NAME(tms0270); |
| 326 | 327 | } |
| 327 | 328 | |
| 328 | 329 | |
| r242390 | r242391 | |
| 396 | 397 | m_cs = 0; |
| 397 | 398 | m_r = 0; |
| 398 | 399 | m_o = 0; |
| 399 | | m_o_index = 0; |
| 400 | 400 | m_cki_bus = 0; |
| 401 | 401 | m_c4 = 0; |
| 402 | 402 | m_p = 0; |
| r242390 | r242391 | |
| 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)); |
| 438 | 437 | save_item(NAME(m_cki_bus)); |
| 439 | 438 | save_item(NAME(m_c4)); |
| 440 | 439 | save_item(NAME(m_p)); |
| r242390 | r242391 | |
| 475 | 474 | m_icountptr = &m_icount; |
| 476 | 475 | } |
| 477 | 476 | |
| 478 | | void tmc0270_cpu_device::device_start() |
| 477 | void tms0270_cpu_device::device_start() |
| 479 | 478 | { |
| 480 | 479 | // common init |
| 481 | 480 | tms1xxx_cpu_device::device_start(); |
| r242390 | r242391 | |
| 635 | 634 | UINT32 mask = m_mpla->read(sel); |
| 636 | 635 | mask ^= 0x43fc3; // invert active-negative |
| 637 | 636 | |
| 638 | | // M_RSTR is specific to TMC02x0, it redirects to F_RSTR |
| 639 | | // M_UNK1 is specific to TMC0270, unknown yet |
| 637 | // M_RSTR is specific to TMS02x0, it redirects to F_RSTR |
| 638 | // M_UNK1 is specific to TMS0270, unknown yet |
| 640 | 639 | // _______ ______ _____ _____ _____ _____ ______ _____ ______ _____ _____ |
| 641 | 640 | 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 }; |
| 642 | 641 | |
| r242390 | r242391 | |
| 683 | 682 | m_micro_direct[op] = decode_micro(op); |
| 684 | 683 | } |
| 685 | 684 | |
| 686 | | void tmc0270_cpu_device::device_reset() |
| 685 | void tms0270_cpu_device::device_reset() |
| 687 | 686 | { |
| 688 | 687 | // common reset |
| 689 | 688 | tms0980_cpu_device::device_reset(); |
| r242390 | r242391 | |
| 747 | 746 | next_pc(); |
| 748 | 747 | } |
| 749 | 748 | |
| 750 | | void tmc0270_cpu_device::read_opcode() |
| 749 | void tms0270_cpu_device::read_opcode() |
| 751 | 750 | { |
| 752 | 751 | tms0980_cpu_device::read_opcode(); |
| 753 | 752 | |
| r242390 | r242391 | |
| 764 | 763 | |
| 765 | 764 | void tms1xxx_cpu_device::write_o_output(UINT8 index) |
| 766 | 765 | { |
| 767 | | m_o_index = index; |
| 768 | | |
| 769 | 766 | // a hardcoded table is supported if the output pla is unknown |
| 770 | 767 | m_o = (c_output_pla == NULL) ? m_opla->read(index) : c_output_pla[index]; |
| 771 | 768 | m_write_o(0, m_o & m_o_mask, 0xffff); |
| r242390 | r242391 | |
| 773 | 770 | |
| 774 | 771 | void tms0970_cpu_device::write_o_output(UINT8 index) |
| 775 | 772 | { |
| 776 | | m_o_index = index; |
| 777 | | |
| 778 | 773 | m_o = m_spla->read(index); |
| 779 | 774 | m_write_o(0, m_o & m_o_mask, 0xffff); |
| 780 | 775 | } |
| 781 | 776 | |
| 782 | 777 | |
| 783 | | void tmc0270_cpu_device::dynamic_output() |
| 778 | void tms0270_cpu_device::dynamic_output() |
| 784 | 779 | { |
| 785 | 780 | // TODO.. |
| 786 | 781 | |
| r242390 | r242391 | |
| 798 | 793 | return (k & 0xf) | k3; |
| 799 | 794 | } |
| 800 | 795 | |
| 801 | | UINT8 tmc0270_cpu_device::read_k_input() |
| 796 | UINT8 tms0270_cpu_device::read_k_input() |
| 802 | 797 | { |
| 803 | 798 | // TODO.. |
| 804 | 799 | |
| r242390 | r242391 | |
| 1019 | 1014 | } |
| 1020 | 1015 | |
| 1021 | 1016 | |
| 1022 | | // TMC0270-specific |
| 1023 | | void tmc0270_cpu_device::op_tdo() |
| 1017 | // TMS0270-specific |
| 1018 | void tms0270_cpu_device::op_tdo() |
| 1024 | 1019 | { |
| 1025 | 1020 | // TDO: transfer data out |
| 1026 | 1021 | if (m_status) |
| r242390 | r242391 | |
| 1031 | 1026 | // write to output is done in dynamic_output |
| 1032 | 1027 | } |
| 1033 | 1028 | |
| 1034 | | void tmc0270_cpu_device::op_setr() |
| 1029 | void tms0270_cpu_device::op_setr() |
| 1035 | 1030 | { |
| 1036 | 1031 | // same as default, but handle write to output in dynamic_output |
| 1037 | 1032 | m_r = m_r | (1 << m_y); |
| 1038 | 1033 | } |
| 1039 | 1034 | |
| 1040 | | void tmc0270_cpu_device::op_rstr() |
| 1035 | void tms0270_cpu_device::op_rstr() |
| 1041 | 1036 | { |
| 1042 | 1037 | // same as default, but handle write to output in dynamic_output |
| 1043 | 1038 | m_r = m_r & ~(1 << m_y); |
trunk/src/emu/cpu/tms0980/tms0980.h
| r242390 | r242391 | |
| 5 | 5 | TMS0980/TMS1000-family MCU cores |
| 6 | 6 | |
| 7 | 7 | */ |
| 8 | |
| 8 | 9 | #ifndef _TMS0980_H_ |
| 9 | 10 | #define _TMS0980_H_ |
| 10 | 11 | |
| r242390 | r242391 | |
| 12 | 13 | #include "machine/pla.h" |
| 13 | 14 | |
| 14 | 15 | |
| 15 | | #define MCFG_TMS1XXX_OUTPUT_PLA(_pla) \ |
| 16 | | tms1xxx_cpu_device::set_output_pla(*device, _pla); |
| 17 | | |
| 16 | // K input pins |
| 18 | 17 | #define MCFG_TMS1XXX_READ_K_CB(_devcb) \ |
| 19 | 18 | tms1xxx_cpu_device::set_read_k_callback(*device, DEVCB_##_devcb); |
| 20 | 19 | |
| 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) |
| 24 | 25 | #define MCFG_TMS1XXX_WRITE_R_CB(_devcb) \ |
| 25 | 26 | tms1xxx_cpu_device::set_write_r_callback(*device, DEVCB_##_devcb); |
| 26 | 27 | |
| 28 | // OFF opcode on TMS0980 and up |
| 27 | 29 | #define MCFG_TMS1XXX_POWER_OFF_CB(_devcb) \ |
| 28 | 30 | tms1xxx_cpu_device::set_power_off_callback(*device, DEVCB_##_devcb); |
| 29 | 31 | |
| 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); |
| 30 | 36 | |
| 37 | |
| 38 | |
| 31 | 39 | class tms1xxx_cpu_device : public cpu_device |
| 32 | 40 | { |
| 33 | 41 | public: |
| r242390 | r242391 | |
| 62 | 70 | 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); } |
| 63 | 71 | static void set_output_pla(device_t &device, const UINT16 *output_pla) { downcast<tms1xxx_cpu_device &>(device).c_output_pla = output_pla; } |
| 64 | 72 | |
| 65 | | // driver debugging |
| 66 | | UINT8 debug_peek_o_index() { return m_o_index; } |
| 67 | | |
| 68 | 73 | protected: |
| 69 | 74 | // device-level overrides |
| 70 | 75 | virtual void device_start(); |
| r242390 | r242391 | |
| 132 | 137 | UINT8 m_cs; // chapter subroutine bit |
| 133 | 138 | UINT16 m_r; |
| 134 | 139 | UINT16 m_o; |
| 135 | | UINT8 m_o_index; |
| 136 | 140 | UINT8 m_cki_bus; |
| 137 | 141 | UINT8 m_c4; |
| 138 | 142 | UINT8 m_p; // 4-bit adder p(lus)-input |
| r242390 | r242391 | |
| 283 | 287 | }; |
| 284 | 288 | |
| 285 | 289 | |
| 286 | | class tmc0270_cpu_device : public tms0980_cpu_device |
| 290 | class tms0270_cpu_device : public tms0980_cpu_device |
| 287 | 291 | { |
| 288 | 292 | public: |
| 289 | | tmc0270_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 293 | tms0270_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 290 | 294 | |
| 291 | 295 | protected: |
| 292 | 296 | // overrides |
| r242390 | r242391 | |
| 322 | 326 | extern const device_type TMS1300; |
| 323 | 327 | extern const device_type TMS0970; |
| 324 | 328 | extern const device_type TMS0980; |
| 325 | | extern const device_type TMC0270; |
| 329 | extern const device_type TMS0270; |
| 326 | 330 | |
| 327 | 331 | |
| 328 | 332 | #endif /* _TMS0980_H_ */ |
trunk/src/mess/drivers/tandy12.c
| r242390 | r242391 | |
| 2 | 2 | // copyright-holders:hap |
| 3 | 3 | /*************************************************************************** |
| 4 | 4 | |
| 5 | | Tandy Radio Shack Tandy-12 - Computerized Arcade |
| 5 | Tandy Radio Shack Computerized Arcade (1981, 1982, 1995) |
| 6 | 6 | * TMS1100 CD7282SL |
| 7 | 7 | |
| 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. |
| 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. |
| 11 | 14 | |
| 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 | |
| 12 | 27 | ***************************************************************************/ |
| 13 | 28 | |
| 14 | 29 | #include "emu.h" |
| r242390 | r242391 | |
| 28 | 43 | tandy12_state(const machine_config &mconfig, device_type type, const char *tag) |
| 29 | 44 | : driver_device(mconfig, type, tag), |
| 30 | 45 | m_maincpu(*this, "maincpu"), |
| 46 | m_button_matrix(*this, "IN"), |
| 31 | 47 | m_speaker(*this, "speaker") |
| 32 | 48 | { } |
| 33 | 49 | |
| 34 | 50 | required_device<tms1xxx_cpu_device> m_maincpu; |
| 51 | required_ioport_array<5> m_button_matrix; |
| 35 | 52 | required_device<speaker_sound_device> m_speaker; |
| 36 | 53 | |
| 37 | | UINT16 m_o; |
| 38 | 54 | UINT16 m_r; |
| 39 | 55 | |
| 40 | 56 | DECLARE_READ8_MEMBER(read_k); |
| r242390 | r242391 | |
| 53 | 69 | |
| 54 | 70 | READ8_MEMBER(tandy12_state::read_k) |
| 55 | 71 | { |
| 56 | | return 0; |
| 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; |
| 57 | 80 | } |
| 58 | 81 | |
| 59 | 82 | WRITE16_MEMBER(tandy12_state::write_o) |
| 60 | 83 | { |
| 61 | | m_o = data; |
| 84 | // O0-O7: button lamps 1-8 |
| 85 | for (int i = 0; i < 8; i++) |
| 86 | output_set_lamp_value(i, data >> i & 1); |
| 62 | 87 | } |
| 63 | 88 | |
| 64 | 89 | WRITE16_MEMBER(tandy12_state::write_r) |
| 65 | 90 | { |
| 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 | |
| 66 | 95 | // R10: speaker out |
| 67 | 96 | m_speaker->level_w(data >> 10 & 1); |
| 68 | | |
| 97 | |
| 98 | // R5-R9: input mux |
| 69 | 99 | m_r = data; |
| 70 | 100 | } |
| 71 | 101 | |
| r242390 | r242391 | |
| 77 | 107 | |
| 78 | 108 | ***************************************************************************/ |
| 79 | 109 | |
| 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 | |
| 80 | 131 | 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") |
| 81 | 161 | INPUT_PORTS_END |
| 82 | 162 | |
| 83 | 163 | |
| r242390 | r242391 | |
| 90 | 170 | |
| 91 | 171 | void tandy12_state::machine_start() |
| 92 | 172 | { |
| 93 | | m_o = 0; |
| 94 | 173 | m_r = 0; |
| 95 | | |
| 96 | | save_item(NAME(m_o)); |
| 97 | 174 | save_item(NAME(m_r)); |
| 98 | 175 | } |
| 99 | 176 | |
| 100 | 177 | |
| 101 | 178 | static const UINT16 tandy12_output_pla[0x20] = |
| 102 | 179 | { |
| 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 |
| 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 |
| 108 | 188 | }; |
| 109 | 189 | |
| 110 | 190 | |
| r242390 | r242391 | |
| 146 | 226 | ROM_END |
| 147 | 227 | |
| 148 | 228 | |
| 149 | | CONS( 1981, tandy12, 0, 0, tandy12, tandy12, driver_device, 0, "Tandy Radio Shack", "Tandy-12 - Computerized Arcade", GAME_SUPPORTS_SAVE | GAME_NOT_WORKING ) |
| 229 | CONS( 1981, tandy12, 0, 0, tandy12, tandy12, driver_device, 0, "Tandy Radio Shack", "Tandy-12 - Computerized Arcade", GAME_SUPPORTS_SAVE ) |