trunk/src/mess/drivers/hec2hrp.c
| r30770 | r30771 | |
| 197 | 197 | /* Input ports */ |
| 198 | 198 | static INPUT_PORTS_START( hec2hrp ) |
| 199 | 199 | /* keyboard input */ |
| 200 | | PORT_START("KEY0") /* [0] - port 3000 @ 0 */ |
| 200 | PORT_START("KEY.0") /* [0] - port 3000 @ 0 */ |
| 201 | 201 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\') PORT_CHAR('|') |
| 202 | 202 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE) |
| 203 | 203 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Return") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) |
| r30770 | r30771 | |
| 206 | 206 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Caps Lock") PORT_CODE(KEYCODE_CAPSLOCK) |
| 207 | 207 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_MAMEKEY(LCONTROL)) |
| 208 | 208 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) |
| 209 | | PORT_START("KEY1") /* [1] - port 3000 @ 1 */ /* touches => 2 1 0 / . - , + */ |
| 209 | PORT_START("KEY.1") /* [1] - port 3000 @ 1 */ /* touches => 2 1 0 / . - , + */ |
| 210 | 210 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2 \"") PORT_CODE(KEYCODE_2) PORT_CHAR('2') |
| 211 | 211 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1 >") PORT_CODE(KEYCODE_1) PORT_CHAR('1') |
| 212 | 212 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0 <") PORT_CODE(KEYCODE_0) PORT_CHAR('0') |
| r30770 | r30771 | |
| 216 | 216 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) |
| 217 | 217 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=') PORT_CHAR('+') |
| 218 | 218 | |
| 219 | | PORT_START("KEY2") /* [1] - port 3000 @ 2 */ /* touches => .. 9 8 7 6 5 4 3 */ |
| 219 | PORT_START("KEY.2") /* [1] - port 3000 @ 2 */ /* touches => .. 9 8 7 6 5 4 3 */ |
| 220 | 220 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) |
| 221 | 221 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9 )") PORT_CODE(KEYCODE_9) PORT_CHAR('9') |
| 222 | 222 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8 (") PORT_CODE(KEYCODE_8) PORT_CHAR('8') |
| r30770 | r30771 | |
| 225 | 225 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5 %") PORT_CODE(KEYCODE_5) PORT_CHAR('5') |
| 226 | 226 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4 $") PORT_CODE(KEYCODE_4) PORT_CHAR('4') |
| 227 | 227 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3 /") PORT_CODE(KEYCODE_3) PORT_CHAR('3') |
| 228 | | PORT_START("KEY3") /* [1] - port 3000 @ 3 */ /* touches => B A .. ? .. = .. ; */ |
| 228 | PORT_START("KEY.3") /* [1] - port 3000 @ 3 */ /* touches => B A .. ? .. = .. ; */ |
| 229 | 229 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('B') |
| 230 | 230 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_Q) PORT_CHAR('Q') |
| 231 | 231 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED) |
| r30770 | r30771 | |
| 234 | 234 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']') PORT_CHAR('}') |
| 235 | 235 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) |
| 236 | 236 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') |
| 237 | | PORT_START("KEY4") /* [1] - port 3000 @ 4 */ |
| 237 | PORT_START("KEY.4") /* [1] - port 3000 @ 4 */ |
| 238 | 238 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_CHAR('J') |
| 239 | 239 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('I') |
| 240 | 240 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_CHAR('H') |
| r30770 | r30771 | |
| 244 | 244 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('C') |
| 245 | 245 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_CHAR('D') |
| 246 | 246 | |
| 247 | | PORT_START("KEY5") /* [1] - port 3000 @ 5 */ |
| 247 | PORT_START("KEY.5") /* [1] - port 3000 @ 5 */ |
| 248 | 248 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('R') |
| 249 | 249 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_A) PORT_CHAR('A') |
| 250 | 250 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('P') |
| r30770 | r30771 | |
| 254 | 254 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('L') |
| 255 | 255 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('K') |
| 256 | 256 | |
| 257 | | PORT_START("KEY6") /* [1] - port 3000 @ 6 */ |
| 257 | PORT_START("KEY.6") /* [1] - port 3000 @ 6 */ |
| 258 | 258 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_W) PORT_CHAR('W') |
| 259 | 259 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('Y') |
| 260 | 260 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X) PORT_CHAR('X') |
| r30770 | r30771 | |
| 264 | 264 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_CHAR('T') |
| 265 | 265 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('S') |
| 266 | 266 | |
| 267 | | PORT_START("KEY7") /* [1] - port 3000 @ 7 JOYSTICK */ |
| 267 | PORT_START("KEY.7") /* [1] - port 3000 @ 7 JOYSTICK */ |
| 268 | 268 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Joy(0) LEFT") PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) |
| 269 | 269 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Joy(0) RIGHT") PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) |
| 270 | 270 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Joy(0) UP") PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) |
| r30770 | r30771 | |
| 274 | 274 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Joy(1) UP") PORT_CODE(KEYCODE_5_PAD) |
| 275 | 275 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Joy(1) DOWN") PORT_CODE(KEYCODE_2_PAD) |
| 276 | 276 | |
| 277 | | PORT_START("KEY8") /* [1] - port 3000 @ 8 not for the real machine, but to emulate the analog signal of the joystick */ |
| 277 | PORT_START("KEY.8") /* [1] - port 3000 @ 8 not for the real machine, but to emulate the analog signal of the joystick */ |
| 278 | 278 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("RESET") PORT_CODE(KEYCODE_ESC) PORT_CHAR(27) |
| 279 | 279 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Joy(0) FIRE") PORT_CODE(KEYCODE_TILDE) |
| 280 | 280 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Joy(1) FIRE") PORT_CODE(KEYCODE_PLUS_PAD) |
trunk/src/mess/includes/hec2hrp.h
| r30770 | r30771 | |
| 74 | 74 | public: |
| 75 | 75 | hec2hrp_state(const machine_config &mconfig, device_type type, const char *tag) |
| 76 | 76 | : driver_device(mconfig, type, tag), |
| 77 | | m_videoram(*this,"videoram"), |
| 78 | | m_hector_videoram(*this,"hector_videoram") , |
| 79 | 77 | m_maincpu(*this, "maincpu"), |
| 80 | 78 | m_disc2cpu(*this, "disc2cpu"), |
| 81 | 79 | m_cassette(*this, "cassette"), |
| 82 | 80 | m_sn(*this, "sn76477"), |
| 83 | | m_palette(*this, "palette") { } |
| 81 | m_palette(*this, "palette"), |
| 82 | m_videoram(*this,"videoram"), |
| 83 | m_hector_videoram(*this,"hector_videoram") , |
| 84 | m_keyboard(*this, "KEY") { } |
| 84 | 85 | |
| 86 | required_device<cpu_device> m_maincpu; |
| 87 | optional_device<cpu_device> m_disc2cpu; |
| 88 | required_device<cassette_image_device> m_cassette; |
| 89 | required_device<sn76477_device> m_sn; |
| 90 | required_device<palette_device> m_palette; |
| 85 | 91 | optional_shared_ptr<UINT8> m_videoram; |
| 86 | 92 | optional_shared_ptr<UINT8> m_hector_videoram; |
| 93 | required_ioport_array<9> m_keyboard; |
| 94 | |
| 87 | 95 | UINT8 m_hector_flag_hr; |
| 88 | 96 | UINT8 m_hector_flag_80c; |
| 89 | 97 | UINT8 m_hector_color[4]; |
| r30770 | r30771 | |
| 148 | 156 | |
| 149 | 157 | DECLARE_WRITE_LINE_MEMBER( disc2_fdc_interrupt ); |
| 150 | 158 | DECLARE_WRITE_LINE_MEMBER( disc2_fdc_dma_irq ); |
| 151 | | required_device<cpu_device> m_maincpu; |
| 152 | | optional_device<cpu_device> m_disc2cpu; |
| 153 | | required_device<cassette_image_device> m_cassette; |
| 154 | | required_device<sn76477_device> m_sn; |
| 155 | | required_device<palette_device> m_palette; |
| 156 | 159 | int isHectorWithDisc2(); |
| 157 | 160 | int isHectorWithMiniDisc(); |
| 158 | 161 | int isHectorHR(); |