trunk/src/mess/drivers/alesis.c
| r243479 | r243480 | |
| 8 | 8 | |
| 9 | 9 | http://www.vintagesynth.com/misc/hr16.php |
| 10 | 10 | http://www.vintagesynth.com/misc/sr16.php |
| 11 | http://www.vintagesynth.com/misc/mmt8.php |
| 11 | 12 | |
| 12 | 13 | ****************************************************************************/ |
| 13 | 14 | |
| r243479 | r243480 | |
| 73 | 74 | m_lcdc->write(space, BIT(m_kb_matrix,7), data); |
| 74 | 75 | } |
| 75 | 76 | |
| 77 | WRITE8_MEMBER( alesis_state::mmt8_led_w ) |
| 78 | { |
| 79 | output_set_value("play_led", data & 0x01 ? 0 : 1); |
| 80 | output_set_value("record_led" , data & 0x02 ? 0 : 1); |
| 81 | output_set_value("part_led", data & 0x04 ? 0 : 1); |
| 82 | output_set_value("edit_led", data & 0x08 ? 0 : 1); |
| 83 | output_set_value("song_led", data & 0x10 ? 0 : 1); |
| 84 | output_set_value("echo_led", data & 0x20 ? 0 : 1); |
| 85 | output_set_value("loop_led", data & 0x40 ? 0 : 1); |
| 86 | |
| 87 | m_leds = data; |
| 88 | } |
| 89 | |
| 90 | READ8_MEMBER( alesis_state::mmt8_led_r ) |
| 91 | { |
| 92 | return m_leds; |
| 93 | } |
| 94 | |
| 95 | WRITE8_MEMBER( alesis_state::track_led_w ) |
| 96 | { |
| 97 | for (int i=0; i<8; i++) |
| 98 | output_set_indexed_value("track_led", i + 1, BIT(data, i)); |
| 99 | } |
| 100 | |
| 101 | READ8_MEMBER( alesis_state::mmt8_p3_r ) |
| 102 | { |
| 103 | // ---- -x-- Tape in |
| 104 | // ---- x--- Start/Stop input |
| 105 | UINT8 data = 0xff; |
| 106 | |
| 107 | data &= ~(m_cassette->input() > 0.01 ? 0x00 : 0x04); |
| 108 | |
| 109 | return data; |
| 110 | } |
| 111 | |
| 112 | WRITE8_MEMBER( alesis_state::mmt8_p3_w ) |
| 113 | { |
| 114 | // ---x ---- Tape out |
| 115 | // --x- ---- Click out |
| 116 | |
| 117 | m_cassette->output(data & 0x10 ? -1.0 : +1.0); |
| 118 | } |
| 119 | |
| 76 | 120 | static ADDRESS_MAP_START(hr16_mem, AS_PROGRAM, 8, alesis_state) |
| 77 | 121 | ADDRESS_MAP_UNMAP_HIGH |
| 78 | 122 | AM_RANGE(0x0000, 0x7fff) AM_MIRROR(0x8000) AM_ROM |
| r243479 | r243480 | |
| 108 | 152 | AM_RANGE(0x8000, 0xffff) AM_RAM AM_SHARE("nvram") // 32Kx8 SRAM, (battery-backed) |
| 109 | 153 | ADDRESS_MAP_END |
| 110 | 154 | |
| 155 | static ADDRESS_MAP_START(mmt8_io, AS_IO, 8, alesis_state) |
| 156 | ADDRESS_MAP_UNMAP_HIGH |
| 157 | AM_RANGE(0xff02, 0xff02) AM_WRITE(track_led_w) |
| 158 | AM_RANGE(0xff04, 0xff04) AM_READWRITE(mmt8_led_r, mmt8_led_w) |
| 159 | AM_RANGE(0xff06, 0xff06) AM_WRITE(kb_matrix_w) |
| 160 | AM_RANGE(0xff08, 0xff09) AM_DEVREADWRITE("hd44780", hd44780_device, read, write) |
| 161 | AM_RANGE(0xff0e, 0xff0e) AM_READNOP |
| 162 | AM_RANGE(MCS51_PORT_P1, MCS51_PORT_P1) AM_READ(kb_r) |
| 163 | AM_RANGE(MCS51_PORT_P2, MCS51_PORT_P2) AM_WRITENOP |
| 164 | AM_RANGE(MCS51_PORT_P3, MCS51_PORT_P3) AM_READWRITE(mmt8_p3_r, mmt8_p3_w) |
| 165 | AM_RANGE(0x0000, 0xffff) AM_RAM AM_SHARE("nvram") // 2x32Kx8 SRAM, (battery-backed) |
| 166 | ADDRESS_MAP_END |
| 167 | |
| 111 | 168 | /* Input ports */ |
| 112 | 169 | static INPUT_PORTS_START( hr16 ) |
| 113 | 170 | PORT_START("COL1") |
| r243479 | r243480 | |
| 169 | 226 | PORT_BIT(0xff, 0x00, IPT_DIAL) PORT_NAME("SELECT Slider") PORT_SENSITIVITY(50) PORT_KEYDELTA(1) PORT_CODE_DEC(KEYCODE_DOWN) PORT_CODE_INC(KEYCODE_UP) |
| 170 | 227 | INPUT_PORTS_END |
| 171 | 228 | |
| 229 | static INPUT_PORTS_START( mmt8 ) |
| 230 | PORT_START("COL1") |
| 231 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("<<") PORT_CODE(KEYCODE_LEFT) |
| 232 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(">>") PORT_CODE(KEYCODE_RIGHT) |
| 233 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("ERASE") PORT_CODE(KEYCODE_DEL) |
| 234 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TRANS") PORT_CODE(KEYCODE_R) |
| 235 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("PLAY") PORT_CODE(KEYCODE_ENTER) |
| 236 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("STOP/CONTINUE") PORT_CODE(KEYCODE_END) |
| 237 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("COPY") PORT_CODE(KEYCODE_C) |
| 238 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("RECORD") PORT_CODE(KEYCODE_HOME) |
| 239 | PORT_START("COL2") |
| 240 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TRACK 1") PORT_CODE(KEYCODE_F1) |
| 241 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TRACK 2") PORT_CODE(KEYCODE_F2) |
| 242 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TRACK 3") PORT_CODE(KEYCODE_F3) |
| 243 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TRACK 4") PORT_CODE(KEYCODE_F4) |
| 244 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TRACK 5") PORT_CODE(KEYCODE_F5) |
| 245 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TRACK 6") PORT_CODE(KEYCODE_F6) |
| 246 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TRACK 7") PORT_CODE(KEYCODE_F7) |
| 247 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TRACK 8") PORT_CODE(KEYCODE_F8) |
| 248 | PORT_START("COL3") |
| 249 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TEMPO") PORT_CODE(KEYCODE_T) |
| 250 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS) |
| 251 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("+") PORT_CODE(KEYCODE_PLUS_PAD) |
| 252 | PORT_BIT(0x38, IP_ACTIVE_LOW, IPT_UNUSED) |
| 253 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("PAGE DOWN") PORT_CODE(KEYCODE_DOWN) |
| 254 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("PAGE UP") PORT_CODE(KEYCODE_UP) |
| 255 | PORT_START("COL4") |
| 256 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CLICK") PORT_CODE(KEYCODE_G) |
| 257 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6) |
| 258 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7) |
| 259 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8) |
| 260 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9) |
| 261 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0) |
| 262 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("MIDI CHAN") PORT_CODE(KEYCODE_I) |
| 263 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TAPE") PORT_CODE(KEYCODE_Y) |
| 264 | PORT_START("COL5") |
| 265 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CLOCK") PORT_CODE(KEYCODE_K) |
| 266 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) |
| 267 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2) |
| 268 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3) |
| 269 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) |
| 270 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) |
| 271 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("SONG") PORT_CODE(KEYCODE_S) |
| 272 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("MERGE") PORT_CODE(KEYCODE_M) |
| 273 | PORT_START("COL6") |
| 274 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("MIDI FILTER") PORT_CODE(KEYCODE_F) |
| 275 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("MIDI ECHO") PORT_CODE(KEYCODE_H) |
| 276 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("LOOP") PORT_CODE(KEYCODE_J) |
| 277 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("QUANT") PORT_CODE(KEYCODE_Q) |
| 278 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("LENGTH") PORT_CODE(KEYCODE_L) |
| 279 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("PART") PORT_CODE(KEYCODE_P) |
| 280 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("EDIT") PORT_CODE(KEYCODE_E) |
| 281 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("NAME") PORT_CODE(KEYCODE_N) |
| 282 | INPUT_PORTS_END |
| 283 | |
| 172 | 284 | static INPUT_PORTS_START( sr16 ) |
| 173 | 285 | PORT_START("COL1") |
| 174 | 286 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("PRESET/USER") PORT_CODE(KEYCODE_U) |
| r243479 | r243480 | |
| 229 | 341 | void alesis_state::machine_reset() |
| 230 | 342 | { |
| 231 | 343 | m_kb_matrix = 0xff; |
| 344 | m_leds = 0; |
| 232 | 345 | memset(m_lcd_digits, 0, sizeof(m_lcd_digits)); |
| 233 | 346 | } |
| 234 | 347 | |
| r243479 | r243480 | |
| 292 | 405 | MCFG_HD44780_PIXEL_UPDATE_CB(sr16_pixel_update) |
| 293 | 406 | MACHINE_CONFIG_END |
| 294 | 407 | |
| 408 | static MACHINE_CONFIG_DERIVED( mmt8, hr16 ) |
| 409 | /* basic machine hardware */ |
| 410 | MCFG_CPU_MODIFY("maincpu") |
| 411 | MCFG_CPU_IO_MAP(mmt8_io) |
| 412 | |
| 413 | MCFG_DEVICE_REMOVE("dm3ag") |
| 414 | MACHINE_CONFIG_END |
| 415 | |
| 295 | 416 | /* ROM definition */ |
| 296 | 417 | ROM_START( hr16 ) |
| 297 | 418 | ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) |
| r243479 | r243480 | |
| 324 | 445 | ROM_LOAD( "2-27-0007.u15", 0x80000, 0x80000, CRC(319746db) SHA1(46b32a3ab2fbad67fb4566f607f578a2e9defd63)) |
| 325 | 446 | ROM_END |
| 326 | 447 | |
| 448 | ROM_START( mmt8 ) |
| 449 | ROM_REGION( 0x8000, "maincpu", ROMREGION_ERASEFF ) |
| 450 | ROM_SYSTEM_BIOS(0, "v111", "ver 1.11") |
| 451 | ROMX_LOAD( "mt8v1-11.bin", 0x00000, 0x08000, CRC(c9951946) SHA1(149bc5ea46466537de4074820c66a2296ea43bc1), ROM_BIOS(1)) |
| 452 | ROM_SYSTEM_BIOS(1, "v109", "ver 1.09") |
| 453 | ROMX_LOAD( "mt8v1-09.bin", 0x00000, 0x08000, CRC(0ec41dec) SHA1(2c283965e510b586a08f0290df4dd357e6b19b62), ROM_BIOS(2)) |
| 454 | ROM_SYSTEM_BIOS(2, "v108", "ver 1.08") |
| 455 | ROMX_LOAD( "mt8v1-08.bin", 0x00000, 0x08000, CRC(a0615455) SHA1(77395c837b356b34d6b96f6f46eca8c89b57434e), ROM_BIOS(3)) |
| 456 | ROM_END |
| 457 | |
| 327 | 458 | ROM_START( sr16 ) |
| 328 | 459 | ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) |
| 329 | 460 | ROM_SYSTEM_BIOS(0, "v104", "ver 1.04") |
| r243479 | r243480 | |
| 349 | 480 | /* Driver */ |
| 350 | 481 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ |
| 351 | 482 | SYST( 1987, hr16, 0, 0, hr16, hr16, alesis_state, hr16, "Alesis", "HR-16", GAME_NOT_WORKING | GAME_NO_SOUND) |
| 483 | SYST( 1987, mmt8, 0, 0, mmt8, mmt8, driver_device, 0, "Alesis", "MMT-8", GAME_NOT_WORKING | GAME_NO_SOUND) |
| 352 | 484 | SYST( 1989, hr16b, hr16, 0, hr16, hr16, alesis_state, hr16, "Alesis", "HR-16B", GAME_NOT_WORKING | GAME_NO_SOUND) |
| 353 | 485 | SYST( 1990, sr16, 0, 0, sr16, sr16, driver_device, 0, "Alesis", "SR-16", GAME_NOT_WORKING | GAME_NO_SOUND) |