trunk/src/mess/video/alesis.c
r0 | r17538 | |
| 1 | /*************************************************************************** |
| 2 | |
| 3 | Alesis SR-16 LCD emulation |
| 4 | |
| 5 | ****************************************************************************/ |
| 6 | |
| 7 | #include "emu.h" |
| 8 | #include "includes/alesis.h" |
| 9 | |
| 10 | |
| 11 | void alesis_state::update_lcd_symbols(bitmap_ind16 &bitmap, UINT8 pos, UINT8 y, UINT8 x, int state) |
| 12 | { |
| 13 | if (pos == 6) |
| 14 | { |
| 15 | switch(x) |
| 16 | { |
| 17 | case 0: |
| 18 | switch(y) |
| 19 | { |
| 20 | case 0: output_set_value("a_next", state); break; |
| 21 | case 1: output_set_value("b_next", state); break; |
| 22 | case 2: output_set_value("fill_next", state); break; |
| 23 | case 3: output_set_value("user_next", state); break; |
| 24 | case 4: output_set_value("play", state); break; |
| 25 | case 5: output_set_value("record", state); break; |
| 26 | case 6: output_set_value("compose", state); break; |
| 27 | case 7: output_set_value("perform", state); break; |
| 28 | } |
| 29 | break; |
| 30 | case 1: |
| 31 | if (y == 0) |
| 32 | { |
| 33 | output_set_value("song", state); |
| 34 | } |
| 35 | else if (y < 8) |
| 36 | { |
| 37 | if (state) |
| 38 | m_lcd_digits[0] |= (1<<(y-1)); |
| 39 | else |
| 40 | m_lcd_digits[0] &= ~(1<<(y-1)); |
| 41 | |
| 42 | output_set_value("digit0", BITSWAP8(m_lcd_digits[0],7,3,1,4,6,5,2,0)); |
| 43 | } |
| 44 | break; |
| 45 | case 2: |
| 46 | if (y == 0) |
| 47 | { |
| 48 | output_set_value("pattern", state); |
| 49 | } |
| 50 | else if (y < 8) |
| 51 | { |
| 52 | if (state) |
| 53 | m_lcd_digits[1] |= (1<<(y-1)); |
| 54 | else |
| 55 | m_lcd_digits[1] &= ~(1<<(y-1)); |
| 56 | |
| 57 | output_set_value("digit1", BITSWAP8(m_lcd_digits[1],7,3,1,4,6,5,2,0)); |
| 58 | } |
| 59 | break; |
| 60 | case 3: |
| 61 | switch(y) |
| 62 | { |
| 63 | case 0: output_set_value("b", state); break; |
| 64 | case 1: output_set_value("a", state); break; |
| 65 | case 2: output_set_value("fill", state); break; |
| 66 | case 3: output_set_value("user", state); break; |
| 67 | case 4: output_set_value("edited", state); break; |
| 68 | case 5: output_set_value("set", state); break; |
| 69 | case 6: output_set_value("drum", state); break; |
| 70 | case 7: output_set_value("press_play", state); break; |
| 71 | } |
| 72 | break; |
| 73 | case 4: |
| 74 | if (y == 7) |
| 75 | { |
| 76 | output_set_value("metronome", state); |
| 77 | } |
| 78 | else if (y < 7) |
| 79 | { |
| 80 | if (state) |
| 81 | m_lcd_digits[4] |= (1<<y); |
| 82 | else |
| 83 | m_lcd_digits[4] &= ~(1<<y); |
| 84 | |
| 85 | output_set_value("digit4", BITSWAP8(m_lcd_digits[4],7,3,5,2,0,1,4,6)); |
| 86 | } |
| 87 | break; |
| 88 | } |
| 89 | } |
| 90 | else |
| 91 | { |
| 92 | switch(x) |
| 93 | { |
| 94 | case 0: |
| 95 | if (y == 7) |
| 96 | { |
| 97 | output_set_value("tempo", state); |
| 98 | } |
| 99 | else if (y < 7) |
| 100 | { |
| 101 | if (state) |
| 102 | m_lcd_digits[3] |= (1<<y); |
| 103 | else |
| 104 | m_lcd_digits[3] &= ~(1<<y); |
| 105 | |
| 106 | output_set_value("digit3", BITSWAP8(m_lcd_digits[3],7,3,5,2,0,1,4,6)); |
| 107 | } |
| 108 | break; |
| 109 | case 1: |
| 110 | if (y == 7) |
| 111 | { |
| 112 | output_set_value("page", state); |
| 113 | } |
| 114 | else if (y < 7) |
| 115 | { |
| 116 | if (state) |
| 117 | m_lcd_digits[2] |= (1<<y); |
| 118 | else |
| 119 | m_lcd_digits[2] &= ~(1<<y); |
| 120 | |
| 121 | output_set_value("digit2", BITSWAP8(m_lcd_digits[2],7,3,5,2,0,1,4,6)); |
| 122 | } |
| 123 | break; |
| 124 | case 2: |
| 125 | switch(y) |
| 126 | { |
| 127 | case 0: output_set_value("step_edit", state); break; |
| 128 | case 1: output_set_value("swing_off", state); break; |
| 129 | case 2: output_set_value("swing_62", state); break; |
| 130 | case 3: output_set_value("click_l1", state); break; |
| 131 | case 4: output_set_value("click_note", state); break; |
| 132 | case 5: output_set_value("click_l2", state); break; |
| 133 | case 6: output_set_value("click_3", state); break; |
| 134 | case 7: output_set_value("backup", state); break; |
| 135 | } |
| 136 | break; |
| 137 | case 3: |
| 138 | switch(y) |
| 139 | { |
| 140 | case 0: output_set_value("drum_set", state); break; |
| 141 | case 1: output_set_value("swing", state); break; |
| 142 | case 2: output_set_value("swing_58", state); break; |
| 143 | case 3: output_set_value("click_off", state); break; |
| 144 | case 4: output_set_value("click", state); break; |
| 145 | case 5: output_set_value("quantize_off", state); break; |
| 146 | case 6: output_set_value("quantize_3", state); break; |
| 147 | case 7: output_set_value("midi_setup", state); break; |
| 148 | } |
| 149 | break; |
| 150 | case 4: |
| 151 | switch(y) |
| 152 | { |
| 153 | case 0: output_set_value("record_setup", state); break; |
| 154 | case 1: output_set_value("quantize", state); break; |
| 155 | case 2: output_set_value("swing_54", state); break; |
| 156 | case 3: output_set_value("quantize_l1", state); break; |
| 157 | case 4: output_set_value("quantize_l2", state); break; |
| 158 | case 5: output_set_value("quantize_l3", state); break; |
| 159 | case 6: output_set_value("quantize_note", state); break; |
| 160 | case 7: output_set_value("setup", state); break; |
| 161 | } |
| 162 | break; |
| 163 | } |
| 164 | } |
| 165 | } |
trunk/src/mess/layout/sr16.lay
r0 | r17538 | |
| 1 | <?xml version="1.0"?> |
| 2 | <mamelayout version="2"> |
| 3 | <element name="digit"> |
| 4 | <led7seg> |
| 5 | <color red="1.0" green="1.0" blue="1.0" /> |
| 6 | </led7seg> |
| 7 | </element> |
| 8 | <element name="song" defstate="0"> |
| 9 | <text string="SONG" align="1" state="1"> |
| 10 | <color red="1.0" green="1.0" blue="1.0" /> |
| 11 | </text> |
| 12 | </element> |
| 13 | <element name="pattern" defstate="0"> |
| 14 | <text string="PATTERN" align="1" state="1"> |
| 15 | <color red="1.0" green="1.0" blue="1.0" /> |
| 16 | </text> |
| 17 | </element> |
| 18 | <element name="a" defstate="0"> |
| 19 | <text string="A" align="1" state="1"> |
| 20 | <color red="1.0" green="1.0" blue="1.0" /> |
| 21 | </text> |
| 22 | </element> |
| 23 | <element name="b" defstate="0"> |
| 24 | <text string="B" align="1" state="1"> |
| 25 | <color red="1.0" green="1.0" blue="1.0" /> |
| 26 | </text> |
| 27 | </element> |
| 28 | <element name="fill" defstate="0"> |
| 29 | <text string="FILL" align="1" state="1"> |
| 30 | <color red="1.0" green="1.0" blue="1.0" /> |
| 31 | </text> |
| 32 | </element> |
| 33 | <element name="user" defstate="0"> |
| 34 | <text string="USER" align="1" state="1"> |
| 35 | <color red="1.0" green="1.0" blue="1.0" /> |
| 36 | </text> |
| 37 | </element> |
| 38 | <element name="drum" defstate="0"> |
| 39 | <text string="DRUM" align="1" state="1"> |
| 40 | <color red="1.0" green="1.0" blue="1.0" /> |
| 41 | </text> |
| 42 | </element> |
| 43 | <element name="set" defstate="0"> |
| 44 | <text string="SET" align="1" state="1"> |
| 45 | <color red="1.0" green="1.0" blue="1.0" /> |
| 46 | </text> |
| 47 | </element> |
| 48 | <element name="edited" defstate="0"> |
| 49 | <text string="EDITED" align="1" state="1"> |
| 50 | <color red="1.0" green="1.0" blue="1.0" /> |
| 51 | </text> |
| 52 | </element> |
| 53 | <element name="press_play" defstate="0"> |
| 54 | <text string="PRESS PLAY" align="1" state="1"> |
| 55 | <color red="1.0" green="1.0" blue="1.0" /> |
| 56 | </text> |
| 57 | </element> |
| 58 | <element name="page" defstate="0"> |
| 59 | <text string="PAGE" align="1" state="1"> |
| 60 | <color red="1.0" green="1.0" blue="1.0" /> |
| 61 | </text> |
| 62 | </element> |
| 63 | <element name="tempo" defstate="0"> |
| 64 | <text string="TEMPO" align="1" state="1"> |
| 65 | <color red="1.0" green="1.0" blue="1.0" /> |
| 66 | </text> |
| 67 | </element> |
| 68 | <element name="metronome" defstate="0"> |
| 69 | <disk state="1"> |
| 70 | <color red="1.0" green="1.0" blue="1.0" /> |
| 71 | </disk> |
| 72 | </element> |
| 73 | <element name="play" defstate="0"> |
| 74 | <text string="PLAY" align="1" state="1"> |
| 75 | <color red="1.0" green="1.0" blue="1.0" /> |
| 76 | </text> |
| 77 | </element> |
| 78 | <element name="record" defstate="0"> |
| 79 | <text string="RECORD" align="1" state="1"> |
| 80 | <color red="1.0" green="1.0" blue="1.0" /> |
| 81 | </text> |
| 82 | </element> |
| 83 | <element name="compose" defstate="0"> |
| 84 | <text string="COMPOSE" align="1" state="1"> |
| 85 | <color red="1.0" green="1.0" blue="1.0" /> |
| 86 | </text> |
| 87 | </element> |
| 88 | <element name="perform" defstate="0"> |
| 89 | <text string="PERFORM" align="1" state="1"> |
| 90 | <color red="1.0" green="1.0" blue="1.0" /> |
| 91 | </text> |
| 92 | </element> |
| 93 | <element name="setup" defstate="0"> |
| 94 | <text string="SETUP" align="1" state="1"> |
| 95 | <color red="1.0" green="1.0" blue="1.0" /> |
| 96 | </text> |
| 97 | </element> |
| 98 | <element name="midi" defstate="0"> |
| 99 | <text string="MIDI" align="1" state="1"> |
| 100 | <color red="1.0" green="1.0" blue="1.0" /> |
| 101 | </text> |
| 102 | </element> |
| 103 | <element name="backup" defstate="0"> |
| 104 | <text string="BACKUP" align="1" state="1"> |
| 105 | <color red="1.0" green="1.0" blue="1.0" /> |
| 106 | </text> |
| 107 | </element> |
| 108 | <element name="step_edit" defstate="0"> |
| 109 | <text string="STEP" align="1" state="1"> |
| 110 | <color red="1.0" green="1.0" blue="1.0" /> |
| 111 | <bounds left="0" top="0" right="10" bottom="3" /> |
| 112 | </text> |
| 113 | <text string="EDIT" align="1" state="1"> |
| 114 | <color red="1.0" green="1.0" blue="1.0" /> |
| 115 | <bounds left="0" top="3" right="10" bottom="6" /> |
| 116 | </text> |
| 117 | </element> |
| 118 | <element name="drum_set" defstate="0"> |
| 119 | <text string="DRUM SET" align="1" state="1"> |
| 120 | <color red="1.0" green="1.0" blue="1.0" /> |
| 121 | </text> |
| 122 | </element> |
| 123 | <element name="quantize" defstate="0"> |
| 124 | <text string="QUANTIZE" align="1" state="1"> |
| 125 | <color red="1.0" green="1.0" blue="1.0" /> |
| 126 | </text> |
| 127 | </element> |
| 128 | <element name="line"> |
| 129 | <rect state="1"> |
| 130 | <color red="1.0" green="1.0" blue="1.0" /> |
| 131 | </rect> |
| 132 | </element> |
| 133 | <element name="note"> |
| 134 | <disk state="1"> |
| 135 | <color red="1.0" green="1.0" blue="1.0" /> |
| 136 | <bounds left="0" top="6" right="4" bottom="8" /> |
| 137 | </disk> |
| 138 | <rect state="1"> |
| 139 | <color red="1.0" green="1.0" blue="1.0" /> |
| 140 | <bounds left="3" top="2" right="4" bottom="7" /> |
| 141 | </rect> |
| 142 | </element> |
| 143 | <element name="num3" defstate="0"> |
| 144 | <text string="3" align="1" state="1"> |
| 145 | <color red="1.0" green="1.0" blue="1.0" /> |
| 146 | </text> |
| 147 | </element> |
| 148 | <element name="off" defstate="0"> |
| 149 | <text string="OFF" align="1" state="1"> |
| 150 | <color red="1.0" green="1.0" blue="1.0" /> |
| 151 | </text> |
| 152 | </element> |
| 153 | <element name="swing" defstate="0"> |
| 154 | <text string="SWING" align="1" state="1"> |
| 155 | <color red="1.0" green="1.0" blue="1.0" /> |
| 156 | </text> |
| 157 | </element> |
| 158 | <element name="swing_54" defstate="0"> |
| 159 | <text string="54%" align="1" state="1"> |
| 160 | <color red="1.0" green="1.0" blue="1.0" /> |
| 161 | </text> |
| 162 | </element> |
| 163 | <element name="swing_58" defstate="0"> |
| 164 | <text string="58%" align="1" state="1"> |
| 165 | <color red="1.0" green="1.0" blue="1.0" /> |
| 166 | </text> |
| 167 | </element> |
| 168 | <element name="swing_62" defstate="0"> |
| 169 | <text string="62%" align="1" state="1"> |
| 170 | <color red="1.0" green="1.0" blue="1.0" /> |
| 171 | </text> |
| 172 | </element> |
| 173 | <element name="click" defstate="0"> |
| 174 | <text string="CLICK" align="1" state="1"> |
| 175 | <color red="1.0" green="1.0" blue="1.0" /> |
| 176 | </text> |
| 177 | </element> |
| 178 | |
| 179 | <view name="Default Layout"> |
| 180 | <screen index="0"> |
| 181 | <bounds x="0" y="0" width="96" height="36" /> |
| 182 | </screen> |
| 183 | |
| 184 | <bezel name="digit0" element="digit"> |
| 185 | <bounds x="100" y="6" width="10" height="16" /> |
| 186 | </bezel> |
| 187 | <bezel name="digit1" element="digit"> |
| 188 | <bounds x="112" y="6" width="10" height="16" /> |
| 189 | </bezel> |
| 190 | <bezel name="digit2" element="digit"> |
| 191 | <bounds x="100" y="48" width="10" height="16" /> |
| 192 | </bezel> |
| 193 | <bezel name="digit3" element="digit"> |
| 194 | <bounds x="112" y="48" width="10" height="16" /> |
| 195 | </bezel> |
| 196 | <bezel name="digit4" element="digit"> |
| 197 | <bounds x="124" y="48" width="10" height="16" /> |
| 198 | </bezel> |
| 199 | <bezel name="a_next" element="a"> |
| 200 | <bounds x="76" y="18" width="4" height="6" /> |
| 201 | </bezel> |
| 202 | <bezel name="b_next" element="b"> |
| 203 | <bounds x="82" y="18" width="5" height="6" /> |
| 204 | </bezel> |
| 205 | <bezel name="fill_next" element="fill"> |
| 206 | <bounds x="76" y="24" width="16" height="5" /> |
| 207 | </bezel> |
| 208 | <bezel name="user_next" element="user"> |
| 209 | <bounds x="76" y="30" width="16" height="5" /> |
| 210 | </bezel> |
| 211 | <bezel name="song" element="song"> |
| 212 | <bounds x="100" y="0" width="16" height="5" /> |
| 213 | </bezel> |
| 214 | <bezel name="pattern" element="pattern"> |
| 215 | <bounds x="114" y="0" width="28" height="5" /> |
| 216 | </bezel> |
| 217 | <bezel name="a" element="a"> |
| 218 | <bounds x="124" y="6" width="4" height="5" /> |
| 219 | </bezel> |
| 220 | <bezel name="b" element="b"> |
| 221 | <bounds x="130" y="6" width="4" height="5" /> |
| 222 | </bezel> |
| 223 | <bezel name="fill" element="fill"> |
| 224 | <bounds x="124" y="12" width="16" height="5" /> |
| 225 | </bezel> |
| 226 | <bezel name="user" element="user"> |
| 227 | <bounds x="124" y="18" width="16" height="5" /> |
| 228 | </bezel> |
| 229 | <bezel name="drum" element="drum"> |
| 230 | <bounds x="100" y="24" width="16" height="5" /> |
| 231 | </bezel> |
| 232 | <bezel name="set" element="set"> |
| 233 | <bounds x="114" y="24" width="12" height="5" /> |
| 234 | </bezel> |
| 235 | <bezel name="edited" element="edited"> |
| 236 | <bounds x="124" y="24" width="18" height="5" /> |
| 237 | </bezel> |
| 238 | <bezel name="press_play" element="press_play"> |
| 239 | <bounds x="100" y="32" width="40" height="5" /> |
| 240 | </bezel> |
| 241 | <bezel name="page" element="page"> |
| 242 | <bounds x="100" y="40" width="16" height="5" /> |
| 243 | </bezel> |
| 244 | <bezel name="tempo" element="tempo"> |
| 245 | <bounds x="113" y="40" width="20" height="5" /> |
| 246 | </bezel> |
| 247 | <bezel name="metronome" element="metronome"> |
| 248 | <bounds x="132" y="40" width="4" height="4" /> |
| 249 | </bezel> |
| 250 | <bezel name="play" element="play"> |
| 251 | <bounds x="72" y="38" width="16" height="5" /> |
| 252 | </bezel> |
| 253 | <bezel name="record" element="record"> |
| 254 | <bounds x="68" y="44" width="24" height="5" /> |
| 255 | </bezel> |
| 256 | <bezel name="compose" element="compose"> |
| 257 | <bounds x="68" y="54" width="28" height="5" /> |
| 258 | </bezel> |
| 259 | <bezel name="perform" element="perform"> |
| 260 | <bounds x="68" y="60" width="28" height="5" /> |
| 261 | </bezel> |
| 262 | <bezel name="setup" element="setup"> |
| 263 | <bounds x="2" y="38" width="20" height="5" /> |
| 264 | </bezel> |
| 265 | <bezel name="midi_setup" element="midi"> |
| 266 | <bounds x="20" y="38" width="16" height="5" /> |
| 267 | </bezel> |
| 268 | <bezel name="backup" element="backup"> |
| 269 | <bounds x="32" y="38" width="20" height="5" /> |
| 270 | </bezel> |
| 271 | <bezel name="step_edit" element="step_edit"> |
| 272 | <bounds x="52" y="38" width="16" height="10" /> |
| 273 | </bezel> |
| 274 | <bezel name="record_setup" element="record"> |
| 275 | <bounds x="2" y="44" width="24" height="5" /> |
| 276 | </bezel> |
| 277 | <bezel name="drum_set" element="drum_set"> |
| 278 | <bounds x="24" y="44" width="32" height="5" /> |
| 279 | </bezel> |
| 280 | <bezel name="quantize" element="quantize"> |
| 281 | <bounds x="2" y="50" width="32" height="5" /> |
| 282 | </bezel> |
| 283 | <bezel name="quantize_off" element="off"> |
| 284 | <bounds x="16" y="56" width="12" height="5" /> |
| 285 | </bezel> |
| 286 | <bezel name="quantize_note" element="note"> |
| 287 | <bounds x="6" y="58" width="4" height="12" /> |
| 288 | </bezel> |
| 289 | <bezel name="quantize_3" element="num3"> |
| 290 | <bounds x="12" y="66" width="4" height="5" /> |
| 291 | </bezel> |
| 292 | <bezel name="quantize_l3" element="line"> |
| 293 | <bounds x="10" y="62" width="4" height="1" /> |
| 294 | </bezel> |
| 295 | <bezel name="quantize_l2" element="line"> |
| 296 | <bounds x="10" y="60" width="4" height="1" /> |
| 297 | </bezel> |
| 298 | <bezel name="quantize_l1" element="line"> |
| 299 | <bounds x="10" y="58" width="4" height="1" /> |
| 300 | </bezel> |
| 301 | <bezel name="swing" element="swing"> |
| 302 | <bounds x="30" y="50" width="20" height="5" /> |
| 303 | </bezel> |
| 304 | <bezel name="swing_off" element="off"> |
| 305 | <bounds x="48" y="50" width="12" height="5" /> |
| 306 | </bezel> |
| 307 | <bezel name="swing_54" element="swing_54"> |
| 308 | <bounds x="30" y="56" width="12" height="5" /> |
| 309 | </bezel> |
| 310 | <bezel name="swing_58" element="swing_58"> |
| 311 | <bounds x="42" y="56" width="12" height="5" /> |
| 312 | </bezel> |
| 313 | <bezel name="swing_62" element="swing_62"> |
| 314 | <bounds x="54" y="56" width="12" height="5" /> |
| 315 | </bezel> |
| 316 | <bezel name="click" element="click"> |
| 317 | <bounds x="30" y="62" width="20" height="5" /> |
| 318 | </bezel> |
| 319 | <bezel name="click_off" element="off"> |
| 320 | <bounds x="45" y="62" width="12" height="5" /> |
| 321 | </bezel> |
| 322 | <bezel name="click_note" element="note"> |
| 323 | <bounds x="56" y="63" width="2" height="8" /> |
| 324 | </bezel> |
| 325 | <bezel name="click_l1" element="line"> |
| 326 | <bounds x="58" y="63" width="2" height="0.5" /> |
| 327 | </bezel> |
| 328 | <bezel name="click_l2" element="line"> |
| 329 | <bounds x="58" y="65" width="2" height="0.5" /> |
| 330 | </bezel> |
| 331 | <bezel name="click_3" element="num3"> |
| 332 | <bounds x="60" y="67" width="3" height="5" /> |
| 333 | </bezel> |
| 334 | </view> |
| 335 | </mamelayout> |
trunk/src/mess/drivers/alesis.c
r17537 | r17538 | |
11 | 11 | |
12 | 12 | #include "emu.h" |
13 | 13 | #include "includes/alesis.h" |
| 14 | #include "sr16.lh" |
14 | 15 | |
15 | 16 | |
16 | 17 | WRITE8_MEMBER( alesis_state::kb_matrix_w ) |
r17537 | r17538 | |
179 | 180 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3) |
180 | 181 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) |
181 | 182 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) |
182 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TEMPO/PAGE UP") PORT_CODE(KEYCODE_UP) |
| 183 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("UP") PORT_CODE(KEYCODE_UP) |
183 | 184 | PORT_START("COL2") |
184 | 185 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("RECORD SETUP") PORT_CODE(KEYCODE_R) |
185 | 186 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("DRUM SET") PORT_CODE(KEYCODE_D) |
r17537 | r17538 | |
188 | 189 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8) |
189 | 190 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9) |
190 | 191 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0) |
191 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TEMPO/PAGE DOWN") PORT_CODE(KEYCODE_DOWN) |
| 192 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("DOWN") PORT_CODE(KEYCODE_DOWN) |
192 | 193 | PORT_START("COL3") |
193 | 194 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("BACKUP") PORT_CODE(KEYCODE_K) |
194 | 195 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("ERASE") PORT_CODE(KEYCODE_DEL) |
r17537 | r17538 | |
200 | 201 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("COPY") PORT_CODE(KEYCODE_C) |
201 | 202 | PORT_START("COL4") |
202 | 203 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("MIDI SETUP") PORT_CODE(KEYCODE_M) |
203 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("LEFT") PORT_CODE(KEYCODE_LEFT) |
| 204 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TEMPO/PAGE UP") PORT_CODE(KEYCODE_LEFT) |
204 | 205 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TOM 1") PORT_CODE(KEYCODE_1_PAD) |
205 | 206 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TOM 2") PORT_CODE(KEYCODE_2_PAD) |
206 | 207 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TOM 3") PORT_CODE(KEYCODE_3_PAD) |
r17537 | r17538 | |
209 | 210 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("PERC 1") PORT_CODE(KEYCODE_6_PAD) |
210 | 211 | PORT_START("COL5") |
211 | 212 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("PERFORM/COMPOSE") PORT_CODE(KEYCODE_HOME) |
212 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("RIGHT") PORT_CODE(KEYCODE_RIGHT) |
| 213 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TEMPO/PAGE DOWN") PORT_CODE(KEYCODE_RIGHT) |
213 | 214 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KICK") PORT_CODE(KEYCODE_F1) |
214 | 215 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("SNARE") PORT_CODE(KEYCODE_F2) |
215 | 216 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CLOSED HAT") PORT_CODE(KEYCODE_F3) |
r17537 | r17538 | |
230 | 231 | void alesis_state::machine_reset() |
231 | 232 | { |
232 | 233 | m_kb_matrix = 0xff; |
| 234 | memset(m_lcd_digits, 0, sizeof(m_lcd_digits)); |
233 | 235 | } |
234 | 236 | |
235 | 237 | static HD44780_INTERFACE( hr16_display ) |
r17537 | r17538 | |
239 | 241 | NULL // pixel update callback |
240 | 242 | }; |
241 | 243 | |
| 244 | static HD44780_PIXEL_UPDATE(sr16_pixel_update) |
| 245 | { |
| 246 | alesis_state *driv_state = device.machine().driver_data<alesis_state>(); |
| 247 | |
| 248 | if (line == 1 && pos >= 6) // last 2 characters of the second line are used to control the LCD symbols |
| 249 | driv_state->update_lcd_symbols(bitmap, pos, y, x, state); |
| 250 | else |
| 251 | bitmap.pix16(line*9 + y, pos*6 + x) = state; |
| 252 | } |
| 253 | |
242 | 254 | static HD44780_INTERFACE( sr16_display ) |
243 | 255 | { |
244 | 256 | 2, // number of lines |
245 | 257 | 8, // chars for line |
246 | | NULL // pixel update callback |
| 258 | sr16_pixel_update // pixel update callback |
247 | 259 | }; |
248 | 260 | |
249 | 261 | static const cassette_interface hr16_cassette_interface = |
r17537 | r17538 | |
294 | 306 | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
295 | 307 | MCFG_SCREEN_SIZE(6*8, 9*2) |
296 | 308 | MCFG_SCREEN_VISIBLE_AREA(0, 6*8-1, 0, 9*2-1) |
297 | | MCFG_DEFAULT_LAYOUT(layout_lcd) |
| 309 | MCFG_DEFAULT_LAYOUT(layout_sr16) |
298 | 310 | MCFG_SCREEN_UPDATE_DEVICE("hd44780", hd44780_device, screen_update) |
299 | 311 | |
300 | 312 | MCFG_PALETTE_LENGTH(2) |
| 313 | MCFG_PALETTE_INIT(black_and_white) |
301 | 314 | |
302 | 315 | MCFG_CASSETTE_ADD( CASSETTE_TAG, hr16_cassette_interface ) |
303 | 316 | |