| Previous | 15994 Revisions | Next |
| r2773 Friday 30th May, 2008 at 14:44:19 UTC by Fabio Priuli |
|---|
| Cleaned up inputs in pocketc.c and converted more systems to tagged inputs |
| [src/mess/drivers] | coco.c concept.c cybiko.c dgn_beta.c geneve.c pdp1.c pocketc.c ti99_4p.c ti99_4x.c ti99_8.c tx0.c |
| [src/mess/includes] | concept.h geneve.h pc1251.h pc1350.h pc1401.h pc1403.h pdp1.h tx0.h |
| [src/mess/machine] | coco.c concept.c cybiko.c dgn_beta.c geneve.c pc1251.c pc1350.c pc1401.c pc1403.c pdp1.c ti99_4x.c ti99_4x.h tx0.c |
| [src/mess/video] | 733_asr.c 733_asr.h 911_vdt.c 911_vdt.h pc1251.c pc1350.c pc1401.c pc1403.c |
| r2772 | r2773 | |
|---|---|---|
| 18 | 18 | |
| 19 | 19 | /*----------- defined in drivers/pdp1.c -----------*/ |
| 20 | 20 | |
| 21 | /* defines for input port | |
| 21 | /* defines for each bit and mask in input port "CSW" | |
| 22 | 22 | enum |
| 23 | 23 | { |
| 24 | pdp1_spacewar_controllers = 0, | |
| 25 | pdp1_control_switches = 1, /* various operator control panel switches */ | |
| 26 | pdp1_sense_switches = 2, /* sense switches */ | |
| 27 | pdp1_ta_switches = 3, /* test address switches */ | |
| 28 | pdp1_tw_switches_MSB = 4, /* test word switches */ | |
| 29 | pdp1_tw_switches_LSB = 5, | |
| 30 | pdp1_typewriter = 6, /* typewriter keys */ | |
| 31 | pdp1_config = 10, /* pseudo input port with config */ | |
| 32 | pdp1_lightpen_state = 11, /* pseudo input port with light pen down */ | |
| 33 | pdp1_lightpen_x = 12, /* pseudo input port with light pen x deltas */ | |
| 34 | pdp1_lightpen_y = 13 /* pseudo input port with light pen y deltas */ | |
| 35 | }; | |
| 36 | ||
| 37 | /* defines for each bit and mask in input port pdp1_control_switches */ | |
| 38 | enum | |
| 39 | { | |
| 40 | 24 | /* bit numbers */ |
| 41 | 25 | pdp1_control_bit = 0, |
| 42 | 26 |
| r2772 | r2773 | |
|---|---|---|
| 9 | 9 | #ifndef PC1401_H_ |
| 10 | 10 | #define PC1401_H_ |
| 11 | 11 | |
| 12 | #define CONTRAST (input_port_read(machine, "DSW0") & 0x07) | |
| 12 | 13 | |
| 13 | #define KEY_OFF input_port_read_indexed(machine, 0)&0x80 | |
| 14 | #define KEY_CAL input_port_read_indexed(machine, 0)&0x40 | |
| 15 | #define KEY_BASIC input_port_read_indexed(machine, 0)&0x20 | |
| 16 | #define KEY_BRK input_port_read_indexed(machine, 0)&0x10 | |
| 17 | #define KEY_DEF input_port_read_indexed(machine, 0)&8 | |
| 18 | #define KEY_DOWN input_port_read_indexed(machine, 0)&4 | |
| 19 | #define KEY_UP input_port_read_indexed(machine, 0)&2 | |
| 20 | #define KEY_LEFT input_port_read_indexed(machine, 0)&1 | |
| 21 | 14 | |
| 22 | #define KEY_RIGHT input_port_read_indexed(machine, 1)&0x80 | |
| 23 | // pc1403 sml | |
| 24 | #define KEY_SHIFT input_port_read_indexed(machine, 1)&0x20 | |
| 25 | #define KEY_Q input_port_read_indexed(machine, 1)&0x10 | |
| 26 | #define KEY_W input_port_read_indexed(machine, 1)&8 | |
| 27 | #define KEY_E input_port_read_indexed(machine, 1)&4 | |
| 28 | #define KEY_R input_port_read_indexed(machine, 1)&2 | |
| 29 | #define KEY_T input_port_read_indexed(machine, 1)&1 | |
| 30 | ||
| 31 | #define KEY_Y input_port_read_indexed(machine, 2)&0x80 | |
| 32 | #define KEY_U input_port_read_indexed(machine, 2)&0x40 | |
| 33 | #define KEY_I input_port_read_indexed(machine, 2)&0x20 | |
| 34 | #define KEY_O input_port_read_indexed(machine, 2)&0x10 | |
| 35 | #define KEY_P input_port_read_indexed(machine, 2)&8 | |
| 36 | #define KEY_A input_port_read_indexed(machine, 2)&4 | |
| 37 | #define KEY_S input_port_read_indexed(machine, 2)&2 | |
| 38 | #define KEY_D input_port_read_indexed(machine, 2)&1 | |
| 39 | ||
| 40 | #define KEY_F input_port_read_indexed(machine, 3)&0x80 | |
| 41 | #define KEY_G input_port_read_indexed(machine, 3)&0x40 | |
| 42 | #define KEY_H input_port_read_indexed(machine, 3)&0x20 | |
| 43 | #define KEY_J input_port_read_indexed(machine, 3)&0x10 | |
| 44 | #define KEY_K input_port_read_indexed(machine, 3)&8 | |
| 45 | #define KEY_L input_port_read_indexed(machine, 3)&4 | |
| 46 | #define KEY_COMMA input_port_read_indexed(machine, 3)&2 | |
| 47 | #define KEY_Z input_port_read_indexed(machine, 3)&1 | |
| 48 | ||
| 49 | #define KEY_X input_port_read_indexed(machine, 4)&0x80 | |
| 50 | #define KEY_C input_port_read_indexed(machine, 4)&0x40 | |
| 51 | #define KEY_V input_port_read_indexed(machine, 4)&0x20 | |
| 52 | #define KEY_B input_port_read_indexed(machine, 4)&0x10 | |
| 53 | #define KEY_N input_port_read_indexed(machine, 4)&8 | |
| 54 | #define KEY_M input_port_read_indexed(machine, 4)&4 | |
| 55 | #define KEY_SPC input_port_read_indexed(machine, 4)&2 | |
| 56 | #define KEY_ENTER input_port_read_indexed(machine, 4)&1 | |
| 57 | ||
| 58 | #define KEY_HYP input_port_read_indexed(machine, 5)&0x80 | |
| 59 | #define KEY_SIN input_port_read_indexed(machine, 5)&0x40 | |
| 60 | #define KEY_COS input_port_read_indexed(machine, 5)&0x20 | |
| 61 | #define KEY_TAN input_port_read_indexed(machine, 5)&0x10 | |
| 62 | #define KEY_FE input_port_read_indexed(machine, 5)&8 | |
| 63 | #define KEY_CCE input_port_read_indexed(machine, 5)&4 | |
| 64 | #define KEY_HEX input_port_read_indexed(machine, 5)&2 | |
| 65 | #define KEY_DEG input_port_read_indexed(machine, 5)&1 | |
| 66 | ||
| 67 | #define KEY_LN input_port_read_indexed(machine, 6)&0x80 | |
| 68 | #define KEY_LOG input_port_read_indexed(machine, 6)&0x40 | |
| 69 | #define KEY_1X input_port_read_indexed(machine, 6)&0x20 | |
| 70 | #define KEY_STAT input_port_read_indexed(machine, 6)&0x10 | |
| 71 | #define KEY_EXP input_port_read_indexed(machine, 6)&8 | |
| 72 | #define KEY_POT input_port_read_indexed(machine, 6)&4 | |
| 73 | #define KEY_ROOT input_port_read_indexed(machine, 6)&2 | |
| 74 | #define KEY_SQUARE input_port_read_indexed(machine, 6)&1 | |
| 75 | ||
| 76 | #define KEY_BRACE_LEFT input_port_read_indexed(machine, 7)&0x80 | |
| 77 | #define KEY_BRACE_RIGHT input_port_read_indexed(machine, 7)&0x40 | |
| 78 | #define KEY_7 input_port_read_indexed(machine, 7)&0x20 | |
| 79 | #define KEY_8 input_port_read_indexed(machine, 7)&0x10 | |
| 80 | #define KEY_9 input_port_read_indexed(machine, 7)&8 | |
| 81 | #define KEY_DIV input_port_read_indexed(machine, 7)&4 | |
| 82 | #define KEY_XM input_port_read_indexed(machine, 7)&2 | |
| 83 | #define KEY_4 input_port_read_indexed(machine, 7)&1 | |
| 84 | ||
| 85 | #define KEY_5 input_port_read_indexed(machine, 8)&0x80 | |
| 86 | #define KEY_6 input_port_read_indexed(machine, 8)&0x40 | |
| 87 | #define KEY_MUL input_port_read_indexed(machine, 8)&0x20 | |
| 88 | #define KEY_RM input_port_read_indexed(machine, 8)&0x10 | |
| 89 | #define KEY_1 input_port_read_indexed(machine, 8)&8 | |
| 90 | #define KEY_2 input_port_read_indexed(machine, 8)&4 | |
| 91 | #define KEY_3 input_port_read_indexed(machine, 8)&2 | |
| 92 | #define KEY_MINUS input_port_read_indexed(machine, 8)&1 | |
| 93 | ||
| 94 | #define KEY_MPLUS input_port_read_indexed(machine, 9)&0x80 | |
| 95 | #define KEY_0 input_port_read_indexed(machine, 9)&0x40 | |
| 96 | #define KEY_SIGN input_port_read_indexed(machine, 9)&0x20 | |
| 97 | #define KEY_POINT input_port_read_indexed(machine, 9)&0x10 | |
| 98 | #define KEY_PLUS input_port_read_indexed(machine, 9)&8 | |
| 99 | #define KEY_EQUALS input_port_read_indexed(machine, 9)&4 | |
| 100 | #define KEY_RESET input_port_read_indexed(machine, 9)&2 | |
| 101 | ||
| 102 | #define RAM4K (input_port_read_indexed(machine, 10)&0xc0)==0x40 | |
| 103 | #define RAM10K (input_port_read_indexed(machine, 10)&0xc0)==0x80 | |
| 104 | #define CONTRAST (input_port_read_indexed(machine, 10)&7) | |
| 105 | ||
| 106 | ||
| 107 | 15 | /*----------- defined in machine/pc1401.c -----------*/ |
| 108 | 16 | |
| 109 | 17 | extern UINT8 pc1401_portc; |
| r2772 | r2773 | |
|---|---|---|
| 9 | 9 | #ifndef PC1350_H_ |
| 10 | 10 | #define PC1350_H_ |
| 11 | 11 | |
| 12 | #define PC1350_CONTRAST (input_port_read(machine, "DSW0") & 0x07) | |
| 12 | 13 | |
| 13 | #define PC1350_KEY_OFF input_port_read_indexed(machine, 0)&0x80 | |
| 14 | #define PC1350_KEY_DOWN input_port_read_indexed(machine, 0)&0x40 | |
| 15 | #define PC1350_KEY_UP input_port_read_indexed(machine, 0)&0x20 | |
| 16 | #define PC1350_KEY_MODE input_port_read_indexed(machine, 0)&0x10 | |
| 17 | #define PC1350_KEY_CLS input_port_read_indexed(machine, 0)&8 | |
| 18 | #define PC1350_KEY_LEFT input_port_read_indexed(machine, 0)&4 | |
| 19 | #define PC1350_KEY_RIGHT input_port_read_indexed(machine, 0)&2 | |
| 20 | #define PC1350_KEY_DEL input_port_read_indexed(machine, 0)&1 | |
| 21 | 14 | |
| 22 | #define PC1350_KEY_INS input_port_read_indexed(machine, 1)&0x80 | |
| 23 | #define PC1350_KEY_BRK input_port_read_indexed(machine, 1)&0x40 | |
| 24 | #define PC1350_KEY_RSHIFT input_port_read_indexed(machine, 1)&0x20 | |
| 25 | #define PC1350_KEY_7 input_port_read_indexed(machine, 1)&0x10 | |
| 26 | #define PC1350_KEY_8 input_port_read_indexed(machine, 1)&8 | |
| 27 | #define PC1350_KEY_9 input_port_read_indexed(machine, 1)&4 | |
| 28 | #define PC1350_KEY_BRACE_OPEN input_port_read_indexed(machine, 1)&2 | |
| 29 | #define PC1350_KEY_BRACE_CLOSE input_port_read_indexed(machine, 1)&1 | |
| 30 | ||
| 31 | #define PC1350_KEY_4 input_port_read_indexed(machine, 2)&0x80 | |
| 32 | #define PC1350_KEY_5 input_port_read_indexed(machine, 2)&0x40 | |
| 33 | #define PC1350_KEY_6 input_port_read_indexed(machine, 2)&0x20 | |
| 34 | #define PC1350_KEY_SLASH input_port_read_indexed(machine, 2)&0x10 | |
| 35 | #define PC1350_KEY_COLON input_port_read_indexed(machine, 2)&8 | |
| 36 | #define PC1350_KEY_1 input_port_read_indexed(machine, 2)&4 | |
| 37 | #define PC1350_KEY_2 input_port_read_indexed(machine, 2)&2 | |
| 38 | #define PC1350_KEY_3 input_port_read_indexed(machine, 2)&1 | |
| 39 | ||
| 40 | #define PC1350_KEY_ASTERIX input_port_read_indexed(machine, 3)&0x80 | |
| 41 | #define PC1350_KEY_SEMICOLON input_port_read_indexed(machine, 3)&0x40 | |
| 42 | #define PC1350_KEY_0 input_port_read_indexed(machine, 3)&0x20 | |
| 43 | #define PC1350_KEY_POINT input_port_read_indexed(machine, 3)&0x10 | |
| 44 | #define PC1350_KEY_PLUS input_port_read_indexed(machine, 3)&8 | |
| 45 | #define PC1350_KEY_MINUS input_port_read_indexed(machine, 3)&4 | |
| 46 | #define PC1350_KEY_COMMA input_port_read_indexed(machine, 3)&2 | |
| 47 | #define PC1350_KEY_LSHIFT input_port_read_indexed(machine, 3)&1 | |
| 48 | ||
| 49 | #define PC1350_KEY_Q input_port_read_indexed(machine, 4)&0x80 | |
| 50 | #define PC1350_KEY_W input_port_read_indexed(machine, 4)&0x40 | |
| 51 | #define PC1350_KEY_E input_port_read_indexed(machine, 4)&0x20 | |
| 52 | #define PC1350_KEY_R input_port_read_indexed(machine, 4)&0x10 | |
| 53 | #define PC1350_KEY_T input_port_read_indexed(machine, 4)&8 | |
| 54 | #define PC1350_KEY_Y input_port_read_indexed(machine, 4)&4 | |
| 55 | #define PC1350_KEY_U input_port_read_indexed(machine, 4)&2 | |
| 56 | #define PC1350_KEY_I input_port_read_indexed(machine, 4)&1 | |
| 57 | ||
| 58 | #define PC1350_KEY_O input_port_read_indexed(machine, 5)&0x80 | |
| 59 | #define PC1350_KEY_P input_port_read_indexed(machine, 5)&0x40 | |
| 60 | #define PC1350_KEY_DEF input_port_read_indexed(machine, 5)&0x20 | |
| 61 | #define PC1350_KEY_A input_port_read_indexed(machine, 5)&0x10 | |
| 62 | #define PC1350_KEY_S input_port_read_indexed(machine, 5)&8 | |
| 63 | #define PC1350_KEY_D input_port_read_indexed(machine, 5)&4 | |
| 64 | #define PC1350_KEY_F input_port_read_indexed(machine, 5)&2 | |
| 65 | #define PC1350_KEY_G input_port_read_indexed(machine, 5)&1 | |
| 66 | ||
| 67 | #define PC1350_KEY_H input_port_read_indexed(machine, 6)&0x80 | |
| 68 | #define PC1350_KEY_J input_port_read_indexed(machine, 6)&0x40 | |
| 69 | #define PC1350_KEY_K input_port_read_indexed(machine, 6)&0x20 | |
| 70 | #define PC1350_KEY_L input_port_read_indexed(machine, 6)&0x10 | |
| 71 | #define PC1350_KEY_EQUALS input_port_read_indexed(machine, 6)&8 | |
| 72 | #define PC1350_KEY_SML input_port_read_indexed(machine, 6)&4 | |
| 73 | #define PC1350_KEY_Z input_port_read_indexed(machine, 6)&2 | |
| 74 | #define PC1350_KEY_X input_port_read_indexed(machine, 6)&1 | |
| 75 | ||
| 76 | #define PC1350_KEY_C input_port_read_indexed(machine, 7)&0x80 | |
| 77 | #define PC1350_KEY_V input_port_read_indexed(machine, 7)&0x40 | |
| 78 | #define PC1350_KEY_B input_port_read_indexed(machine, 7)&0x20 | |
| 79 | #define PC1350_KEY_N input_port_read_indexed(machine, 7)&0x10 | |
| 80 | #define PC1350_KEY_M input_port_read_indexed(machine, 7)&8 | |
| 81 | #define PC1350_KEY_SPACE input_port_read_indexed(machine, 7)&4 | |
| 82 | #define PC1350_KEY_ENTER input_port_read_indexed(machine, 7)&2 | |
| 83 | ||
| 84 | #define PC1350_CONTRAST (input_port_read_indexed(machine, 8)&7) | |
| 85 | ||
| 86 | ||
| 87 | 15 | /*----------- defined in machine/pc1350.c -----------*/ |
| 88 | 16 | |
| 89 | 17 | void pc1350_outa(int data); |
| r2772 | r2773 | |
|---|---|---|
| 12 | 12 | #define CONCEPT_H_ |
| 13 | 13 | |
| 14 | 14 | |
| 15 | enum | |
| 16 | { | |
| 17 | input_port_keyboard_concept = 0, | |
| 18 | dipswitch_port_concept = 6, | |
| 19 | display_orientation_concept = 7 | |
| 20 | }; | |
| 21 | ||
| 22 | ||
| 23 | 15 | /*----------- defined in machine/concept.c -----------*/ |
| 24 | 16 | |
| 25 | 17 | MACHINE_START(concept); |
| r2772 | r2773 | |
|---|---|---|
| 22 | 22 | }; |
| 23 | 23 | |
| 24 | 24 | |
| 25 | /* defines for input ports */ | |
| 26 | enum | |
| 27 | { | |
| 28 | input_port_config_geneve = 0, | |
| 29 | input_port_joysticks_geneve, | |
| 30 | input_port_mouse_buttons_geneve, | |
| 31 | input_port_mouse_deltax_geneve, | |
| 32 | input_port_mouse_deltay_geneve, | |
| 33 | input_port_keyboard_geneve | |
| 34 | }; | |
| 35 | ||
| 36 | ||
| 37 | 25 | /*----------- defined in machine/geneve.c -----------*/ |
| 38 | 26 | |
| 39 | 27 | /* prototypes for machine code */ |
| r2772 | r2773 | |
|---|---|---|
| 45 | 45 | VIDEO_UPDATE( tx0 ); |
| 46 | 46 | void tx0_typewriter_drawchar(running_machine *machine, int character); |
| 47 | 47 | |
| 48 | /* defines for each bit and mask in input port "CSW" */ | |
| 48 | 49 | enum |
| 49 | 50 | { |
| 50 | tx0_control_switches = 0, /* various operator control panel switches */ | |
| 51 | tx0_tsr_switches_MSW = 1, /* toggle switch register switches */ | |
| 52 | tx0_tsr_switches_LSW = 2, | |
| 53 | tx0_typewriter = 3 /* typewriter keys */ | |
| 54 | }; | |
| 55 | ||
| 56 | /* defines for each bit and mask in input port tx0_control_switches */ | |
| 57 | enum | |
| 58 | { | |
| 59 | 51 | /* bit numbers */ |
| 60 | 52 | tx0_control_bit = 0, |
| 61 | 53 |
| r2772 | r2773 | |
|---|---|---|
| 9 | 9 | #ifndef PC1403_H_ |
| 10 | 10 | #define PC1403_H_ |
| 11 | 11 | |
| 12 | #define CONTRAST (input_port_read(machine, "DSW0") & 0x07) | |
| 12 | 13 | |
| 13 | #define KEY_SMALL input_port_read_indexed(machine, 1)&0x40 | |
| 14 | #define RAM32K (input_port_read_indexed(machine, 10)&0x80)==0x80 | |
| 15 | 14 | |
| 16 | ||
| 17 | 15 | /*----------- defined in machine/pc1403.c -----------*/ |
| 18 | 16 | |
| 19 | 17 | extern UINT8 pc1403_portc; |
| r2772 | r2773 | |
|---|---|---|
| 10 | 10 | #define PC1251_H_ |
| 11 | 11 | |
| 12 | 12 | |
| 13 | #define PC1251_ | |
| 13 | #define PC1251_ | |
| 14 | 14 | |
| 15 | #define PC1251_KEY_DEF input_port_read_indexed(machine, 0)&0x100 | |
| 16 | #define PC1251_KEY_SHIFT input_port_read_indexed(machine, 0)&0x80 | |
| 17 | #define PC1251_KEY_DOWN input_port_read_indexed(machine, 0)&0x40 | |
| 18 | #define PC1251_KEY_UP input_port_read_indexed(machine, 0)&0x20 | |
| 19 | #define PC1251_KEY_LEFT input_port_read_indexed(machine, 0)&0x10 | |
| 20 | #define PC1251_KEY_RIGHT input_port_read_indexed(machine, 0)&8 | |
| 21 | 15 | |
| 22 | #define PC1251_KEY_BRK input_port_read_indexed(machine, 1)&0x80 | |
| 23 | #define PC1251_KEY_Q input_port_read_indexed(machine, 1)&0x40 | |
| 24 | #define PC1251_KEY_W input_port_read_indexed(machine, 1)&0x20 | |
| 25 | #define PC1251_KEY_E input_port_read_indexed(machine, 1)&0x10 | |
| 26 | #define PC1251_KEY_R input_port_read_indexed(machine, 1)&8 | |
| 27 | #define PC1251_KEY_T input_port_read_indexed(machine, 1)&4 | |
| 28 | #define PC1251_KEY_Y input_port_read_indexed(machine, 1)&2 | |
| 29 | #define PC1251_KEY_U input_port_read_indexed(machine, 1)&1 | |
| 30 | ||
| 31 | #define PC1251_KEY_I input_port_read_indexed(machine, 2)&0x80 | |
| 32 | #define PC1251_KEY_O input_port_read_indexed(machine, 2)&0x40 | |
| 33 | #define PC1251_KEY_P input_port_read_indexed(machine, 2)&0x20 | |
| 34 | #define PC1251_KEY_A input_port_read_indexed(machine, 2)&0x10 | |
| 35 | #define PC1251_KEY_S input_port_read_indexed(machine, 2)&8 | |
| 36 | #define PC1251_KEY_D input_port_read_indexed(machine, 2)&4 | |
| 37 | #define PC1251_KEY_F input_port_read_indexed(machine, 2)&2 | |
| 38 | #define PC1251_KEY_G input_port_read_indexed(machine, 2)&1 | |
| 39 | ||
| 40 | #define PC1251_KEY_H input_port_read_indexed(machine, 3)&0x80 | |
| 41 | #define PC1251_KEY_J input_port_read_indexed(machine, 3)&0x40 | |
| 42 | #define PC1251_KEY_K input_port_read_indexed(machine, 3)&0x20 | |
| 43 | #define PC1251_KEY_L input_port_read_indexed(machine, 3)&0x10 | |
| 44 | #define PC1251_KEY_EQUALS input_port_read_indexed(machine, 3)&8 | |
| 45 | #define PC1251_KEY_Z input_port_read_indexed(machine, 3)&4 | |
| 46 | #define PC1251_KEY_X input_port_read_indexed(machine, 3)&2 | |
| 47 | #define PC1251_KEY_C input_port_read_indexed(machine, 3)&1 | |
| 48 | ||
| 49 | #define PC1251_KEY_V input_port_read_indexed(machine, 4)&0x80 | |
| 50 | #define PC1251_KEY_B input_port_read_indexed(machine, 4)&0x40 | |
| 51 | #define PC1251_KEY_N input_port_read_indexed(machine, 4)&0x20 | |
| 52 | #define PC1251_KEY_M input_port_read_indexed(machine, 4)&0x10 | |
| 53 | #define PC1251_KEY_SPACE input_port_read_indexed(machine, 4)&8 | |
| 54 | #define PC1251_KEY_ENTER input_port_read_indexed(machine, 4)&4 | |
| 55 | #define PC1251_KEY_7 input_port_read_indexed(machine, 4)&2 | |
| 56 | #define PC1251_KEY_8 input_port_read_indexed(machine, 4)&1 | |
| 57 | ||
| 58 | #define PC1251_KEY_9 input_port_read_indexed(machine, 5)&0x80 | |
| 59 | #define PC1251_KEY_CL input_port_read_indexed(machine, 5)&0x40 | |
| 60 | #define PC1251_KEY_4 input_port_read_indexed(machine, 5)&0x20 | |
| 61 | #define PC1251_KEY_5 input_port_read_indexed(machine, 5)&0x10 | |
| 62 | #define PC1251_KEY_6 input_port_read_indexed(machine, 5)&8 | |
| 63 | #define PC1251_KEY_SLASH input_port_read_indexed(machine, 5)&4 | |
| 64 | #define PC1251_KEY_1 input_port_read_indexed(machine, 5)&2 | |
| 65 | #define PC1251_KEY_2 input_port_read_indexed(machine, 5)&1 | |
| 66 | ||
| 67 | #define PC1251_KEY_3 input_port_read_indexed(machine, 6)&0x80 | |
| 68 | #define PC1251_KEY_ASTERIX input_port_read_indexed(machine, 6)&0x40 | |
| 69 | #define PC1251_KEY_0 input_port_read_indexed(machine, 6)&0x20 | |
| 70 | #define PC1251_KEY_POINT input_port_read_indexed(machine, 6)&0x10 | |
| 71 | #define PC1251_KEY_PLUS input_port_read_indexed(machine, 6)&8 | |
| 72 | #define PC1251_KEY_MINUS input_port_read_indexed(machine, 6)&4 | |
| 73 | #define PC1251_KEY_RESET input_port_read_indexed(machine, 6)&1 | |
| 74 | ||
| 75 | #define PC1251_RAM4K (input_port_read_indexed(machine, 7)&0xc0)==0x40 | |
| 76 | #define PC1251_RAM6K (input_port_read_indexed(machine, 7)&0xc0)==0x80 | |
| 77 | #define PC1251_RAM11K (input_port_read_indexed(machine, 7)&0xc0)==0xc0 | |
| 78 | ||
| 79 | #define PC1251_CONTRAST (input_port_read_indexed(machine, 7)&7) | |
| 80 | ||
| 81 | ||
| 82 | 16 | /*----------- defined in machine/pc1251.c -----------*/ |
| 83 | 17 | |
| 84 | 18 | void pc1251_outa(int data); |
| r2772 | r2773 | |
|---|---|---|
| 160 | 160 | } |
| 161 | 161 | } |
| 162 | 162 | |
| 163 | pocketc_draw_special(bitmap,RIGHT+149,DOWN+24,line, | |
| 164 | pc1401_lcd.reg[0x3c]&8?color[1]:color[0]); | |
| 165 | pocketc_draw_special(bitmap,RIGHT,DOWN-10,busy, | |
| 166 | pc1401_lcd.reg[0x3d]&1?color[1]:color[0]); | |
| 167 | pocketc_draw_special(bitmap,RIGHT+18,DOWN-10,def, | |
| 168 | pc1401_lcd.reg[0x3d]&2?color[1]:color[0]); | |
| 169 | pocketc_draw_special(bitmap,RIGHT+43,DOWN-10,shift, | |
| 170 | pc1401_lcd.reg[0x3d]&4?color[1]:color[0]); | |
| 171 | pocketc_draw_special(bitmap,RIGHT+63,DOWN-10,hyp, | |
| 172 | pc1401_lcd.reg[0x3d]&8?color[1]:color[0]); | |
| 173 | pocketc_draw_special(bitmap,RIGHT+38,DOWN+24,line, | |
| 174 | pc1401_lcd.reg[0x3d]&0x10?color[1]:color[0]); | |
| 175 | pocketc_draw_special(bitmap,RIGHT+23,DOWN+24,line, | |
| 176 | pc1401_lcd.reg[0x3d]&0x20?color[1]:color[0]); | |
| 177 | pocketc_draw_special(bitmap,RIGHT+8,DOWN+24,line, | |
| 178 | pc1401_lcd.reg[0x3d]&0x40?color[1]:color[0]); | |
| 179 | pocketc_draw_special(bitmap,RIGHT+183,DOWN-10,e, | |
| 180 | pc1401_lcd.reg[0x7c]&1?color[1]:color[0]); | |
| 181 | pocketc_draw_special(bitmap,RIGHT+176,DOWN-10,m, | |
| 182 | pc1401_lcd.reg[0x7c]&2?color[1]:color[0]); | |
| 183 | pocketc_draw_special(bitmap,RIGHT+168,DOWN-10,braces, | |
| 184 | pc1401_lcd.reg[0x7c]&4?color[1]:color[0]); | |
| 185 | pocketc_draw_special(bitmap,RIGHT+138,DOWN-10,rad, | |
| 186 | pc1401_lcd.reg[0x7c]&8?color[1]:color[0]); | |
| 187 | pocketc_draw_special(bitmap,RIGHT+134,DOWN-10,g, | |
| 188 | pc1401_lcd.reg[0x7c]&0x10?color[1]:color[0]); | |
| 189 | pocketc_draw_special(bitmap,RIGHT+126,DOWN-10,de, | |
| 190 | pc1401_lcd.reg[0x7c]&0x20?color[1]:color[0]); | |
| 191 | pocketc_draw_special(bitmap,RIGHT+165,DOWN+24,line, | |
| 192 | pc1401_lcd.reg[0x7c]&0x40?color[1]:color[0]); | |
| 163 | pocketc_draw_special(bitmap, RIGHT+149, DOWN+24, line, | |
| 164 | pc1401_lcd.reg[0x3c] & 0x08 ? color[1] : color[0]); | |
| 165 | ||
| 166 | pocketc_draw_special(bitmap, RIGHT, DOWN-10, busy, | |
| 167 | pc1401_lcd.reg[0x3d] & 0x01 ? color[1] : color[0]); | |
| 193 | 168 | |
| 169 | pocketc_draw_special(bitmap, RIGHT+18, DOWN-10, def, | |
| 170 | pc1401_lcd.reg[0x3d] & 0x02 ? color[1] : color[0]); | |
| 171 | ||
| 172 | pocketc_draw_special(bitmap, RIGHT+43, DOWN-10,shift, | |
| 173 | pc1401_lcd.reg[0x3d] & 0x04 ? color[1] : color[0]); | |
| 174 | ||
| 175 | pocketc_draw_special(bitmap, RIGHT+63, DOWN-10,hyp, | |
| 176 | pc1401_lcd.reg[0x3d] & 0x08 ? color[1] : color[0]); | |
| 177 | ||
| 178 | pocketc_draw_special(bitmap, RIGHT+38, DOWN+24,line, | |
| 179 | pc1401_lcd.reg[0x3d] & 0x10 ? color[1] : color[0]); | |
| 180 | ||
| 181 | pocketc_draw_special(bitmap, RIGHT+23, DOWN+24,line, | |
| 182 | pc1401_lcd.reg[0x3d] & 0x20 ? color[1] : color[0]); | |
| 183 | ||
| 184 | pocketc_draw_special(bitmap, RIGHT+8, DOWN+24,line, | |
| 185 | pc1401_lcd.reg[0x3d] & 0x40 ? color[1] : color[0]); | |
| 186 | ||
| 187 | pocketc_draw_special(bitmap, RIGHT+183, DOWN-10,e, | |
| 188 | pc1401_lcd.reg[0x7c] & 0x01 ? color[1] : color[0]); | |
| 189 | ||
| 190 | pocketc_draw_special(bitmap, RIGHT+176, DOWN-10,m, | |
| 191 | pc1401_lcd.reg[0x7c] & 0x02 ? color[1] : color[0]); | |
| 192 | ||
| 193 | pocketc_draw_special(bitmap, RIGHT+168, DOWN-10,braces, | |
| 194 | pc1401_lcd.reg[0x7c] & 0x04 ? color[1] : color[0]); | |
| 195 | ||
| 196 | pocketc_draw_special(bitmap, RIGHT+138, DOWN-10,rad, | |
| 197 | pc1401_lcd.reg[0x7c] & 0x08 ? color[1] : color[0]); | |
| 198 | ||
| 199 | pocketc_draw_special(bitmap, RIGHT+134, DOWN-10,g, | |
| 200 | pc1401_lcd.reg[0x7c] & 0x10 ? color[1] : color[0]); | |
| 201 | ||
| 202 | pocketc_draw_special(bitmap, RIGHT+126, DOWN-10,de, | |
| 203 | pc1401_lcd.reg[0x7c] & 0x20 ? color[1] : color[0]); | |
| 204 | ||
| 205 | pocketc_draw_special(bitmap, RIGHT+165, DOWN+24,line, | |
| 206 | pc1401_lcd.reg[0x7c] & 0x40 ? color[1] : color[0]); | |
| 207 | ||
| 194 | 208 | /* |
| 195 | 209 | 603c: 3 STAT |
| 196 | 210 | 603d: 0 BUSY, 1 DEF, 2 SHIFT, 3 HYP, 4 PRO, 5 RUN, 6 CAL |
| r2772 | r2773 | |
|---|---|---|
| 573 | 573 | int i, j; |
| 574 | 574 | modifier_state_t modifier_state; |
| 575 | 575 | int repeat_mode; |
| 576 | char port[6]; | |
| 576 | 577 | |
| 577 | ||
| 578 | 578 | /* read current key state */ |
| 579 | 579 | for (i=0; i<6; i++) |
| 580 | key_buf[i] = input_port_read_indexed(Machine, i); | |
| 580 | { | |
| 581 | sprintf(port, "KEY%d", i); | |
| 582 | key_buf[i] = input_port_read(Machine, port); | |
| 583 | } | |
| 581 | 584 | |
| 582 | ||
| 583 | 585 | /* parse modifier keys */ |
| 584 | 586 | if ((USES_8BIT_CHARCODES(unit)) |
| 585 | 587 | && ((key_buf[5] & 0x0400) || ((! (key_buf[5] & 0x0100)) && foreign_mode))) |
| r2772 | r2773 | |
|---|---|---|
| 61 | 61 | void vdt911_keyboard(int unit); |
| 62 | 62 | |
| 63 | 63 | #define VDT911_KEY_PORTS \ |
| 64 | PORT_START /* keys 1-16 */ \ | |
| 64 | PORT_START_TAG("KEY0") /* keys 1-16 */ \ | |
| 65 | 65 | PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F1") PORT_CODE(KEYCODE_F1) \ |
| 66 | 66 | PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F2") PORT_CODE(KEYCODE_F2) \ |
| 67 | 67 | PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F3") PORT_CODE(KEYCODE_F3) \ |
| r2772 | r2773 | |
| 79 | 79 | PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("1 !") PORT_CODE(KEYCODE_1) \ |
| 80 | 80 | PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("2 @") PORT_CODE(KEYCODE_2) \ |
| 81 | 81 | \ |
| 82 | PORT_START /* keys 17-32 */ \ | |
| 82 | PORT_START_TAG("KEY1") /* keys 17-32 */ \ | |
| 83 | 83 | PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("3 #") PORT_CODE(KEYCODE_3) \ |
| 84 | 84 | PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("4 $") PORT_CODE(KEYCODE_4) \ |
| 85 | 85 | PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("5 %") PORT_CODE(KEYCODE_5) \ |
| r2772 | r2773 | |
| 97 | 97 | PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("9 (numpad)") PORT_CODE(KEYCODE_9_PAD) \ |
| 98 | 98 | PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("PRINT") PORT_CODE(KEYCODE_PRTSCR) \ |
| 99 | 99 | \ |
| 100 | PORT_START /* keys 33-48 */ \ | |
| 100 | PORT_START_TAG("KEY2") /* keys 33-48 */ \ | |
| 101 | 101 | PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("(up)") PORT_CODE(KEYCODE_UP) \ |
| 102 | 102 | PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("REPEAT") PORT_CODE(KEYCODE_LALT) \ |
| 103 | 103 | PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("ENTER") PORT_CODE(KEYCODE_ENTER_PAD) \ |
| r2772 | r2773 | |
| 115 | 115 | PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("FIELD (left/right)") PORT_CODE(KEYCODE_CLOSEBRACE) \ |
| 116 | 116 | PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("RETURN") PORT_CODE(KEYCODE_ENTER) \ |
| 117 | 117 | \ |
| 118 | PORT_START /* keys 49-64 */ \ | |
| 118 | PORT_START_TAG("KEY3") /* keys 49-64 */ \ | |
| 119 | 119 | PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("4 (numpad)") PORT_CODE(KEYCODE_4_PAD) \ |
| 120 | 120 | PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("5 (numpad)") PORT_CODE(KEYCODE_5_PAD) \ |
| 121 | 121 | PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("6 (numpad)") PORT_CODE(KEYCODE_6_PAD) \ |
| r2772 | r2773 | |
| 133 | 133 | PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K) \ |
| 134 | 134 | PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L) \ |
| 135 | 135 | \ |
| 136 | PORT_START /* keys 65-80 */ \ | |
| 136 | PORT_START_TAG("KEY4") /* keys 65-80 */ \ | |
| 137 | 137 | PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("; :") PORT_CODE(KEYCODE_COLON) \ |
| 138 | 138 | PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("' \"") PORT_CODE(KEYCODE_QUOTE) \ |
| 139 | 139 | PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("(not on US keyboard)") PORT_CODE(KEYCODE_BACKSLASH) \ |
| r2772 | r2773 | |
| 151 | 151 | PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V) \ |
| 152 | 152 | PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) \ |
| 153 | 153 | \ |
| 154 | PORT_START /* keys 81-91 */ \ | |
| 154 | PORT_START_TAG("KEY5") /* keys 81-91 */ \ | |
| 155 | 155 | PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N) \ |
| 156 | 156 | PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M) \ |
| 157 | 157 | PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(", <") PORT_CODE(KEYCODE_COMMA) \ |
| r2772 | r2773 | |
|---|---|---|
| 142 | 142 | color[0] = pocketc_colortable[PC1350_CONTRAST][0]; |
| 143 | 143 | color[1] = pocketc_colortable[PC1350_CONTRAST][1]; |
| 144 | 144 | |
| 145 | for (k=0, y=DOWN; k<4; y+=16,k++) | |
| 145 | for (k=0, y=DOWN; k<4; y+=16, k++) | |
| 146 | 146 | { |
| 147 | 147 | for (x=RIGHT, i=pc1350_addr[k]; i<0xa00; i+=0x200) |
| 148 | 148 | { |
| r2772 | r2773 | |
| 157 | 157 | } |
| 158 | 158 | /* 783c: 0 SHIFT 1 DEF 4 RUN 5 PRO 6 JAPAN 7 SML */ |
| 159 | 159 | /* I don't know how they really look like in the lcd */ |
| 160 | pocketc_draw_special(bitmap,RIGHT-30,DOWN+45,shift, | |
| 161 | pc1350_lcd.reg[0x83c]&1?color[1]:color[0]); | |
| 162 | pocketc_draw_special(bitmap,RIGHT-30,DOWN+55,def, | |
| 163 | pc1350_lcd.reg[0x83c]&2?color[1]:color[0]); | |
| 164 | pocketc_draw_special(bitmap,RIGHT-30,DOWN+5,run, | |
| 165 | pc1350_lcd.reg[0x83c]&0x10?color[1]:color[0]); | |
| 166 | pocketc_draw_special(bitmap,RIGHT-30,DOWN+15,pro, | |
| 167 | pc1350_lcd.reg[0x83c]&0x20?color[1]:color[0]); | |
| 168 | pocketc_draw_special(bitmap,RIGHT-30,DOWN+25,japan, | |
| 169 | pc1350_lcd.reg[0x83c]&0x40?color[1]:color[0]); | |
| 170 | pocketc_draw_special(bitmap,RIGHT-30,DOWN+35,sml, | |
| 171 | pc1350_lcd.reg[0x83c]&0x80?color[1]:color[0]); | |
| 160 | pocketc_draw_special(bitmap, RIGHT-30, DOWN+45, shift, | |
| 161 | pc1350_lcd.reg[0x83c] & 0x01 ? color[1] : color[0]); | |
| 162 | pocketc_draw_special(bitmap, RIGHT-30, DOWN+55, def, | |
| 163 | pc1350_lcd.reg[0x83c] & 0x02 ? color[1] : color[0]); | |
| 164 | pocketc_draw_special(bitmap, RIGHT-30, DOWN+5, run, | |
| 165 | pc1350_lcd.reg[0x83c] & 0x10 ? color[1] : color[0]); | |
| 166 | pocketc_draw_special(bitmap, RIGHT-30, DOWN+15, pro, | |
| 167 | pc1350_lcd.reg[0x83c] & 0x20 ? color[1] : color[0]); | |
| 168 | pocketc_draw_special(bitmap, RIGHT-30, DOWN+25, japan, | |
| 169 | pc1350_lcd.reg[0x83c] & 0x40 ? color[1] : color[0]); | |
| 170 | pocketc_draw_special(bitmap, RIGHT-30, DOWN+35, sml, | |
| 171 | pc1350_lcd.reg[0x83c] & 0x80 ? color[1] : color[0]); | |
| 172 | ||
| 172 | 173 | return 0; |
| 173 | 174 | } |
| r2772 | r2773 | |
|---|---|---|
| 31 | 31 | #include "driver.h" |
| 32 | 32 | |
| 33 | 33 | #include "includes/pocketc.h" |
| 34 | #include "includes/pc1401.h" | |
| 35 | 34 | #include "includes/pc1403.h" |
| 36 | 35 | |
| 37 | 36 | static struct { |
| r2772 | r2773 | |
| 164 | 163 | /* HJB: we cannot initialize array with values from other arrays, thus... */ |
| 165 | 164 | color[0] = pocketc_colortable[CONTRAST][0]; |
| 166 | 165 | color[2] = pocketc_colortable[CONTRAST][1]; |
| 167 | color[1] = (pc1403_portc&1) ? color[2] : color[0]; | |
| 166 | color[1] = (pc1403_portc & 1) ? color[2] : color[0]; | |
| 168 | 167 | |
| 169 | if (pc1403_portc&1) { | |
| 170 | for (x=RIGHT,y=DOWN,i=0; i<6*5;x+=2) { | |
| 171 | for (j=0; j<5;j++,i++,x+=2) | |
| 168 | if (pc1403_portc & 1) | |
| 169 | { | |
| 170 | for (x=RIGHT, y=DOWN, i=0; i<6*5; x+=2) { | |
| 171 | for (j=0; j<5; j++, i++, x+=2) | |
| 172 | 172 | drawgfx(bitmap, screen->machine->gfx[0], pc1403_lcd.reg[i],CONTRAST,0,0, |
| 173 | 173 | x,y, |
| 174 | 174 | 0, TRANSPARENCY_NONE,0); |
| 175 | 175 | } |
| 176 | for (i=9*5; i<12*5;x+=2) { | |
| 177 | for (j=0; j<5;j++,i++,x+=2) | |
| 176 | for (i=9*5; i<12*5; x+=2) | |
| 177 | { | |
| 178 | for (j=0; j<5; j++, i++, x+=2) | |
| 178 | 179 | drawgfx(bitmap, screen->machine->gfx[0], pc1403_lcd.reg[i],CONTRAST,0,0, |
| 179 | 180 | x,y, |
| 180 | 181 | 0, TRANSPARENCY_NONE,0); |
| 181 | 182 | } |
| 182 | for (i=6*5; i<9*5;x+=2) { | |
| 183 | for (j=0; j<5;j++,i++,x+=2) | |
| 183 | for (i=6*5; i<9*5; x+=2) | |
| 184 | { | |
| 185 | for (j=0; j<5; j++, i++, x+=2) | |
| 184 | 186 | drawgfx(bitmap, screen->machine->gfx[0], pc1403_lcd.reg[i],CONTRAST,0,0, |
| 185 | 187 | x,y, |
| 186 | 188 | 0, TRANSPARENCY_NONE,0); |
| 187 | 189 | } |
| 188 | for (i=0x7b-3*5; i>0x7b-6*5;x+=2) { | |
| 189 | for (j=0; j<5;j++,i--,x+=2) | |
| 190 | for (i=0x7b-3*5; i>0x7b-6*5; x+=2) | |
| 191 | { | |
| 192 | for (j=0; j<5; j++, i--, x+=2) | |
| 190 | 193 | drawgfx(bitmap, screen->machine->gfx[0], pc1403_lcd.reg[i],CONTRAST,0,0, |
| 191 | 194 | x,y, |
| 192 | 195 | 0, TRANSPARENCY_NONE,0); |
| 193 | 196 | } |
| 194 | for (i=0x7b; i>0x7b-3*5;x+=2) { | |
| 195 | for (j=0; j<5;j++,i--,x+=2) | |
| 197 | for (i=0x7b; i>0x7b-3*5; x+=2) | |
| 198 | { | |
| 199 | for (j=0; j<5; j++, i--, x+=2) | |
| 196 | 200 | drawgfx(bitmap, screen->machine->gfx[0], pc1403_lcd.reg[i],CONTRAST,0,0, |
| 197 | 201 | x,y, |
| 198 | 202 | 0, TRANSPARENCY_NONE,0); |
| 199 | 203 | } |
| 200 | for (i=0x7b-6*5; i>0x7b-12*5;x+=2) { | |
| 201 | for (j=0; j<5;j++,i--,x+=2) | |
| 204 | for (i=0x7b-6*5; i>0x7b-12*5; x+=2) | |
| 205 | { | |
| 206 | for (j=0; j<5; j++, i--, x+=2) | |
| 202 | 207 | drawgfx(bitmap, screen->machine->gfx[0], pc1403_lcd.reg[i],CONTRAST,0,0, |
| 203 | 208 | x,y, |
| 204 | 209 | 0, TRANSPARENCY_NONE,0); |
| r2772 | r2773 | |
| 207 | 212 | /* if display is off, busy is always visible? it seems to behave like that. */ |
| 208 | 213 | /* But if computer is off, busy is hidden. */ |
| 209 | 214 | if(!(pc1403_portc&8)) |
| 210 | {if (pc1403_portc&1) pocketc_draw_special(bitmap,RIGHT,DOWN-13,busy, | |
| 211 | pc1403_lcd.reg[0x3d]&1?color[2]:color[0]); | |
| 212 | else pocketc_draw_special(bitmap,RIGHT,DOWN-13,busy,color[2]); | |
| 215 | { | |
| 216 | if (pc1403_portc&1) | |
| 217 | pocketc_draw_special(bitmap, RIGHT, DOWN-13, busy, | |
| 218 | pc1403_lcd.reg[0x3d] & 1 ? color[2] : color[0]); | |
| 219 | ||
| 220 | else pocketc_draw_special(bitmap, RIGHT, DOWN-13, busy, color[2]); | |
| 213 | 221 | } |
| 214 | else pocketc_draw_special(bitmap,RIGHT,DOWN-13,busy,color[0]); | |
| 222 | else pocketc_draw_special(bitmap, RIGHT, DOWN-13, busy, color[0]); | |
| 215 | 223 | |
| 216 | pocketc_draw_special(bitmap,RIGHT+18,DOWN-13,def, | |
| 217 | pc1403_lcd.reg[0x3d]&2?color[1]:color[0]); | |
| 218 | pocketc_draw_special(bitmap,RIGHT+43,DOWN-13,shift, | |
| 219 | pc1403_lcd.reg[0x3d]&4?color[1]:color[0]); | |
| 220 | pocketc_draw_special(bitmap,RIGHT+63,DOWN-13,hyp, | |
| 221 | pc1403_lcd.reg[0x3d]&8?color[1]:color[0]); | |
| 224 | pocketc_draw_special(bitmap, RIGHT+18, DOWN-13, def, | |
| 225 | pc1403_lcd.reg[0x3d] & 0x02 ? color[1] : color[0]); | |
| 226 | pocketc_draw_special(bitmap, RIGHT+43, DOWN-13, shift, | |
| 227 | pc1403_lcd.reg[0x3d] & 0x04 ? color[1] : color[0]); | |
| 228 | pocketc_draw_special(bitmap, RIGHT+63, DOWN-13, hyp, | |
| 229 | pc1403_lcd.reg[0x3d] & 0x08 ? color[1] : color[0]); | |
| 222 | 230 | |
| 223 | pocketc_draw_special(bitmap,RIGHT+155,DOWN-13,kana, | |
| 224 | pc1403_lcd.reg[0x3c]&1?color[1]:color[0]); | |
| 225 | pocketc_draw_special(bitmap,RIGHT+167,DOWN-13,shoo, | |
| 226 | pc1403_lcd.reg[0x3c]&2?color[1]:color[0]); | |
| 227 | pocketc_draw_special(bitmap,RIGHT+178,DOWN-13,sml, | |
| 228 | pc1403_lcd.reg[0x3c]&4?color[1]:color[0]); | |
| 231 | pocketc_draw_special(bitmap, RIGHT+155, DOWN-13, kana, | |
| 232 | pc1403_lcd.reg[0x3c] & 0x01 ? color[1] : color[0]); | |
| 233 | pocketc_draw_special(bitmap, RIGHT+167, DOWN-13, shoo, | |
| 234 | pc1403_lcd.reg[0x3c] & 0x02 ? color[1] : color[0]); | |
| 235 | pocketc_draw_special(bitmap, RIGHT+178, DOWN-13, sml, | |
| 236 | pc1403_lcd.reg[0x3c] & 0x04 ? color[1] : color[0]); | |
| 229 | 237 | |
| 230 | pocketc_draw_special(bitmap,RIGHT+191,DOWN-13,de, | |
| 231 | pc1403_lcd.reg[0x7c]&0x20?color[1]:color[0]); | |
| 232 | pocketc_draw_special(bitmap,RIGHT+199,DOWN-13,g, | |
| 233 | pc1403_lcd.reg[0x7c]&0x10?color[1]:color[0]); | |
| 234 | pocketc_draw_special(bitmap,RIGHT+203,DOWN-13,rad, | |
| 235 | pc1403_lcd.reg[0x7c]&8?color[1]:color[0]); | |
| 238 | pocketc_draw_special(bitmap, RIGHT+191, DOWN-13, de, | |
| 239 | pc1403_lcd.reg[0x7c] & 0x20 ? color[1] : color[0]); | |
| 240 | pocketc_draw_special(bitmap, RIGHT+199, DOWN-13, g, | |
| 241 | pc1403_lcd.reg[0x7c] & 0x10 ? color[1] : color[0]); | |
| 242 | pocketc_draw_special(bitmap, RIGHT+203, DOWN-13, rad, | |
| 243 | pc1403_lcd.reg[0x7c] & 0x08 ? color[1] : color[0]); | |
| 236 | 244 | |
| 237 | pocketc_draw_special(bitmap,RIGHT+266,DOWN-13,braces, | |
| 238 | pc1403_lcd.reg[0x7c]&4?color[1]:color[0]); | |
| 239 | pocketc_draw_special(bitmap,RIGHT+274,DOWN-13,m, | |
| 240 | pc1403_lcd.reg[0x7c]&2?color[1]:color[0]); | |
| 241 | pocketc_draw_special(bitmap,RIGHT+281,DOWN-13,e, | |
| 242 | pc1403_lcd.reg[0x7c]&1?color[1]:color[0]); | |
| 245 | pocketc_draw_special(bitmap, RIGHT+266, DOWN-13, braces, | |
| 246 | pc1403_lcd.reg[0x7c] & 0x04 ? color[1] : color[0]); | |
| 247 | pocketc_draw_special(bitmap, RIGHT+274, DOWN-13, m, | |
| 248 | pc1403_lcd.reg[0x7c] & 0x02 ? color[1] : color[0]); | |
| 249 | pocketc_draw_special(bitmap, RIGHT+281, DOWN-13, e, | |
| 250 | pc1403_lcd.reg[0x7c] & 0x01 ? color[1] : color[0]); | |
| 243 | 251 | |
| 244 | pocketc_draw_special(bitmap, RIGHT+10,DOWN+27,line /* empty */, | |
| 245 | (pc1403_lcd.reg[0x3c]&0x40) ?color[1]:color[0]); | |
| 246 | pocketc_draw_special(bitmap,RIGHT+31,DOWN+27,line /*calc*/, | |
| 247 | (pc1403_lcd.reg[0x3d]&0x40) ?color[1]:color[0]); | |
| 248 | pocketc_draw_special(bitmap,RIGHT+52,DOWN+27,line/*run*/, | |
| 249 | (pc1403_lcd.reg[0x3d]&0x20) ?color[1]:color[0]); | |
| 250 | pocketc_draw_special(bitmap,RIGHT+73,DOWN+27,line/*prog*/, | |
| 251 | (pc1403_lcd.reg[0x3d]&0x10) ? color[1]:color[0]); | |
| 252 | pocketc_draw_special(bitmap, RIGHT+94,DOWN+27,line /* empty */, | |
| 253 | (pc1403_lcd.reg[0x3c]&0x20) ? color[1]:color[0]); | |
| 252 | pocketc_draw_special(bitmap, RIGHT+10, DOWN+27, line /* empty */, | |
| 253 | pc1403_lcd.reg[0x3c] & 0x40 ? color[1] : color[0]); | |
| 254 | pocketc_draw_special(bitmap, RIGHT+31, DOWN+27, line /*calc*/, | |
| 255 | pc1403_lcd.reg[0x3d] & 0x40 ? color[1] : color[0]); | |
| 256 | pocketc_draw_special(bitmap, RIGHT+52, DOWN+27, line/*run*/, | |
| 257 | pc1403_lcd.reg[0x3d] & 0x20 ? color[1] : color[0]); | |
| 258 | pocketc_draw_special(bitmap, RIGHT+73, DOWN+27, line/*prog*/, | |
| 259 | pc1403_lcd.reg[0x3d] & 0x10 ? color[1] : color[0]); | |
| 260 | pocketc_draw_special(bitmap, RIGHT+94, DOWN+27, line /* empty */, | |
| 261 | pc1403_lcd.reg[0x3c] & 0x20 ? color[1] : color[0]); | |
| 254 | 262 | |
| 255 | pocketc_draw_special(bitmap,RIGHT+232,DOWN+27,line/*matrix*/, | |
| 256 | pc1403_lcd.reg[0x3c]&0x10?color[1]:color[0]); | |
| 257 | pocketc_draw_special(bitmap,RIGHT+253,DOWN+27,line/*stat*/, | |
| 258 | pc1403_lcd.reg[0x3c]&8?color[1]:color[0]); | |
| 259 | pocketc_draw_special(bitmap,RIGHT+274,DOWN+27,line/*print*/, | |
| 260 | pc1403_lcd.reg[0x7c]&0x40?color[1]:color[0]); | |
| 263 | pocketc_draw_special(bitmap, RIGHT+232, DOWN+27, line/*matrix*/, | |
| 264 | pc1403_lcd.reg[0x3c] & 0x10 ? color[1] : color[0]); | |
| 265 | pocketc_draw_special(bitmap, RIGHT+253, DOWN+27, line/*stat*/, | |
| 266 | pc1403_lcd.reg[0x3c] & 0x08 ? color[1] : color[0]); | |
| 267 | pocketc_draw_special(bitmap, RIGHT+274, DOWN+27, line/*print*/, | |
| 268 | pc1403_lcd.reg[0x7c] & 0x40 ? color[1] : color[0]); | |
| 261 | 269 | |
| 262 | 270 | return 0; |
| 263 | 271 | } |
| r2772 | r2773 | |
|---|---|---|
| 128 | 128 | color[0] = pocketc_colortable[PC1251_CONTRAST][0]; |
| 129 | 129 | color[1] = pocketc_colortable[PC1251_CONTRAST][1]; |
| 130 | 130 | |
| 131 | for (x=RIGHT,y=DOWN,i=0; i<60;x+=3) { | |
| 132 | for (j=0; j<5;j++,i++,x+=3) | |
| 131 | for (x=RIGHT,y=DOWN, i=0; i<60; x+=3) | |
| 132 | { | |
| 133 | for (j=0; j<5; j++, i++, x+=3) | |
| 133 | 134 | drawgfx(bitmap, screen->machine->gfx[0], pc1251_lcd.reg[i], |
| 134 | 135 | PC1251_CONTRAST,0,0, |
| 135 | 136 | x,y, |
| 136 | 137 | 0, TRANSPARENCY_NONE,0); |
| 137 | 138 | } |
| 138 | for (i=0x7b; i>=0x40;x+=3) { | |
| 139 | for (j=0; j<5;j++,i--,x+=3) | |
| 139 | for (i=0x7b; i>=0x40; x+=3) | |
| 140 | { | |
| 141 | for (j=0; j<5; j++, i--, x+=3) | |
| 140 | 142 | drawgfx(bitmap, screen->machine->gfx[0], pc1251_lcd.reg[i], |
| 141 | 143 | PC1251_CONTRAST,0,0, |
| 142 | 144 | x,y, |
| 143 | 145 | 0, TRANSPARENCY_NONE,0); |
| 144 | 146 | } |
| 145 | pocketc_draw_special(bitmap,RIGHT+134,DOWN-10,de, | |
| 146 | pc1251_lcd.reg[0x3c]&8?color[1]:color[0]); | |
| 147 | pocketc_draw_special(bitmap,RIGHT+142,DOWN-10,g, | |
| 148 | pc1251_lcd.reg[0x3c]&4?color[1]:color[0]); | |
| 149 | pocketc_draw_special(bitmap,RIGHT+146,DOWN-10,rad, | |
| 150 | pc1251_lcd.reg[0x3d]&4?color[1]:color[0]); | |
| 151 | pocketc_draw_special(bitmap,RIGHT+18,DOWN-10,def, | |
| 152 | pc1251_lcd.reg[0x3c]&1?color[1]:color[0]); | |
| 153 | pocketc_draw_special(bitmap,RIGHT,DOWN-10,shift, | |
| 154 | pc1251_lcd.reg[0x3d]&2?color[1]:color[0]); | |
| 155 | pocketc_draw_special(bitmap,RIGHT+38,DOWN-10,pro, | |
| 156 | pc1251_lcd.reg[0x3e]&1?color[1]:color[0]); | |
| 157 | pocketc_draw_special(bitmap,RIGHT+53,DOWN-10,run, | |
| 158 | pc1251_lcd.reg[0x3e]&2?color[1]:color[0]); | |
| 159 | pocketc_draw_special(bitmap,RIGHT+68,DOWN-10,rsv, | |
| 160 | pc1251_lcd.reg[0x3e]&4?color[1]:color[0]); | |
| 161 | 147 | |
| 148 | pocketc_draw_special(bitmap, RIGHT+134, DOWN-10, de, | |
| 149 | pc1251_lcd.reg[0x3c] & 0x08 ? color[1] : color[0]); | |
| 150 | pocketc_draw_special(bitmap, RIGHT+142, DOWN-10, g, | |
| 151 | pc1251_lcd.reg[0x3c] & 0x04 ? color[1] : color[0]); | |
| 152 | pocketc_draw_special(bitmap, RIGHT+146, DOWN-10, rad, | |
| 153 | pc1251_lcd.reg[0x3d] & 0x04 ? color[1] : color[0]); | |
| 154 | pocketc_draw_special(bitmap, RIGHT+18, DOWN-10, def, | |
| 155 | pc1251_lcd.reg[0x3c] & 0x01 ? color[1] : color[0]); | |
| 156 | pocketc_draw_special(bitmap, RIGHT, DOWN-10, shift, | |
| 157 | pc1251_lcd.reg[0x3d] & 0x02 ? color[1] : color[0]); | |
| 158 | pocketc_draw_special(bitmap, RIGHT+38, DOWN-10, pro, | |
| 159 | pc1251_lcd.reg[0x3e] & 0x01 ? color[1] : color[0]); | |
| 160 | pocketc_draw_special(bitmap, RIGHT+53, DOWN-10, run, | |
| 161 | pc1251_lcd.reg[0x3e] & 0x02 ? color[1] : color[0]); | |
| 162 | pocketc_draw_special(bitmap, RIGHT+68, DOWN-10, rsv, | |
| 163 | pc1251_lcd.reg[0x3e] & 0x04 ? color[1] : color[0]); | |
| 164 | ||
| 162 | 165 | /* 0x3c 1 def?, 4 g, 8 de |
| 163 | 166 | 0x3d 2 shift, 4 rad, 8 error |
| 164 | 167 | 0x3e 1 pro?, 2 run?, 4rsv?*/ |
| r2772 | r2773 | |
|---|---|---|
| 625 | 625 | int i, j; |
| 626 | 626 | modifier_state_t modifier_state; |
| 627 | 627 | int repeat_mode; |
| 628 | char port[6]; | |
| 628 | 629 | |
| 629 | ||
| 630 | 630 | /* read current key state */ |
| 631 | for (i=0; i<6; i++) | |
| 632 | key_buf[i] = input_port_read_indexed(Machine, i); | |
| 631 | /* 2008-05 FP: in 733_asr.h there are only 4 input ports defined... */ | |
| 632 | /* for (i=0; i<6; i++) */ | |
| 633 | for (i=0; i<4; i++) | |
| 634 | { | |
| 635 | sprintf(port, "KEY%d", i); | |
| 636 | key_buf[i] = input_port_read(Machine, port); | |
| 637 | } | |
| 633 | 638 | |
| 634 | 639 | /* process key modifiers */ |
| 635 | 640 | if (key_buf[1] & 0x0200) |
| r2772 | r2773 | |
|---|---|---|
| 32 | 32 | void asr733_keyboard(int unit); |
| 33 | 33 | |
| 34 | 34 | #define ASR733_KEY_PORTS \ |
| 35 | PORT_START /* keys 1-16 */ \ | |
| 35 | PORT_START_TAG("KEY0") /* keys 1-16 */ \ | |
| 36 | 36 | PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) \ |
| 37 | 37 | PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2) \ |
| 38 | 38 | PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3) \ |
| r2772 | r2773 | |
| 50 | 50 | PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W) \ |
| 51 | 51 | PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E) \ |
| 52 | 52 | \ |
| 53 | PORT_START /* keys 17-32 */ \ | |
| 53 | PORT_START_TAG("KEY1") /* keys 17-32 */ \ | |
| 54 | 54 | PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R) \ |
| 55 | 55 | PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T) \ |
| 56 | 56 | PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Y") PORT_CODE(KEYCODE_Y) \ |
| r2772 | r2773 | |
| 68 | 68 | PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G) \ |
| 69 | 69 | PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H) \ |
| 70 | 70 | \ |
| 71 | PORT_START /* keys 33-48 */ \ | |
| 71 | PORT_START_TAG("KEY2") /* keys 33-48 */ \ | |
| 72 | 72 | PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J) \ |
| 73 | 73 | PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K) \ |
| 74 | 74 | PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L) \ |
| r2772 | r2773 | |
| 88 | 88 | PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(",") PORT_CODE(KEYCODE_COMMA) \ |
| 89 | 89 | PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(".") PORT_CODE(KEYCODE_STOP) \ |
| 90 | 90 | \ |
| 91 | PORT_START /* keys 49-51 */ \ | |
| 91 | PORT_START_TAG("KEY3") /* keys 49-51 */ \ | |
| 92 | 92 | PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("/") PORT_CODE(KEYCODE_SLASH) \ |
| 93 | 93 | PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_RSHIFT) \ |
| 94 | 94 | PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("(SPACE)") PORT_CODE(KEYCODE_SPACE) |
| r2772 | r2773 | |
|---|---|---|
| 547 | 547 | int RetVal; |
| 548 | 548 | int Idx; |
| 549 | 549 | int Selected; |
| 550 | ||
| 550 | char port[6]; | |
| 551 | ||
| 551 | 552 | LOG_KEYBOARD(("PB Read\n")); |
| 552 | 553 | |
| 553 | 554 | KAny_next=0; |
| r2772 | r2773 | |
| 558 | 559 | /* This actually scans in the keyboard */ |
| 559 | 560 | if(RowShifter==0x00) |
| 560 | 561 | { |
| 561 | for(Idx=0;Idx<NoKeyrows;Idx++) | |
| 562 | for(Idx=0; Idx<NoKeyrows; Idx++) | |
| 562 | 563 | { |
| 563 | switch (Idx) | |
| 564 | { | |
| 565 | case 0 : Keyboard[Idx]=input_port_read_indexed(machine, 0); break; | |
| 566 | case 1 : Keyboard[Idx]=input_port_read_indexed(machine, 1); break; | |
| 567 | case 2 : Keyboard[Idx]=input_port_read_indexed(machine, 2); break; | |
| 568 | case 3 : Keyboard[Idx]=input_port_read_indexed(machine, 3); break; | |
| 569 | case 4 : Keyboard[Idx]=input_port_read_indexed(machine, 4); break; | |
| 570 | case 5 : Keyboard[Idx]=input_port_read_indexed(machine, 5); break; | |
| 571 | case 6 : Keyboard[Idx]=input_port_read_indexed(machine, 6); break; | |
| 572 | case 7 : Keyboard[Idx]=input_port_read_indexed(machine, 7); break; | |
| 573 | case 8 : Keyboard[Idx]=input_port_read_indexed(machine, 8); break; | |
| 574 | case 9 : Keyboard[Idx]=input_port_read_indexed(machine, 9); break; | |
| 575 | } | |
| 564 | sprintf(port, "KEY%d", Idx); | |
| 565 | Keyboard[Idx] = input_port_read(machine, port); | |
| 576 | 566 | |
| 577 | 567 | if(Keyboard[Idx]!=0x7F) |
| 578 | 568 | { |
| r2772 | r2773 | |
| 984 | 974 | #if 0 |
| 985 | 975 | int Idx; |
| 986 | 976 | int Row; |
| 987 | ||
| 977 | char port[6]; | |
| 978 | ||
| 988 | 979 | LOG_KEYBOARD(("Scanning Host keyboard\n")); |
| 989 | 980 | |
| 990 | for(Idx=0;Idx<NoKeyrows;Idx++) | |
| 981 | for(Idx=0; Idx<NoKeyrows; Idx++) | |
| 991 | 982 | { |
| 992 | | |
| 983 | | |
| 993 | 984 | { |
| 994 | case 0 : Row=input_port_read_indexed(machine, 0) /*| 0x33*/; break; | |
| 995 | case 1 : Row=input_port_read_indexed(machine, 1); break; | |
| 996 | case 2 : Row=input_port_read_indexed(machine, 2); break; | |
| 997 | case 3 : Row=input_port_read_indexed(machine, 3); break; | |
| 998 | case 4 : Row=input_port_read_indexed(machine, 4); break; | |
| 999 | case 5 : Row=input_port_read_indexed(machine, 5); break; | |
| 1000 | case 6 : Row=input_port_read_indexed(machine, 6); break; | |
| 1001 | case 7 : Row=input_port_read_indexed(machine, 7); break; | |
| 1002 | case 8 : Row=input_port_read_indexed(machine, 8); break; | |
| 1003 | case 9 : Row=input_port_read_indexed(machine, 9); break; | |
| 1004 | default : Row=0x7F; break; | |
| 985 | sprintf(port, "KEY%d", Idx); | |
| 986 | Row = input_port_read(machine, port); | |
| 1005 | 987 | } |
| 988 | else | |
| 989 | Row = 0x7f; | |
| 990 | ||
| 1006 | 991 | Keyboard[Idx]=Row; |
| 1007 | 992 | LOG_KEYBOARD(("Keyboard[%d]=$%02X\n",Idx,Row)); |
| 993 | ||
| 1008 | 994 | if (Row!=0x7F) |
| 1009 | 995 | { |
| 1010 | 996 | LOG_KEYBOARD(("Found Pressed Key\n")); |
| r2772 | r2773 | |
|---|---|---|
| 160 | 160 | { |
| 161 | 161 | int config; |
| 162 | 162 | |
| 163 | config = input_port_read | |
| 163 | config = input_port_read | |
| 164 | 164 | pdp1_reset_param.extend_support = (config >> pdp1_config_extend_bit) & pdp1_config_extend_mask; |
| 165 | 165 | pdp1_reset_param.hw_mul_div = (config >> pdp1_config_hw_mul_div_bit) & pdp1_config_hw_mul_div_mask; |
| 166 | 166 | pdp1_reset_param.type_20_sbs = (config >> pdp1_config_type_20_sbs_bit) & pdp1_config_type_20_sbs_mask; |
| r2772 | r2773 | |
| 1175 | 1175 | */ |
| 1176 | 1176 | void iot_011(int op2, int nac, int mb, int *io, int ac) |
| 1177 | 1177 | { |
| 1178 | int key_state = input_port_read | |
| 1178 | int key_state = input_port_read | |
| 1179 | 1179 | int reply; |
| 1180 | 1180 | |
| 1181 | 1181 | |
| r2772 | r2773 | |
| 1257 | 1257 | static int old_typewriter_keys[4]; |
| 1258 | 1258 | |
| 1259 | 1259 | int typewriter_transitions; |
| 1260 | char port[5]; | |
| 1260 | 1261 | |
| 1261 | 1262 | |
| 1262 | 1263 | for (i=0; i<4; i++) |
| 1263 | typewriter_keys[i] = input_port_read_indexed(machine, pdp1_typewriter + i); | |
| 1264 | { | |
| 1265 | sprintf(port, "TWR%d", i); | |
| 1266 | typewriter_keys[i] = input_port_read(machine, port); | |
| 1267 | } | |
| 1264 | 1268 | |
| 1265 | 1269 | for (i=0; i<4; i++) |
| 1266 | 1270 | { |
| r2772 | r2773 | |
| 1291 | 1295 | int current_state; |
| 1292 | 1296 | static int previous_state; |
| 1293 | 1297 | |
| 1294 | lightpen.active = (input_port_read | |
| 1298 | lightpen.active = (input_port_read | |
| 1295 | 1299 | |
| 1296 | current_state = input_port_read | |
| 1300 | current_state = input_port_read | |
| 1297 | 1301 | |
| 1298 | 1302 | /* update pen down state */ |
| 1299 | 1303 | lightpen.down = lightpen.active && (current_state & pdp1_lightpen_down); |
| r2772 | r2773 | |
| 1315 | 1319 | previous_state = current_state; |
| 1316 | 1320 | |
| 1317 | 1321 | /* update pen position */ |
| 1318 | x_delta = input_port_read_indexed(machine, pdp1_lightpen_x); | |
| 1319 | y_delta = input_port_read_indexed(machine, pdp1_lightpen_y); | |
| 1322 | x_delta = input_port_read(machine, "LIGHTX"); | |
| 1323 | y_delta = input_port_read(machine, "LIGHTY"); | |
| 1320 | 1324 | |
| 1321 | 1325 | if (x_delta >= 0x80) |
| 1322 | 1326 | x_delta -= 0x100; |
| r2772 | r2773 | |
| 1356 | 1360 | int ta_transitions; |
| 1357 | 1361 | |
| 1358 | 1362 | |
| 1359 | cpunum_set_reg(0, PDP1_SS, input_port_read | |
| 1363 | cpunum_set_reg(0, PDP1_SS, input_port_read | |
| 1360 | 1364 | |
| 1361 | 1365 | /* read new state of control keys */ |
| 1362 | control_keys = input_port_read | |
| 1366 | control_keys = input_port_read | |
| 1363 | 1367 | |
| 1364 | 1368 | if (control_keys & pdp1_control) |
| 1365 | 1369 | { |
| r2772 | r2773 | |
| 1451 | 1455 | |
| 1452 | 1456 | |
| 1453 | 1457 | /* handle test word keys */ |
| 1454 | tw_keys = (input_port_read | |
| 1458 | tw_keys = (input_port_read | |
| 1455 | 1459 | |
| 1456 | 1460 | /* compute transitions */ |
| 1457 | 1461 | tw_transitions = tw_keys & (~ old_tw_keys); |
| r2772 | r2773 | |
| 1464 | 1468 | |
| 1465 | 1469 | |
| 1466 | 1470 | /* handle address keys */ |
| 1467 | ta_keys = input_port_read | |
| 1471 | ta_keys = input_port_read | |
| 1468 | 1472 | |
| 1469 | 1473 | /* compute transitions */ |
| 1470 | 1474 | ta_transitions = ta_keys & (~ old_ta_keys); |
| r2772 | r2773 | |
|---|---|---|
| 27 | 27 | int pc1350_ina(void) |
| 28 | 28 | { |
| 29 | 29 | running_machine *machine = Machine; |
| 30 | int data=outa; | |
| 31 | int t=pc1350_keyboard_line_r(); | |
| 32 | if (t&1) { | |
| 33 | if (PC1350_KEY_BRACE_CLOSE) data|=1; | |
| 34 | if (PC1350_KEY_COLON) data|=2; | |
| 35 | if (PC1350_KEY_SEMICOLON) data|=4; | |
| 36 | if (PC1350_KEY_COMMA) data|=8; | |
| 37 | if (PC1350_KEY_SML) data|=0x10; | |
| 38 | if (PC1350_KEY_DEF) data|=0x20; | |
| 39 | // not sure if both shifts are wired to the same contacts | |
| 40 | if (PC1350_KEY_LSHIFT||PC1350_KEY_RSHIFT) data|=0x40; | |
| 30 | int data = outa; | |
| 31 | int t = pc1350_keyboard_line_r(); | |
| 32 | ||
| 33 | if (t & 0x01) | |
| 34 | data |= input_port_read(machine, "KEY0"); | |
| 35 | ||
| 36 | if (t & 0x02) | |
| 37 | data |= input_port_read(machine, "KEY1"); | |
| 38 | ||
| 39 | if (t & 0x04) | |
| 40 | data |= input_port_read(machine, "KEY2"); | |
| 41 | ||
| 42 | if (t & 0x08) | |
| 43 | data |= input_port_read(machine, "KEY3"); | |
| 44 | ||
| 45 | if (t & 0x10) | |
| 46 | data |= input_port_read(machine, "KEY4"); | |
| 47 | ||
| 48 | if (t & 0x20) | |
| 49 | data |= input_port_read(machine, "KEY5"); | |
| 50 | ||
| 51 | if (outa & 0x01) | |
| 52 | data |= input_port_read(machine, "KEY6"); | |
| 53 | ||
| 54 | if (outa & 0x02) | |
| 55 | data |= input_port_read(machine, "KEY7"); | |
| 56 | ||
| 57 | if (outa & 0x04) | |
| 58 | { | |
| 59 | data |= input_port_read(machine, "KEY8"); | |
| 60 | ||
| 61 | /* At Power Up we fake a 'CLS' pressure */ | |
| 62 | if (power) | |
| 63 | data |= 0x08; | |
| 41 | 64 | } |
| 42 | if (t&2) { | |
| 43 | if (PC1350_KEY_BRACE_OPEN) data|=1; | |
| 44 | if (PC1350_KEY_SLASH) data|=2; | |
| 45 | if (PC1350_KEY_ASTERIX) data|=4; | |
| 46 | if (PC1350_KEY_MINUS) data|=8; | |
| 47 | if (PC1350_KEY_Z) data|=0x10; | |
| 48 | if (PC1350_KEY_A) data|=0x20; | |
| 49 | if (PC1350_KEY_Q) data|=0x40; | |
| 50 | } | |
| 51 | if (t&4) { | |
| 52 | if (PC1350_KEY_9) data|=1; | |
| 53 | if (PC1350_KEY_6) data|=2; | |
| 54 | if (PC1350_KEY_3) data|=4; | |
| 55 | if (PC1350_KEY_PLUS) data|=8; | |
| 56 | if (PC1350_KEY_X) data|=0x10; | |
| 57 | if (PC1350_KEY_S) data|=0x20; | |
| 58 | if (PC1350_KEY_W) data|=0x40; | |
| 59 | } | |
| 60 | if (t&8) { | |
| 61 | if (PC1350_KEY_8) data|=1; | |
| 62 | if (PC1350_KEY_5) data|=2; | |
| 63 | if (PC1350_KEY_2) data|=4; | |
| 64 | if (PC1350_KEY_POINT) data|=8; | |
| 65 | if (PC1350_KEY_C) data|=0x10; | |
| 66 | if (PC1350_KEY_D) data|=0x20; | |
| 67 | if (PC1350_KEY_E) data|=0x40; | |
| 68 | } | |
| 69 | if (t&0x10) { | |
| 70 | if (PC1350_KEY_7) data|=1; | |
| 71 | if (PC1350_KEY_4) data|=2; | |
| 72 | if (PC1350_KEY_1) data|=4; | |
| 73 | if (PC1350_KEY_0) data|=8; | |
| 74 | if (PC1350_KEY_V) data|=0x10; | |
| 75 | if (PC1350_KEY_F) data|=0x20; | |
| 76 | if (PC1350_KEY_R) data|=0x40; | |
| 77 | } | |
| 78 | if (t&0x20) { | |
| 79 | if (PC1350_KEY_UP) data|=1; | |
| 80 | if (PC1350_KEY_DOWN) data|=2; | |
| 81 | if (PC1350_KEY_LEFT) data|=4; | |
| 82 | if (PC1350_KEY_RIGHT) data|=8; | |
| 83 | if (PC1350_KEY_B) data|=0x10; | |
| 84 | if (PC1350_KEY_G) data|=0x20; | |
| 85 | if (PC1350_KEY_T) data|=0x40; | |
| 86 | } | |
| 87 | if (outa&1) { | |
| 88 | // if (PC1350_KEY_1) data|=2; //? | |
| 89 | if (PC1350_KEY_INS) data|=4; | |
| 90 | if (PC1350_KEY_DEL) data|=8; | |
| 91 | if (PC1350_KEY_N) data|=0x10; | |
| 92 | if (PC1350_KEY_H) data|=0x20; | |
| 93 | if (PC1350_KEY_Y) data|=0x40; | |
| 94 | } | |
| 95 | if (outa&2) { | |
| 96 | // if (PC1350_KEY_2) data|=4; //? | |
| 97 | if (PC1350_KEY_MODE) data|=8; | |
| 98 | if (PC1350_KEY_M) data|=0x10; | |
| 99 | if (PC1350_KEY_J) data|=0x20; | |
| 100 | if (PC1350_KEY_U) data|=0x40; | |
| 101 | } | |
| 102 | if (outa&4) { | |
| 103 | if (power||PC1350_KEY_CLS) data|=8; | |
| 104 | if (PC1350_KEY_SPACE) data|=0x10; | |
| 105 | if (PC1350_KEY_K) data|=0x20; | |
| 106 | if (PC1350_KEY_I) data|=0x40; | |
| 107 | } | |
| 108 | if (outa&8) { | |
| 109 | if (PC1350_KEY_ENTER) data|=0x10; | |
| 110 | if (PC1350_KEY_L) data|=0x20; | |
| 111 | if (PC1350_KEY_O) data|=0x40; | |
| 112 | } | |
| 113 | if (outa&0x10) { | |
| 114 | if (PC1350_KEY_EQUALS) data|=0x20; | |
| 115 | if (PC1350_KEY_P) data|=0x40; | |
| 116 | } | |
| 117 | if (PC1350_KEY_OFF&&(outa&0xc0) ) data|=0xc0; | |
| 118 | 65 | |
| 66 | if (outa & 0x08) | |
| 67 | data |= input_port_read(machine, "KEY9"); | |
| 68 | ||
| 69 | if (outa & 0x10) | |
| 70 | data |= input_port_read(machine, "KEY10"); | |
| 71 | ||
| 72 | if (outa & 0xc0) | |
| 73 | data |= input_port_read(machine, "KEY11"); | |
| 74 | ||
| 119 | 75 | // missing lshift |
| 120 | 76 | |
| 121 | 77 | return data; |
| r2772 | r2773 | |
| 130 | 86 | int pc1350_brk(void) |
| 131 | 87 | { |
| 132 | 88 | running_machine *machine = Machine; |
| 133 | return | |
| 89 | return (input_port_read(machine, "EXTRA") & 0x01); | |
| 134 | 90 | } |
| 135 | 91 | |
| 136 | 92 | /* currently enough to save the external ram */ |
| r2772 | r2773 | |
|---|---|---|
| 1309 | 1309 | joystick_axis = mux_sel1; |
| 1310 | 1310 | joystick = mux_sel2; |
| 1311 | 1311 | |
| 1312 | /* poll keyoard keys */ | |
| 1313 | if ((input_port_read_indexed(machine, 0) | pia0_pb) != 0xff) porta &= ~0x01; | |
| 1314 | if ((input_port_read_indexed(machine, 1) | pia0_pb) != 0xff) porta &= ~0x02; | |
| 1315 | if ((input_port_read_indexed(machine, 2) | pia0_pb) != 0xff) porta &= ~0x04; | |
| 1316 | if ((input_port_read_indexed(machine, 3) | pia0_pb) != 0xff) porta &= ~0x08; | |
| 1317 | if ((input_port_read_indexed(machine, 4) | pia0_pb) != 0xff) porta &= ~0x10; | |
| 1318 | if ((input_port_read_indexed(machine, 5) | pia0_pb) != 0xff) porta &= ~0x20; | |
| 1319 | if ((input_port_read_indexed(machine, 6) | pia0_pb) != 0xff) porta &= ~0x40; | |
| 1312 | /* poll keyboard keys */ | |
| 1313 | if ((input_port_read(machine, "row0") | pia0_pb) != 0xff) porta &= ~0x01; | |
| 1314 | if ((input_port_read(machine, "row1") | pia0_pb) != 0xff) porta &= ~0x02; | |
| 1315 | if ((input_port_read(machine, "row2") | pia0_pb) != 0xff) porta &= ~0x04; | |
| 1316 | if ((input_port_read(machine, "row3") | pia0_pb) != 0xff) porta &= ~0x08; | |
| 1317 | if ((input_port_read(machine, "row4") | pia0_pb) != 0xff) porta &= ~0x10; | |
| 1318 | if ((input_port_read(machine, "row5") | pia0_pb) != 0xff) porta &= ~0x20; | |
| 1319 | if ((input_port_read(machine, "row6") | pia0_pb) != 0xff) porta &= ~0x40; | |
| 1320 | 1320 | |
| 1321 | if ((input_port_read_indexed(machine, 0) | pia_get_port_b_z_mask(0)) != 0xff) port_za &= ~0x01; | |
| 1322 | if ((input_port_read_indexed(machine, 1) | pia_get_port_b_z_mask(0)) != 0xff) port_za &= ~0x02; | |
| 1323 | if ((input_port_read_indexed(machine, 2) | pia_get_port_b_z_mask(0)) != 0xff) port_za &= ~0x04; | |
| 1324 | if ((input_port_read_indexed(machine, 3) | pia_get_port_b_z_mask(0)) != 0xff) port_za &= ~0x08; | |
| 1325 | if ((input_port_read_indexed(machine, 4) | pia_get_port_b_z_mask(0)) != 0xff) port_za &= ~0x10; | |
| 1326 | if ((input_port_read_indexed(machine, 5) | pia_get_port_b_z_mask(0)) != 0xff) port_za &= ~0x20; | |
| 1327 | if ((input_port_read_indexed(machine, 6) | pia_get_port_b_z_mask(0)) != 0xff) port_za &= ~0x40; | |
| 1321 | if ((input_port_read(machine, "row0") | pia_get_port_b_z_mask(0)) != 0xff) port_za &= ~0x01; | |
| 1322 | if ((input_port_read(machine, "row1") | pia_get_port_b_z_mask(0)) != 0xff) port_za &= ~0x02; | |
| 1323 | if ((input_port_read(machine, "row2") | pia_get_port_b_z_mask(0)) != 0xff) port_za &= ~0x04; | |
| 1324 | if ((input_port_read(machine, "row3") | pia_get_port_b_z_mask(0)) != 0xff) port_za &= ~0x08; | |
| 1325 | if ((input_port_read(machine, "row4") | pia_get_port_b_z_mask(0)) != 0xff) port_za &= ~0x10; | |
| 1326 | if ((input_port_read(machine, "row5") | pia_get_port_b_z_mask(0)) != 0xff) port_za &= ~0x20; | |
| 1327 | if ((input_port_read(machine, "row6") | pia_get_port_b_z_mask(0)) != 0xff) port_za &= ~0x40; | |
| 1328 | 1328 | |
| 1329 | 1329 | switch(get_input_device(joystick ? INPUTPORT_LEFT_JOYSTICK : INPUTPORT_RIGHT_JOYSTICK)) |
| 1330 | 1330 | { |
| r2772 | r2773 | |
|---|---|---|
| 1117 | 1117 | |
| 1118 | 1118 | int typewriter_transitions; |
| 1119 | 1119 | int charcode, lr; |
| 1120 | char port[5]; | |
| 1120 | 1121 | |
| 1121 | ||
| 1122 | 1122 | for (i=0; i<4; i++) |
| 1123 | typewriter_keys[i] = input_port_read_indexed(machine, tx0_typewriter + i); | |
| 1124 | ||
| 1123 | { | |
| 1124 | sprintf(port, "TWR%d", i); | |
| 1125 | typewriter_keys[i] = input_port_read(machine, port); | |
| 1126 | } | |
| 1127 | ||
| 1125 | 1128 | for (i=0; i<4; i++) |
| 1126 | 1129 | { |
| 1127 | 1130 | typewriter_transitions = typewriter_keys[i] & (~ old_typewriter_keys[i]); |
| r2772 | r2773 | |
| 1162 | 1165 | |
| 1163 | 1166 | |
| 1164 | 1167 | /* read new state of control keys */ |
| 1165 | control_keys = input_port_read | |
| 1168 | control_keys = input_port_read | |
| 1166 | 1169 | |
| 1167 | 1170 | if (control_keys & tx0_control) |
| 1168 | 1171 | { |
| r2772 | r2773 | |
| 1231 | 1234 | |
| 1232 | 1235 | |
| 1233 | 1236 | /* handle toggle switch register keys */ |
| 1234 | tsr_keys = (input_port_read | |
| 1237 | tsr_keys = (input_port_read | |
| 1235 | 1238 | |
| 1236 | 1239 | /* compute transitions */ |
| 1237 | 1240 | tsr_transitions = tsr_keys & (~ old_tsr_keys); |
| r2772 | r2773 | |
|---|---|---|
| 22 | 22 | static UINT8 outa,outb; |
| 23 | 23 | UINT8 pc1401_portc; |
| 24 | 24 | |
| 25 | static int power=1; /* simulates pressed cce when mess is started */ | |
| 25 | static int power = 1; /* simulates pressed cce when mess is started */ | |
| 26 | 26 | |
| 27 | 27 | void pc1401_outa(int data) |
| 28 | 28 | { |
| r2772 | r2773 | |
| 43 | 43 | int pc1401_ina(void) |
| 44 | 44 | { |
| 45 | 45 | running_machine *machine = Machine; |
| 46 | int data=outa; | |
| 47 | if (outb&1) { | |
| 48 | if (KEY_SIGN) data|=1; | |
| 49 | if (KEY_8) data|=2; | |
| 50 | if (KEY_2) data|=4; | |
| 51 | if (KEY_5) data|=8; | |
| 52 | if (KEY_CAL) data|=0x10; | |
| 53 | if (KEY_Q) data|=0x20; | |
| 54 | if (KEY_A) data|=0x40; | |
| 55 | if (KEY_Z) data|=0x80; | |
| 46 | int data = outa; | |
| 47 | ||
| 48 | if (outb & 0x01) | |
| 49 | data |= input_port_read(machine, "KEY0"); | |
| 50 | ||
| 51 | if (outb & 0x02) | |
| 52 | data |= input_port_read(machine, "KEY1"); | |
| 53 | ||
| 54 | if (outb & 0x04) | |
| 55 | data |= input_port_read(machine, "KEY2"); | |
| 56 | ||
| 57 | if (outb & 0x08) | |
| 58 | data |= input_port_read(machine, "KEY3"); | |
| 59 | ||
| 60 | if (outb & 0x10) | |
| 61 | data |= input_port_read(machine, "KEY4"); | |
| 62 | ||
| 63 | if (outb & 0x20) | |
| 64 | { | |
| 65 | data |= input_port_read(machine, "KEY5"); | |
| 66 | ||
| 67 | /* At Power Up we fake a 'C-CE' pressure */ | |
| 68 | if (power) | |
| 69 | data |= 0x01; | |
| 56 | 70 | } |
| 57 | if (outb&2) { | |
| 58 | if (KEY_POINT) data|=1; | |
| 59 | if (KEY_9) data|=2; | |
| 60 | if (KEY_3) data|=4; | |
| 61 | if (KEY_6) data|=8; | |
| 62 | if (KEY_BASIC) data|=0x10; | |
| 63 | if (KEY_W) data|=0x20; | |
| 64 | if (KEY_S) data|=0x40; | |
| 65 | if (KEY_X) data|=0x80; | |
| 66 | } | |
| 67 | if (outb&4) { | |
| 68 | if (KEY_PLUS) data|=1; | |
| 69 | if (KEY_DIV) data|=2; | |
| 70 | if (KEY_MINUS) data|=4; | |
| 71 | if (KEY_MUL) data|=8; | |
| 72 | if (KEY_DEF) data|=0x10; | |
| 73 | if (KEY_E) data|=0x20; | |
| 74 | if (KEY_D) data|=0x40; | |
| 75 | if (KEY_C) data|=0x80; | |
| 76 | } | |
| 77 | if (outb&8) { | |
| 78 | if (KEY_BRACE_RIGHT) data|=1; | |
| 79 | if (KEY_BRACE_LEFT) data|=2; | |
| 80 | if (KEY_SQUARE) data|=4; | |
| 81 | if (KEY_ROOT) data|=8; | |
| 82 | if (KEY_POT) data|=0x10; | |
| 83 | if (KEY_EXP) data|=0x20; | |
| 84 | if (KEY_XM) data|=0x40; | |
| 85 | if (KEY_EQUALS) data|=0x80; | |
| 86 | } | |
| 87 | if (outb&0x10) { | |
| 88 | if (KEY_STAT) data|=1; | |
| 89 | if (KEY_1X) data|=2; | |
| 90 | if (KEY_LOG) data|=4; | |
| 91 | if (KEY_LN) data|=8; | |
| 92 | if (KEY_DEG) data|=0x10; | |
| 93 | if (KEY_HEX) data|=0x20; | |
| 94 | if (KEY_MPLUS) data|=0x80; | |
| 95 | } | |
| 96 | if (outb&0x20) { | |
| 97 | if (power||(KEY_CCE)) data|=1; | |
| 98 | if (KEY_FE) data|=2; | |
| 99 | if (KEY_TAN) data|=4; | |
| 100 | if (KEY_COS) data|=8; | |
| 101 | if (KEY_SIN) data|=0x10; | |
| 102 | if (KEY_HYP) data|=0x20; | |
| 103 | if (KEY_SHIFT) data|=0x40; | |
| 104 | if (KEY_RM) data|=0x80; | |
| 105 | } | |
| 106 | if (outa&1) { | |
| 107 | if (KEY_7) data|=2; | |
| 108 | if (KEY_1) data|=4; | |
| 109 | if (KEY_4) data|=8; | |
| 110 | if (KEY_DOWN) data|=0x10; | |
| 111 | if (KEY_R) data|=0x20; | |
| 112 | if (KEY_F) data|=0x40; | |
| 113 | if (KEY_V) data|=0x80; | |
| 114 | } | |
| 115 | if (outa&2) { | |
| 116 | if (KEY_COMMA) data|=4; | |
| 117 | if (KEY_P) data|=8; | |
| 118 | if (KEY_UP) data|=0x10; | |
| 119 | if (KEY_T) data|=0x20; | |
| 120 | if (KEY_G) data|=0x40; | |
| 121 | if (KEY_B) data|=0x80; | |
| 122 | } | |
| 123 | if (outa&4) { | |
| 124 | if (KEY_O) data|=8; | |
| 125 | if (KEY_LEFT) data|=0x10; | |
| 126 | if (KEY_Y) data|=0x20; | |
| 127 | if (KEY_H) data|=0x40; | |
| 128 | if (KEY_N) data|=0x80; | |
| 129 | } | |
| 130 | if (outa&8) { | |
| 131 | if (KEY_RIGHT) data|=0x10; | |
| 132 | if (KEY_U) data|=0x20; | |
| 133 | if (KEY_J) data|=0x40; | |
| 134 | if (KEY_M) data|=0x80; | |
| 135 | } | |
| 136 | if (outa&0x10) { | |
| 137 | if (KEY_I) data|=0x20; | |
| 138 | if (KEY_K) data|=0x40; | |
| 139 | if (KEY_SPC) data|=0x80; | |
| 140 | } | |
| 141 | if (outa&0x20) { | |
| 142 | if (KEY_L) data|=0x40; | |
| 143 | if (KEY_ENTER) data|=0x80; | |
| 144 | } | |
| 145 | if (outa&0x40) { | |
| 146 | if (KEY_0) data|=0x80; | |
| 147 | } | |
| 71 | ||
| 72 | if (outa & 0x01) | |
| 73 | data |= input_port_read(machine, "KEY6"); | |
| 74 | ||
| 75 | if (outa & 0x02) | |
| 76 | data |= input_port_read(machine, "KEY7"); | |
| 77 | ||
| 78 | if (outa & 0x04) | |
| 79 | data |= input_port_read(machine, "KEY8"); | |
| 80 | ||
| 81 | if (outa & 0x08) | |
| 82 | data |= input_port_read(machine, "KEY9"); | |
| 83 | ||
| 84 | if (outa & 0x10) | |
| 85 | data |= input_port_read(machine, "KEY10"); | |
| 86 | ||
| 87 | if (outa & 0x20) | |
| 88 | data |= input_port_read(machine, "KEY11"); | |
| 89 | ||
| 90 | if (outa & 0x40) | |
| 91 | data |= input_port_read(machine, "KEY12"); | |
| 92 | ||
| 148 | 93 | return data; |
| 149 | 94 | } |
| 150 | 95 | |
| r2772 | r2773 | |
| 152 | 97 | { |
| 153 | 98 | running_machine *machine = Machine; |
| 154 | 99 | int data=outb; |
| 155 | if (KEY_OFF) data|=1; | |
| 100 | ||
| 101 | if (input_port_read(machine, "EXTRA") & 0x04) | |
| 102 | data |= 0x01; | |
| 103 | ||
| 156 | 104 | return data; |
| 157 | 105 | } |
| 158 | 106 | |
| 159 | 107 | int pc1401_brk(void) |
| 160 | 108 | { |
| 161 | 109 | running_machine *machine = Machine; |
| 162 | return | |
| 110 | return (input_port_read(machine, "EXTRA") & 0x01); | |
| 163 | 111 | } |
| 164 | 112 | |
| 165 | 113 | int pc1401_reset(void) |
| 166 | 114 | { |
| 167 | 115 | running_machine *machine = Machine; |
| 168 | return | |
| 116 | return (input_port_read(machine, "EX | |
| 169 | 117 | } |
| 170 | 118 | |
| 171 | 119 | /* currently enough to save the external ram */ |
| r2772 | r2773 | |
| 295 | 243 | for (i=0; i<sizeof(sucker);i++) pc1401_mem[0x4000+i]=sucker[i]; |
| 296 | 244 | logerror("%d %d\n",i, 0x4000+i); |
| 297 | 245 | #endif |
| 298 | for (i=0; i<128; i++) gfx[i]=i; | |
| 299 | 246 | |
| 247 | for (i=0; i<128; i++) | |
| 248 | gfx[i]=i; | |
| 249 | ||
| 300 | 250 | timer_set(ATTOTIME_IN_SEC(1), NULL, 0, pc1401_power_up); |
| 301 | 251 | |
| 302 | if ( | |
| 252 | if ((input_port_read(machine, "DSW0") & 0xc0) == 0x80) | |
| 303 | 253 | { |
| 304 | 254 | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x2000, 0x3fff, 0, 0, SMH_RAM); |
| 305 | 255 | } |
| 306 | else if ( | |
| 256 | else if ((input_port_read(machine, "DSW0") & 0xc0) == 0x40) | |
| 307 | 257 | { |
| 308 | 258 | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x2000, 0x37ff, 0, 0, SMH_NOP); |
| 309 | 259 | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x3800, 0x3fff, 0, 0, SMH_RAM); |
| r2772 | r2773 | |
|---|---|---|
| 175 | 175 | UINT32 key_transitions; |
| 176 | 176 | int i, j; |
| 177 | 177 | int keycode; |
| 178 | char port1[6], port2[6]; | |
| 178 | 179 | |
| 179 | 180 | |
| 180 | 181 | for (i=0; (i</*4*/3) && (KeyQueueLen <= (KeyQueueSize-MaxKeyMessageLen)); i++) |
| 181 | 182 | { |
| 182 | keystate = input_port_read_indexed(machine, input_port_keyboard_concept + i*2) | |
| 183 | | (input_port_read_indexed(machine, input_port_keyboard_concept + i*2 + 1) << 16); | |
| 183 | sprintf(port1, "KEY%d", 2*i); | |
| 184 | sprintf(port2, "KEY%d", 2*i+1); | |
| 185 | keystate = input_port_read(machine, port1) | (input_port_read(machine, port2) << 16); | |
| 184 | 186 | key_transitions = keystate ^ KeyStateSave[i]; |
| 185 | 187 | if (key_transitions) |
| 186 | 188 | { |
| r2772 | r2773 | |
| 253 | 255 | { |
| 254 | 256 | UINT8 status; |
| 255 | 257 | |
| 256 | status = ((input_port_read | |
| 258 | status = ((input_port_read | |
| 257 | 259 | LOG(("via_in_b: VIA port B (DIP switches, Video, Comm Rate) - status: 0x%2.2x\n", status)); |
| 258 | 260 | return status; |
| 259 | 261 | } |
| r2772 | r2773 | |
|---|---|---|
| 254 | 254 | KeyReset = 1; |
| 255 | 255 | |
| 256 | 256 | /* read config */ |
| 257 | has_speech = (input_port_read_indexed(machine, INPUT_PORT_CONFIG) >> config_speech_bit) & config_speech_mask; | |
| 258 | fdc_kind = (input_port_read_indexed(machine, INPUT_PORT_CONFIG) >> config_fdc_bit) & config_fdc_mask; | |
| 259 | has_ide = (input_port_read_indexed(machine, INPUT_PORT_CONFIG) >> config_ide_bit) & config_ide_mask; | |
| 260 | has_rs232 = (input_port_read_indexed(machine, INPUT_PORT_CONFIG) >> config_rs232_bit) & config_rs232_mask; | |
| 261 | has_usb_sm = (input_port_read_indexed(machine, INPUT_PORT_CONFIG) >> config_usbsm_bit) & config_usbsm_mask; | |
| 257 | has_speech = (input_port_read(machine, "CFG") >> config_speech_bit) & config_speech_mask; | |
| 258 | fdc_kind = (input_port_read(machine, "CFG") >> config_fdc_bit) & config_fdc_mask; | |
| 259 | has_ide = (input_port_read(machine, "CFG") >> config_ide_bit) & config_ide_mask; | |
| 260 | has_rs232 = (input_port_read(machine, "CFG") >> config_rs232_bit) & config_rs232_mask; | |
| 261 | has_usb_sm = (input_port_read(machine, "CFG") >> config_usbsm_bit) & config_usbsm_mask; | |
| 262 | 262 | |
| 263 | 263 | /* set up optional expansion hardware */ |
| 264 | 264 | ti99_peb_reset(0, inta_callback, intb_callback); |
| r2772 | r2773 | |
| 1041 | 1041 | int i, j; |
| 1042 | 1042 | int keycode; |
| 1043 | 1043 | int pressed; |
| 1044 | char port1[6], port2[6]; | |
| 1044 | 1045 | |
| 1045 | 1046 | static const UINT8 keyboard_mf1_code[0xe] = |
| 1046 | 1047 | { |
| r2772 | r2773 | |
| 1077 | 1078 | /* Poll keyboard */ |
| 1078 | 1079 | for (i=0; (i<4) && (KeyQueueLen <= (KeyQueueSize-MaxKeyMessageLen)); i++) |
| 1079 | 1080 | { |
| 1080 | keystate = input_port_read_indexed(machine, input_port_keyboard_geneve + i*2) | |
| 1081 | | (input_port_read_indexed(machine, input_port_keyboard_geneve + i*2 + 1) << 16); | |
| 1081 | sprintf(port1, "KEY%d", 2*i); | |
| 1082 | sprintf(port2, "KEY%d", 2*i+1); | |
| 1083 | ||
| 1084 | keystate = input_port_read(machine, port1) | (input_port_read(machine, port2) << 16); | |
| 1082 | 1085 | key_transitions = keystate ^ KeyStateSave[i]; |
| 1083 | 1086 | if (key_transitions) |
| 1084 | 1087 | { |
| r2772 | r2773 | |
| 1276 | 1279 | int new_mx, new_my; |
| 1277 | 1280 | int delta_x, delta_y, buttons; |
| 1278 | 1281 | |
| 1279 | buttons = input_port_read_indexed(Machine, input_port_mouse_buttons_geneve); | |
| 1280 | new_mx = input_port_read_indexed(Machine, input_port_mouse_deltax_geneve); | |
| 1281 | new_my = input_port_read_indexed(Machine, input_port_mouse_deltay_geneve); | |
| 1282 | buttons = input_port_read(Machine, "MOUSE0"); | |
| 1283 | new_mx = input_port_read(Machine, "MOUSEX"); | |
| 1284 | new_my = input_port_read(Machine, "MOUSEY"); | |
| 1282 | 1285 | |
| 1283 | 1286 | /* compute x delta */ |
| 1284 | 1287 | delta_x = new_mx - last_mx; |
| r2772 | r2773 | |
| 1359 | 1362 | { |
| 1360 | 1363 | int answer; |
| 1361 | 1364 | |
| 1362 | answer = input_port_read | |
| 1365 | answer = input_port_read | |
| 1363 | 1366 | |
| 1364 | 1367 | return (answer); |
| 1365 | 1368 | } |
| r2772 | r2773 | |
| 1380 | 1383 | { |
| 1381 | 1384 | int answer; |
| 1382 | 1385 | |
| 1383 | answer = (input_port_read | |
| 1386 | answer = (input_port_read | |
| 1384 | 1387 | |
| 1385 | 1388 | return answer; |
| 1386 | 1389 | } |
| r2772 | r2773 | |
| 1401 | 1404 | { |
| 1402 | 1405 | int answer = 0; |
| 1403 | 1406 | |
| 1404 | if (! (input_port_read | |
| 1407 | if (! (input_port_read | |
| 1405 | 1408 | answer |= 0x10; |
| 1406 | 1409 | |
| 1407 | 1410 | return answer; |
| r2772 | r2773 | |
|---|---|---|
| 62 | 62 | UINT8 data=outa; |
| 63 | 63 | running_machine *machine = Machine; |
| 64 | 64 | |
| 65 | if (asic[3]&1) { | |
| 66 | if (KEY_7) data|=1; | |
| 67 | if (KEY_8) data|=2; | |
| 68 | if (KEY_9) data|=4; | |
| 69 | if (KEY_DIV) data|=8; | |
| 70 | if (KEY_XM) data|=0x10; | |
| 71 | // 0x20 | |
| 72 | // 0x40 | |
| 73 | // 0x80 | |
| 74 | } | |
| 75 | if (asic[3]&2) { | |
| 76 | if (KEY_4) data|=1; | |
| 77 | if (KEY_5) data|=2; | |
| 78 | if (KEY_6) data|=4; | |
| 79 | if (KEY_MUL) data|=8; | |
| 80 | if (KEY_RM) data|=0x10; | |
| 81 | if (KEY_SHIFT) data|=0x20; | |
| 82 | if (KEY_DEF) data|=0x40; | |
| 83 | if (KEY_SMALL) data|=0x80; | |
| 84 | } | |
| 85 | if (asic[3]&4) { | |
| 86 | if (KEY_1) data|=1; | |
| 87 | if (KEY_2) data|=2; | |
| 88 | if (KEY_3) data|=4; | |
| 89 | if (KEY_MINUS) data|=8; | |
| 90 | if (KEY_MPLUS) data|=0x10; | |
| 91 | if (KEY_Q) data|=0x20; | |
| 92 | if (KEY_A) data|=0x40; | |
| 93 | if (KEY_Z) data|=0x80; | |
| 94 | } | |
| 95 | if (asic[3]&8) { | |
| 96 | if (KEY_0) data|=1; | |
| 97 | if (KEY_SIGN) data|=2; | |
| 98 | if (KEY_POINT) data|=4; | |
| 99 | if (KEY_PLUS) data|=8; | |
| 100 | if (KEY_EQUALS) data|=0x10; | |
| 101 | if (KEY_W) data|=0x20; | |
| 102 | if (KEY_S) data|=0x40; | |
| 103 | if (KEY_X) data|=0x80; | |
| 104 | } | |
| 105 | if (asic[3]&0x10) { | |
| 106 | if (KEY_HYP) data|=1; | |
| 107 | if (KEY_SIN) data|=2; | |
| 108 | if (KEY_COS) data|=4; | |
| 109 | if (KEY_TAN) data|=8; | |
| 110 | //0x10 toggles indicator 3c bit 0 japan? | |
| 111 | if (KEY_E) data|=0x20; | |
| 112 | if (KEY_D) data|=0x40; | |
| 113 | if (KEY_C) data|=0x80; | |
| 114 | } | |
| 115 | if (asic[3]&0x20) { | |
| 116 | if (KEY_HEX) data|=1; | |
| 117 | if (KEY_DEG) data|=2; | |
| 118 | if (KEY_LN) data|=4; | |
| 119 | if (KEY_LOG) data|=8; | |
| 120 | //0x10 tilde | |
| 121 | if (KEY_R) data|=0x20; | |
| 122 | if (KEY_F) data|=0x40; | |
| 123 | if (KEY_V) data|=0x80; | |
| 124 | } | |
| 125 | if (asic[3]&0x40) { | |
| 126 | if (KEY_EXP) data|=1; | |
| 127 | if (KEY_POT) data|=2; | |
| 128 | if (KEY_ROOT) data|=4; | |
| 129 | if (KEY_SQUARE) data|=8; | |
| 130 | //0x10 - yen | |
| 131 | if (KEY_T) data|=0x20; | |
| 132 | if (KEY_G) data|=0x40; | |
| 133 | if (KEY_B) data|=0x80; | |
| 134 | } | |
| 135 | if (outa&1) { | |
| 136 | if (power||(KEY_CCE)) data|=2; | |
| 137 | if (KEY_STAT) data|=4; | |
| 138 | if (KEY_FE) data|=8; | |
| 139 | if (KEY_DOWN) data|=0x10; | |
| 140 | if (KEY_Y) data|=0x20; | |
| 141 | if (KEY_H) data|=0x40; | |
| 142 | if (KEY_N) data|=0x80; | |
| 143 | } | |
| 144 | if (outa&2) { | |
| 145 | if (KEY_BRACE_RIGHT) data|=4; | |
| 146 | if (KEY_1X) data|=8; | |
| 147 | if (KEY_UP) data|=0x10; | |
| 148 | if (KEY_U) data|=0x20; | |
| 149 | if (KEY_J) data|=0x40; | |
| 150 | if (KEY_M) data|=0x80; | |
| 151 | } | |
| 152 | if (outa&4) { | |
| 153 | if (KEY_BRACE_LEFT) data|=8; | |
| 154 | if (KEY_LEFT) data|=0x10; | |
| 155 | if (KEY_I) data|=0x20; | |
| 156 | if (KEY_K) data|=0x40; | |
| 157 | if (KEY_SPC) data|=0x80; | |
| 158 | } | |
| 159 | if (outa&8) { | |
| 160 | if (KEY_RIGHT) data|=0x10; | |
| 161 | if (KEY_O) data|=0x20; | |
| 162 | if (KEY_L) data|=0x40; | |
| 163 | if (KEY_ENTER) data|=0x80; | |
| 164 | } | |
| 165 | if (outa&0x10) { | |
| 166 | if (KEY_P) data|=0x20; | |
| 167 | if (KEY_COMMA) data|=0x40; | |
| 168 | if (KEY_BASIC) data|=0x80; | |
| 169 | } | |
| 170 | if (outa&0x20) { | |
| 171 | //0x40 shift lock | |
| 172 | if (KEY_CAL) data|=0x80; | |
| 173 | } | |
| 174 | if (outa&0x40) { | |
| 175 | if (KEY_OFF) data|=0x80; | |
| 176 | } | |
| 65 | if (asic[3] & 0x01) | |
| 66 | data |= input_port_read(machine, "KEY0"); | |
| 67 | ||
| 68 | if (asic[3] & 0x02) | |
| 69 | data |= input_port_read(machine, "KEY1"); | |
| 70 | ||
| 71 | if (asic[3] & 0x04) | |
| 72 | data |= input_port_read(machine, "KEY2"); | |
| 73 | ||
| 74 | if (asic[3] & 0x08) | |
| 75 | data |= input_port_read(machine, "KEY3"); | |
| 76 | ||
| 77 | if (asic[3] & 0x10) | |
| 78 | data |= input_port_read(machine, "KEY4"); | |
| 79 | ||
| 80 | if (asic[3] & 0x20) | |
| 81 | data |= input_port_read(machine, "KEY5"); | |
| 82 | ||
| 83 | if (asic[3] & 0x40) | |
| 84 | data |= input_port_read(machine, "KEY6"); | |
| 85 | ||
| 86 | if (outa & 0x01) | |
| 87 | { | |
| 88 | data |= input_port_read(machine, "KEY7"); | |
| 89 | ||
| 90 | /* At Power Up we fake a 'C-CE' pressure */ | |
| 91 | if (power) | |
| 92 | data |= 0x02; | |
| 93 | } | |
| 94 | ||
| 95 | if (outa & 0x02) | |
| 96 | data |= input_port_read(machine, "KEY8"); | |
| 97 | ||
| 98 | if (outa & 0x04) | |
| 99 | data |= input_port_read(machine, "KEY9"); | |
| 100 | ||
| 101 | if (outa & 0x08) | |
| 102 | data |= input_port_read(machine, "KEY10"); | |
| 103 | ||
| 104 | if (outa & 0x10) | |
| 105 | data |= input_port_read(machine, "KEY11"); | |
| 106 | ||
| 107 | if (outa & 0x20) | |
| 108 | data |= input_port_read(machine, "KEY12"); | |
| 109 | ||
| 110 | if (outa & 0x40) | |
| 111 | data |= input_port_read(machine, "KEY13"); | |
| 112 | ||
| 177 | 113 | return data; |
| 178 | 114 | } |
| 179 | 115 | |
| 180 | 116 | #if 0 |
| 181 | 117 | int pc1403_inb(void) |
| 182 | 118 | { |
| 183 | int data=outb; | |
| 184 | if (KEY_OFF) data|=1; | |
| 119 | int data = outb; | |
| 120 | ||
| 121 | if (input_port_read(machine, "KEY13")) | |
| 122 | data |= 1; | |
| 123 | ||
| 185 | 124 | return data; |
| 186 | 125 | } |
| 187 | 126 | #endif |
| 188 | 127 | |
| 189 | 128 | void pc1403_outc(int data) |
| 190 | 129 | { |
| 191 | pc1403_portc=data; | |
| 130 | pc1403_portc = data; | |
| 192 | 131 | logerror("%g pc %.4x outc %.2x\n", attotime_to_double(timer_get_time()), activecpu_get_pc(), data); |
| 193 | 132 | } |
| 194 | 133 | |
| r2772 | r2773 | |
| 196 | 135 | int pc1403_brk(void) |
| 197 | 136 | { |
| 198 | 137 | running_machine *machine = Machine; |
| 199 | return | |
| 138 | return (input_port_read(machine, "EXTRA") & 0x01); | |
| 200 | 139 | } |
| 201 | 140 | |
| 202 | 141 | int pc1403_reset(void) |
| 203 | 142 | { |
| 204 | 143 | running_machine *machine = Machine; |
| 205 | return | |
| 144 | return (input_port_read(machine, "EX | |
| 206 | 145 | } |
| 207 | 146 | |
| 208 | 147 | /* currently enough to save the external ram */ |
| r2772 | r2773 | |
| 243 | 182 | timer_set(ATTOTIME_IN_SEC(1), NULL, 0, pc1403_power_up); |
| 244 | 183 | |
| 245 | 184 | memory_set_bankptr(1, memory_region(REGION_USER1)); |
| 246 | if ( | |
| 185 | if ((input_port_read(machine, "DSW0") & 0x80) == 0x80) | |
| 247 | 186 | { |
| 248 | 187 | memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x8000, 0xdfff, 0, 0, SMH_RAM); |
| 249 | 188 | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x8000, 0xdfff, 0, 0, SMH_RAM); |
| r2772 | r2773 | |
|---|---|---|
| 418 | 418 | { |
| 419 | 419 | UINT8 data = 0xFF; |
| 420 | 420 | int i; |
| 421 | char port[4]; | |
| 422 | ||
| 421 | 423 | _logerror( 2, ("cybiko_key_r_byte (%08X)\n", offset)); |
| 422 | 424 | // A11 |
| 423 | if (!(offset & (1 << 11))) data &= 0xFE; | |
| 425 | if (!(offset & (1 << 11))) | |
| 426 | data &= 0xFE; | |
| 424 | 427 | // A1 .. A9 |
| 425 | for (i=1;i<10;i++) if (!(offset & (1 << i))) data &= input_port_read_indexed(machine, i - 1); | |
| 428 | for (i=1; i<10; i++) | |
| 429 | if (!(offset & (1 << i))) | |
| 430 | { | |
| 431 | sprintf(port, "A%d", i); | |
| 432 | data &= input_port_read(machine, port); | |
| 433 | } | |
| 426 | 434 | // A0 |
| 427 | if (!(offset & (1 << 0))) data |= 0xFF; | |
| 435 | if (!(offset & (1 << 0))) | |
| 436 | data |= 0xFF; | |
| 428 | 437 | // |
| 429 | 438 | return data; |
| 430 | 439 | } |
| r2772 | r2773 | |
| 448 | 457 | // keyboard |
| 449 | 458 | case H8S_IO_PORT1 : |
| 450 | 459 | { |
| 451 | //if (input_port_read | |
| 460 | //if (input_port_read | |
| 452 | 461 | data = data | 0x08; |
| 453 | 462 | } |
| 454 | 463 | break; |
| r2772 | r2773 | |
|---|---|---|
| 792 | 792 | else if (ti99_model == model_99_4p) |
| 793 | 793 | xRAM_kind = xRAM_kind_99_4p_1Mb; /* hack */ |
| 794 | 794 | else |
| 795 | xRAM_kind = (input_port_read | |
| 795 | xRAM_kind = (input_port_read | |
| 796 | 796 | if (ti99_model == model_99_8) |
| 797 | 797 | has_speech = TRUE; |
| 798 | 798 | else |
| 799 | has_speech = (input_port_read_indexed(machine, INPUT_PORT_CONFIG) >> config_speech_bit) & config_speech_mask; | |
| 800 | fdc_kind = (input_port_read_indexed(machine, INPUT_PORT_CONFIG) >> config_fdc_bit) & config_fdc_mask; | |
| 801 | has_ide = (input_port_read_indexed(machine, INPUT_PORT_CONFIG) >> config_ide_bit) & config_ide_mask; | |
| 802 | has_rs232 = (input_port_read_indexed(machine, INPUT_PORT_CONFIG) >> config_rs232_bit) & config_rs232_mask; | |
| 803 | has_handset = (ti99_model == model_99_4) && ((input_port_read_indexed(machine, INPUT_PORT_CONFIG) >> config_handsets_bit) & config_handsets_mask); | |
| 804 | has_hsgpl = (ti99_model == model_99_4p) || ((input_port_read_indexed(machine, INPUT_PORT_CONFIG) >> config_hsgpl_bit) & config_hsgpl_mask); | |
| 805 | has_usb_sm = (input_port_read_indexed(machine, INPUT_PORT_CONFIG) >> config_usbsm_bit) & config_usbsm_mask; | |
| 799 | has_speech = (input_port_read(machine, "CFG") >> config_speech_bit) & config_speech_mask; | |
| 800 | fdc_kind = (input_port_read(machine, "CFG") >> config_fdc_bit) & config_fdc_mask; | |
| 801 | has_ide = (input_port_read(machine, "CFG") >> config_ide_bit) & config_ide_mask; | |
| 802 | has_rs232 = (input_port_read(machine, "CFG") >> config_rs232_bit) & config_rs232_mask; | |
| 803 | has_handset = (ti99_model == model_99_4) && ((input_port_read(machine, "CFG") >> config_handsets_bit) & config_handsets_mask); | |
| 804 | has_hsgpl = ((ti99_model == model_99_4p) || (input_port_read(machine, "CFG") >> config_hsgpl_bit) & config_hsgpl_mask); | |
| 805 | has_usb_sm = (input_port_read(machine, "CFG") >> config_usbsm_bit) & config_usbsm_mask; | |
| 806 | 806 | |
| 807 | 807 | /* set up optional expansion hardware */ |
| 808 | 808 | ti99_peb_reset(ti99_model == model_99_4p, tms9901_set_int1, NULL); |
| r2772 | r2773 | |
| 947 | 947 | TMS9928A_interrupt(machine); |
| 948 | 948 | if (has_handset) |
| 949 | 949 | ti99_handset_task(); |
| 950 | has_mecmouse = (input_port_read | |
| 950 | has_mecmouse = (input_port_read | |
| 951 | 951 | if (has_mecmouse) |
| 952 | 952 | mecmouse_poll(); |
| 953 | 953 | } |
| r2772 | r2773 | |
| 959 | 959 | if (++line_count == 262) |
| 960 | 960 | { |
| 961 | 961 | line_count = 0; |
| 962 | has_mecmouse = (input_port_read | |
| 962 | has_mecmouse = (input_port_read | |
| 963 | 963 | if (has_mecmouse) |
| 964 | 964 | mecmouse_poll(); |
| 965 | 965 | } |
| r2772 | r2773 | |
| 1821 | 1821 | UINT32 key_buf; |
| 1822 | 1822 | UINT8 current_key; |
| 1823 | 1823 | int i; |
| 1824 | char port1[5], port2[5]; | |
| 1824 | 1825 | |
| 1825 | 1826 | |
| 1826 | 1827 | /* read current key state */ |
| 1827 | key_buf = ( input_port_read_indexed(machine, input_port_IR_keypads+num) | |
| 1828 | | (input_port_read_indexed(machine, input_port_IR_keypads+num+1) << 16) ) >> (4*num); | |
| 1828 | sprintf(port1, "KP%d", num); | |
| 1829 | sprintf(port2, "KP%d", num+1); | |
| 1830 | key_buf = ( input_port_read(machine, port1) | (input_port_read(machine, port2) << 16) ) >> (4*num); | |
| 1829 | 1831 | |
| 1830 | 1832 | /* If a key was previously pressed, this key was not shift, and this key is |
| 1831 | 1833 | still down, then don't change the current key press. */ |
| r2772 | r2773 | |
| 1902 | 1904 | UINT8 current_joy; |
| 1903 | 1905 | int current_joy_x, current_joy_y; |
| 1904 | 1906 | int message; |
| 1907 | char port1[6], port2[6]; | |
| 1905 | 1908 | |
| 1906 | 1909 | /* read joystick position */ |
| 1907 | current_joy_x = input_port_read_indexed(machine, input_port_IR_joysticks+2*num); | |
| 1908 | current_joy_y = input_port_read_indexed(machine, input_port_IR_joysticks+2*num+1); | |
| 1910 | sprintf(port1, "JOY%d", 2*num); | |
| 1911 | sprintf(port2, "JOY%d", 2*num+1); | |
| 1912 | current_joy_x = input_port_read(machine, port1); | |
| 1913 | current_joy_y = input_port_read(machine, port2); | |
| 1909 | 1914 | /* compare with last saved position */ |
| 1910 | 1915 | current_joy = current_joy_x | (current_joy_y << 4); |
| 1911 | 1916 | if (current_joy != previous_joy[num]) |
| r2772 | r2773 | |
| 2091 | 2096 | int new_mx, new_my; |
| 2092 | 2097 | int delta_x, delta_y; |
| 2093 | 2098 | |
| 2094 | new_mx = input_port_read_indexed(machine, input_port_mousex); | |
| 2095 | new_my = input_port_read_indexed(machine, input_port_mousey); | |
| 2099 | new_mx = input_port_read(machine, "MOUSEX"); | |
| 2100 | new_my = input_port_read(machine, "MOUSEY"); | |
| 2096 | 2101 | |
| 2097 | 2102 | /* compute x delta */ |
| 2098 | 2103 | delta_x = new_mx - last_mx; |
| r2772 | r2773 | |
| 2223 | 2228 | { |
| 2224 | 2229 | running_machine *machine = Machine; |
| 2225 | 2230 | int answer; |
| 2231 | char port[7]; | |
| 2226 | 2232 | |
| 2227 | 2233 | if ((ti99_model == model_99_4) && (KeyCol == 7)) |
| 2228 | 2234 | answer = (ti99_handset_poll_bus() << 3) | 0x80; |
| 2229 | 2235 | else if (has_mecmouse && (KeyCol == ((ti99_model == model_99_4) ? 6 : 7))) |
| 2230 | 2236 | { |
| 2231 | int buttons = input_port_read | |
| 2237 | int buttons = input_port_read | |
| 2232 | 2238 | |
| 2233 | 2239 | answer = (mecmouse_read_y ? mecmouse_y_buf : mecmouse_x_buf) << 4; |
| 2234 | 2240 | |
| r2772 | r2773 | |
| 2240 | 2246 | answer |= 0x80; |
| 2241 | 2247 | } |
| 2242 | 2248 | else |
| 2243 | answer = ((input_port_read_indexed(machine, input_port_keyboard + (KeyCol >> 1)) >> ((KeyCol & 1) * 8)) << 3) & 0xF8; | |
| 2244 | ||
| 2249 | { | |
| 2250 | sprintf(port, "KEY%d", (KeyCol >> 1)); | |
| 2251 | answer = ((input_port_read(machine, port) >> ((KeyCol & 1) * 8)) << 3) & 0xF8; | |
| 2252 | } | |
| 2253 | ||
| 2245 | 2254 | if ((ti99_model == model_99_4a) || (ti99_model == model_99_4p)) |
| 2246 | 2255 | { |
| 2247 | 2256 | if (! AlphaLockLine) |
| 2248 | answer &= ~ (input_port_read | |
| 2257 | answer &= ~ (input_port_read | |
| 2249 | 2258 | } |
| 2250 | 2259 | |
| 2251 | 2260 | return answer; |
| r2772 | r2773 | |
| 2264 | 2273 | { |
| 2265 | 2274 | running_machine *machine = Machine; |
| 2266 | 2275 | int answer; |
| 2276 | char port[7]; | |
| 2267 | 2277 | |
| 2268 | 2278 | if (/*(ti99_model == model_99_4) &&*/ (KeyCol == 7)) |
| 2269 | 2279 | answer = 0x07; |
| 2270 | 2280 | else |
| 2271 | answer = ((input_port_read_indexed(machine, input_port_keyboard + (KeyCol >> 1)) >> ((KeyCol & 1) * 8)) >> 5) & 0x07; | |
| 2272 | ||
| 2281 | { | |
| 2282 | sprintf(port, "KEY%d", (KeyCol >> 1)); | |
| 2283 | answer = ((input_port_read(machine, port) >> ((KeyCol & 1) * 8)) >> 5) & 0x07; | |
| 2284 | } | |
| 2285 | ||
| 2273 | 2286 | /* we don't take CS2 into account, as CS2 is a write-only unit */ |
| 2274 | 2287 | /*if (cassette_input(image_from_devtype_and_index(IO_CASSETTE, 0)) > 0) |
| 2275 | 2288 | answer |= 8;*/ |
| r2772 | r2773 | |
| 2348 | 2361 | { |
| 2349 | 2362 | running_machine *machine = Machine; |
| 2350 | 2363 | int answer; |
| 2364 | char port[7]; | |
| 2351 | 2365 | |
| 2352 | 2366 | if (has_mecmouse && (KeyCol == 15)) |
| 2353 | 2367 | { |
| 2354 | int buttons = input_port_read | |
| 2368 | int buttons = input_port_read | |
| 2355 | 2369 | |
| 2356 | 2370 | answer = ((mecmouse_read_y ? mecmouse_y_buf : mecmouse_x_buf) << 7) & 0x80; |
| 2357 | 2371 | |
| r2772 | r2773 | |
| 2360 | 2374 | answer |= 0x40; |
| 2361 | 2375 | } |
| 2362 | 2376 | else |
| 2363 | answer = (input_port_read_indexed(machine, input_port_keyboard + KeyCol) << 6) & 0xC0; | |
| 2364 | ||
| 2377 | { | |
| 2378 | sprintf(port, "KEY%d", KeyCol); | |
| 2379 | answer = (input_port_read(machine, port) << 6) & 0xC0; | |
| 2380 | } | |
| 2381 | ||
| 2365 | 2382 | return answer; |
| 2366 | 2383 | } |
| 2367 | 2384 | |
| r2772 | r2773 | |
| 2378 | 2395 | { |
| 2379 | 2396 | running_machine *machine = Machine; |
| 2380 | 2397 | int answer; |
| 2398 | char port[7]; | |
| 2381 | 2399 | |
| 2382 | 2400 | if (has_mecmouse && (KeyCol == 15)) |
| 2383 | 2401 | { |
| 2384 | int buttons = input_port_read | |
| 2402 | int buttons = input_port_read | |
| 2385 | 2403 | |
| 2386 | 2404 | answer = ((mecmouse_read_y ? mecmouse_y_buf : mecmouse_x_buf) << 1) & 0x03; |
| 2387 | 2405 | |
| r2772 | r2773 | |
| 2390 | 2408 | answer |= 0x04; |
| 2391 | 2409 | } |
| 2392 | 2410 | else |
| 2393 | answer = (input_port_read_indexed(machine, input_port_keyboard + KeyCol) >> 2) & 0x07; | |
| 2394 | ||
| 2411 | { | |
| 2412 | sprintf(port, "KEY%d", KeyCol); | |
| 2413 | answer = (input_port_read(machine, port) >> 2) & 0x07; | |
| 2414 | } | |
| 2415 | ||
| 2395 | 2416 | /* we don't take CS2 into account, as CS2 is a write-only unit */ |
| 2396 | 2417 | /*if (cassette_input(image_from_devtype_and_index(IO_CASSETTE, 0)) > 0) |
| 2397 | 2418 | answer |= 8;*/ |
| r2772 | r2773 | |
|---|---|---|
| 28 | 28 | |
| 29 | 29 | int pc1251_ina(void) |
| 30 | 30 | { |
| 31 | int data=outa; | |
| 31 | int data = outa; | |
| 32 | 32 | running_machine *machine = Machine; |
| 33 | 33 | |
| 34 | if (outb&1) { | |
| 35 | if (PC1251_KEY_MINUS) data|=1; | |
| 36 | if (power||PC1251_KEY_CL) data|=2; // problem with the deg lcd | |
| 37 | if (PC1251_KEY_ASTERIX) data|=4; | |
| 38 | if (PC1251_KEY_SLASH) data|=8; | |
| 39 | if (PC1251_KEY_DOWN) data|=0x10; | |
| 40 | if (PC1251_KEY_E) data|=0x20; | |
| 41 | if (PC1251_KEY_D) data|=0x40; | |
| 42 | if (PC1251_KEY_C) data|=0x80; | |
| 34 | if (outb & 0x01) | |
| 35 | { | |
| 36 | data |= input_port_read(machine, "KEY0"); | |
| 37 | ||
| 38 | /* At Power Up we fake a 'CL' pressure */ | |
| 39 | if (power) | |
| 40 | data |= 0x02; // problem with the deg lcd | |
| 43 | 41 | } |
| 44 | if (outb&2) { | |
| 45 | if (PC1251_KEY_PLUS) data|=1; | |
| 46 | if (PC1251_KEY_9) data|=2; | |
| 47 | if (PC1251_KEY_3) data|=4; | |
| 48 | if (PC1251_KEY_6) data|=8; | |
| 49 | if (PC1251_KEY_SHIFT) data|=0x10; | |
| 50 | if (PC1251_KEY_W) data|=0x20; | |
| 51 | if (PC1251_KEY_S) data|=0x40; | |
| 52 | if (PC1251_KEY_X) data|=0x80; | |
| 53 | } | |
| 54 | if (outb&4) { | |
| 55 | if (PC1251_KEY_POINT) data|=1; | |
| 56 | if (PC1251_KEY_8) data|=2; | |
| 57 | if (PC1251_KEY_2) data|=4; | |
| 58 | if (PC1251_KEY_5) data|=8; | |
| 59 | if (PC1251_KEY_DEF) data|=0x10; | |
| 60 | if (PC1251_KEY_Q) data|=0x20; | |
| 61 | if (PC1251_KEY_A) data|=0x40; | |
| 62 | if (PC1251_KEY_Z) data|=0x80; | |
| 63 | } | |
| 64 | if (outa&1) { | |
| 65 | if (PC1251_KEY_7) data|=2; | |
| 66 | if (PC1251_KEY_1) data|=4; | |
| 67 | if (PC1251_KEY_4) data|=8; | |
| 68 | if (PC1251_KEY_UP) data|=0x10; | |
| 69 | if (PC1251_KEY_R) data|=0x20; | |
| 70 | if (PC1251_KEY_F) data|=0x40; | |
| 71 | if (PC1251_KEY_V) data|=0x80; | |
| 72 | } | |
| 73 | if (outa&2) { | |
| 74 | if (PC1251_KEY_EQUALS) data|=4; | |
| 75 | if (PC1251_KEY_P) data|=8; | |
| 76 | if (PC1251_KEY_LEFT) data|=0x10; | |
| 77 | if (PC1251_KEY_T) data|=0x20; | |
| 78 | if (PC1251_KEY_G) data|=0x40; | |
| 79 | if (PC1251_KEY_B) data|=0x80; | |
| 80 | } | |
| 81 | if (outa&4) { | |
| 82 | if (PC1251_KEY_O) data|=8; | |
| 83 | if (PC1251_KEY_RIGHT) data|=0x10; | |
| 84 | if (PC1251_KEY_Y) data|=0x20; | |
| 85 | if (PC1251_KEY_H) data|=0x40; | |
| 86 | if (PC1251_KEY_N) data|=0x80; | |
| 87 | } | |
| 88 | if (outa&8) { | |
| 89 | // if (PC1251_KEY_DOWN) data|=0x10; //? | |
| 90 | if (PC1251_KEY_U) data|=0x20; | |
| 91 | if (PC1251_KEY_J) data|=0x40; | |
| 92 | if (PC1251_KEY_M) data|=0x80; | |
| 93 | } | |
| 94 | if (outa&0x10) { | |
| 95 | if (PC1251_KEY_I) data|=0x20; | |
| 96 | if (PC1251_KEY_K) data|=0x40; | |
| 97 | if (PC1251_KEY_SPACE) data|=0x80; | |
| 98 | } | |
| 99 | if (outa&0x20) { | |
| 100 | if (PC1251_KEY_L) data|=0x40; | |
| 101 | if (PC1251_KEY_ENTER) data|=0x80; | |
| 102 | } | |
| 103 | if (outa&0x40) { | |
| 104 | if (PC1251_KEY_0) data|=0x80; | |
| 105 | } | |
| 106 | 42 | |
| 43 | if (outb & 0x02) | |
| 44 | data |= input_port_read(machine, "KEY1"); | |
| 45 | ||
| 46 | if (outb & 0x04) | |
| 47 | data |= input_port_read(machine, "KEY2"); | |
| 48 | ||
| 49 | if (outa & 0x01) | |
| 50 | data |= input_port_read(machine, "KEY3"); | |
| 51 | ||
| 52 | if (outa & 0x02) | |
| 53 | data |= input_port_read(machine, "KEY4"); | |
| 54 | ||
| 55 | if (outa & 0x04) | |
| 56 | data |= input_port_read(machine, "KEY5"); | |
| 57 | ||
| 58 | if (outa & 0x08) | |
| 59 | data |= input_port_read(machine, "KEY6"); | |
| 60 | ||
| 61 | if (outa & 0x10) | |
| 62 | data |= input_port_read(machine, "KEY7"); | |
| 63 | ||
| 64 | if (outa & 0x20) | |
| 65 | data |= input_port_read(machine, "KEY8"); | |
| 66 | ||
| 67 | if (outa & 0x40) | |
| 68 | data |= input_port_read(machine, "KEY9"); | |
| 69 | ||
| 107 | 70 | return data; |
| 108 | 71 | } |
| 109 | 72 | |
| 110 | 73 | int pc1251_inb(void) |
| 111 | 74 | { |
| 112 | int data=outb; | |
| 75 | int data = outb; | |
| 113 | 76 | running_machine *machine = Machine; |
| 114 | if (outb&8) data|=PC1251_SWITCH_MODE; | |
| 77 | ||
| 78 | if (outb & 0x08) | |
| 79 | data |= (input_port_read(machine, "MODE") & 0x07); | |
| 80 | ||
| 115 | 81 | return data; |
| 116 | 82 | } |
| 117 | 83 | |
| 118 | 84 | int pc1251_brk(void) |
| 119 | 85 | { |
| 120 | 86 | running_machine *machine = Machine; |
| 121 | return | |
| 87 | return (input_port_read(machine, "EXTRA") & 0x01); | |
| 122 | 88 | } |
| 123 | 89 | |
| 124 | 90 | int pc1251_reset(void) |
| 125 | 91 | { |
| 126 | 92 | running_machine *machine = Machine; |
| 127 | return | |
| 93 | return (input_port_read(machine, "EX | |
| 128 | 94 | } |
| 129 | 95 | |
| 130 | 96 | /* currently enough to save the external ram */ |
| r2772 | r2773 | |
| 170 | 136 | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x8000, 0xc7ff, 0, 0, SMH_BANK1); |
| 171 | 137 | memory_set_bankptr(1, memory_region(REGION_CPU1) + 0x8000); |
| 172 | 138 | #else |
| 173 | if ( | |
| 139 | if ((input_port_read(machine, "DSW0") & 0xc0) == 0xc0) | |
| 174 | 140 | { |
| 175 | 141 | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x8000, 0xafff, 0, 0, SMH_RAM); |
| 176 | 142 | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xb000, 0xc5ff, 0, 0, SMH_NOP); |
| 177 | 143 | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xc600, 0xc7ff, 0, 0, SMH_RAM); |
| 178 | 144 | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xc800, 0xf7ff, 0, 0, SMH_RAM); |
| 179 | 145 | } |
| 180 | else if ( | |
| 146 | else if ((input_port_read(machine, "DSW0") & 0xc0) == 0x80) | |
| 181 | 147 | { |
| 182 | 148 | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xa000, 0xafff, 0, 0, SMH_NOP); |
| 183 | 149 | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xb000, 0xc7ff, 0, 0, SMH_RAM); |
| 184 | 150 | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xc800, 0xcbff, 0, 0, SMH_RAM); |
| 185 | 151 | } |
| 186 | else if ( | |
| 152 | else if ((input_port_read(machine, "DSW0") & 0xc0) == 0x40) | |
| 187 | 153 | { |
| 188 | 154 | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xa000, 0xb7ff, 0, 0, SMH_NOP); |
| 189 | 155 | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xb800, 0xc7ff, 0, 0, SMH_RAM); |
| r2772 | r2773 | |
|---|---|---|
| 105 | 105 | #endif |
| 106 | 106 | } fdc_kind_t; |
| 107 | 107 | |
| 108 | /* defines for input ports */ | |
| 109 | enum | |
| 110 | { | |
| 111 | INPUT_PORT_CONFIG = 0, | |
| 112 | input_port_mousex, /* optional mouse */ | |
| 113 | input_port_mousey, /* optional mouse */ | |
| 114 | input_port_mouse_buttons, /* optional mouse */ | |
| 115 | input_port_keyboard, /* 4 (/4x) or 16 (/8) input ports */ | |
| 116 | 108 | |
| 117 | input_port_caps_lock = input_port_keyboard+4, /* /4a only */ | |
| 118 | ||
| 119 | input_port_IR_joysticks = input_port_keyboard+4, /* /4 only */ | |
| 120 | input_port_IR_keypads = input_port_IR_joysticks+8 /* /4 only */ | |
| 121 | }; | |
| 122 | ||
| 123 | /* defines for input port input_port_config */ | |
| 109 | /* defines for input port "CFG" */ | |
| 124 | 110 | enum |
| 125 | 111 | { |
| 126 | 112 | config_xRAM_bit = 0, |
| r2772 | r2773 | |
|---|---|---|
| 170 | 170 | |
| 171 | 171 | |
| 172 | 172 | static INPUT_PORTS_START( dgnbeta ) |
| 173 | PORT_START /* Key ROw 0 */ | |
| 173 | PORT_START_TAG("KEY0") /* Key ROw 0 */ | |
| 174 | 174 | /* Return shift if either shift key pressed */ |
| 175 | 175 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L-SHIFT") PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1) |
| 176 | 176 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R-SHIFT") PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) |
| r2772 | r2773 | |
| 194 | 194 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("ESC") PORT_CODE(KEYCODE_ESC) PORT_CHAR(0x1B) |
| 195 | 195 | */ |
| 196 | 196 | |
| 197 | PORT_START /* Key row 2 */ | |
| 197 | PORT_START_TAG("KEY1") /* Key row 2 */ | |
| 198 | 198 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("b") PORT_CODE(KEYCODE_B) PORT_CHAR('b') |
| 199 | 199 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("j") PORT_CODE(KEYCODE_J) PORT_CHAR('j') |
| 200 | 200 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("i") PORT_CODE(KEYCODE_I) PORT_CHAR('i') |
| r2772 | r2773 | |
| 203 | 203 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("h") PORT_CODE(KEYCODE_H) PORT_CHAR('h') |
| 204 | 204 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7) PORT_CHAR('7') |
| 205 | 205 | |
| 206 | PORT_START /* Key row 3 */ | |
| 206 | PORT_START_TAG("KEY2") /* Key row 3 */ | |
| 207 | 207 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("n") PORT_CODE(KEYCODE_N) PORT_CHAR('n') |
| 208 | 208 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("k") PORT_CODE(KEYCODE_K) PORT_CHAR('k') |
| 209 | 209 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("o") PORT_CODE(KEYCODE_O) PORT_CHAR('o') |
| r2772 | r2773 | |
| 212 | 212 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("g") PORT_CODE(KEYCODE_G) PORT_CHAR('g') |
| 213 | 213 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6) PORT_CHAR('6') |
| 214 | 214 | |
| 215 | PORT_START /* Key row 4 */ | |
| 215 | PORT_START_TAG("KEY3") /* Key row 4 */ | |
| 216 | 216 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("m") PORT_CODE(KEYCODE_M) PORT_CHAR('m') |
| 217 | 217 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("l") PORT_CODE(KEYCODE_L) PORT_CHAR('l') |
| 218 | 218 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("p") PORT_CODE(KEYCODE_P) PORT_CHAR('p') |
| r2772 | r2773 | |
| 221 | 221 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("f") PORT_CODE(KEYCODE_F) PORT_CHAR('f') |
| 222 | 222 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) PORT_CHAR('5') |
| 223 | 223 | |
| 224 | PORT_START /* Key row 5 */ | |
| 224 | PORT_START_TAG("KEY4") /* Key row 5 */ | |
| 225 | 225 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(",") PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') |
| 226 | 226 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(";") PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(';') |
| 227 | 227 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("@") PORT_CODE(KEYCODE_ASTERISK) PORT_CHAR('@') |
| r2772 | r2773 | |
| 230 | 230 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("d") PORT_CODE(KEYCODE_D) PORT_CHAR('d') |
| 231 | 231 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) PORT_CHAR('4') |
| 232 | 232 | |
| 233 | PORT_START /* Key row 6 */ | |
| 233 | PORT_START_TAG("KEY5") /* Key row 6 */ | |
| 234 | 234 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(".") PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') |
| 235 | 235 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(":") PORT_CODE(KEYCODE_COLON) PORT_CHAR(':') |
| 236 | 236 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\\") PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\') |
| r2772 | r2773 | |
| 239 | 239 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("s") PORT_CODE(KEYCODE_S) PORT_CHAR('s') |
| 240 | 240 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3) PORT_CHAR('3') |
| 241 | 241 | |
| 242 | PORT_START /* Key row 7 */ | |
| 242 | PORT_START_TAG("KEY6") /* Key row 7 */ | |
| 243 | 243 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("/") PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') |
| 244 | 244 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("ENTER") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) |
| 245 | 245 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("DELETE") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8) |
| r2772 | r2773 | |
| 248 | 248 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("x") PORT_CODE(KEYCODE_X) PORT_CHAR('x') |
| 249 | 249 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("SPACE") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') |
| 250 | 250 | |
| 251 | PORT_START /* Key row 8 */ | |
| 251 | PORT_START_TAG("KEY7") /* Key row 8 */ | |
| 252 | 252 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("ASTERISK") PORT_CODE(KEYCODE_ASTERISK) PORT_CHAR('*') |
| 253 | 253 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("PAD_7") PORT_CODE(KEYCODE_7_PAD) PORT_CHAR('7') |
| 254 | 254 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("PAD_4") PORT_CODE(KEYCODE_4_PAD) PORT_CHAR('4') |
| r2772 | r2773 | |
| 257 | 257 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("z") PORT_CODE(KEYCODE_Z) PORT_CHAR('z') |
| 258 | 258 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2) PORT_CHAR('2') |
| 259 | 259 | |
| 260 | PORT_START /* Key row 9 */ | |
| 260 | PORT_START_TAG("KEY8") /* Key row 9 */ | |
| 261 | 261 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("PAD_0") PORT_CODE(KEYCODE_0_PAD) PORT_CHAR('0') |
| 262 | 262 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("PAD_8") PORT_CODE(KEYCODE_8_PAD) PORT_CHAR('8') |
| 263 | 263 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("PAD_5") PORT_CODE(KEYCODE_5_PAD) PORT_CHAR('5') |
| r2772 | r2773 | |
| 266 | 266 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("a") PORT_CODE(KEYCODE_A) PORT_CHAR('a') |
| 267 | 267 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) PORT_CHAR('1') |
| 268 | 268 | |
| 269 | PORT_START /* Key row 10 */ | |
| 269 | PORT_START_TAG("KEY9") /* Key row 10 */ | |
| 270 | 270 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("PAD_HASH") PORT_CODE(KEYCODE_MINUS_PAD) PORT_CHAR('#') |
| 271 | 271 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("PAD_9") PORT_CODE(KEYCODE_9_PAD) PORT_CHAR('9') |
| 272 | 272 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("PAD_6") PORT_CODE(KEYCODE_6_PAD) PORT_CHAR('6') |
| r2772 | r2773 | |
|---|---|---|
| 146 | 146 | |
| 147 | 147 | static INPUT_PORTS_START( pdp1 ) |
| 148 | 148 | |
| 149 | PORT_START /* 0: spacewar controllers */ | |
| 149 | PORT_START_TAG("SPACEWAR") /* 0: spacewar controllers */ | |
| 150 | 150 | PORT_BIT( ROTATE_LEFT_PLAYER1, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT) PORT_NAME("Spin Left Player 1") PORT_CODE(KEYCODE_A) PORT_CODE(JOYCODE_X_LEFT_SWITCH) |
| 151 | 151 | PORT_BIT( ROTATE_RIGHT_PLAYER1, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT) PORT_NAME("Spin Right Player 1") PORT_CODE(KEYCODE_S) PORT_CODE(JOYCODE_X_RIGHT_SWITCH) |
| 152 | 152 | PORT_BIT( THRUST_PLAYER1, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Thrust Player 1") PORT_CODE(KEYCODE_D) PORT_CODE(JOYCODE_BUTTON1) |
| r2772 | r2773 | |
| 158 | 158 | PORT_BIT( HSPACE_PLAYER1, IP_ACTIVE_HIGH, IPT_BUTTON3) PORT_NAME("Hyperspace Player 1") PORT_CODE(KEYCODE_Z) PORT_CODE(JOYCODE_BUTTON3) |
| 159 | 159 | PORT_BIT( HSPACE_PLAYER2, IP_ACTIVE_HIGH, IPT_BUTTON3) PORT_NAME("Hyperspace Player 2") PORT_CODE(KEYCODE_SLASH) PORT_CODE(JOYCODE_BUTTON3 ) PORT_PLAYER(2) |
| 160 | 160 | |
| 161 | PORT_START /* 1: various pdp1 operator control panel switches */ | |
| 161 | PORT_START_TAG("CSW") /* 1: various pdp1 operator control panel switches */ | |
| 162 | 162 | PORT_BIT(pdp1_control, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("control panel key") PORT_CODE(KEYCODE_LCONTROL) |
| 163 | 163 | PORT_BIT(pdp1_extend, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("extend") PORT_CODE(KEYCODE_TILDE) |
| 164 | 164 | PORT_BIT(pdp1_start_nobrk, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("start (sequence break disabled)") PORT_CODE(KEYCODE_U) |
| r2772 | r2773 | |
| 173 | 173 | PORT_BIT(pdp1_single_step, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("single step") PORT_CODE(KEYCODE_STOP) |
| 174 | 174 | PORT_BIT(pdp1_single_inst, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("single inst") PORT_CODE(KEYCODE_SLASH) |
| 175 | 175 | |
| 176 | PORT_START /* 2: operator control panel sense switches */ | |
| 176 | PORT_START_TAG("SENSE") /* 2: operator control panel sense switches */ | |
| 177 | 177 | PORT_DIPNAME( 040, 000, "Sense Switch 1") PORT_CODE(KEYCODE_1_PAD) |
| 178 | 178 | PORT_DIPSETTING( 000, DEF_STR( Off ) ) |
| 179 | 179 | PORT_DIPSETTING( 040, DEF_STR( On ) ) |
| r2772 | r2773 | |
| 193 | 193 | PORT_DIPSETTING( 000, DEF_STR( Off ) ) |
| 194 | 194 | PORT_DIPSETTING( 001, DEF_STR( On ) ) |
| 195 | 195 | |
| 196 | PORT_START /* 3: operator control panel test address switches */ | |
| 196 | PORT_START_TAG("TSTADD") /* 3: operator control panel test address switches */ | |
| 197 | 197 | PORT_BIT( 0100000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Extension Test Address Switch 3") PORT_CODE(KEYCODE_1) |
| 198 | 198 | PORT_BIT( 0040000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Extension Test Address Switch 4") PORT_CODE(KEYCODE_2) |
| 199 | 199 | PORT_BIT( 0020000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Extension Test Address Switch 5") PORT_CODE(KEYCODE_3) |
| r2772 | r2773 | |
| 211 | 211 | PORT_BIT( 0000002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Test Address Switch 17") PORT_CODE(KEYCODE_E) |
| 212 | 212 | PORT_BIT( 0000001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Test Address Switch 18") PORT_CODE(KEYCODE_R) |
| 213 | 213 | |
| 214 | PORT_START /* 4: operator control panel test word switches MSB */ | |
| 214 | PORT_START_TAG("TWDMSB") /* 4: operator control panel test word switches MSB */ | |
| 215 | 215 | PORT_BIT( 0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Test Word Switch 1") PORT_CODE(KEYCODE_A) |
| 216 | 216 | PORT_BIT( 0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Test Word Switch 2") PORT_CODE(KEYCODE_S) |
| 217 | 217 | |
| 218 | PORT_START /* 5: operator control panel test word switches LSB */ | |
| 218 | PORT_START_TAG("TWDLSB") /* 5: operator control panel test word switches LSB */ | |
| 219 | 219 | PORT_BIT( 0100000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Test Word Switch 3") PORT_CODE(KEYCODE_D) |
| 220 | 220 | PORT_BIT( 0040000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Test Word Switch 4") PORT_CODE(KEYCODE_F) |
| 221 | 221 | PORT_BIT( 0020000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Test Word Switch 5") PORT_CODE(KEYCODE_G) |
| r2772 | r2773 | |
| 239 | 239 | rightmost one: maybe they were used to set the margin (I don't have the |
| 240 | 240 | manual for the typewriter). |
| 241 | 241 | */ |
| 242 | PORT_START /* 6: typewriter codes 00-17 */ | |
| 242 | PORT_START_TAG("TWR0") /* 6: typewriter codes 00-17 */ | |
| 243 | 243 | PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("(Space)") PORT_CODE(KEYCODE_SPACE) |
| 244 | 244 | PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("1 \"") PORT_CODE(KEYCODE_1) |
| 245 | 245 | PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("2 '") PORT_CODE(KEYCODE_2) |
| r2772 | r2773 | |
| 251 | 251 | PORT_BIT(0x0100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("8 >") PORT_CODE(KEYCODE_8) |
| 252 | 252 | PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("9 (up arrow)") PORT_CODE(KEYCODE_9) |
| 253 | 253 | |
| 254 | PORT_START /* 7: typewriter codes 20-37 */ | |
| 254 | PORT_START_TAG("TWR1") /* 7: typewriter codes 20-37 */ | |
| 255 | 255 | PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("0 (right arrow)") PORT_CODE(KEYCODE_0) |
| 256 | 256 | PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("/ ?") PORT_CODE(KEYCODE_SLASH) |
| 257 | 257 | PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S) |
| r2772 | r2773 | |
| 265 | 265 | PORT_BIT(0x0800, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(", =") PORT_CODE(KEYCODE_COMMA) |
| 266 | 266 | PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Tab Key") PORT_CODE(KEYCODE_TAB) |
| 267 | 267 | |
| 268 | PORT_START /* 8: typewriter codes 40-57 */ | |
| 268 | PORT_START_TAG("TWR2") /* 8: typewriter codes 40-57 */ | |
| 269 | 269 | PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("(non-spacing middle dot) _") PORT_CODE(KEYCODE_QUOTE) |
| 270 | 270 | PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J) |
| 271 | 271 | PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K) |
| r2772 | r2773 | |
| 281 | 281 | PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("(non-spacing overstrike) |") PORT_CODE(KEYCODE_OPENBRACE) |
| 282 | 282 | PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("( [") PORT_CODE(KEYCODE_MINUS) |
| 283 | 283 | |
| 284 | PORT_START /* 9: typewriter codes 60-77 */ | |
| 284 | PORT_START_TAG("TWR3") /* 9: typewriter codes 60-77 */ | |
| 285 | 285 | PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A) |
| 286 | 286 | PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) |
| 287 | 287 | PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) |
| r2772 | r2773 | |
| 299 | 299 | PORT_BIT(0x2000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Backspace") PORT_CODE(KEYCODE_BACKSPACE) |
| 300 | 300 | PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Return") PORT_CODE(KEYCODE_ENTER) |
| 301 | 301 | |
| 302 | PORT_START /* 10: pseudo-input port with config */ | |
| 302 | PORT_START_TAG("CFG") /* 10: pseudo-input port with config */ | |
| 303 | 303 | PORT_DIPNAME( 0x0003, 0x0002, "RAM size") |
| 304 | 304 | PORT_DIPSETTING( 0x0000, "4kw" ) |
| 305 | 305 | PORT_DIPSETTING( 0x0001, "32kw") |
| r2772 | r2773 | |
| 317 | 317 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) |
| 318 | 318 | PORT_DIPSETTING( 0x0020, DEF_STR( On ) ) |
| 319 | 319 | |
| 320 | PORT_START /* 11: pseudo-input port with lightpen status */ | |
| 320 | PORT_START_TAG("LIGHTPEN") /* 11: pseudo-input port with lightpen status */ | |
| 321 | 321 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("select larger light pen tip") PORT_CODE(KEYCODE_PLUS_PAD) |
| 322 | 322 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("select smaller light pen tip") PORT_CODE(KEYCODE_MINUS_PAD) |
| 323 | 323 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("light pen down") |
| 324 | 324 | |
| 325 | PORT_START /* 12: lightpen - X AXIS */ | |
| 325 | PORT_START_TAG("LIGHTX") /* 12: lightpen - X AXIS */ | |
| 326 | 326 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(1) PORT_RESET |
| 327 | 327 | |
| 328 | PORT_START /* 13: lightpen - Y AXIS */ | |
| 328 | PORT_START_TAG("LIGHTY") /* 13: lightpen - Y AXIS */ | |
| 329 | 329 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(1) PORT_RESET |
| 330 | 330 | |
| 331 | 331 |
| r2772 | r2773 | |
|---|---|---|
| 283 | 283 | PA0: 0 1 2 3 4 5 6 7 |
| 284 | 284 | */ |
| 285 | 285 | static INPUT_PORTS_START( dragon32 ) |
| 286 | PORT_START /* KEY ROW 0 */ | |
| 286 | PORT_START_TAG("row0") /* KEY ROW 0 */ | |
| 287 | 287 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_0) PORT_CHAR('0') |
| 288 | 288 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') |
| 289 | 289 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('\"') |
| r2772 | r2773 | |
| 293 | 293 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&') |
| 294 | 294 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('\'') |
| 295 | 295 | |
| 296 | PORT_START /* KEY ROW 1 */ | |
| 296 | PORT_START_TAG("row1") /* KEY ROW 1 */ | |
| 297 | 297 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(') |
| 298 | 298 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')') |
| 299 | 299 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_COLON) PORT_CHAR(':') PORT_CHAR('*') |
| r2772 | r2773 | |
| 303 | 303 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') |
| 304 | 304 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') |
| 305 | 305 | |
| 306 | PORT_START /* KEY ROW 2 */ | |
| 306 | PORT_START_TAG("row2") /* KEY ROW 2 */ | |
| 307 | 307 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_ASTERISK) PORT_CHAR('@') |
| 308 | 308 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_A) PORT_CHAR('A') |
| 309 | 309 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_B) PORT_CHAR('B') |
| r2772 | r2773 | |
| 313 | 313 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_F) PORT_CHAR('F') |
| 314 | 314 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_G) PORT_CHAR('G') |
| 315 | 315 | |
| 316 | PORT_START /* KEY ROW 3 */ | |
| 316 | PORT_START_TAG("row3") /* KEY ROW 3 */ | |
| 317 | 317 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_H) PORT_CHAR('H') |
| 318 | 318 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_I) PORT_CHAR('I') |
| 319 | 319 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_J) PORT_CHAR('J') |
| r2772 | r2773 | |
| 323 | 323 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_N) PORT_CHAR('N') |
| 324 | 324 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_O) PORT_CHAR('O') |
| 325 | 325 | |
| 326 | PORT_START /* KEY ROW 4 */ | |
| 326 | PORT_START_TAG("row4") /* KEY ROW 4 */ | |
| 327 | 327 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_P) PORT_CHAR('P') |
| 328 | 328 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q') |
| 329 | 329 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_R) PORT_CHAR('R') |
| r2772 | r2773 | |
| 333 | 333 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_V) PORT_CHAR('V') |
| 334 | 334 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_W) PORT_CHAR('W') |
| 335 | 335 | |
| 336 | PORT_START /* KEY ROW 5 */ | |
| 336 | PORT_START_TAG("row5") /* KEY ROW 5 */ | |
| 337 | 337 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_X) PORT_CHAR('X') |
| 338 | 338 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_Y) PORT_CHAR('Y') |
| 339 | 339 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z') |
| r2772 | r2773 | |
| 343 | 343 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_NAME("RIGHT") PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(9) |
| 344 | 344 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_NAME("SPACE") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') |
| 345 | 345 | |
| 346 | PORT_START /* KEY ROW 6 */ | |
| 346 | PORT_START_TAG("row6") /* KEY ROW 6 */ | |
| 347 | 347 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_NAME("ENTER") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) |
| 348 | 348 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_NAME("CLEAR") PORT_CODE(KEYCODE_HOME) PORT_CHAR(12) |
| 349 | 349 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_NAME("BREAK") PORT_CODE(KEYCODE_END) PORT_CODE(KEYCODE_ESC) PORT_CHAR(27) |
| r2772 | r2773 | |
| 370 | 370 | PA0: @ A B C D E F G |
| 371 | 371 | */ |
| 372 | 372 | static INPUT_PORTS_START( coco ) |
| 373 | PORT_START /* KEY ROW 0 */ | |
| 373 | PORT_START_TAG("row0") /* KEY ROW 0 */ | |
| 374 | 374 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_ASTERISK) PORT_CHAR('@') |
| 375 | 375 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_A) PORT_CHAR('A') |
| 376 | 376 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_B) PORT_CHAR('B') |
| r2772 | r2773 | |
| 380 | 380 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_F) PORT_CHAR('F') |
| 381 | 381 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_G) PORT_CHAR('G') |
| 382 | 382 | |
| 383 | PORT_START /* KEY ROW 1 */ | |
| 383 | PORT_START_TAG("row1") /* KEY ROW 1 */ | |
| 384 | 384 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_H) PORT_CHAR('H') |
| 385 | 385 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_I) PORT_CHAR('I') |
| 386 | 386 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_J) PORT_CHAR('J') |
| r2772 | r2773 | |
| 390 | 390 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_N) PORT_CHAR('N') |
| 391 | 391 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_O) PORT_CHAR('O') |
| 392 | 392 | |
| 393 | PORT_START /* KEY ROW 2 */ | |
| 393 | PORT_START_TAG("row2") /* KEY ROW 2 */ | |
| 394 | 394 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_P) PORT_CHAR('P') |
| 395 | 395 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q') |
| 396 | 396 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_R) PORT_CHAR('R') |
| r2772 | r2773 | |
| 400 | 400 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_V) PORT_CHAR('V') |
| 401 | 401 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_W) PORT_CHAR('W') |
| 402 | 402 | |
| 403 | PORT_START /* KEY ROW 3 */ | |
| 403 | PORT_START_TAG("row3") /* KEY ROW 3 */ | |
| 404 | 404 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_X) PORT_CHAR('X') |
| 405 | 405 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_Y) PORT_CHAR('Y') |
| 406 | 406 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z') |
| r2772 | r2773 | |
| 410 | 410 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_NAME("RIGHT") PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(9) |
| 411 | 411 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_NAME("SPACE") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') |
| 412 | 412 | |
| 413 | PORT_START /* KEY ROW 4 */ | |
| 413 | PORT_START_TAG("row4") /* KEY ROW 4 */ | |
| 414 | 414 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_0) PORT_CHAR('0') |
| 415 | 415 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') |
| 416 | 416 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('\"') |
| r2772 | r2773 | |
| 420 | 420 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&') |
| 421 | 421 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('\'') |
| 422 | 422 | |
| 423 | PORT_START /* KEY ROW 5 */ | |
| 423 | PORT_START_TAG("row5") /* KEY ROW 5 */ | |
| 424 | 424 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(') |
| 425 | 425 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')') |
| 426 | 426 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_COLON) PORT_CHAR(':') PORT_CHAR('*') |
| r2772 | r2773 | |
| 430 | 430 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') |
| 431 | 431 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') |
| 432 | 432 | |
| 433 | PORT_START /* KEY ROW 6 */ | |
| 433 | PORT_START_TAG("row6") /* KEY ROW 6 */ | |
| 434 | 434 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_NAME("ENTER") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) |
| 435 | 435 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_NAME("CLEAR") PORT_CODE(KEYCODE_HOME) PORT_CHAR(12) |
| 436 | 436 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_NAME("BREAK") PORT_CODE(KEYCODE_END) PORT_CODE(KEYCODE_ESC) PORT_CHAR(27) |
| r2772 | r2773 | |
| 442 | 442 | PORT_INCLUDE( coco_joystick_buttons ) |
| 443 | 443 | PORT_INCLUDE( m6847_artifacting ) |
| 444 | 444 | |
| 445 | PORT_START /* 13 */ | |
| 445 | PORT_START_TAG("real_time_clock") /* 13 */ | |
| 446 | 446 | PORT_CONFNAME( 0x03, 0x00, "Real Time Clock" ) |
| 447 | 447 | PORT_CONFSETTING( 0x00, "Disto" ) |
| 448 | 448 | PORT_CONFSETTING( 0x01, "Cloud-9" ) |
| r2772 | r2773 | |
| 462 | 462 | PA0: @ A B C D E F G |
| 463 | 463 | */ |
| 464 | 464 | static INPUT_PORTS_START( coco3 ) |
| 465 | PORT_START /* KEY ROW 0 */ | |
| 465 | PORT_START_TAG("row0") /* KEY ROW 0 */ | |
| 466 | 466 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_ASTERISK) PORT_CHAR('@') |
| 467 | 467 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_A) PORT_CHAR('A') |
| 468 | 468 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_B) PORT_CHAR('B') |
| r2772 | r2773 | |
| 472 | 472 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_F) PORT_CHAR('F') |
| 473 | 473 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_G) PORT_CHAR('G') |
| 474 | 474 | |
| 475 | PORT_START /* KEY ROW 1 */ | |
| 475 | PORT_START_TAG("row1") /* KEY ROW 1 */ | |
| 476 | 476 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_H) PORT_CHAR('H') |
| 477 | 477 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_I) PORT_CHAR('I') |
| 478 | 478 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_J) PORT_CHAR('J') |
| r2772 | r2773 | |
| 482 | 482 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_N) PORT_CHAR('N') |
| 483 | 483 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_O) PORT_CHAR('O') |
| 484 | 484 | |
| 485 | PORT_START /* KEY ROW 2 */ | |
| 485 | PORT_START_TAG("row2") /* KEY ROW 2 */ | |
| 486 | 486 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_P) PORT_CHAR('P') |
| 487 | 487 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q') |
| 488 | 488 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_R) PORT_CHAR('R') |
| r2772 | r2773 | |
| 492 | 492 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_V) PORT_CHAR('V') |
| 493 | 493 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_W) PORT_CHAR('W') |
| 494 | 494 | |
| 495 | PORT_START /* KEY ROW 3 */ | |
| 495 | PORT_START_TAG("row3") /* KEY ROW 3 */ | |
| 496 | 496 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_X) PORT_CHAR('X') |
| 497 | 497 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_Y) PORT_CHAR('Y') |
| 498 | 498 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z') |
| r2772 | r2773 | |
| 502 | 502 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_NAME("RIGHT") PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(9) |
| 503 | 503 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_NAME("SPACE") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') |
| 504 | 504 | |
| 505 | PORT_START /* KEY ROW 4 */ | |
| 505 | PORT_START_TAG("row4") /* KEY ROW 4 */ | |
| 506 | 506 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_0) PORT_CHAR('0') |
| 507 | 507 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') |
| 508 | 508 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('\"') |
| r2772 | r2773 | |
| 512 | 512 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&') |
| 513 | 513 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('\'') |
| 514 | 514 | |
| 515 | PORT_START /* KEY ROW 5 */ | |
| 515 | PORT_START_TAG("row5") /* KEY ROW 5 */ | |
| 516 | 516 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(') |
| 517 | 517 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')') |
| 518 | 518 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_COLON) PORT_CHAR(':') PORT_CHAR('*') |
| r2772 | r2773 | |
| 522 | 522 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') |
| 523 | 523 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') |
| 524 | 524 | |
| 525 | PORT_START /* KEY ROW 6 */ | |
| 525 | PORT_START_TAG("row6") /* KEY ROW 6 */ | |
| 526 | 526 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_NAME("ENTER") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) |
| 527 | 527 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_NAME("CLEAR") PORT_CODE(KEYCODE_HOME) PORT_CHAR(12) |
| 528 | 528 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED(coco_keyboard_changed, NULL) PORT_NAME("BREAK") PORT_CODE(KEYCODE_END) PORT_CODE(KEYCODE_ESC) PORT_CHAR(27) |
| r2772 | r2773 | |
|---|---|---|
| 197 | 197 | static INPUT_PORTS_START(ti99_8) |
| 198 | 198 | |
| 199 | 199 | /* 1 port for config */ |
| 200 | PORT_START /* config */ | |
| 200 | PORT_START_TAG("CFG") /* config */ | |
| 201 | 201 | PORT_DIPNAME( config_fdc_mask << config_fdc_bit, /*fdc_kind_hfdc << config_fdc_bit*/0, "Floppy disk controller") |
| 202 | 202 | PORT_DIPSETTING( fdc_kind_none << config_fdc_bit, DEF_STR( None ) ) |
| 203 | 203 | PORT_DIPSETTING( fdc_kind_TI << config_fdc_bit, "Texas Instruments SD" ) |
| r2772 | r2773 | |
| 224 | 224 | |
| 225 | 225 | |
| 226 | 226 | /* 3 ports for mouse */ |
| 227 | PORT_START /* Mouse - X AXIS */ | |
| 227 | PORT_START_TAG("MOUSEX") /* Mouse - X AXIS */ | |
| 228 | 228 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(1) |
| 229 | 229 | |
| 230 | PORT_START /* Mouse - Y AXIS */ | |
| 230 | PORT_START_TAG("MOUSEY") /* Mouse - Y AXIS */ | |
| 231 | 231 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(1) |
| 232 | 232 | |
| 233 | PORT_START /* Mouse - buttons */ | |
| 233 | PORT_START_TAG("MOUSE0") /* Mouse - buttons */ | |
| 234 | 234 | PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_PLAYER(1) |
| 235 | 235 | PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_PLAYER(1) |
| 236 | 236 | |
| 237 | 237 | |
| 238 | 238 | /* 16 ports for keyboard and joystick */ |
| 239 | PORT_START /* col 0 */ | |
| 239 | PORT_START_TAG("KEY0") /* col 0 */ | |
| 240 | 240 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("ALPHA LOCK") PORT_CODE(KEYCODE_CAPSLOCK) |
| 241 | 241 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("FCTN") PORT_CODE(KEYCODE_LALT) PORT_CODE(KEYCODE_RALT) |
| 242 | 242 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CTRL") PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL) |
| 243 | 243 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("LSHIFT") PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1) |
| 244 | 244 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) |
| 245 | 245 | |
| 246 | PORT_START /* col 1 */ | |
| 246 | PORT_START_TAG("KEY1") /* col 1 */ | |
| 247 | 247 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1 ! DEL") PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') |
| 248 | 248 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("q Q") PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q') |
| 249 | 249 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("a A") PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') |
| 250 | 250 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("z Z") PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') |
| 251 | 251 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) |
| 252 | 252 | |
| 253 | PORT_START /* col 2 */ | |
| 253 | PORT_START_TAG("KEY2") /* col 2 */ | |
| 254 | 254 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2 @ INS") PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('@') |
| 255 | 255 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("w W") PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W') |
| 256 | 256 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("s S (LEFT)") PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S') |
| 257 | 257 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("x X (DOWN)") PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') |
| 258 | 258 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) |
| 259 | 259 | |
| 260 | PORT_START /* col 3 */ | |
| 260 | PORT_START_TAG("KEY3") /* col 3 */ | |
| 261 | 261 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3 #") PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') |
| 262 | 262 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("e E (UP)") PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E') |
| 263 | 263 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("d D (RIGHT)") PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D') |
| 264 | 264 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("c C") PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C') |
| 265 | 265 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) |
| 266 | 266 | |
| 267 | PORT_START /* col 4 */ | |
| 267 | PORT_START_TAG("KEY4") /* col 4 */ | |
| 268 | 268 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4 $ CLEAR") PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') |
| 269 | 269 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("r R") PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R') |
| 270 | 270 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("f F") PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F') |
| 271 | 271 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("v V") PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V') |
| 272 | 272 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) |
| 273 | 273 | |
| 274 | PORT_START /* col 5 */ | |
| 274 | PORT_START_TAG("KEY5") /* col 5 */ | |
| 275 | 275 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5 % BEGIN") PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') |
| 276 | 276 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("t T") PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T') |
| 277 | 277 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("g G") PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G') |
| 278 | 278 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("b B") PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') |
| 279 | 279 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) |
| 280 | 280 | |
| 281 | PORT_START /* col 6 */ | |
| 281 | PORT_START_TAG("KEY6") /* col 6 */ | |
| 282 | 282 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6 ^ PROC'D") PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('^') |
| 283 | 283 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("y Y") PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y') |
| 284 | 284 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("h H") PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H') |
| 285 | 285 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("n N") PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N') |
| 286 | 286 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) |
| 287 | 287 | |
| 288 | PORT_START /* col 7 */ | |
| 288 | PORT_START_TAG("KEY7") /* col 7 */ | |
| 289 | 289 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7 & AID") PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('&') |
| 290 | 290 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("u U") PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U') |
| 291 | 291 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("j J") PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J') |
| 292 | 292 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("m M") PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M') |
| 293 | 293 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) |
| 294 | 294 | |
| 295 | PORT_START /* col 8 */ | |
| 295 | PORT_START_TAG("KEY8") /* col 8 */ | |
| 296 | 296 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8 * REDO") PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('*') |
| 297 | 297 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("i I") PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I') |
| 298 | 298 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("k K") PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K') |
| 299 | 299 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(", <") PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') |
| 300 | 300 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) |
| 301 | 301 | |
| 302 | PORT_START /* col 9 */ | |
| 302 | PORT_START_TAG("KEY9") /* col 9 */ | |
| 303 | 303 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9 ( BACK") PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR('(') |
| 304 | 304 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("o O") PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O') |
| 305 | 305 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("l L") PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L') |
| 306 | 306 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(". >") PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') |
| 307 | 307 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) |
| 308 | 308 | |
| 309 | PORT_START /* col 10 */ | |
| 309 | PORT_START_TAG("KEY10") /* col 10 */ | |
| 310 | 310 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0 )") PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR(')') |
| 311 | 311 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("p P") PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P') |
| 312 | 312 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("; :") PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR(':') |
| 313 | 313 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("/ ?") PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') |
| 314 | 314 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) |
| 315 | 315 | |
| 316 | PORT_START /* col 11 */ | |
| 316 | PORT_START_TAG("KEY11") /* col 11 */ | |
| 317 | 317 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("= + QUIT") PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=') PORT_CHAR('+') |
| 318 | 318 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("[ {") PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[') PORT_CHAR('{') |
| 319 | 319 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("' \"") PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('\'') PORT_CHAR('"') |
| 320 | 320 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("RSHIFT") PORT_CODE(KEYCODE_RSHIFT) |
| 321 | 321 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) |
| 322 | 322 | |
| 323 | PORT_START /* col 12 */ | |
| 323 | PORT_START_TAG("KEY12") /* col 12 */ | |
| 324 | 324 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("- _") PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('_') |
| 325 | 325 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("] }") PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']') PORT_CHAR('}') |
| 326 | 326 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("ENTER") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) |
| 327 | 327 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("(SPACE)") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') |
| 328 | 328 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) |
| 329 | 329 | |
| 330 | PORT_START /* col 13 */ | |
| 330 | PORT_START_TAG("KEY13") /* col 13 */ | |
| 331 | 331 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\\ |") PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\') PORT_CHAR('|') |
| 332 | 332 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("` ~") PORT_CODE(KEYCODE_BACKSLASH2) PORT_CHAR('`') PORT_CHAR('~') |
| 333 | 333 | PORT_BIT(0x07, IP_ACTIVE_LOW, IPT_UNUSED) |
| 334 | 334 | |
| 335 | PORT_START /* col 14: "wired handset 1" (= joystick 1) */ | |
| 336 | PORT_BIT(0x0010, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN/*, "(1DOWN)", CODE_NONE, OSD_JOY_DOWN, 0*/) PORT_PLAYER(1) | |
| 337 | PORT_BIT(0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT/*, "(1RIGHT)", CODE_NONE, OSD_JOY_RIGHT, 0*/) PORT_PLAYER(1) | |
| 338 | PORT_BIT(0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT/*, "(1LEFT)", CODE_NONE, OSD_JOY_LEFT, 0*/) PORT_PLAYER(1) | |
| 339 | PORT_BIT(0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_UP/*, "(1UP)", CODE_NONE, OSD_JOY_UP*/) PORT_PLAYER(1) | |
| 340 | PORT_BIT(0x0001, IP_ACTIVE_LOW, IPT_BUTTON1/*, "(1FIRE)", CODE_NONE, OSD_JOY_FIRE, 0*/) PORT_PLAYER(1) | |
| 335 | PORT_START_TAG("KEY14") /* col 14: "wired handset 1" (= joystick 1) */ | |
| 336 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN/*, "(1DOWN)", CODE_NONE, OSD_JOY_DOWN, 0*/) PORT_PLAYER(1) | |
| 337 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT/*, "(1RIGHT)", CODE_NONE, OSD_JOY_RIGHT, 0*/) PORT_PLAYER(1) | |
| 338 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT/*, "(1LEFT)", CODE_NONE, OSD_JOY_LEFT, 0*/) PORT_PLAYER(1) | |
| 339 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP/*, "(1UP)", CODE_NONE, OSD_JOY_UP*/) PORT_PLAYER(1) | |
| 340 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_BUTTON1/*, "(1FIRE)", CODE_NONE, OSD_JOY_FIRE, 0*/) PORT_PLAYER(1) | |
| 341 | 341 | |
| 342 | PORT_START /* col 15: "wired handset 2" (= joystick 2) */ | |
| 343 | PORT_BIT(0x0010, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN/*, "(2UP)", CODE_NONE, OSD_JOY2_UP, 0*/) PORT_PLAYER(2) | |
| 344 | PORT_BIT(0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT/*, "(2DOWN)", CODE_NONE, OSD_JOY2_DOWN, 0*/) PORT_PLAYER(2) | |
| 345 | PORT_BIT(0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT/*, "(2RIGHT)", CODE_NONE, OSD_JOY2_RIGHT, 0*/) PORT_PLAYER(2) | |
| 346 | PORT_BIT(0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_UP/*, "(2LEFT)", CODE_NONE, OSD_JOY2_LEFT, 0*/) PORT_PLAYER(2) | |
| 347 | PORT_BIT(0x0001, IP_ACTIVE_LOW, IPT_BUTTON1/*, "(2FIRE)", CODE_NONE, OSD_JOY2_FIRE, 0*/) PORT_PLAYER(2) | |
| 342 | PORT_START_TAG("KEY15") /* col 15: "wired handset 2" (= joystick 2) */ | |
| 343 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN/*, "(2UP)", CODE_NONE, OSD_JOY2_UP, 0*/) PORT_PLAYER(2) | |
| 344 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT/*, "(2DOWN)", CODE_NONE, OSD_JOY2_DOWN, 0*/) PORT_PLAYER(2) | |
| 345 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT/*, "(2RIGHT)", CODE_NONE, OSD_JOY2_RIGHT, 0*/) PORT_PLAYER(2) | |
| 346 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP/*, "(2LEFT)", CODE_NONE, OSD_JOY2_LEFT, 0*/) PORT_PLAYER(2) | |
| 347 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_BUTTON1/*, "(2FIRE)", CODE_NONE, OSD_JOY2_FIRE, 0*/) PORT_PLAYER(2) | |
| 348 | 348 | |
| 349 | 349 | INPUT_PORTS_END |
| 350 | 350 |
| r2772 | r2773 | |
|---|---|---|
| 142 | 142 | ADDRESS_MAP_END |
| 143 | 143 | #endif |
| 144 | 144 | |
| 145 | #define PC1401_HELPER1 \ | |
| 146 | PORT_START \ | |
| 147 | PORT_DIPNAME (0x80, 0x00, "Power") \ | |
| 148 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) \ | |
| 149 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) \ | |
| 150 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("CAL") PORT_CODE(KEYCODE_F1) \ | |
| 151 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("BASIC") PORT_CODE(KEYCODE_F2) \ | |
| 152 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("BRK ON") PORT_CODE(KEYCODE_F4) \ | |
| 153 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("DEF") PORT_CODE(KEYCODE_LALT) PORT_CODE(KEYCODE_RALT) \ | |
| 154 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("down") PORT_CODE(KEYCODE_DOWN) \ | |
| 155 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("up") PORT_CODE(KEYCODE_UP) \ | |
| 156 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("left DEL") PORT_CODE(KEYCODE_LEFT) \ | |
| 157 | PORT_START \ | |
| 158 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("right INS") PORT_CODE(KEYCODE_RIGHT) | |
| 159 | 145 | |
| 160 | #define PC1401_HELPER2 \ | |
| 161 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) \ | |
| 162 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Q !") PORT_CODE(KEYCODE_Q)\ | |
| 163 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("W \"") PORT_CODE(KEYCODE_W)\ | |
| 164 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("E #") PORT_CODE(KEYCODE_E)\ | |
| 165 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("R $") PORT_CODE(KEYCODE_R)\ | |
| 166 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("T %") PORT_CODE(KEYCODE_T)\ | |
| 167 | PORT_START\ | |
| 168 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Y &") PORT_CODE(KEYCODE_Y)\ | |
| 169 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("U ?") PORT_CODE(KEYCODE_U)\ | |
| 170 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("I At") PORT_CODE(KEYCODE_I)\ | |
| 171 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("O :") PORT_CODE(KEYCODE_O)\ | |
| 172 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("P ;") PORT_CODE(KEYCODE_P)\ | |
| 173 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("A INPUT") PORT_CODE(KEYCODE_A)\ | |
| 174 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("S IF") PORT_CODE(KEYCODE_S)\ | |
| 175 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("D THEN") PORT_CODE(KEYCODE_D)\ | |
| 176 | PORT_START\ | |
| 177 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F GOTO") PORT_CODE(KEYCODE_F)\ | |
| 178 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("G FOR") PORT_CODE(KEYCODE_G)\ | |
| 179 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("H TO") PORT_CODE(KEYCODE_H)\ | |
| 180 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("J STEP") PORT_CODE(KEYCODE_J)\ | |
| 181 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("K NEXT") PORT_CODE(KEYCODE_K)\ | |
| 182 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("L LIST") PORT_CODE(KEYCODE_L)\ | |
| 183 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(", RUN") PORT_CODE(KEYCODE_COMMA)\ | |
| 184 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Z PRINT") PORT_CODE(KEYCODE_Z)\ | |
| 185 | PORT_START\ | |
| 186 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("X USING") PORT_CODE(KEYCODE_X)\ | |
| 187 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("C GOSUB") PORT_CODE(KEYCODE_C)\ | |
| 188 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("V RETURN") PORT_CODE(KEYCODE_V)\ | |
| 189 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("B DIM") PORT_CODE(KEYCODE_B)\ | |
| 190 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("N END") PORT_CODE(KEYCODE_N)\ | |
| 191 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("M CSAVE") PORT_CODE(KEYCODE_M)\ | |
| 192 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("SPC CLOAD") PORT_CODE(KEYCODE_SPACE)\ | |
| 193 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("ENTER N<>NP") PORT_CODE(KEYCODE_ENTER)\ | |
| 194 | PORT_START\ | |
| 195 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("HYP ARCHYP")\ | |
| 196 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("SIN SIN^-1")\ | |
| 197 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("COS COS^-1")\ | |
| 198 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("TAN TAN^-1")\ | |
| 199 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F<>E TAB")\ | |
| 200 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("C-CE CA") PORT_CODE(KEYCODE_ESC)\ | |
| 201 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("->HEX ->DEC")\ | |
| 202 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("->DEG ->D.MS")\ | |
| 203 | PORT_START\ | |
| 204 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("LN e^x E")\ | |
| 205 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("LOG 10^x F")\ | |
| 206 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("1/x ->re")\ | |
| 207 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("chnge STAT")\ | |
| 208 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("EXP Pi A")\ | |
| 209 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("y^x xROOTy B")\ | |
| 210 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("sqrt 3root C")\ | |
| 211 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("sqr tri% D")\ | |
| 212 | PORT_START\ | |
| 213 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("( ->xy") PORT_CODE(KEYCODE_8)\ | |
| 214 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(") n!") PORT_CODE(KEYCODE_9)\ | |
| 215 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("7 y mean") PORT_CODE(KEYCODE_7_PAD)\ | |
| 216 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("8 Sy") PORT_CODE(KEYCODE_8_PAD)\ | |
| 217 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("9 sigmay") PORT_CODE(KEYCODE_9_PAD)\ | |
| 218 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("/") PORT_CODE(KEYCODE_SLASH_PAD)\ | |
| 219 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("X->M Sum y Sum y^2")\ | |
| 220 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("4 x mean") PORT_CODE(KEYCODE_4_PAD)\ | |
| 221 | PORT_START\ | |
| 222 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("5 Sx") PORT_CODE(KEYCODE_5_PAD)\ | |
| 223 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("6 sigmax") PORT_CODE(KEYCODE_6_PAD)\ | |
| 224 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("* <") PORT_CODE(KEYCODE_ASTERISK)\ | |
| 225 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("RM (x,y)")\ | |
| 226 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("1 r") PORT_CODE(KEYCODE_1_PAD)\ | |
| 227 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("2 a") PORT_CODE(KEYCODE_2_PAD)\ | |
| 228 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("3 b") PORT_CODE(KEYCODE_3_PAD)\ | |
| 229 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("- >") PORT_CODE(KEYCODE_MINUS_PAD)\ | |
| 230 | PORT_START\ | |
| 231 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("M+ DATA CD")\ | |
| 232 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("0 x'") PORT_CODE(KEYCODE_0_PAD)\ | |
| 233 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("+/- y'") PORT_CODE(KEYCODE_NUMLOCK)\ | |
| 234 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(". DRG") PORT_CODE(KEYCODE_DEL_PAD)\ | |
| 235 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("+ ^") PORT_CODE(KEYCODE_PLUS_PAD)\ | |
| 236 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("=") PORT_CODE(KEYCODE_ENTER_PAD)\ | |
| 146 | /* 2008-05 FP: the following input ports are based on the way ports are read, but I would like | |
| 147 | to have confirmation from technical docs before considering these correct. | |
| 148 | */ | |
| 149 | ||
| 150 | static INPUT_PORTS_START( pc1401 ) | |
| 151 | PORT_START_TAG("KEY0") | |
| 152 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("+/- y'") PORT_CODE(KEYCODE_NUMLOCK) | |
| 153 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("8 Sy") PORT_CODE(KEYCODE_8_PAD) | |
| 154 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("2 a") PORT_CODE(KEYCODE_2_PAD) | |
| 155 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("5 Sx") PORT_CODE(KEYCODE_5_PAD) | |
| 156 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("CAL") PORT_CODE(KEYCODE_F1) | |
| 157 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Q !") PORT_CODE(KEYCODE_Q) | |
| 158 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("A INPUT") PORT_CODE(KEYCODE_A) | |
| 159 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Z PRINT") PORT_CODE(KEYCODE_Z) | |
| 160 | ||
| 161 | PORT_START_TAG("KEY1") | |
| 162 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(". DRG") PORT_CODE(KEYCODE_DEL_PAD) | |
| 163 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("9 sigmay") PORT_CODE(KEYCODE_9_PAD) | |
| 164 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("3 b") PORT_CODE(KEYCODE_3_PAD) | |
| 165 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("6 sigmax") PORT_CODE(KEYCODE_6_PAD) | |
| 166 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("BASIC") PORT_CODE(KEYCODE_F2) | |
| 167 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("W \"") PORT_CODE(KEYCODE_W) | |
| 168 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("S IF") PORT_CODE(KEYCODE_S) | |
| 169 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("X USING") PORT_CODE(KEYCODE_X) | |
| 170 | ||
| 171 | PORT_START_TAG("KEY2") | |
| 172 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("+ ^") PORT_CODE(KEYCODE_PLUS_PAD) | |
| 173 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("/") PORT_CODE(KEYCODE_SLASH_PAD) | |
| 174 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("- >") PORT_CODE(KEYCODE_MINUS_PAD) | |
| 175 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("* <") PORT_CODE(KEYCODE_ASTERISK) | |
| 176 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("DEF") PORT_CODE(KEYCODE_LALT) PORT_CODE(KEYCODE_RALT) | |
| 177 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("E #") PORT_CODE(KEYCODE_E) | |
| 178 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("D THEN") PORT_CODE(KEYCODE_D) | |
| 179 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("C GOSUB") PORT_CODE(KEYCODE_C) | |
| 180 | ||
| 181 | PORT_START_TAG("KEY3") | |
| 182 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(") n!") PORT_CODE(KEYCODE_9) | |
| 183 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("( ->xy") PORT_CODE(KEYCODE_8) | |
| 184 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("sqr tri% D") | |
| 185 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("sqrt 3root C") | |
| 186 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("y^x xROOTy B") | |
| 187 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("EXP Pi A") | |
| 188 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("X->M Sum y Sum y^2") | |
| 189 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("=") PORT_CODE(KEYCODE_ENTER_PAD) | |
| 190 | ||
| 191 | PORT_START_TAG("KEY4") | |
| 192 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("chnge STAT") | |
| 193 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("1/x ->r theta") | |
| 194 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("LOG 10^x F") | |
| 195 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("LN e^x E") | |
| 196 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("->DEG ->D.MS") | |
| 197 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("->HEX ->DEC") | |
| 198 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_UNUSED) | |
| 199 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("M+ DATA CD") | |
| 200 | ||
| 201 | PORT_START_TAG("KEY5") | |
| 202 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("C-CE CA") PORT_CODE(KEYCODE_ESC) | |
| 203 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F<>E TAB") | |
| 204 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("TAN TAN^-1") | |
| 205 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("COS COS^-1") | |
| 206 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("SIN SIN^-1") | |
| 207 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("HYP ARCHYP") | |
| 208 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) | |
| 209 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("RM (x,y)") | |
| 210 | ||
| 211 | PORT_START_TAG("KEY6") | |
| 212 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_UNUSED) | |
| 213 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("7 y mean") PORT_CODE(KEYCODE_7_PAD) | |
| 214 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("1 r") PORT_CODE(KEYCODE_1_PAD) | |
| 215 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("4 x mean") PORT_CODE(KEYCODE_4_PAD) | |
| 216 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("down") PORT_CODE(KEYCODE_DOWN) | |
| 217 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("R $") PORT_CODE(KEYCODE_R) | |
| 218 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F GOTO") PORT_CODE(KEYCODE_F) | |
| 219 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("V RETURN") PORT_CODE(KEYCODE_V) | |
| 220 | ||
| 221 | PORT_START_TAG("KEY7") | |
| 222 | PORT_BIT(0x03, IP_ACTIVE_HIGH, IPT_UNUSED) | |
| 223 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(", RUN") PORT_CODE(KEYCODE_COMMA) | |
| 224 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("P ;") PORT_CODE(KEYCODE_P) | |
| 225 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("up") PORT_CODE(KEYCODE_UP) | |
| 226 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("T %") PORT_CODE(KEYCODE_T) | |
| 227 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("G FOR") PORT_CODE(KEYCODE_G) | |
| 228 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("B DIM") PORT_CODE(KEYCODE_B) | |
| 229 | ||
| 230 | PORT_START_TAG("KEY8") | |
| 231 | PORT_BIT(0x07, IP_ACTIVE_HIGH, IPT_UNUSED) | |
| 232 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("O :") PORT_CODE(KEYCODE_O) | |
| 233 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("left DEL") PORT_CODE(KEYCODE_LEFT) | |
| 234 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Y &") PORT_CODE(KEYCODE_Y) | |
| 235 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("H TO") PORT_CODE(KEYCODE_H) | |
| 236 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("N END") PORT_CODE(KEYCODE_N) | |
| 237 | ||
| 238 | PORT_START_TAG("KEY9") | |
| 239 | PORT_BIT(0x0f, IP_ACTIVE_HIGH, IPT_UNUSED) | |
| 240 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("right INS") PORT_CODE(KEYCODE_RIGHT) | |
| 241 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("U ?") PORT_CODE(KEYCODE_U) | |
| 242 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("J STEP") PORT_CODE(KEYCODE_J) | |
| 243 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("M CSAVE") PORT_CODE(KEYCODE_M) | |
| 244 | ||
| 245 | PORT_START_TAG("KEY10") | |
| 246 | PORT_BIT(0x1f, IP_ACTIVE_HIGH, IPT_UNUSED) | |
| 247 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("I @") PORT_CODE(KEYCODE_I) | |
| 248 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("K NEXT") PORT_CODE(KEYCODE_K) | |
| 249 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("SPC CLOAD") PORT_CODE(KEYCODE_SPACE) | |
| 250 | ||
| 251 | PORT_START_TAG("KEY11") | |
| 252 | PORT_BIT(0x3f, IP_ACTIVE_HIGH, IPT_UNUSED) | |
| 253 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("L LIST") PORT_CODE(KEYCODE_L) | |
| 254 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("ENTER N<>NP") PORT_CODE(KEYCODE_ENTER) | |
| 255 | ||
| 256 | PORT_START_TAG("KEY12") | |
| 257 | PORT_BIT(0x7f, IP_ACTIVE_HIGH, IPT_UNUSED) | |
| 258 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("0 x'") PORT_CODE(KEYCODE_0_PAD) | |
| 259 | ||
| 260 | PORT_START_TAG("EXTRA") | |
| 261 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("BRK ON") PORT_CODE(KEYCODE_F4) | |
| 237 | 262 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Reset") PORT_CODE(KEYCODE_F3) |
| 263 | PORT_DIPNAME( 0x04, 0x00, "Power") | |
| 264 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 265 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 238 | 266 | |
| 239 | static INPUT_PORTS_START( pc1401 ) | |
| 240 | PC1401_HELPER1 | |
| 241 | PORT_BIT ( 0x40, 0x0, IPT_UNUSED ) | |
| 242 | PC1401_HELPER2 | |
| 243 | PORT_START | |
| 244 | PORT_DIPNAME ( 0xc0, 0x80, "RAM") | |
| 245 | PORT_DIPSETTING( 0x00, "2KB" ) | |
| 246 | PORT_DIPSETTING( 0x40, "PC1401(4KB)" ) | |
| 247 | PORT_DIPSETTING( 0x80, "PC1402(10KB)" ) | |
| 248 | PORT_DIPNAME ( 7, 2, "Contrast") | |
| 249 | PORT_DIPSETTING( 0, "0/Low" ) | |
| 250 | PORT_DIPSETTING( 1, "1" ) | |
| 251 | PORT_DIPSETTING( 2, "2" ) | |
| 252 | PORT_DIPSETTING( 3, "3" ) | |
| 253 | PORT_DIPSETTING( 4, "4" ) | |
| 254 | PORT_DIPSETTING( 5, "5" ) | |
| 255 | PORT_DIPSETTING( 6, "6" ) | |
| 256 | PORT_DIPSETTING( 7, "7/High" ) | |
| 267 | PORT_START_TAG("DSW0") | |
| 268 | PORT_DIPNAME( 0xc0, 0x40, "RAM") | |
| 269 | PORT_DIPSETTING( 0x00, "2KB" ) | |
| 270 | PORT_DIPSETTING( 0x40, "PC1401 (4KB)" ) | |
| 271 | PORT_DIPSETTING( 0x80, "PC1402 (10KB)" ) | |
| 272 | PORT_DIPNAME( 0x07, 0x02, "Contrast") | |
| 273 | PORT_DIPSETTING( 0x00, "0/Low" ) | |
| 274 | PORT_DIPSETTING( 0x01, "1" ) | |
| 275 | PORT_DIPSETTING( 0x02, "2" ) | |
| 276 | PORT_DIPSETTING( 0x03, "3" ) | |
| 277 | PORT_DIPSETTING( 0x04, "4" ) | |
| 278 | PORT_DIPSETTING( 0x05, "5" ) | |
| 279 | PORT_DIPSETTING( 0x06, "6" ) | |
| 280 | PORT_DIPSETTING( 0x07, "7/High" ) | |
| 257 | 281 | INPUT_PORTS_END |
| 258 | 282 | |
| 283 | static INPUT_PORTS_START( pc1402 ) | |
| 284 | PORT_INCLUDE( pc1401 ) | |
| 285 | ||
| 286 | PORT_MODIFY("DSW0") | |
| 287 | PORT_DIPNAME( 0xc0, 0x80, "RAM") | |
| 288 | PORT_DIPSETTING( 0x00, "2KB" ) | |
| 289 | PORT_DIPSETTING( 0x40, "PC1401 (4KB)" ) | |
| 290 | PORT_DIPSETTING( 0x80, "PC1402 (10KB)" ) | |
| 291 | INPUT_PORTS_END | |
| 292 | ||
| 259 | 293 | static INPUT_PORTS_START( pc1403 ) |
| 260 | PC1401_HELPER1 | |
| 261 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("SML") PORT_CODE(KEYCODE_CAPSLOCK) | |
| 262 | PC1401_HELPER2 | |
| 263 | PORT_START | |
| 264 | PORT_DIPNAME ( 0x80, 0x80, "RAM") | |
| 265 | PORT_DIPSETTING( 0x00, "PC1403(8KB)" ) | |
| 266 | PORT_DIPSETTING( 0x80, "PC1403H(32KB)" ) | |
| 294 | PORT_START_TAG("KEY0") | |
| 295 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("7 y mean") PORT_CODE(KEYCODE_7_PAD) | |
| 296 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("8 Sy") PORT_CODE(KEYCODE_8_PAD) | |
| 297 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("9 sigmay") PORT_CODE(KEYCODE_9_PAD) | |
| 298 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("/") PORT_CODE(KEYCODE_SLASH_PAD) | |
| 299 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("X->M Sum y Sum y^2") | |
| 300 | PORT_BIT(0xe0, IP_ACTIVE_HIGH, IPT_UNUSED) | |
| 267 | 301 | |
| 302 | PORT_START_TAG("KEY1") | |
| 303 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("4 x mean") PORT_CODE(KEYCODE_4_PAD) | |
| 304 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("5 Sx") PORT_CODE(KEYCODE_5_PAD) | |
| 305 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("6 sigmax") PORT_CODE(KEYCODE_6_PAD) | |
| 306 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("* <") PORT_CODE(KEYCODE_ASTERISK) | |
| 307 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("RM (x,y)") | |
| 308 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) | |
| 309 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("DEF") PORT_CODE(KEYCODE_LALT) PORT_CODE(KEYCODE_RALT) | |
| 310 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("SML") PORT_CODE(KEYCODE_CAPSLOCK) | |
| 311 | ||
| 312 | PORT_START_TAG("KEY2") | |
| 313 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("1 r") PORT_CODE(KEYCODE_1_PAD) | |
| 314 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("2 a") PORT_CODE(KEYCODE_2_PAD) | |
| 315 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("3 b") PORT_CODE(KEYCODE_3_PAD) | |
| 316 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("- >") PORT_CODE(KEYCODE_MINUS_PAD) | |
| 317 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("M+ DATA CD") | |
| 318 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Q !") PORT_CODE(KEYCODE_Q) | |
| 319 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("A INPUT") PORT_CODE(KEYCODE_A) | |
| 320 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Z PRINT") PORT_CODE(KEYCODE_Z) | |
| 321 | ||
| 322 | PORT_START_TAG("KEY3") | |
| 323 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("0 x'") PORT_CODE(KEYCODE_0_PAD) | |
| 324 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("+/- y'") PORT_CODE(KEYCODE_NUMLOCK) | |
| 325 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(". DRG") PORT_CODE(KEYCODE_DEL_PAD) | |
| 326 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("+ ^") PORT_CODE(KEYCODE_PLUS_PAD) | |
| 327 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("=") PORT_CODE(KEYCODE_ENTER_PAD) | |
| 328 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("W \"") PORT_CODE(KEYCODE_W) | |
| 329 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("S IF") PORT_CODE(KEYCODE_S) | |
| 330 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("X USING") PORT_CODE(KEYCODE_X) | |
| 331 | ||
| 332 | PORT_START_TAG("KEY4") | |
| 333 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("HYP ARCHYP") | |
| 334 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("SIN SIN^-1") | |
| 335 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("COS COS^-1") | |
| 336 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("TAN TAN^-1") | |
| 337 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_UNUSED) /* toggles indicator 3c bit 0 japan? */ | |
| 338 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("E #") PORT_CODE(KEYCODE_E) | |
| 339 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("D THEN") PORT_CODE(KEYCODE_D) | |
| 340 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("C GOSUB") PORT_CODE(KEYCODE_C) | |
| 341 | ||
| 342 | PORT_START_TAG("KEY5") | |
| 343 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("->HEX ->DEC") | |
| 344 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("->DEG ->D.MS") | |
| 345 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("LN e^x E") | |
| 346 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("LOG 10^x F") | |
| 347 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_UNUSED) /* tilde? */ | |
| 348 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("R $") PORT_CODE(KEYCODE_R) | |
| 349 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F GOTO") PORT_CODE(KEYCODE_F) | |
| 350 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("V RETURN") PORT_CODE(KEYCODE_V) | |
| 351 | ||
| 352 | PORT_START_TAG("KEY6") | |
| 353 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("EXP Pi A") | |
| 354 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("y^x xROOTy B") | |
| 355 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("sqrt 3root C") | |
| 356 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("sqr tri% D") | |
| 357 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_UNUSED) /* yen? */ | |
| 358 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("T %") PORT_CODE(KEYCODE_T) | |
| 359 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("G FOR") PORT_CODE(KEYCODE_G) | |
| 360 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("B DIM") PORT_CODE(KEYCODE_B) | |
| 361 | ||
| 362 | PORT_START_TAG("KEY7") | |
| 363 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_UNUSED) | |
| 364 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("C-CE CA") PORT_CODE(KEYCODE_ESC) | |
| 365 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("chnge STAT") | |
| 366 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F<>E TAB") | |
| 367 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Down") PORT_CODE(KEYCODE_DOWN) | |
| 368 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Y &") PORT_CODE(KEYCODE_Y) | |
| 369 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("H TO") PORT_CODE(KEYCODE_H) | |
| 370 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("N END") PORT_CODE(KEYCODE_N) | |
| 371 | ||
| 372 | PORT_START_TAG("KEY8") | |
| 373 | PORT_BIT(0x03, IP_ACTIVE_HIGH, IPT_UNUSED) | |
| 374 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(") n!") PORT_CODE(KEYCODE_9) | |
| 375 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("1/x ->r theta") | |
| 376 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Up") PORT_CODE(KEYCODE_UP) | |
| 377 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("U ?") PORT_CODE(KEYCODE_U) | |
| 378 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("J STEP") PORT_CODE(KEYCODE_J) | |
| 379 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("M CSAVE") PORT_CODE(KEYCODE_M) | |
| 380 | ||
| 381 | PORT_START_TAG("KEY9") | |
| 382 | PORT_BIT(0x07, IP_ACTIVE_HIGH, IPT_UNUSED) | |
| 383 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("( ->x y") PORT_CODE(KEYCODE_8) | |
| 384 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Left DEL") PORT_CODE(KEYCODE_LEFT) | |
| 385 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("I @") PORT_CODE(KEYCODE_I) | |
| 386 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("K NEXT") PORT_CODE(KEYCODE_K) | |
| 387 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("SPC CLOAD") PORT_CODE(KEYCODE_SPACE) | |
| 388 | ||
| 389 | PORT_START_TAG("KEY10") | |
| 390 | PORT_BIT(0x0f, IP_ACTIVE_HIGH, IPT_UNUSED) | |
| 391 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Right INS") PORT_CODE(KEYCODE_RIGHT) | |
| 392 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("O :") PORT_CODE(KEYCODE_O) | |
| 393 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("L LIST") PORT_CODE(KEYCODE_L) | |
| 394 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("ENTER N<>NP") PORT_CODE(KEYCODE_ENTER) | |
| 395 | ||
| 396 | PORT_START_TAG("KEY11") | |
| 397 | PORT_BIT(0x1f, IP_ACTIVE_HIGH, IPT_UNUSED) | |
| 398 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("P ;") PORT_CODE(KEYCODE_P) | |
| 399 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(", RUN") PORT_CODE(KEYCODE_COMMA) | |
| 400 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("BASIC") PORT_CODE(KEYCODE_F2) | |
| 401 | ||
| 402 | PORT_START_TAG("KEY12") | |
| 403 | PORT_BIT(0x3f, IP_ACTIVE_HIGH, IPT_UNUSED) | |
| 404 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_UNUSED) /* shift lock */ | |
| 405 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("CAL") PORT_CODE(KEYCODE_F1) | |
| 406 | ||
| 407 | PORT_START_TAG("KEY13") | |
| 408 | PORT_BIT(0x7f, IP_ACTIVE_HIGH, IPT_UNUSED) | |
| 409 | PORT_DIPNAME( 0x80, 0x00, "Power") | |
| 410 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 411 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 412 | ||
| 413 | PORT_START_TAG("EXTRA") | |
| 414 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("BRK ON") PORT_CODE(KEYCODE_F4) | |
| 415 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Reset") PORT_CODE(KEYCODE_F3) | |
| 416 | ||
| 417 | PORT_START_TAG("DSW0") | |
| 418 | PORT_DIPNAME( 0x80, 0x00, "RAM") | |
| 419 | PORT_DIPSETTING( 0x00, "PC1403 (8KB)" ) | |
| 420 | PORT_DIPSETTING( 0x80, "PC1403H (32KB)" ) | |
| 268 | 421 | // normally no contrast control! |
| 269 | PORT_DIPNAME ( 7, 2, "Contrast") | |
| 270 | PORT_DIPSETTING( 0, "0/Low" ) | |
| 271 | PORT_DIPSETTING( 1, "1" ) | |
| 272 | PORT_DIPSETTING( 2, "2" ) | |
| 273 | PORT_DIPSETTING( 3, "3" ) | |
| 274 | PORT_DIPSETTING( 4, "4" ) | |
| 275 | PORT_DIPSETTING( 5, "5" ) | |
| 276 | PORT_DIPSETTING( 6, "6" ) | |
| 277 | PORT_DIPSETTING( 7, "7/High" ) | |
| 422 | PORT_DIPNAME( 0x07, 0x02, "Contrast") | |
| 423 | PORT_DIPSETTING( 0x00, "0/Low" ) | |
| 424 | PORT_DIPSETTING( 0x01, "1" ) | |
| 425 | PORT_DIPSETTING( 0x02, "2" ) | |
| 426 | PORT_DIPSETTING( 0x03, "3" ) | |
| 427 | PORT_DIPSETTING( 0x04, "4" ) | |
| 428 | PORT_DIPSETTING( 0x05, "5" ) | |
| 429 | PORT_DIPSETTING( 0x06, "6" ) | |
| 430 | PORT_DIPSETTING( 0x07, "7/High" ) | |
| 278 | 431 | INPUT_PORTS_END |
| 279 | 432 | |
| 433 | static INPUT_PORTS_START( pc1403h ) | |
| 434 | PORT_INCLUDE( pc1403 ) | |
| 435 | ||
| 436 | PORT_MODIFY("DSW0") | |
| 437 | PORT_DIPNAME( 0x80, 0x80, "RAM") | |
| 438 | PORT_DIPSETTING( 0x00, "PC1403 (8KB)" ) | |
| 439 | PORT_DIPSETTING( 0x80, "PC1403H (32KB)" ) | |
| 440 | INPUT_PORTS_END | |
| 280 | 441 | |
| 281 | 442 | static INPUT_PORTS_START( pc1251 ) |
| 282 | PORT_START | |
| 283 | PORT_DIPNAME ( 7, 0, "Mode") | |
| 284 | PORT_DIPSETTING( 4, DEF_STR(Off) ) | |
| 285 | PORT_DIPSETTING( 0, "On/RUN" ) | |
| 286 | PORT_DIPSETTING( 2, "On/PRO" ) | |
| 287 | PORT_DIPSETTING( 1, "On/RSV" ) | |
| 288 | PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("DEF") PORT_CODE(KEYCODE_LALT) PORT_CODE(KEYCODE_RALT) | |
| 289 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) | |
| 290 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("DOWN (") PORT_CODE(KEYCODE_DOWN) | |
| 291 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("UP )") PORT_CODE(KEYCODE_UP) | |
| 443 | PORT_START_TAG("KEY0") | |
| 444 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("- >") PORT_CODE(KEYCODE_MINUS) PORT_CODE(KEYCODE_MINUS_PAD) | |
| 445 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("CL CA") PORT_CODE(KEYCODE_ESC) | |
| 446 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("* <") PORT_CODE(KEYCODE_ASTERISK) | |
| 447 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("/ ^") PORT_CODE(KEYCODE_SLASH) PORT_CODE(KEYCODE_SLASH_PAD) | |
| 448 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("DOWN (") PORT_CODE(KEYCODE_DOWN) | |
| 449 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("E #") PORT_CODE(KEYCODE_E) | |
| 450 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) | |
| 451 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) | |
| 452 | ||
| 453 | PORT_START_TAG("KEY1") | |
| 454 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("+ Exp") PORT_CODE(KEYCODE_PLUS_PAD) | |
| 455 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) | |
| 456 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("3 @") PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) | |
| 457 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) | |
| 458 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) | |
| 459 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("W \"") PORT_CODE(KEYCODE_W) | |
| 460 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S) | |
| 461 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X) | |
| 462 | ||
| 463 | PORT_START_TAG("KEY2") | |
| 464 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(". SquareRoot") PORT_CODE(KEYCODE_STOP) PORT_CODE(KEYCODE_DEL_PAD) | |
| 465 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) | |
| 466 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) | |
| 467 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) | |
| 468 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("DEF") PORT_CODE(KEYCODE_LALT) PORT_CODE(KEYCODE_RALT) | |
| 469 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Q !") PORT_CODE(KEYCODE_Q) | |
| 470 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A) | |
| 471 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z) | |
| 472 | ||
| 473 | PORT_START_TAG("KEY3") | |
| 474 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_UNUSED) | |
| 475 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) | |
| 476 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) | |
| 477 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) | |
| 478 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("UP )") PORT_CODE(KEYCODE_UP) | |
| 479 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("R $") PORT_CODE(KEYCODE_R) | |
| 480 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F) | |
| 481 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V) | |
| 482 | ||
| 483 | PORT_START_TAG("KEY4") | |
| 484 | PORT_BIT(0x03, IP_ACTIVE_HIGH, IPT_UNUSED) | |
| 485 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("=") PORT_CODE(KEYCODE_QUOTE) | |
| 486 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("P ;") PORT_CODE(KEYCODE_P) | |
| 292 | 487 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("LEFT DEL") PORT_CODE(KEYCODE_LEFT) |
| 293 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("RIGHT INS") PORT_CODE(KEYCODE_RIGHT) | |
| 294 | PORT_START | |
| 295 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("BRK ON") PORT_CODE(KEYCODE_F4) | |
| 296 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Q !") PORT_CODE(KEYCODE_Q) | |
| 297 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("W \"") PORT_CODE(KEYCODE_W) | |
| 298 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("E #") PORT_CODE(KEYCODE_E) | |
| 299 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("R $") PORT_CODE(KEYCODE_R) | |
| 300 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("T %") PORT_CODE(KEYCODE_T) | |
| 301 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Y &") PORT_CODE(KEYCODE_Y) | |
| 302 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("U ?") PORT_CODE(KEYCODE_U) | |
| 303 | PORT_START | |
| 304 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("I :") PORT_CODE(KEYCODE_I) | |
| 305 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("O ,") PORT_CODE(KEYCODE_O) | |
| 306 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("P ;") PORT_CODE(KEYCODE_P) | |
| 307 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A) | |
| 308 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S) | |
| 309 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) | |
| 310 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F) | |
| 311 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G) | |
| 312 | PORT_START | |
| 313 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H) | |
| 488 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("T %") PORT_CODE(KEYCODE_T) | |
| 489 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G) | |
| 490 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) | |
| 491 | ||
| 492 | PORT_START_TAG("KEY5") | |
| 493 | PORT_BIT(0x07, IP_ACTIVE_HIGH, IPT_UNUSED) | |
| 494 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("O ,") PORT_CODE(KEYCODE_O) | |
| 495 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("RIGHT INS") PORT_CODE(KEYCODE_RIGHT) | |
| 496 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Y &") PORT_CODE(KEYCODE_Y) | |
| 497 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H) | |
| 498 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N) | |
| 499 | ||
| 500 | PORT_START_TAG("KEY6") | |
| 501 | PORT_BIT(0x0f, IP_ACTIVE_HIGH, IPT_UNUSED) | |
| 502 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_UNUSED) /* down? */ | |
| 503 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("U ?") PORT_CODE(KEYCODE_U) | |
| 314 | 504 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J) |
| 315 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K) | |
| 316 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L) | |
| 317 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("=") PORT_CODE(KEYCODE_QUOTE) | |
| 318 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z) | |
| 319 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X) | |
| 320 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) | |
| 321 | PORT_START | |
| 322 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V) | |
| 323 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) | |
| 324 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N) | |
| 325 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M) | |
| 326 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(" SPC") PORT_CODE(KEYCODE_SPACE) | |
| 327 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("ENTER N<>NP") PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) | |
| 328 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) | |
| 329 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) | |
| 330 | PORT_START | |
| 331 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) | |
| 332 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("CL CA") PORT_CODE(KEYCODE_ESC) | |
| 333 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) | |
| 334 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) | |
| 335 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) | |
| 336 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("/ ^") PORT_CODE(KEYCODE_SLASH) PORT_CODE(KEYCODE_SLASH_PAD) | |
| 337 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) | |
| 338 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) | |
| 339 | PORT_START | |
| 340 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("3 @") PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) | |
| 341 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("* <") PORT_CODE(KEYCODE_ASTERISK) | |
| 342 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("0 Pi") PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) | |
| 343 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(". SquareRoot") PORT_CODE(KEYCODE_STOP) PORT_CODE(KEYCODE_DEL_PAD) | |
| 344 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("+ Exp") PORT_CODE(KEYCODE_PLUS_PAD) | |
| 345 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("- >") PORT_CODE(KEYCODE_MINUS) PORT_CODE(KEYCODE_MINUS_PAD) | |
| 346 | PORT_START | |
| 505 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M) | |
| 506 | ||
| 507 | PORT_START_TAG("KEY7") | |
| 508 | PORT_BIT(0x1f, IP_ACTIVE_HIGH, IPT_UNUSED) | |
| 509 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("I :") PORT_CODE(KEYCODE_I) | |
| 510 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K) | |
| 511 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(" SPC") PORT_CODE(KEYCODE_SPACE) | |
| 512 | ||
| 513 | PORT_START_TAG("KEY8") | |
| 514 | PORT_BIT(0x3f, IP_ACTIVE_HIGH, IPT_UNUSED) | |
| 515 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L) | |
| 516 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("ENTER N<>NP") PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) | |
| 517 | ||
| 518 | PORT_START_TAG("KEY9") | |
| 519 | PORT_BIT(0x7f, IP_ACTIVE_HIGH, IPT_UNUSED) | |
| 520 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("0 Pi") PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) | |
| 521 | ||
| 522 | PORT_START_TAG("EXTRA") | |
| 523 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("BRK ON") PORT_CODE(KEYCODE_F4) | |
| 524 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Reset") PORT_CODE(KEYCODE_F3) | |
| 525 | ||
| 526 | PORT_START_TAG("MODE") | |
| 527 | PORT_DIPNAME( 0x07, 0x00, "Mode") | |
| 528 | PORT_DIPSETTING( 0x04, DEF_STR(Off) ) | |
| 529 | PORT_DIPSETTING( 0x00, "On/RUN" ) | |
| 530 | PORT_DIPSETTING( 0x02, "On/PRO" ) | |
| 531 | PORT_DIPSETTING( 0x01, "On/RSV" ) | |
| 532 | ||
| 533 | PORT_START_TAG("DSW0") | |
| 347 | 534 | #if 0 |
| 348 | PORT_DIPNAME ( 0xc0, 0xc0, "RAM") | |
| 349 | PORT_DIPSETTING( 0x00, "1KB" ) | |
| 350 | PORT_DIPSETTING( 0x40, "3.5KB" ) | |
| 351 | PORT_DIPSETTING( 0x80, "6KB" ) | |
| 352 | PORT_DIPSETTING( 0xc0, "11KB" ) | |
| 535 | PORT_DIPNAME( 0xc0, 0xc0, "RAM") | |
| 536 | PORT_DIPSETTING( 0x00, "1KB" ) | |
| 537 | PORT_DIPSETTING( 0x40, "3.5KB" ) | |
| 538 | PORT_DIPSETTING( 0x80, "6KB" ) | |
| 539 | PORT_DIPSETTING( 0xc0, "11KB" ) | |
| 353 | 540 | #endif |
| 354 | PORT_DIPNAME ( 7, 2, "Contrast") | |
| 355 | PORT_DIPSETTING( 0, "0/Low" ) | |
| 356 | PORT_DIPSETTING( 1, "1" ) | |
| 357 | PORT_DIPSETTING( 2, "2" ) | |
| 358 | PORT_DIPSETTING( 3, "3" ) | |
| 359 | PORT_DIPSETTING( 4, "4" ) | |
| 360 | PORT_DIPSETTING( 5, "5" ) | |
| 361 | PORT_DIPSETTING( 6, "6" ) | |
| 362 | PORT_DIPSETTING( 7, "7/High" ) | |
| 541 | PORT_DIPNAME( 0x07, 0x02, "Contrast") | |
| 542 | PORT_DIPSETTING( 0x00, "0/Low" ) | |
| 543 | PORT_DIPSETTING( 0x01, "1" ) | |
| 544 | PORT_DIPSETTING( 0x02, "2" ) | |
| 545 | PORT_DIPSETTING( 0x03, "3" ) | |
| 546 | PORT_DIPSETTING( 0x04, "4" ) | |
| 547 | PORT_DIPSETTING( 0x05, "5" ) | |
| 548 | PORT_DIPSETTING( 0x06, "6" ) | |
| 549 | PORT_DIPSETTING( 0x07, "7/High" ) | |
| 363 | 550 | INPUT_PORTS_END |
| 364 | 551 | |
| 365 | 552 | static INPUT_PORTS_START( pc1350 ) |
| 366 | PORT_START | |
| 367 | PORT_DIPNAME (0x80, 0x00, "Power") | |
| 368 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 369 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 370 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("DOWN") PORT_CODE(KEYCODE_DOWN) | |
| 371 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("UP") PORT_CODE(KEYCODE_UP) | |
| 372 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("MODE") PORT_CODE(KEYCODE_F1) | |
| 373 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("CLS CA") PORT_CODE(KEYCODE_ESC) | |
| 374 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("LEFT") PORT_CODE(KEYCODE_LEFT) | |
| 375 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("RIGHT") PORT_CODE(KEYCODE_RIGHT) | |
| 376 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("DEL") PORT_CODE(KEYCODE_DEL) | |
| 377 | PORT_START | |
| 378 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("INS") PORT_CODE(KEYCODE_INSERT) | |
| 379 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("BRK ON") PORT_CODE(KEYCODE_F4) | |
| 380 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_LSHIFT) | |
| 381 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) | |
| 382 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) | |
| 383 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) | |
| 384 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("( <") PORT_CODE(KEYCODE_OPENBRACE) | |
| 553 | PORT_START_TAG("KEY0") | |
| 385 | 554 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(") >") PORT_CODE(KEYCODE_CLOSEBRACE) |
| 386 | PORT_START | |
| 387 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) | |
| 388 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) | |
| 389 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) | |
| 390 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("/") PORT_CODE(KEYCODE_SLASH) PORT_CODE(KEYCODE_SLASH_PAD) | |
| 391 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(":") PORT_CODE(KEYCODE_COLON) | |
| 392 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) | |
| 393 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) | |
| 394 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) | |
| 395 | PORT_START | |
| 396 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("*") PORT_CODE(KEYCODE_ASTERISK) | |
| 397 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(";") PORT_CODE(KEYCODE_QUOTE) | |
| 398 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) | |
| 399 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(".") PORT_CODE(KEYCODE_STOP) | |
| 555 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(":") PORT_CODE(KEYCODE_COLON) | |
| 556 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(";") PORT_CODE(KEYCODE_QUOTE) | |
| 557 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(",") PORT_CODE(KEYCODE_COMMA) | |
| 558 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("SML") PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL) | |
| 559 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("DEF") PORT_CODE(KEYCODE_LALT) PORT_CODE(KEYCODE_RALT) | |
| 560 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_RSHIFT) /* are both Shifts connected here? or is Left Shift missing */ | |
| 561 | ||
| 562 | PORT_START_TAG("KEY1") | |
| 563 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("( <") PORT_CODE(KEYCODE_OPENBRACE) | |
| 564 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("/") PORT_CODE(KEYCODE_SLASH) PORT_CODE(KEYCODE_SLASH_PAD) | |
| 565 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("*") PORT_CODE(KEYCODE_ASTERISK) | |
| 566 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("- ^") PORT_CODE(KEYCODE_MINUS) PORT_CODE(KEYCODE_MINUS_PAD) | |
| 567 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z) | |
| 568 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A) | |
| 569 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Q !") PORT_CODE(KEYCODE_Q) | |
| 570 | ||
| 571 | PORT_START_TAG("KEY2") | |
| 572 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) | |
| 573 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) | |
| 574 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) | |
| 400 | 575 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("+") PORT_CODE(KEYCODE_PLUS_PAD) |
| 401 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("- ^") PORT_CODE(KEYCODE_MINUS) PORT_CODE(KEYCODE_MINUS_PAD) | |
| 402 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(",") PORT_CODE(KEYCODE_COMMA) | |
| 403 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_LSHIFT) | |
| 404 | PORT_START | |
| 405 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Q !") PORT_CODE(KEYCODE_Q) | |
| 576 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X) | |
| 577 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S) | |
| 406 | 578 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("W \"") PORT_CODE(KEYCODE_W) |
| 407 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("E #") PORT_CODE(KEYCODE_E) | |
| 408 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("R $") PORT_CODE(KEYCODE_R) | |
| 409 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("T %") PORT_CODE(KEYCODE_T) | |
| 410 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Y &") PORT_CODE(KEYCODE_Y) | |
| 411 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("U ?") PORT_CODE(KEYCODE_U) | |
| 412 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("I Pi") PORT_CODE(KEYCODE_I) | |
| 413 | PORT_START | |
| 414 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("O Squareroot") PORT_CODE(KEYCODE_O) | |
| 579 | ||
| 580 | PORT_START_TAG("KEY3") | |
| 581 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) | |
| 582 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) | |
| 583 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) | |
| 584 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(".") PORT_CODE(KEYCODE_STOP) | |
| 585 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) | |
| 586 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) | |
| 587 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("E #") PORT_CODE(KEYCODE_E) | |
| 588 | ||
| 589 | PORT_START_TAG("KEY4") | |
| 590 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) | |
| 591 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) | |
| 592 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) | |
| 593 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) | |
| 594 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V) | |
| 595 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F) | |
| 596 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("R $") PORT_CODE(KEYCODE_R) | |
| 597 | ||
| 598 | PORT_START_TAG("KEY5") | |
| 599 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("UP") PORT_CODE(KEYCODE_UP) | |
| 600 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("DOWN") PORT_CODE(KEYCODE_DOWN) | |
| 601 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("LEFT") PORT_CODE(KEYCODE_LEFT) | |
| 602 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("RIGHT") PORT_CODE(KEYCODE_RIGHT) | |
| 603 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) | |
| 604 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G) | |
| 605 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("T %") PORT_CODE(KEYCODE_T) | |
| 606 | ||
| 607 | PORT_START_TAG("KEY6") | |
| 608 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_UNUSED) | |
| 609 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_UNUSED) /* 1 ?*/ | |
| 610 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("INS") PORT_CODE(KEYCODE_INSERT) | |
| 611 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("DEL") PORT_CODE(KEYCODE_DEL) | |
| 612 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N) | |
| 613 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H) | |
| 614 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Y &") PORT_CODE(KEYCODE_Y) | |
| 615 | ||
| 616 | PORT_START_TAG("KEY7") | |
| 617 | PORT_BIT(0x03, IP_ACTIVE_HIGH, IPT_UNUSED) | |
| 618 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_UNUSED) /* 2 ?*/ | |
| 619 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("MODE") PORT_CODE(KEYCODE_F1) | |
| 620 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M) | |
| 621 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J) | |
| 622 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("U ?") PORT_CODE(KEYCODE_U) | |
| 623 | ||
| 624 | PORT_START_TAG("KEY8") | |
| 625 | PORT_BIT(0x07, IP_ACTIVE_HIGH, IPT_UNUSED) | |
| 626 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("CLS CA") PORT_CODE(KEYCODE_ESC) | |
| 627 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("SPC") PORT_CODE(KEYCODE_SPACE) | |
| 628 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K) | |
| 629 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("I Pi") PORT_CODE(KEYCODE_I) | |
| 630 | ||
| 631 | PORT_START_TAG("KEY9") | |
| 632 | PORT_BIT(0x0f, IP_ACTIVE_HIGH, IPT_UNUSED) | |
| 633 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("ENTER P<->NP") PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) | |
| 634 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L) | |
| 635 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("O Squareroot") PORT_CODE(KEYCODE_O) | |
| 636 | ||
| 637 | PORT_START_TAG("KEY10") | |
| 638 | PORT_BIT(0x1f, IP_ACTIVE_HIGH, IPT_UNUSED) | |
| 639 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("=") PORT_CODE(KEYCODE_EQUALS) | |
| 415 | 640 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("P Alpha") PORT_CODE(KEYCODE_P) |
| 416 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("DEF") PORT_CODE(KEYCODE_LALT) PORT_CODE(KEYCODE_RALT) | |
| 417 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A) | |
| 418 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S) | |
| 419 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) | |
| 420 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F) | |
| 421 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G) | |
| 422 | PORT_START | |
| 423 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H) | |
| 424 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J) | |
| 425 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K) | |
| 426 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L) | |
| 427 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("=") PORT_CODE(KEYCODE_EQUALS) | |
| 428 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("SML") PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL) | |
| 429 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z) | |
| 430 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X) | |
| 431 | PORT_START | |
| 432 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) | |
| 433 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V) | |
| 434 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) | |
| 435 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N) | |
| 436 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M) | |
| 437 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("SPC") PORT_CODE(KEYCODE_SPACE) | |
| 438 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("ENTER P<->NP") PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) | |
| 439 | PORT_START | |
| 440 | PORT_DIPNAME ( 7, 2, "Contrast") | |
| 441 | PORT_DIPSETTING( 0, "0/Low" ) | |
| 442 | PORT_DIPSETTING( 1, "1" ) | |
| 443 | PORT_DIPSETTING( 2, "2" ) | |
| 444 | PORT_DIPSETTING( 3, "3" ) | |
| 445 | PORT_DIPSETTING( 4, "4" ) | |
| 446 | PORT_DIPSETTING( 5, "5" ) | |
| 447 | PORT_DIPSETTING( 6, "6" ) | |
| 448 | PORT_DIPSETTING( 7, "7/High" ) | |
| 641 | ||
| 642 | PORT_START_TAG("KEY11") | |
| 643 | PORT_DIPNAME( 0xc0, 0x00, "Power") | |
| 644 | PORT_DIPSETTING( 0xc0, DEF_STR( Off ) ) | |
| 645 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 646 | ||
| 647 | PORT_START_TAG("EXTRA") | |
| 648 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("BRK ON") PORT_CODE(KEYCODE_F4) | |
| 649 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_LSHIFT) // temporarily here, but not read... | |
| 650 | ||
| 651 | PORT_START_TAG("DSW0") | |
| 652 | PORT_DIPNAME( 0x07, 0x02, "Contrast") | |
| 653 | PORT_DIPSETTING( 0x00, "0/Low" ) | |
| 654 | PORT_DIPSETTING( 0x01, "1" ) | |
| 655 | PORT_DIPSETTING( 0x02, "2" ) | |
| 656 | PORT_DIPSETTING( 0x03, "3" ) | |
| 657 | PORT_DIPSETTING( 0x04, "4" ) | |
| 658 | PORT_DIPSETTING( 0x05, "5" ) | |
| 659 | PORT_DIPSETTING( 0x06, "6" ) | |
| 660 | PORT_DIPSETTING( 0x07, "7/High" ) | |
| 449 | 661 | INPUT_PORTS_END |
| 450 | 662 | |
| 663 | ||
| 451 | 664 | static const gfx_layout pc1401_charlayout = |
| 452 | 665 | { |
| 453 | 666 | 2,21, |
| r2772 | r2773 | |
| 713 | 926 | /* pc1261/pc1262 */ |
| 714 | 927 | COMP( 1984, pc1350, 0, 0, pc1350, pc1350, 0, pc1350, "Sharp", "Pocket Computer 1350", 0 ) |
| 715 | 928 | COMP( 1983, pc1401, 0, 0, pc1401, pc1401, pc1401, pocketc, "Sharp", "Pocket Computer 1401", 0 ) |
| 716 | COMP( 1984, pc1402, pc1401, 0, pc1401, pc140 | |
| 929 | COMP( 1984, pc1402, pc1401, 0, pc1401, pc1402, pc1401, pocketc, "Sharp", "Pocket Computer 1402", 0 ) | |
| 717 | 930 | |
| 718 | 931 | /* 72kb rom, 32kb ram, cpu? pc1360 */ |
| 719 | COMP( 198?, pc1403, 0, 0, pc1403, pc1403, pc1403, pocketc, "Sharp", "Pocket Computer 1403", GAME_NOT_WORKING) | |
| 720 | COMP( 198?, pc1403h, pc1403, 0, pc1403, pc1403, pc1403, pocketc, "Sharp", "Pocket Computer 1403H", GAME_NOT_WORKING) | |
| 932 | COMP( 198?, pc1403, 0, 0, pc1403, pc1403, pc1403, pocketc, "Sharp", "Pocket Computer 1403", GAME_NOT_WORKING) | |
| 933 | COMP( 198?, pc1403h, pc1403, 0, pc1403, pc1403h, pc1403, pocketc, "Sharp", "Pocket Computer 1403H", GAME_NOT_WORKING) |
| r2772 | r2773 | |
|---|---|---|
| 82 | 82 | |
| 83 | 83 | static INPUT_PORTS_START( concept ) |
| 84 | 84 | |
| 85 | PORT_START /* port 0: keys 0x00 through 0x0f */ | |
| 85 | PORT_START_TAG("KEY0") /* port 0: keys 0x00 through 0x0f */ | |
| 86 | 86 | PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("(right)") PORT_CODE(KEYCODE_RIGHT) |
| 87 | 87 | PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3_PAD) |
| 88 | 88 | PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9_PAD) |
| r2772 | r2773 | |
| 100 | 100 | PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5_PAD) |
| 101 | 101 | PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2_PAD) |
| 102 | 102 | |
| 103 | PORT_START /* port 1: keys 0x10 through 0x1f */ | |
| 103 | PORT_START_TAG("KEY1") /* port 1: keys 0x10 through 0x1f */ | |
| 104 | 104 | PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("= +") PORT_CODE(KEYCODE_EQUALS) |
| 105 | 105 | |
| 106 | 106 | PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("[ {") PORT_CODE(KEYCODE_OPENBRACE) |
| r2772 | r2773 | |
| 118 | 118 | PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("' \"") PORT_CODE(KEYCODE_QUOTE) |
| 119 | 119 | PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("SHIFT (r)") PORT_CODE(KEYCODE_RSHIFT) |
| 120 | 120 | |
| 121 | PORT_START /* port 2: keys 0x20 through 0x2f */ | |
| 121 | PORT_START_TAG("KEY2") /* port 2: keys 0x20 through 0x2f */ | |
| 122 | 122 | PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F1") PORT_CODE(KEYCODE_F1) |
| 123 | 123 | PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F2") PORT_CODE(KEYCODE_F2) |
| 124 | 124 | PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F3") PORT_CODE(KEYCODE_F3) |
| r2772 | r2773 | |
| 134 | 134 | PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V) |
| 135 | 135 | PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) |
| 136 | 136 | |
| 137 | PORT_START /* port 3: keys 0x30 through 0x3f */ | |
| 137 | PORT_START_TAG("KEY3") /* port 3: keys 0x30 through 0x3f */ | |
| 138 | 138 | PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("2 @") PORT_CODE(KEYCODE_2) |
| 139 | 139 | PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("3 #") PORT_CODE(KEYCODE_3) |
| 140 | 140 | PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W) |
| r2772 | r2773 | |
| 152 | 152 | PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("SHIFT (l)") PORT_CODE(KEYCODE_LSHIFT) |
| 153 | 153 | PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z) |
| 154 | 154 | |
| 155 | PORT_START /* port 4: keys 0x40 through 0x4f */ | |
| 155 | PORT_START_TAG("KEY4") /* port 4: keys 0x40 through 0x4f */ | |
| 156 | 156 | PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("6 ^") PORT_CODE(KEYCODE_6) |
| 157 | 157 | PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("7 &") PORT_CODE(KEYCODE_7) |
| 158 | 158 | PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Y") PORT_CODE(KEYCODE_Y) |
| r2772 | r2773 | |
| 170 | 170 | PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("00") PORT_CODE(KEYCODE_ASTERISK) |
| 171 | 171 | PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(".") PORT_CODE(KEYCODE_DEL_PAD) |
| 172 | 172 | |
| 173 | PORT_START /* port 5: keys 0x50 through 0x5f */ | |
| 173 | PORT_START_TAG("KEY5") /* port 5: keys 0x50 through 0x5f */ | |
| 174 | 174 | PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("8 *") PORT_CODE(KEYCODE_8) |
| 175 | 175 | PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("9 (") PORT_CODE(KEYCODE_9) |
| 176 | 176 | PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I) |
| r2772 | r2773 | |
| 188 | 188 | PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("???") PORT_CODE(KEYCODE_SLASH_PAD) |
| 189 | 189 | PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("BREAK") PORT_CODE(KEYCODE_PAUSE) |
| 190 | 190 | |
| 191 | PORT_START /* port 6: on-board DIP switches */ | |
| 191 | PORT_START_TAG("DSW0") /* port 6: on-board DIP switches */ | |
| 192 | 192 | PORT_DIPNAME(0x01, 0x00, "Omninet Address bit 0") |
| 193 | 193 | PORT_DIPSETTING(0x00, DEF_STR( Off )) |
| 194 | 194 | PORT_DIPSETTING(0x01, DEF_STR( On )) |
| r2772 | r2773 | |
| 214 | 214 | PORT_DIPSETTING(0xc0, "Boot from Diskette") |
| 215 | 215 | |
| 216 | 216 | #if 0 |
| 217 | PORT_START /* port 7: Display orientation */ | |
| 217 | PORT_START_TAG("DISPLAY") /* port 7: Display orientation */ | |
| 218 | 218 | PORT_DIPNAME(0x01, 0x00, "Screen Orientation") |
| 219 | 219 | PORT_DIPSETTING(0x00, "Horizontal") |
| 220 | 220 | PORT_DIPSETTING(0x01, "Vertical") |
| r2772 | r2773 | |
|---|---|---|
| 251 | 251 | /* 101-key PC XT keyboard + TI joysticks */ |
| 252 | 252 | static INPUT_PORTS_START(geneve) |
| 253 | 253 | |
| 254 | PORT_START /* config */ | |
| 254 | PORT_START_TAG("CFG") /* config */ | |
| 255 | 255 | PORT_DIPNAME( config_speech_mask << config_speech_bit, 1 << config_speech_bit, "Speech synthesis") |
| 256 | 256 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) |
| 257 | 257 | PORT_DIPSETTING( 1 << config_speech_bit, DEF_STR( On ) ) |
| r2772 | r2773 | |
| 273 | 273 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) |
| 274 | 274 | PORT_DIPSETTING( 1 << config_usbsm_bit, DEF_STR( On ) ) |
| 275 | 275 | |
| 276 | PORT_START /* col 1: "wired handset 1" (= joystick 1) */ | |
| 276 | PORT_START_TAG("JOY") /* col 1: "wired handset 1" (= joystick 1) */ | |
| 277 | 277 | PORT_BIT(0x0080, IP_ACTIVE_LOW, IPT_JOYSTICK_UP/*, "(1UP)", CODE_NONE, OSD_JOY_UP*/) PORT_PLAYER(1) |
| 278 | 278 | PORT_BIT(0x0040, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN/*, "(1DOWN)", CODE_NONE, OSD_JOY_DOWN, 0*/) PORT_PLAYER(1) |
| 279 | 279 | PORT_BIT(0x0020, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT/*, "(1RIGHT)", CODE_NONE, OSD_JOY_RIGHT, 0*/) PORT_PLAYER(1) |
| r2772 | r2773 | |
| 288 | 288 | PORT_BIT(0x0800, IP_ACTIVE_LOW, IPT_BUTTON1/*, "(2FIRE)", CODE_NONE, OSD_JOY2_FIRE, 0*/) PORT_PLAYER(2) |
| 289 | 289 | PORT_BIT(0x0700, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 290 | 290 | |
| 291 | PORT_START /* mouse buttons */ | |
| 291 | PORT_START_TAG("MOUSEX") /* Mouse - X AXIS */ | |
| 292 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(1) | |
| 293 | ||
| 294 | PORT_START_TAG("MOUSEY") /* Mouse - Y AXIS */ | |
| 295 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(1) | |
| 296 | ||
| 297 | PORT_START_TAG("MOUSE0") /* mouse buttons */ | |
| 292 | 298 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("mouse button 1") |
| 293 | 299 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_NAME("mouse button 2") |
| 294 | 300 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON3) PORT_NAME("mouse button 3") |
| 295 | 301 | |
| 296 | PORT_START /* Mouse - X AXIS */ | |
| 297 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(1) | |
| 298 | ||
| 299 | PORT_START /* Mouse - Y AXIS */ | |
| 300 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(1) | |
| 301 | ||
| 302 | PORT_START /* IN3 */ | |
| 302 | PORT_START_TAG("KEY0") /* IN3 */ | |
| 303 | 303 | PORT_BIT ( 0x0001, 0x0000, IPT_UNUSED ) /* unused scancode 0 */ |
| 304 | 304 | PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Esc") PORT_CODE(KEYCODE_ESC) /* Esc 01 81 */ |
| 305 | 305 | PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("1 !") PORT_CODE(KEYCODE_1) /* 1 02 82 */ |
| r2772 | r2773 | |
| 317 | 317 | PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Backspace") PORT_CODE(KEYCODE_BACKSPACE) /* Backspace 0E 8E */ |
| 318 | 318 | PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Tab") PORT_CODE(KEYCODE_TAB) /* Tab 0F 8F */ |
| 319 | 319 | |
| 320 | PORT_START /* IN4 */ | |
| 320 | PORT_START_TAG("KEY1") /* IN4 */ | |
| 321 | 321 | PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q) /* Q 10 90 */ |
| 322 | 322 | PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W) /* W 11 91 */ |
| 323 | 323 | PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E) /* E 12 92 */ |
| r2772 | r2773 | |
| 335 | 335 | PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A) /* A 1E 9E */ |
| 336 | 336 | PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S) /* S 1F 9F */ |
| 337 | 337 | |
| 338 | PORT_START /* IN5 */ | |
| 338 | PORT_START_TAG("KEY2") /* IN5 */ | |
| 339 | 339 | PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) /* D 20 A0 */ |
| 340 | 340 | PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F) /* F 21 A1 */ |
| 341 | 341 | PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G) /* G 22 A2 */ |
| r2772 | r2773 | |
| 353 | 353 | PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) /* C 2E AE */ |
| 354 | 354 | PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V) /* V 2F AF */ |
| 355 | 355 | |
| 356 | PORT_START /* IN6 */ | |
| 356 | PORT_START_TAG("KEY3") /* IN6 */ | |
| 357 | 357 | PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) /* B 30 B0 */ |
| 358 | 358 | PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N) /* N 31 B1 */ |
| 359 | 359 | PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M) /* M 32 B2 */ |
| r2772 | r2773 | |
| 371 | 371 | PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F4") PORT_CODE(KEYCODE_F4) /* F4 3E BE */ |
| 372 | 372 | PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F5") PORT_CODE(KEYCODE_F5) /* F5 3F BF */ |
| 373 | 373 | |
| 374 | PORT_START /* IN7 */ | |
| 374 | PORT_START_TAG("KEY4") /* IN7 */ | |
| 375 | 375 | PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F6") PORT_CODE(KEYCODE_F6) /* F6 40 C0 */ |
| 376 | 376 | PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F7") PORT_CODE(KEYCODE_F7) /* F7 41 C1 */ |
| 377 | 377 | PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F8") PORT_CODE(KEYCODE_F8) /* F8 42 C2 */ |
| r2772 | r2773 | |
| 389 | 389 | PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("KP +") PORT_CODE(KEYCODE_PLUS_PAD) /* Keypad + 4E CE */ |
| 390 | 390 | PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("KP 1 (End)") PORT_CODE(KEYCODE_1_PAD ) /* Keypad 1 (End) 4F CF */ |
| 391 | 391 | |
| 392 | PORT_START /* IN8 */ | |
| 392 | PORT_START_TAG("KEY5") /* IN8 */ | |
| 393 | 393 | PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("KP 2 (Down)") PORT_CODE(KEYCODE_2_PAD ) /* Keypad 2 (Down arrow) 50 D0 */ |
| 394 | 394 | PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("KP 3 (PgDn)") PORT_CODE(KEYCODE_3_PAD ) /* Keypad 3 (PgDn) 51 D1 */ |
| 395 | 395 | PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("KP 0 (Ins)") PORT_CODE(KEYCODE_0_PAD ) /* Keypad 0 (Ins) 52 D2 */ |
| r2772 | r2773 | |
| 400 | 400 | PORT_BIT(0x0100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("(101)F12") PORT_CODE(KEYCODE_F12) /* F12 58 D8 */ |
| 401 | 401 | PORT_BIT ( 0xfe00, 0x0000, IPT_UNUSED ) |
| 402 | 402 | |
| 403 | PORT_START /* IN9 */ | |
| 403 | PORT_START_TAG("KEY6") /* IN9 */ | |
| 404 | 404 | PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("(101)KP Enter") PORT_CODE(KEYCODE_ENTER_PAD) /* PAD Enter 60 e0 */ |
| 405 | 405 | PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("(101)R-Control") PORT_CODE(KEYCODE_RCONTROL) /* Right Control 61 e1 */ |
| 406 | 406 | PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("(101)ALTGR") PORT_CODE(KEYCODE_RALT) /* ALTGR 64 e4 */ |
| r2772 | r2773 | |
| 421 | 421 | PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("(101)PrtScr (F13)") PORT_CODE(KEYCODE_PRTSCR) /* Print Screen 63 e3 */ |
| 422 | 422 | PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("(101)Pause (F15)") PORT_CODE(KEYCODE_PAUSE) /* Pause 65 e5 */ |
| 423 | 423 | |
| 424 | PORT_START /* IN10 */ | |
| 424 | PORT_START_TAG("KEY7") /* IN10 */ | |
| 425 | 425 | PORT_BIT ( 0xffff, 0x0000, IPT_UNUSED ) |
| 426 | 426 | #if 0 |
| 427 | 427 | PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Print Screen") PORT_CODE(KEYCODE_PRTSCR) /* Print Screen alternate 77 f7 */ |
| r2772 | r2773 | |
|---|---|---|
| 108 | 108 | |
| 109 | 109 | static INPUT_PORTS_START( tx0 ) |
| 110 | 110 | |
| 111 | PORT_START /* 0: various tx0 operator control panel switches */ | |
| 111 | PORT_START_TAG("CSW") /* 0: various tx0 operator control panel switches */ | |
| 112 | 112 | PORT_BIT(tx0_control, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("control panel key") PORT_CODE(KEYCODE_LCONTROL) |
| 113 | 113 | PORT_BIT(tx0_stop_cyc0, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("stop at cycle 0") PORT_CODE(KEYCODE_Q) |
| 114 | 114 | PORT_BIT(tx0_stop_cyc1, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("stop at cycle 1") PORT_CODE(KEYCODE_W) |
| r2772 | r2773 | |
| 121 | 121 | PORT_BIT(tx0_cm_sel, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("TSS CM switch") PORT_CODE(KEYCODE_A) |
| 122 | 122 | PORT_BIT(tx0_lr_sel, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("TSS LR switch") PORT_CODE(KEYCODE_SLASH) |
| 123 | 123 | |
| 124 | PORT_START /* 1: operator control panel toggle switch register switches MS */ | |
| 124 | PORT_START_TAG("MSW") /* 1: operator control panel toggle switch register switches MS */ | |
| 125 | 125 | PORT_BIT( 0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Toggle Switch Register Switch 0") PORT_CODE(KEYCODE_S) |
| 126 | 126 | PORT_BIT( 0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Toggle Switch Register Switch 1") PORT_CODE(KEYCODE_D) |
| 127 | 127 | |
| 128 | PORT_START /* 2: operator control panel toggle switch register switches LS */ | |
| 128 | PORT_START_TAG("LSW") /* 2: operator control panel toggle switch register switches LS */ | |
| 129 | 129 | PORT_BIT( 0100000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Toggle Switch Register Switch 2") PORT_CODE(KEYCODE_F) |
| 130 | 130 | PORT_BIT( 0040000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Toggle Switch Register Switch 3") PORT_CODE(KEYCODE_G) |
| 131 | 131 | PORT_BIT( 0020000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Toggle Switch Register Switch 4") PORT_CODE(KEYCODE_H) |
| r2772 | r2773 | |
| 143 | 143 | PORT_BIT( 0000002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Toggle Switch Register Switch 16") PORT_CODE(KEYCODE_COMMA) |
| 144 | 144 | PORT_BIT( 0000001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Toggle Switch Register Switch 17") PORT_CODE(KEYCODE_STOP) |
| 145 | 145 | |
| 146 | PORT_START /* 3: typewriter codes 00-17 */ | |
| 146 | PORT_START_TAG("TWR0") /* 3: typewriter codes 00-17 */ | |
| 147 | 147 | PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E) |
| 148 | 148 | PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8) |
| 149 | 149 | PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("| _") PORT_CODE(KEYCODE_SLASH) |
| r2772 | r2773 | |
| 158 | 158 | PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U) |
| 159 | 159 | PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2) |
| 160 | 160 | |
| 161 | PORT_START /* 4: typewriter codes 20-37 */ | |
| 161 | PORT_START_TAG("TWR1") /* 4: typewriter codes 20-37 */ | |
| 162 | 162 | PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(". )") PORT_CODE(KEYCODE_STOP) |
| 163 | 163 | PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) |
| 164 | 164 | PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) |
| r2772 | r2773 | |
| 174 | 174 | PORT_BIT(0x2000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("- +") PORT_CODE(KEYCODE_MINUS) |
| 175 | 175 | PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K) |
| 176 | 176 | |
| 177 | PORT_START /* 5: typewriter codes 40-57 */ | |
| 177 | PORT_START_TAG("TWR2") /* 5: typewriter codes 40-57 */ | |
| 178 | 178 | PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T) |
| 179 | 179 | PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z) |
| 180 | 180 | PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Backspace") PORT_CODE(KEYCODE_BACKSPACE) |
| r2772 | r2773 | |
| 187 | 187 | PORT_BIT(0x1000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P) |
| 188 | 188 | PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q) |
| 189 | 189 | |
| 190 | PORT_START /* 6: typewriter codes 60-77 */ | |
| 190 | PORT_START_TAG("TWR3") /* 6: typewriter codes 60-77 */ | |
| 191 | 191 | PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O) |
| 192 | 192 | PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) |
| 193 | 193 | PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G) |
| r2772 | r2773 | |
|---|---|---|
| 131 | 131 | PORT_BIT( mask, IP_ACTIVE_LOW, IPT_UNUSED) |
| 132 | 132 | |
| 133 | 133 | static INPUT_PORTS_START( cybiko) |
| 134 | PORT_START // A1 | |
| 134 | PORT_START_TAG("A1") // A1 | |
| 135 | 135 | CYBIKO_PORT_BIT_K( 0x01) PORT_NAME( "F7" ) PORT_CODE( KEYCODE_F7 ) PORT_CHAR( UCHAR_MAMEKEY( F7 )) |
| 136 | 136 | CYBIKO_PORT_BIT_K( 0x02) PORT_NAME( "Esc" ) PORT_CODE( KEYCODE_ESC ) PORT_CHAR( UCHAR_MAMEKEY( ESC )) |
| 137 | 137 | CYBIKO_PORT_BIT_K( 0x04) PORT_NAME( "Del" ) PORT_CODE( KEYCODE_DEL ) PORT_CHAR( UCHAR_MAMEKEY( DEL )) |
| r2772 | r2773 | |
| 140 | 140 | CYBIKO_PORT_BIT_K( 0x20) PORT_NAME( "A" ) PORT_CODE( KEYCODE_A ) PORT_CHAR( 'A' ) |
| 141 | 141 | CYBIKO_PORT_BIT_K( 0x40) PORT_NAME( "`" ) PORT_CHAR( '`' ) |
| 142 | 142 | CYBIKO_PORT_BIT_K( 0x80) PORT_NAME( "Shift" ) PORT_CODE( KEYCODE_LSHIFT ) PORT_CHAR( UCHAR_SHIFT_1 ) |
| 143 | PORT_START // A2 | |
| 143 | PORT_START_TAG("A2") // A2 | |
| 144 | 144 | CYBIKO_PORT_BIT_K( 0x01) PORT_NAME( "F6" ) PORT_CODE( KEYCODE_F6 ) PORT_CHAR( UCHAR_MAMEKEY( F6 )) |
| 145 | 145 | CYBIKO_PORT_BIT_K( 0x02) PORT_NAME( "Up" ) PORT_CODE( KEYCODE_UP ) PORT_CHAR( UCHAR_MAMEKEY( UP )) |
| 146 | CYBIKO_PORT_BIT_K( 0x04) PORT_NAME( " | |
| 146 | CYBIKO_PORT_BIT_K( 0x04) PORT_NAME( "A | |
| 147 | 147 | CYBIKO_PORT_BIT_K( 0x08) PORT_NAME( "2 @" ) PORT_CODE( KEYCODE_2 ) PORT_CHAR( '2' ) PORT_CHAR( '@') |
| 148 | 148 | CYBIKO_PORT_BIT_K( 0x10) PORT_NAME( "W" ) PORT_CODE( KEYCODE_W ) PORT_CHAR( 'W' ) |
| 149 | 149 | CYBIKO_PORT_BIT_K( 0x20) PORT_NAME( "S" ) PORT_CODE( KEYCODE_S ) PORT_CHAR( 'S' ) |
| 150 | 150 | CYBIKO_PORT_BIT_K( 0x40) PORT_NAME( "Z" ) PORT_CODE( KEYCODE_Z ) PORT_CHAR( 'Z' ) |
| 151 | 151 | CYBIKO_PORT_BIT_K( 0x80) PORT_NAME( "Fn" ) PORT_CODE( KEYCODE_LCONTROL ) PORT_CHAR( UCHAR_SHIFT_2 ) |
| 152 | PORT_START // A3 | |
| 152 | PORT_START_TAG("A3") // A3 | |
| 153 | 153 | CYBIKO_PORT_BIT_K( 0x01) PORT_NAME( "F5" ) PORT_CODE( KEYCODE_F5 ) PORT_CHAR( UCHAR_MAMEKEY( F5 )) |
| 154 | 154 | CYBIKO_PORT_BIT_K( 0x02) PORT_NAME( "F3" ) PORT_CODE( KEYCODE_F3 ) PORT_CHAR( UCHAR_MAMEKEY( F3 )) |
| 155 | 155 | CYBIKO_PORT_BIT_K( 0x04) PORT_NAME( "Space" ) PORT_CODE( KEYCODE_SPACE ) PORT_CHAR( ' ' ) |
| r2772 | r2773 | |
| 158 | 158 | CYBIKO_PORT_BIT_K( 0x20) PORT_NAME( "D" ) PORT_CODE( KEYCODE_D ) PORT_CHAR( 'D' ) |
| 159 | 159 | CYBIKO_PORT_BIT_K( 0x40) PORT_NAME( "X" ) PORT_CODE( KEYCODE_X ) PORT_CHAR( 'X' ) |
| 160 | 160 | CYBIKO_PORT_BIT_K( 0x80) PORT_NAME( "Help" ) PORT_CODE( KEYCODE_END ) PORT_CHAR( UCHAR_MAMEKEY( END )) |
| 161 | PORT_START // A4 | |
| 161 | PORT_START_TAG("A4") // A4 | |
| 162 | 162 | CYBIKO_PORT_BIT_K( 0x01) PORT_NAME( "F4" ) PORT_CODE( KEYCODE_F4 ) PORT_CHAR( UCHAR_MAMEKEY( F4 )) |
| 163 | 163 | CYBIKO_PORT_BIT_K( 0x02) PORT_NAME( "1 !" ) PORT_CODE( KEYCODE_1 ) PORT_CHAR( '1' ) PORT_CHAR( '!') |
| 164 | 164 | CYBIKO_PORT_BIT_K( 0x04) PORT_NAME( "Tab" ) PORT_CODE( KEYCODE_TAB ) PORT_CHAR( 9 ) |
| r2772 | r2773 | |
| 167 | 167 | CYBIKO_PORT_BIT_K( 0x20) PORT_NAME( "F" ) PORT_CODE( KEYCODE_F ) PORT_CHAR( 'F' ) |
| 168 | 168 | CYBIKO_PORT_BIT_K( 0x40) PORT_NAME( "C" ) PORT_CODE( KEYCODE_C ) PORT_CHAR( 'C' ) |
| 169 | 169 | CYBIKO_PORT_BIT_K( 0x80) PORT_NAME( "[ {" ) PORT_CODE( KEYCODE_OPENBRACE ) PORT_CHAR( '[' ) |
| 170 | PORT_START // A5 | |
| 170 | PORT_START_TAG("A5") // A5 | |
| 171 | 171 | CYBIKO_PORT_BIT_K( 0x01) PORT_NAME( "Right" ) PORT_CODE( KEYCODE_RIGHT ) PORT_CHAR( UCHAR_MAMEKEY( RIGHT )) |
| 172 | 172 | CYBIKO_PORT_BIT_K( 0x02) PORT_NAME( "Down" ) PORT_CODE( KEYCODE_DOWN ) PORT_CHAR( UCHAR_MAMEKEY( DOWN )) |
| 173 | 173 | CYBIKO_PORT_BIT_K( 0x04) PORT_NAME( "Select") PORT_CODE( KEYCODE_HOME ) PORT_CHAR( UCHAR_MAMEKEY( HOME )) |
| r2772 | r2773 | |
| 176 | 176 | CYBIKO_PORT_BIT_K( 0x20) PORT_NAME( "G" ) PORT_CODE( KEYCODE_G ) PORT_CHAR( 'G' ) |
| 177 | 177 | CYBIKO_PORT_BIT_K( 0x40) PORT_NAME( "V" ) PORT_CODE( KEYCODE_V ) PORT_CHAR( 'V' ) |
| 178 | 178 | CYBIKO_PORT_BIT_K( 0x80) PORT_NAME( "] }" ) PORT_CODE( KEYCODE_CLOSEBRACE) PORT_CHAR( ']' ) |
| 179 | PORT_START // A6 | |
| 179 | PORT_START_TAG("A6") // A6 | |
| 180 | 180 | CYBIKO_PORT_BIT_K( 0x01) PORT_NAME( "F2" ) PORT_CODE( KEYCODE_F2 ) PORT_CHAR( UCHAR_MAMEKEY( F2 )) |
| 181 | 181 | CYBIKO_PORT_BIT_K( 0x02) PORT_NAME( "; :" ) PORT_CODE( KEYCODE_COLON ) PORT_CHAR( ';' ) PORT_CHAR( ':') |
| 182 | 182 | CYBIKO_PORT_BIT_K( 0x04) PORT_NAME( "Enter" ) PORT_CODE( KEYCODE_ENTER ) PORT_CHAR( 13 ) |
| r2772 | r2773 | |
| 185 | 185 | CYBIKO_PORT_BIT_K( 0x20) PORT_NAME( "H" ) PORT_CODE( KEYCODE_H ) PORT_CHAR( 'H' ) |
| 186 | 186 | CYBIKO_PORT_BIT_K( 0x40) PORT_NAME( "B" ) PORT_CODE( KEYCODE_B ) PORT_CHAR( 'B' ) |
| 187 | 187 | CYBIKO_PORT_BIT_K( 0x80) PORT_NAME( "\\ |" ) PORT_CODE( KEYCODE_BACKSLASH ) PORT_CHAR( '\\' ) PORT_CHAR( '|') |
| 188 | PORT_START // A7 | |
| 188 | PORT_START_TAG("A7") // A7 | |
| 189 | 189 | CYBIKO_PORT_BIT_K( 0x01) PORT_NAME( "F1" ) PORT_CODE( KEYCODE_F1 ) PORT_CHAR( UCHAR_MAMEKEY( F1 )) |
| 190 | 190 | CYBIKO_PORT_BIT_K( 0x02) PORT_NAME( "/ ?" ) PORT_CODE( KEYCODE_SLASH ) PORT_CHAR( '/' ) PORT_CHAR( '?') |
| 191 | 191 | CYBIKO_PORT_BIT_K( 0x04) PORT_NAME( "BkSp" ) PORT_CODE( KEYCODE_BACKSPACE ) PORT_CHAR( 8 ) |
| r2772 | r2773 | |
| 194 | 194 | CYBIKO_PORT_BIT_K( 0x20) PORT_NAME( "J" ) PORT_CODE( KEYCODE_J ) PORT_CHAR( 'J' ) |
| 195 | 195 | CYBIKO_PORT_BIT_K( 0x40) PORT_NAME( "N" ) PORT_CODE( KEYCODE_N ) PORT_CHAR( 'N' ) |
| 196 | 196 | CYBIKO_PORT_BIT_U( 0x80) |
| 197 | PORT_START // A8 | |
| 197 | PORT_START_TAG("A8") // A8 | |
| 198 | 198 | CYBIKO_PORT_BIT_K( 0x01) PORT_NAME( "- _" ) PORT_CODE( KEYCODE_MINUS ) PORT_CHAR( '-' ) PORT_CHAR( '_') |
| 199 | 199 | CYBIKO_PORT_BIT_K( 0x02) PORT_NAME( ". >" ) PORT_CHAR( '.' ) PORT_CHAR( '>') |
| 200 | 200 | CYBIKO_PORT_BIT_K( 0x04) PORT_NAME( "0 )" ) PORT_CODE( KEYCODE_0 ) PORT_CHAR( '0' ) PORT_CHAR( ')') |
| r2772 | r2773 | |
| 203 | 203 | CYBIKO_PORT_BIT_K( 0x20) PORT_NAME( "K" ) PORT_CODE( KEYCODE_K ) PORT_CHAR( 'K' ) |
| 204 | 204 | CYBIKO_PORT_BIT_K( 0x40) PORT_NAME( "M" ) PORT_CODE( KEYCODE_M ) PORT_CHAR( 'M' ) |
| 205 | 205 | CYBIKO_PORT_BIT_U( 0x80) |
| 206 | PORT_START // A9 | |
| 206 | PORT_START_TAG("A9") // A9 | |
| 207 | 207 | CYBIKO_PORT_BIT_K( 0x01) PORT_NAME( "' \"" ) PORT_CODE( KEYCODE_QUOTE ) PORT_CHAR( '\'' ) PORT_CHAR( '"') |
| 208 | 208 | CYBIKO_PORT_BIT_K( 0x02) PORT_NAME( "= +" ) PORT_CODE( KEYCODE_EQUALS ) PORT_CHAR( '=' ) PORT_CHAR( '+') |
| 209 | 209 | CYBIKO_PORT_BIT_K( 0x04) PORT_NAME( "9 (" ) PORT_CODE( KEYCODE_9 ) PORT_CHAR( '9' ) PORT_CHAR( '(') |
| r2772 | r2773 | |
|---|---|---|
| 94 | 94 | static INPUT_PORTS_START(ti99_4p) |
| 95 | 95 | |
| 96 | 96 | /* 1 port for config */ |
| 97 | PORT_START /* config */ | |
| 97 | PORT_START_TAG("CFG") /* config */ | |
| 98 | 98 | PORT_DIPNAME( config_speech_mask << config_speech_bit, 1 << config_speech_bit, "Speech synthesis") |
| 99 | 99 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) |
| 100 | 100 | PORT_DIPSETTING( 1 << config_speech_bit, DEF_STR( On ) ) |
| r2772 | r2773 | |
| 121 | 121 | |
| 122 | 122 | |
| 123 | 123 | /* 3 ports for mouse */ |
| 124 | PORT_START /* Mouse - X AXIS */ | |
| 124 | PORT_START_TAG("MOUSEX") /* Mouse - X AXIS */ | |
| 125 | 125 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(1) |
| 126 | 126 | |
| 127 | PORT_START /* Mouse - Y AXIS */ | |
| 127 | PORT_START_TAG("MOUSEY") /* Mouse - Y AXIS */ | |
| 128 | 128 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(1) |
| 129 | 129 | |
| 130 | PORT_START /* Mouse - buttons */ | |
| 130 | PORT_START_TAG("MOUSE0") /* Mouse - buttons */ | |
| 131 | 131 | PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_PLAYER(1) |
| 132 | 132 | PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_PLAYER(1) |
| 133 | 133 | |
| 134 | 134 | |
| 135 | 135 | /* 4 ports for keyboard and joystick */ |
| 136 | PORT_START /* col 0 */ | |
| 136 | PORT_START_TAG("KEY0") /* col 0 */ | |
| 137 | 137 | PORT_BIT(0x0088, IP_ACTIVE_LOW, IPT_UNUSED) |
| 138 | 138 | /* The original control key is located on the left, but we accept the |
| 139 | 139 | right control key as well */ |
| r2772 | r2773 | |
| 157 | 157 | PORT_BIT(0x0200, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("l L") PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L') |
| 158 | 158 | PORT_BIT(0x0100, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(". >") PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') |
| 159 | 159 | |
| 160 | PORT_START /* col 2 */ | |
| 160 | PORT_START_TAG("KEY1") /* col 2 */ | |
| 161 | 161 | PORT_BIT(0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("c C `") PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C') PORT_CHAR('`') |
| 162 | 162 | PORT_BIT(0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("e E (UP)") PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E') |
| 163 | 163 | PORT_BIT(0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("d D (RIGHT)") PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D') |
| r2772 | r2773 | |
| 176 | 176 | PORT_BIT(0x0200, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("j J") PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J') |
| 177 | 177 | PORT_BIT(0x0100, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("m M") PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M') |
| 178 | 178 | |
| 179 | PORT_START /* col 4 */ | |
| 179 | PORT_START_TAG("KEY2") /* col 4 */ | |
| 180 | 180 | PORT_BIT(0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("b B") PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') |
| 181 | 181 | PORT_BIT(0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("t T ]") PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T') PORT_CHAR(']') |
| 182 | 182 | PORT_BIT(0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("g G }") PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G') PORT_CHAR('}') |
| r2772 | r2773 | |
| 195 | 195 | PORT_BIT(0x0200, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("; :") PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR(':') |
| 196 | 196 | PORT_BIT(0x0100, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("/ -") PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('-') |
| 197 | 197 | |
| 198 | PORT_START /* col 6: "wired handset 1" (= joystick 1) */ | |
| 198 | PORT_START_TAG("KEY3") /* col 6: "wired handset 1" (= joystick 1) */ | |
| 199 | 199 | PORT_BIT(0x00E0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 200 | 200 | PORT_BIT(0x0010, IP_ACTIVE_LOW, IPT_JOYSTICK_UP/*, "(1UP)", CODE_NONE, OSD_JOY_UP*/) PORT_PLAYER(1) |
| 201 | 201 | PORT_BIT(0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN/*, "(1DOWN)", CODE_NONE, OSD_JOY_DOWN, 0*/) PORT_PLAYER(1) |
| r2772 | r2773 | |
| 210 | 210 | PORT_BIT(0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT/*, "(2LEFT)", CODE_NONE, OSD_JOY2_LEFT, 0*/) PORT_PLAYER(2) |
| 211 | 211 | PORT_BIT(0x0100, IP_ACTIVE_LOW, IPT_BUTTON1/*, "(2FIRE)", CODE_NONE, OSD_JOY2_FIRE, 0*/) PORT_PLAYER(2) |
| 212 | 212 | |
| 213 | PORT_START /* one more port for Alpha line */ | |
| 213 | PORT_START_TAG("ALPHA") /* one more port for Alpha line */ | |
| 214 | 214 | PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Alpha Lock") PORT_CODE(KEYCODE_CAPSLOCK) PORT_TOGGLE |
| 215 | 215 | |
| 216 | 216 | INPUT_PORTS_END |
| r2772 | r2773 | |
|---|---|---|
| 32 | 32 | #include "devices/mflopimg.h" |
| 33 | 33 | #include "devices/harddriv.h" |
| 34 | 34 | #include "devices/cassette.h" |
| 35 | #include "devices/harddriv.h" | |
| 36 | 35 | #include "machine/smartmed.h" |
| 37 | 36 | #include "sound/5220intf.h" |
| 38 | 37 | #include "machine/idectrl.h" |
| r2772 | r2773 | |
| 104 | 103 | static INPUT_PORTS_START(ti99_4a) |
| 105 | 104 | |
| 106 | 105 | /* 1 port for config */ |
| 107 | PORT_START /* config */ | |
| 106 | PORT_START_TAG("CFG") /* config */ | |
| 108 | 107 | PORT_DIPNAME( config_xRAM_mask << config_xRAM_bit, xRAM_kind_TI << config_xRAM_bit, "RAM extension") |
| 109 | 108 | PORT_DIPSETTING( xRAM_kind_none << config_xRAM_bit, DEF_STR( None ) ) |
| 110 | 109 | PORT_DIPSETTING( xRAM_kind_TI << config_xRAM_bit, "Texas Instruments 32kb") |
| r2772 | r2773 | |
| 142 | 141 | |
| 143 | 142 | |
| 144 | 143 | /* 3 ports for mouse */ |
| 145 | PORT_START /* Mouse - X AXIS */ | |
| 144 | PORT_START_TAG("MOUSEX") /* Mouse - X AXIS */ | |
| 146 | 145 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(1) |
| 147 | 146 | |
| 148 | PORT_START /* Mouse - Y AXIS */ | |
| 147 | PORT_START_TAG("MOUSEY") /* Mouse - Y AXIS */ | |
| 149 | 148 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(1) |
| 150 | 149 | |
| 151 | PORT_START /* Mouse - buttons */ | |
| 150 | PORT_START_TAG("MOUSE0") /* Mouse - buttons */ | |
| 152 | 151 | PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_PLAYER(1) |
| 153 | 152 | PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_PLAYER(1) |
| 154 | 153 | |
| 155 | 154 | |
| 156 | 155 | /* 4 ports for keyboard and joystick */ |
| 157 | PORT_START /* col 0 */ | |
| 156 | PORT_START_TAG("KEY0") /* col 0 */ | |
| 158 | 157 | PORT_BIT(0x0088, IP_ACTIVE_LOW, IPT_UNUSED) |
| 159 | 158 | /* The original control key is located on the left, but we accept the |
| 160 | 159 | right control key as well */ |
| r2772 | r2773 | |
| 177 | 176 | PORT_BIT(0x0200, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L') |
| 178 | 177 | PORT_BIT(0x0100, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') |
| 179 | 178 | |
| 180 | PORT_START /* col 2 */ | |
| 179 | PORT_START_TAG("KEY1") /* col 2 */ | |
| 181 | 180 | PORT_BIT(0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C') PORT_CHAR('`') |
| 182 | 181 | PORT_BIT(0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E') PORT_CHAR(UCHAR_MAMEKEY(UP)) |
| 183 | 182 | PORT_BIT(0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D') PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) |
| r2772 | r2773 | |
| 196 | 195 | PORT_BIT(0x0200, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J') |
| 197 | 196 | PORT_BIT(0x0100, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M') |
| 198 | 197 | |
| 199 | PORT_START /* col 4 */ | |
| 198 | PORT_START_TAG("KEY2") /* col 4 */ | |
| 200 | 199 | PORT_BIT(0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') |
| 201 | 200 | PORT_BIT(0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T') PORT_CHAR(']') |
| 202 | 201 | PORT_BIT(0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G') PORT_CHAR('}') |
| r2772 | r2773 | |
| 215 | 214 | PORT_BIT(0x0200, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR(':') |
| 216 | 215 | PORT_BIT(0x0100, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('-') |
| 217 | 216 | |
| 218 | PORT_START /* col 6: "wired handset 1" (= joystick 1) */ | |
| 217 | PORT_START_TAG("KEY3") /* col 6: "wired handset 1" (= joystick 1) */ | |
| 219 | 218 | PORT_BIT(0x00E0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 220 | 219 | PORT_BIT(0x0010, IP_ACTIVE_LOW, IPT_JOYSTICK_UP/*, "(1UP)", CODE_NONE, OSD_JOY_UP*/) PORT_PLAYER(1) |
| 221 | 220 | PORT_BIT(0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN/*, "(1DOWN)", CODE_NONE, OSD_JOY_DOWN, 0*/) PORT_PLAYER(1) |
| r2772 | r2773 | |
| 231 | 230 | PORT_BIT(0x0100, IP_ACTIVE_LOW, IPT_BUTTON1/*, "(2FIRE)", CODE_NONE, OSD_JOY2_FIRE, 0*/) PORT_PLAYER(2) |
| 232 | 231 | |
| 233 | 232 | |
| 234 | PORT_START /* one more port for Alpha line */ | |
| 233 | PORT_START_TAG("ALPHA") /* one more port for Alpha line */ | |
| 235 | 234 | PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Alpha Lock") PORT_CODE(KEYCODE_CAPSLOCK) PORT_TOGGLE |
| 236 | 235 | |
| 237 | 236 | INPUT_PORTS_END |
| r2772 | r2773 | |
| 244 | 243 | static INPUT_PORTS_START(ti99_4) |
| 245 | 244 | |
| 246 | 245 | /* 1 port for config */ |
| 247 | PORT_START /* config */ | |
| 246 | PORT_START_TAG("CFG") /* config */ | |
| 248 | 247 | PORT_DIPNAME( config_xRAM_mask << config_xRAM_bit, xRAM_kind_TI << config_xRAM_bit, "RAM extension") |
| 249 | 248 | PORT_DIPSETTING( xRAM_kind_none << config_xRAM_bit, DEF_STR( None ) ) |
| 250 | 249 | PORT_DIPSETTING( xRAM_kind_TI << config_xRAM_bit, "Texas Instruments 32kb") |
| r2772 | r2773 | |
| 285 | 284 | |
| 286 | 285 | |
| 287 | 286 | /* 3 ports for mouse */ |
| 288 | PORT_START /* Mouse - X AXIS */ | |
| 287 | PORT_START_TAG("MOUSE0") /* Mouse - X AXIS */ | |
| 289 | 288 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(1) |
| 290 | 289 | |
| 291 | PORT_START /* Mouse - Y AXIS */ | |
| 290 | PORT_START_TAG("MOUSE1") /* Mouse - Y AXIS */ | |
| 292 | 291 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(1) |
| 293 | 292 | |
| 294 | PORT_START /* Mouse - buttons */ | |
| 293 | PORT_START_TAG("MOUSE2") /* Mouse - buttons */ | |
| 295 | 294 | PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_PLAYER(1) |
| 296 | 295 | PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_PLAYER(1) |
| 297 | 296 | |
| 298 | 297 | |
| 299 | 298 | /* 4 ports for keyboard and joystick */ |
| 300 | PORT_START /* col 0 */ | |
| 299 | PORT_START_TAG("KEY0") /* col 0 */ | |
| 301 | 300 | PORT_BIT(0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1 !") PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') |
| 302 | 301 | PORT_BIT(0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q QUIT") PORT_CODE(KEYCODE_Q) PORT_CHAR('Q') PORT_CHAR(UCHAR_MAMEKEY(ESC)) |
| 303 | 302 | PORT_BIT(0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("(SPACE)") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') |
| r2772 | r2773 | |
| 318 | 317 | PORT_BIT(0x0200, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K /") PORT_CODE(KEYCODE_K) PORT_CHAR('K') PORT_CHAR('/') |
| 319 | 318 | PORT_BIT(0x0100, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(", .") PORT_CODE(KEYCODE_STOP) PORT_CHAR(',') PORT_CHAR('.') |
| 320 | 319 | |
| 321 | PORT_START /* col 2 */ | |
| 320 | PORT_START_TAG("KEY1") /* col 2 */ | |
| 322 | 321 | PORT_BIT(0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3 #") PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') |
| 323 | 322 | PORT_BIT(0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E UP") PORT_CODE(KEYCODE_E) PORT_CHAR('E') PORT_CHAR(UCHAR_MAMEKEY(UP)) |
| 324 | 323 | PORT_BIT(0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S LEFT") PORT_CODE(KEYCODE_S) PORT_CHAR('S') PORT_CHAR(UCHAR_MAMEKEY(LEFT)) |
| r2772 | r2773 | |
| 337 | 336 | PORT_BIT(0x0200, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H <") PORT_CODE(KEYCODE_H) PORT_CHAR('H') PORT_CHAR('<') |
| 338 | 337 | PORT_BIT(0x0100, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N :") PORT_CODE(KEYCODE_N) PORT_CHAR('N') PORT_CHAR(':') |
| 339 | 338 | |
| 340 | PORT_START /* col 4 */ | |
| 339 | PORT_START_TAG("KEY2") /* col 4 */ | |
| 341 | 340 | PORT_BIT(0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5 %") PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') |
| 342 | 341 | PORT_BIT(0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T ERASE") PORT_CODE(KEYCODE_T) PORT_CHAR('T') PORT_CHAR(UCHAR_MAMEKEY(F3)) |
| 343 | 342 | PORT_BIT(0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F DEL") PORT_CODE(KEYCODE_F) PORT_CHAR('F') PORT_CHAR(UCHAR_MAMEKEY(DEL)) |
| r2772 | r2773 | |
| 354 | 353 | PORT_BIT(0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT/*, "(1LEFT)", CODE_NONE, OSD_JOY_LEFT, 0*/) PORT_PLAYER(1) |
| 355 | 354 | PORT_BIT(0x0100, IP_ACTIVE_LOW, IPT_BUTTON1/*, "(1FIRE)", CODE_NONE, OSD_JOY_FIRE, 0*/) PORT_PLAYER(1) |
| 356 | 355 | |
| 357 | PORT_START /* col 6: "wired handset 2" (= joystick 2) */ | |
| 356 | PORT_START_TAG("KEY3") /* col 6: "wired handset 2" (= joystick 2) */ | |
| 358 | 357 | PORT_BIT(0x00E0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 359 | 358 | PORT_BIT(0x0010, IP_ACTIVE_LOW, IPT_JOYSTICK_UP/*, "(2UP)", CODE_NONE, OSD_JOY2_UP, 0*/) PORT_PLAYER(2) |
| 360 | 359 | PORT_BIT(0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN/*, "(2DOWN)", CODE_NONE, OSD_JOY2_DOWN, 0*/) PORT_PLAYER(2) |
| r2772 | r2773 | |
| 368 | 367 | /* 13 pseudo-ports for IR remote handsets */ |
| 369 | 368 | |
| 370 | 369 | /* 8 pseudo-ports for the 4 IR joysticks */ |
| 371 | PORT_START /* joystick 1, X axis */ | |
| 370 | PORT_START_TAG("JOY0") /* joystick 1, X axis */ | |
| 372 | 371 | PORT_BIT( 0xf, 0x7, IPT_AD_STICK_X) PORT_SENSITIVITY(JOYSTICK_SENSITIVITY) PORT_KEYDELTA(JOYSTICK_DELTA) PORT_MINMAX(0,0xe) PORT_PLAYER(1) |
| 373 | 372 | |
| 374 | PORT_START /* joystick 1, Y axis */ | |
| 373 | PORT_START_TAG("JOY1") /* joystick 1, Y axis */ | |
| 375 | 374 | PORT_BIT( 0xf, 0x7, IPT_AD_STICK_Y) PORT_SENSITIVITY(JOYSTICK_SENSITIVITY) PORT_KEYDELTA(JOYSTICK_DELTA) PORT_MINMAX(0,0xe) PORT_PLAYER(1) PORT_REVERSE |
| 376 | 375 | |
| 377 | PORT_START /* joystick 2, X axis */ | |
| 376 | PORT_START_TAG("JOY2") /* joystick 2, X axis */ | |
| 378 | 377 | PORT_BIT( 0xf, 0x7, IPT_AD_STICK_X) PORT_SENSITIVITY(JOYSTICK_SENSITIVITY) PORT_KEYDELTA(JOYSTICK_DELTA) PORT_MINMAX(0,0xe) PORT_PLAYER(2) |
| 379 | 378 | |
| 380 | PORT_START /* joystick 2, Y axis */ | |
| 379 | PORT_START_TAG("JOY3") /* joystick 2, Y axis */ | |
| 381 | 380 | PORT_BIT( 0xf, 0x7, IPT_AD_STICK_Y) PORT_SENSITIVITY(JOYSTICK_SENSITIVITY) PORT_KEYDELTA(JOYSTICK_DELTA) PORT_MINMAX(0,0xe) PORT_PLAYER(2) PORT_REVERSE |
| 382 | 381 | |
| 383 | PORT_START /* joystick 3, X axis */ | |
| 382 | PORT_START_TAG("JOY4") /* joystick 3, X axis */ | |
| 384 | 383 | PORT_BIT( 0xf, 0x7, IPT_AD_STICK_X) PORT_SENSITIVITY(JOYSTICK_SENSITIVITY) PORT_KEYDELTA(JOYSTICK_DELTA) PORT_MINMAX(0,0xe) PORT_PLAYER(3) |
| 385 | 384 | |
| 386 | PORT_START /* joystick 3, Y axis */ | |
| 385 | PORT_START_TAG("JOY5") /* joystick 3, Y axis */ | |
| 387 | 386 | PORT_BIT( 0xf, 0x7, IPT_AD_STICK_Y) PORT_SENSITIVITY(JOYSTICK_SENSITIVITY) PORT_KEYDELTA(JOYSTICK_DELTA) PORT_MINMAX(0,0xe) PORT_PLAYER(3) PORT_REVERSE |
| 388 | 387 | |
| 389 | PORT_START /* joystick 4, X axis */ | |
| 388 | PORT_START_TAG("JOY6") /* joystick 4, X axis */ | |
| 390 | 389 | PORT_BIT( 0xf, 0x7, IPT_AD_STICK_X) PORT_SENSITIVITY(JOYSTICK_SENSITIVITY) PORT_KEYDELTA(JOYSTICK_DELTA) PORT_MINMAX(0,0xe) PORT_PLAYER(4) |
| 391 | 390 | |
| 392 | PORT_START /* joystick 4, Y axis */ | |
| 391 | PORT_START_TAG("JOY7") /* joystick 4, Y axis */ | |
| 393 | 392 | PORT_BIT( 0xf, 0x7, IPT_AD_STICK_Y) PORT_SENSITIVITY(JOYSTICK_SENSITIVITY) PORT_KEYDELTA(JOYSTICK_DELTA) PORT_MINMAX(0,0xe) PORT_PLAYER(4) PORT_REVERSE |
| 394 | 393 | |
| 395 | 394 | /* 5 pseudo-ports for the 4 IR remote keypads */ |
| 396 | PORT_START /* keypad 1, keys 1 to 16 */ | |
| 395 | PORT_START_TAG("KP0") /* keypad 1, keys 1 to 16 */ | |
| 397 | 396 | PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("1: CLR") PORT_CODE(KEYCODE_1) PORT_PLAYER(1) |
| 398 | 397 | PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("1: GO") PORT_CODE(KEYCODE_Q) PORT_PLAYER(1) |
| 399 | 398 | PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("1: SET") PORT_CODE(KEYCODE_SPACE) PORT_PLAYER(1) |
| r2772 | r2773 | |
| 411 | 410 | PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("1: 3") PORT_CODE(KEYCODE_D) PORT_PLAYER(1) |
| 412 | 411 | PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("1: E =") PORT_CODE(KEYCODE_C) PORT_PLAYER(1) |
| 413 | 412 | |
| 414 | PORT_START /* keypad 1, keys 17 to 20 */ | |
| 413 | PORT_START_TAG("KP1") /* keypad 1, keys 17 to 20 */ | |
| 415 | 414 | PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("1: (div)") PORT_CODE(KEYCODE_5) PORT_PLAYER(1) |
| 416 | 415 | PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("1: (mul)") PORT_CODE(KEYCODE_T) PORT_PLAYER(1) |
| 417 | 416 | PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("1: NO -") PORT_CODE(KEYCODE_F) PORT_PLAYER(1) |
| r2772 | r2773 | |
| 430 | 429 | PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("2: 2") PORT_CODE(KEYCODE_J) PORT_PLAYER(2) |
| 431 | 430 | PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("2: 0") PORT_CODE(KEYCODE_M) PORT_PLAYER(2) |
| 432 | 431 | |
| 433 | PORT_START /* keypad 2, keys 13 to 20 */ | |
| 432 | PORT_START_TAG("KP2") /* keypad 2, keys 13 to 20 */ | |
| 434 | 433 | PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("2: 9") PORT_CODE(KEYCODE_9) PORT_PLAYER(2) |
| 435 | 434 | PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("2: 6") PORT_CODE(KEYCODE_O) PORT_PLAYER(2) |
| 436 | 435 | PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("2: 3") PORT_CODE(KEYCODE_K) PORT_PLAYER(2) |
| r2772 | r2773 | |
| 449 | 448 | PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("3: 1") PORT_CODE(KEYCODE_A) PORT_PLAYER(3) |
| 450 | 449 | PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("3: STOP") PORT_CODE(KEYCODE_Z) PORT_PLAYER(3) |
| 451 | 450 | |
| 452 | PORT_START /* keypad 3, keys 9 to 20 */ | |
| 451 | PORT_START_TAG("KP3") /* keypad 3, keys 9 to 20 */ | |
| 453 | 452 | PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("3: 8") PORT_CODE(KEYCODE_3) PORT_PLAYER(3) |
| 454 | 453 | PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("3: 5") PORT_CODE(KEYCODE_E) PORT_PLAYER(3) |
| 455 | 454 | PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("3: 2") PORT_CODE(KEYCODE_S) PORT_PLAYER(3) |
| r2772 | r2773 | |
| 468 | 467 | PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("4: SET") PORT_CODE(KEYCODE_G) PORT_PLAYER(4) |
| 469 | 468 | PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("4: NEXT") PORT_CODE(KEYCODE_B) PORT_PLAYER(4) |
| 470 | 469 | |
| 471 | PORT_START /* keypad 4, keys 5 to 20 */ | |
| 470 | PORT_START_TAG("KP4") /* keypad 4, keys 5 to 20 */ | |
| 472 | 471 | PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("4: 7") PORT_CODE(KEYCODE_7) PORT_PLAYER(4) |
| 473 | 472 | PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("4: 4") PORT_CODE(KEYCODE_U) PORT_PLAYER(4) |
| 474 | 473 | PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("4: 1") PORT_CODE(KEYCODE_H) PORT_PLAYER(4) |
| Previous | 15994 Revisions | Next |