diff --git a/src/mame/layout/linn_linndrum.lay b/src/mame/layout/linn_linndrum.lay new file mode 100644 index 00000000000..66530763c41 --- /dev/null +++ b/src/mame/layout/linn_linndrum.lay @@ -0,0 +1,714 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + ]]> + + + + ]]> + + + + ]]> + + + + ]]> + + + + ]]> + + + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + > + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/mame/linn/linndrum.cpp b/src/mame/linn/linndrum.cpp index 2613e06dc62..608b3cd4a88 100644 --- a/src/mame/linn/linndrum.cpp +++ b/src/mame/linn/linndrum.cpp @@ -17,8 +17,7 @@ variations, which brings the total to 24 different sounds. The driver is based on the LinnDrum's service manual and schematics, and is intended as an educational tool. -Most of the digital functionality is emulated, though it is not very usable due -to the lack of a layout. Audio is not yet emulated. +Most of the digital functionality is emulated. Audio is not yet emulated. PCBoards: * CPU board. 2 sections in schematics: @@ -34,16 +33,17 @@ PCBoards: Usage: -Since there is no layout yet, usability is limited. +The driver includes a (mostly) interactive layout, including buttons, LEDs and +sliders. The only non-interactive widgets right now are the knobs (such as +tuning and volume). Those will display their current value, but they can only +be modified by the Slider Control menu. -Run the driver with `-log`: +Since there is no audio, the driver logs triggers and other info. To see these +run the driver with `-log`: ./mame -window linndrum -log Tail the log file: (on linux): tail -f error.log - -Press a few of the assigned buttons (B for bass drum, N for snare, T for toms), -and see the voice triggers in the log. */ #include "emu.h" @@ -53,6 +53,8 @@ and see the voice triggers in the log. #include "machine/rescap.h" #include "machine/timer.h" +#include "linn_linndrum.lh" + #define LOG_KEYBOARD (1U << 1) #define LOG_DEBOUNCE (1U << 2) #define LOG_TEMPO (1U << 3) @@ -368,6 +370,8 @@ void linndrum_state::linndrum(machine_config &config) TIMER(config, m_debounce_timer).configure_generic( // 556, U30B. FUNC(linndrum_state::debounce_timer_elapsed)); + config.set_default_layout(layout_linn_linndrum); + // Latches connected to cathodes of LEDs (through resistors), so they are // active-low. @@ -413,51 +417,51 @@ DECLARE_INPUT_CHANGED_MEMBER(linndrum_state::tempo_pot_adjusted) // PORT_NAMEs are based on the annotations in the schematic. INPUT_PORTS_START(linndrum) PORT_START("keyboard_col_0") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("1") - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("2") - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("3") - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("4") - PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("5") - PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("6") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("1") PORT_CODE(KEYCODE_1) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("2") PORT_CODE(KEYCODE_2) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("3") PORT_CODE(KEYCODE_3) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("4") PORT_CODE(KEYCODE_4) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("5") PORT_CODE(KEYCODE_5) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("6") PORT_CODE(KEYCODE_6) PORT_START("keyboard_col_1") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("7") - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SONG/PAT.") - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SONG#") - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("END") - PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("DELETE") - PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("INSERT") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("7") PORT_CODE(KEYCODE_7) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SONG/PAT.") PORT_CODE(KEYCODE_Q) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SONG#") PORT_CODE(KEYCODE_W) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("END") PORT_CODE(KEYCODE_E) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("DELETE") PORT_CODE(KEYCODE_R) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("INSERT") PORT_CODE(KEYCODE_T) PORT_START("keyboard_col_2") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("<-") - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("->") - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("ENTER") - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("STORE") - PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("LOAD") - PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("EXT.SYNC") PORT_CODE(KEYCODE_S) + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("<-") PORT_CODE(KEYCODE_Y) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("->") PORT_CODE(KEYCODE_U) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("ENTER") PORT_CODE(KEYCODE_I) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("STORE") PORT_CODE(KEYCODE_P) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("LOAD") PORT_CODE(KEYCODE_COLON) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("EXT.SYNC") PORT_CODE(KEYCODE_L) PORT_START("keyboard_col_3") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("BPM/TRIG.") - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SIDESTICK") - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SNARE 1") PORT_CODE(KEYCODE_N) - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SNARE 2") - PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SNARE 3") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("BPM/TRIG.") PORT_CODE(KEYCODE_O) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SIDESTICK") PORT_CODE(KEYCODE_Z) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SNARE 1") PORT_CODE(KEYCODE_X) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SNARE 2") PORT_CODE(KEYCODE_C) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SNARE 3") PORT_CODE(KEYCODE_V) PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("BASS 1") PORT_CODE(KEYCODE_B) PORT_START("keyboard_col_4") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("BASS 2") - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("CRASH") - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("PERC.") PORT_CODE(KEYCODE_P) - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("CABASA1 / HIHAT1") - PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("CABASA2 / HIHAT2") - PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("TAMP 1 / HIHAT O") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("BASS 2") PORT_CODE(KEYCODE_N) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("CRASH") PORT_CODE(KEYCODE_M) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("PERC.") PORT_CODE(KEYCODE_COMMA) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("CABASA1 / HIHAT1") PORT_CODE(KEYCODE_A) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("CABASA2 / HIHAT2") PORT_CODE(KEYCODE_S) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("TAMP 1 / HIHAT O") PORT_CODE(KEYCODE_D) PORT_START("keyboard_col_5") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("TAMP 2 / HI TOM") - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("HI CONGA / MID TOM") PORT_CODE(KEYCODE_T) - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("LO CONGA / LO TOM") - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("COWBELL / RIDE 1") - PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("CLAPS / RIDE 2") PORT_CODE(KEYCODE_L) + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("TAMP 2 / HI TOM") PORT_CODE(KEYCODE_F) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("HI CONGA / MID TOM") PORT_CODE(KEYCODE_G) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("LO CONGA / LO TOM") PORT_CODE(KEYCODE_H) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("COWBELL / RIDE 1") PORT_CODE(KEYCODE_J) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("CLAPS / RIDE 2") PORT_CODE(KEYCODE_K) PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED) // The play-stop button and footswitch input are both connected together @@ -482,6 +486,90 @@ INPUT_PORTS_START(linndrum) PORT_START("pot_tempo") PORT_ADJUSTER(50, "TEMPO") PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(linndrum_state::tempo_pot_adjusted), 0) + + PORT_START("pot_volume") + PORT_ADJUSTER(100, "MASTER VOLUME") + + PORT_START("pot_tuning_1") + PORT_ADJUSTER(50, "SNARE TUNING"); + PORT_START("pot_tuning_2") + PORT_ADJUSTER(50, "HI TOM TUNING"); + PORT_START("pot_tuning_3") + PORT_ADJUSTER(50, "MID TOM TUNING"); + PORT_START("pot_tuning_4") + PORT_ADJUSTER(50, "LO TOM TUNING"); + PORT_START("pot_tuning_5") + PORT_ADJUSTER(50, "HI CONGAS TUNING"); + PORT_START("pot_tuning_6") + PORT_ADJUSTER(50, "LO CONGAS TUNING"); + PORT_START("pot_tuning_7") + PORT_ADJUSTER(50, "HIHAT DECAY"); + + PORT_START("pot_pan_1") + PORT_ADJUSTER(50, "BASS PAN") + PORT_START("pot_pan_2") + PORT_ADJUSTER(50, "SNARE PAN") + PORT_START("pot_pan_3") + PORT_ADJUSTER(50, "SIDESTICK PAN") + PORT_START("pot_pan_4") + PORT_ADJUSTER(50, "HIHAT PAN") + PORT_START("pot_pan_5") + PORT_ADJUSTER(50, "HI TOM PAN") + PORT_START("pot_pan_6") + PORT_ADJUSTER(50, "MID TOM PAN") + PORT_START("pot_pan_7") + PORT_ADJUSTER(50, "LO TOM PAN") + PORT_START("pot_pan_8") + PORT_ADJUSTER(50, "RIDE PAN") + PORT_START("pot_pan_9") + PORT_ADJUSTER(50, "CRASH PAN") + PORT_START("pot_pan_10") + PORT_ADJUSTER(50, "CABASA PAN") + PORT_START("pot_pan_11") + PORT_ADJUSTER(50, "TAMB PAN") + PORT_START("pot_pan_12") + PORT_ADJUSTER(50, "HI CONGA PAN") + PORT_START("pot_pan_13") + PORT_ADJUSTER(50, "LO CONGA PAN") + PORT_START("pot_pan_14") + PORT_ADJUSTER(50, "COWBELL PAN") + PORT_START("pot_pan_15") + PORT_ADJUSTER(50, "CLAPS PAN") + PORT_START("pot_pan_16") + PORT_ADJUSTER(50, "CLICK PAN") + + PORT_START("pot_gain_1") + PORT_ADJUSTER(100, "BASS GAIN") + PORT_START("pot_gain_2") + PORT_ADJUSTER(100, "SNARE GAIN") + PORT_START("pot_gain_3") + PORT_ADJUSTER(100, "SIDESTICK GAIN") + PORT_START("pot_gain_4") + PORT_ADJUSTER(100, "HIHAT GAIN") + PORT_START("pot_gain_5") + PORT_ADJUSTER(100, "HI TOM GAIN") + PORT_START("pot_gain_6") + PORT_ADJUSTER(100, "MID TOM GAIN") + PORT_START("pot_gain_7") + PORT_ADJUSTER(100, "LO TOM GAIN") + PORT_START("pot_gain_8") + PORT_ADJUSTER(100, "RIDE GAIN") + PORT_START("pot_gain_9") + PORT_ADJUSTER(100, "CRASH GAIN") + PORT_START("pot_gain_10") + PORT_ADJUSTER(100, "CABASA GAIN") + PORT_START("pot_gain_11") + PORT_ADJUSTER(100, "TAMB GAIN") + PORT_START("pot_gain_12") + PORT_ADJUSTER(100, "HI CONGA GAIN") + PORT_START("pot_gain_13") + PORT_ADJUSTER(100, "LO CONGA GAIN") + PORT_START("pot_gain_14") + PORT_ADJUSTER(100, "COWBELL GAIN") + PORT_START("pot_gain_15") + PORT_ADJUSTER(100, "CLAPS GAIN") + PORT_START("pot_gain_16") + PORT_ADJUSTER(100, "CLICK GAIN") INPUT_PORTS_END ROM_START(linndrum)