src/mess/drivers/astrocde.c
| r1887 | r1888 | |
| 57 | 57 | ADDRESS_MAP_END |
| 58 | 58 | |
| 59 | 59 | static ADDRESS_MAP_START( astrocade_io, ADDRESS_SPACE_IO, 8 ) |
| 60 | | AM_RANGE(0x00, 0x07) AM_MIRROR(0xff00) AM_WRITE(astrocade_colour_register_w) |
| 61 | | AM_RANGE(0x08, 0x08) AM_MIRROR(0xff00) AM_READWRITE(astrocade_intercept_r, astrocade_mode_w) |
| 62 | | AM_RANGE(0x09, 0x09) AM_MIRROR(0xff00) AM_WRITE(astrocade_colour_split_w) |
| 63 | | AM_RANGE(0x0a, 0x0a) AM_MIRROR(0xff00) AM_WRITE(astrocade_vertical_blank_w) |
| 64 | | AM_RANGE(0x0b, 0x0b) AM_MIRROR(0xff00) AM_WRITE(astrocade_colour_block_w) |
| 65 | | AM_RANGE(0x0c, 0x0c) AM_MIRROR(0xff00) AM_WRITE(astrocade_magic_control_w) |
| 66 | | AM_RANGE(0x0d, 0x0d) AM_MIRROR(0xff00) AM_WRITE(astrocade_interrupt_vector_w) |
| 67 | | AM_RANGE(0x0e, 0x0e) AM_MIRROR(0xff00) AM_READWRITE(astrocade_video_retrace_r, astrocade_interrupt_enable_w) |
| 68 | | AM_RANGE(0x0f, 0x0f) AM_MIRROR(0xff00) AM_WRITE(astrocade_interrupt_w) |
| 69 | | /*AM_RANGE(0x0f, 0x0f) AM_MIRROR(0xff00) AM_READ(astrocade_horiz_r)*/ |
| 70 | | AM_RANGE(0x10, 0x10) AM_MIRROR(0xff00) AM_READ(input_port_0_r) |
| 71 | | AM_RANGE(0x11, 0x11) AM_MIRROR(0xff00) AM_READ(input_port_1_r) |
| 72 | | AM_RANGE(0x12, 0x12) AM_MIRROR(0xff00) AM_READ(input_port_2_r) |
| 73 | | AM_RANGE(0x13, 0x13) AM_MIRROR(0xff00) AM_READ(input_port_3_r) |
| 74 | | AM_RANGE(0x14, 0x14) AM_MIRROR(0xff00) AM_READ(input_port_4_r) |
| 75 | | AM_RANGE(0x15, 0x15) AM_MIRROR(0xff00) AM_READ(input_port_5_r) |
| 76 | | AM_RANGE(0x16, 0x16) AM_MIRROR(0xff00) AM_READ(input_port_6_r) |
| 77 | | AM_RANGE(0x17, 0x17) AM_MIRROR(0xff00) AM_READ(input_port_7_r) |
| 78 | | AM_RANGE(0x10, 0x17) AM_MIRROR(0xff00) AM_WRITE(astrocade_sound1_w) /* Sound Stuff */ |
| 79 | | AM_RANGE(0x1c, 0x1c) AM_MIRROR(0xff00) AM_READ(input_port_8_r) |
| 80 | | AM_RANGE(0x1d, 0x1d) AM_MIRROR(0xff00) AM_READ(input_port_9_r) |
| 81 | | AM_RANGE(0x1e, 0x1e) AM_MIRROR(0xff00) AM_READ(input_port_10_r) |
| 82 | | AM_RANGE(0x1f, 0x1f) AM_MIRROR(0xff00) AM_READ(input_port_11_r) |
| 83 | | AM_RANGE(0x19, 0x19) AM_MIRROR(0xff00) AM_WRITE(astrocade_magic_expand_color_w) |
| 84 | | AM_RANGE(0x18, 0xff) AM_MIRROR(0xff00) AM_WRITE(astrocade_soundblock1_w) |
| 60 | ADDRESS_MAP_FLAGS( AMEF_ABITS(8) ) |
| 61 | AM_RANGE(0x00, 0x07) AM_WRITE(astrocade_colour_register_w) |
| 62 | AM_RANGE(0x08, 0x08) AM_READWRITE(astrocade_intercept_r, astrocade_mode_w) |
| 63 | AM_RANGE(0x09, 0x09) AM_WRITE(astrocade_colour_split_w) |
| 64 | AM_RANGE(0x0a, 0x0a) AM_WRITE(astrocade_vertical_blank_w) |
| 65 | AM_RANGE(0x0b, 0x0b) AM_WRITE(astrocade_colour_block_w) |
| 66 | AM_RANGE(0x0c, 0x0c) AM_WRITE(astrocade_magic_control_w) |
| 67 | AM_RANGE(0x0d, 0x0d) AM_WRITE(astrocade_interrupt_vector_w) |
| 68 | AM_RANGE(0x0e, 0x0e) AM_READWRITE(astrocade_video_retrace_r, astrocade_interrupt_enable_w) |
| 69 | AM_RANGE(0x0f, 0x0f) AM_WRITE(astrocade_interrupt_w) |
| 70 | /* AM_RANGE(0x0f, 0x0f) AM_READ(astrocade_horiz_r) */ |
| 71 | AM_RANGE(0x10, 0x10) AM_READ_PORT("P1_HANDLE") |
| 72 | AM_RANGE(0x11, 0x11) AM_READ_PORT("P2_HANDLE") |
| 73 | AM_RANGE(0x12, 0x12) AM_READ_PORT("P3_HANDLE") |
| 74 | AM_RANGE(0x13, 0x13) AM_READ_PORT("P4_HANDLE") |
| 75 | AM_RANGE(0x14, 0x14) AM_READ_PORT("KEYPAD_COL0") |
| 76 | AM_RANGE(0x15, 0x15) AM_READ_PORT("KEYPAD_COL1") |
| 77 | AM_RANGE(0x16, 0x16) AM_READ_PORT("KEYPAD_COL2") |
| 78 | AM_RANGE(0x17, 0x17) AM_READ_PORT("KEYPAD_COL3") |
| 79 | AM_RANGE(0x10, 0x17) AM_WRITE(astrocade_sound1_w) /* Sound Stuff */ |
| 80 | AM_RANGE(0x19, 0x19) AM_WRITE(astrocade_magic_expand_color_w) |
| 81 | AM_RANGE(0x1c, 0x1c) AM_READ_PORT("P1_KNOB") |
| 82 | AM_RANGE(0x1d, 0x1d) AM_READ_PORT("P2_KNOB") |
| 83 | AM_RANGE(0x1e, 0x1e) AM_READ_PORT("P3_KNOB") |
| 84 | AM_RANGE(0x1f, 0x1f) AM_READ_PORT("P4_KNOB") |
| 85 | AM_RANGE(0x18, 0xff) AM_WRITE(astrocade_soundblock1_w) |
| 85 | 86 | ADDRESS_MAP_END |
| 86 | 87 | |
| 87 | 88 | static INPUT_PORTS_START( astrocde ) |
| 88 | | PORT_START /* IN0 */ /* Player 1 Handle */ |
| 89 | PORT_START_TAG("P1_HANDLE") |
| 89 | 90 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP) PORT_PLAYER(1) PORT_8WAY |
| 90 | 91 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN) PORT_PLAYER(1) PORT_8WAY |
| 91 | 92 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT) PORT_PLAYER(1) PORT_8WAY |
| r1887 | r1888 | |
| 95 | 96 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 96 | 97 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 97 | 98 | |
| 98 | | PORT_START /* IN1 */ /* Player 2 Handle */ |
| 99 | PORT_START_TAG("P2_HANDLE") |
| 99 | 100 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP) PORT_PLAYER(2) PORT_8WAY |
| 100 | 101 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN) PORT_PLAYER(2) PORT_8WAY |
| 101 | 102 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT) PORT_PLAYER(2) PORT_8WAY |
| r1887 | r1888 | |
| 105 | 106 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 106 | 107 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 107 | 108 | |
| 108 | | PORT_START /* IN2 */ /* Player 3 Handle */ |
| 109 | PORT_START_TAG("P3_HANDLE") |
| 109 | 110 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP) PORT_PLAYER(3) PORT_8WAY |
| 110 | 111 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN) PORT_PLAYER(3) PORT_8WAY |
| 111 | 112 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT) PORT_PLAYER(3) PORT_8WAY |
| r1887 | r1888 | |
| 115 | 116 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 116 | 117 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 117 | 118 | |
| 118 | | PORT_START /* IN3 */ /* Player 4 Handle */ |
| 119 | PORT_START_TAG("P4_HANDLE") |
| 119 | 120 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP) PORT_PLAYER(4) PORT_8WAY |
| 120 | 121 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN) PORT_PLAYER(4) PORT_8WAY |
| 121 | 122 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT) PORT_PLAYER(4) PORT_8WAY |
| r1887 | r1888 | |
| 125 | 126 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 126 | 127 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 127 | 128 | |
| 128 | | PORT_START /* IN4 */ /* Keypad Column 0 (right) */ |
| 129 | PORT_START_TAG("KEYPAD_COL0") |
| 129 | 130 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("% \xC3\xB7 [ ] LIST") PORT_CODE(KEYCODE_O) |
| 130 | 131 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("/ x J K L NEXT") PORT_CODE(KEYCODE_SLASH_PAD) |
| 131 | 132 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("x - V W X IF") PORT_CODE(KEYCODE_ASTERISK) |
| r1887 | r1888 | |
| 135 | 136 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 136 | 137 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 137 | 138 | |
| 138 | | PORT_START /* IN5 */ /* Keypad Column 1 */ |
| 139 | PORT_START_TAG("KEYPAD_COL1") |
| 139 | 140 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("\xE2\x86\x93 HALT RUN") PORT_CODE(KEYCODE_PGDN) |
| 140 | 141 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("CH 9 G H I STEP") PORT_CODE(KEYCODE_H) |
| 141 | 142 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("9 6 S T U RND") PORT_CODE(KEYCODE_9) |
| r1887 | r1888 | |
| 145 | 146 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 146 | 147 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 147 | 148 | |
| 148 | | PORT_START /* IN6 */ /* Keypad Column 2 */ |
| 149 | PORT_START_TAG("KEYPAD_COL2") |
| 149 | 150 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("\xE2\x86\x91 PAUSE / \\") PORT_CODE(KEYCODE_PGUP) |
| 150 | 151 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("MS 8 D E F TO") PORT_CODE(KEYCODE_S) |
| 151 | 152 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("8 5 P Q R RETN") PORT_CODE(KEYCODE_8) |
| r1887 | r1888 | |
| 155 | 156 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 156 | 157 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 157 | 158 | |
| 158 | | PORT_START /* IN7 */ /* Keypad Column 3 (left) */ |
| 159 | PORT_START_TAG("KEYPAD_COL3") |
| 159 | 160 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("C GO +10") PORT_CODE(KEYCODE_C) |
| 160 | 161 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("MR 7 A B C FOR") PORT_CODE(KEYCODE_R) |
| 161 | 162 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("7 4 M N O GOSB") PORT_CODE(KEYCODE_7) |
| r1887 | r1888 | |
| 165 | 166 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 166 | 167 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 167 | 168 | |
| 168 | | PORT_START /* IN8 */ /* Player 1 Knob */ |
| 169 | PORT_START_TAG("P1_KNOB") |
| 169 | 170 | PORT_BIT(0xff, 0x00, IPT_PADDLE) PORT_INVERT PORT_SENSITIVITY(85) PORT_KEYDELTA(10) PORT_CENTERDELTA(0) PORT_MINMAX(0,255) PORT_CODE_DEC(KEYCODE_Z) PORT_CODE_INC(KEYCODE_X) PORT_PLAYER(1) |
| 170 | 171 | |
| 171 | | PORT_START /* IN9 */ /* Player 2 Knob */ |
| 172 | PORT_START_TAG("P2_KNOB") |
| 172 | 173 | PORT_BIT(0xff, 0x00, IPT_PADDLE) PORT_INVERT PORT_SENSITIVITY(85) PORT_KEYDELTA(10) PORT_CENTERDELTA(0) PORT_MINMAX(0,255) PORT_CODE_DEC(KEYCODE_N) PORT_CODE_INC(KEYCODE_M) PORT_PLAYER(2) |
| 173 | 174 | |
| 174 | | PORT_START /* IN10 */ /* Player 3 Knob */ |
| 175 | PORT_START_TAG("P3_KNOB") |
| 175 | 176 | PORT_BIT(0xff, 0x00, IPT_PADDLE) PORT_INVERT PORT_SENSITIVITY(85) PORT_KEYDELTA(10) PORT_CENTERDELTA(0) PORT_MINMAX(0,255) PORT_CODE_DEC(KEYCODE_Q) PORT_CODE_INC(KEYCODE_W) PORT_PLAYER(3) |
| 176 | 177 | |
| 177 | | PORT_START /* IN11 */ /* Player 4 Knob */ |
| 178 | PORT_START_TAG("P4_KNOB") |
| 178 | 179 | PORT_BIT(0xff, 0x00, IPT_PADDLE) PORT_INVERT PORT_SENSITIVITY(85) PORT_KEYDELTA(10) PORT_CENTERDELTA(0) PORT_MINMAX(0,255) PORT_CODE_DEC(KEYCODE_Y) PORT_CODE_INC(KEYCODE_U) PORT_PLAYER(4) |
| 179 | 180 | INPUT_PORTS_END |
| 180 | 181 | |