src/mess/machine/geneve.c
| r3837 | r3838 | |
| 1301 | 1301 | (bit 2: INT2 status) |
| 1302 | 1302 | bit 3-7: joystick status |
| 1303 | 1303 | */ |
| 1304 | | static READ8_HANDLER( R9901_0 ) |
| 1304 | static READ8_DEVICE_HANDLER( R9901_0 ) |
| 1305 | 1305 | { |
| 1306 | 1306 | int answer; |
| 1307 | 1307 | |
| 1308 | | answer = input_port_read(space->machine, "JOY") >> (JoySel * 8); |
| 1308 | answer = input_port_read(device->machine, "JOY") >> (JoySel * 8); |
| 1309 | 1309 | |
| 1310 | 1310 | return (answer); |
| 1311 | 1311 | } |
| r3837 | r3838 | |
| 1322 | 1322 | bit 5 & 7: used as output |
| 1323 | 1323 | bit 6: unused |
| 1324 | 1324 | */ |
| 1325 | | static READ8_HANDLER( R9901_1 ) |
| 1325 | static READ8_DEVICE_HANDLER( R9901_1 ) |
| 1326 | 1326 | { |
| 1327 | 1327 | int answer; |
| 1328 | 1328 | |
| 1329 | | answer = (input_port_read(space->machine, "MOUSE0") & 4) ^ 4; |
| 1329 | answer = (input_port_read(device->machine, "MOUSE0") & 4) ^ 4; |
| 1330 | 1330 | |
| 1331 | 1331 | return answer; |
| 1332 | 1332 | } |
| r3837 | r3838 | |
| 1334 | 1334 | /* |
| 1335 | 1335 | Read pins P0-P7 of Geneve 9901. |
| 1336 | 1336 | */ |
| 1337 | | static READ8_HANDLER( R9901_2 ) |
| 1337 | static READ8_DEVICE_HANDLER( R9901_2 ) |
| 1338 | 1338 | { |
| 1339 | 1339 | return 0; |
| 1340 | 1340 | } |
| r3837 | r3838 | |
| 1343 | 1343 | Read pins P8-P15 of Geneve 9901. |
| 1344 | 1344 | bit 4: mouse right button |
| 1345 | 1345 | */ |
| 1346 | | static READ8_HANDLER( R9901_3 ) |
| 1346 | static READ8_DEVICE_HANDLER( R9901_3 ) |
| 1347 | 1347 | { |
| 1348 | 1348 | int answer = 0; |
| 1349 | 1349 | |
| 1350 | | if (! (input_port_read(space->machine, "MOUSE0") & 4)) |
| 1350 | if (! (input_port_read(device->machine, "MOUSE0") & 4)) |
| 1351 | 1351 | answer |= 0x10; |
| 1352 | 1352 | |
| 1353 | 1353 | return answer; |
| r3837 | r3838 | |
| 1357 | 1357 | /* |
| 1358 | 1358 | Write PE bus reset line |
| 1359 | 1359 | */ |
| 1360 | | static WRITE8_HANDLER( W9901_PE_bus_reset ) |
| 1360 | static WRITE8_DEVICE_HANDLER( W9901_PE_bus_reset ) |
| 1361 | 1361 | { |
| 1362 | 1362 | } |
| 1363 | 1363 | |
| 1364 | 1364 | /* |
| 1365 | 1365 | Write VDP reset line |
| 1366 | 1366 | */ |
| 1367 | | static WRITE8_HANDLER( W9901_VDP_reset ) |
| 1367 | static WRITE8_DEVICE_HANDLER( W9901_VDP_reset ) |
| 1368 | 1368 | { |
| 1369 | 1369 | } |
| 1370 | 1370 | |
| 1371 | 1371 | /* |
| 1372 | 1372 | Write joystick select line |
| 1373 | 1373 | */ |
| 1374 | | static WRITE8_HANDLER( W9901_JoySel ) |
| 1374 | static WRITE8_DEVICE_HANDLER( W9901_JoySel ) |
| 1375 | 1375 | { |
| 1376 | 1376 | JoySel = data; |
| 1377 | 1377 | } |
| 1378 | 1378 | |
| 1379 | | static WRITE8_HANDLER( W9901_KeyboardReset ) |
| 1379 | static WRITE8_DEVICE_HANDLER( W9901_KeyboardReset ) |
| 1380 | 1380 | { |
| 1381 | 1381 | KeyReset = ! data; |
| 1382 | 1382 | if (KeyReset) |
| r3837 | r3838 | |
| 1399 | 1399 | /* |
| 1400 | 1400 | Write external mem cycles (0=long, 1=short) |
| 1401 | 1401 | */ |
| 1402 | | static WRITE8_HANDLER( W9901_ext_mem_wait_states ) |
| 1402 | static WRITE8_DEVICE_HANDLER( W9901_ext_mem_wait_states ) |
| 1403 | 1403 | { |
| 1404 | 1404 | } |
| 1405 | 1405 | |
| 1406 | 1406 | /* |
| 1407 | 1407 | Write vdp wait cycles (1=add 15 cycles, 0=add none) |
| 1408 | 1408 | */ |
| 1409 | | static WRITE8_HANDLER( W9901_VDP_wait_states ) |
| 1409 | static WRITE8_DEVICE_HANDLER( W9901_VDP_wait_states ) |
| 1410 | 1410 | { |
| 1411 | 1411 | } |
| 1412 | 1412 | |
src/mess/machine/ti99_4x.c
| r3837 | r3838 | |
| 1709 | 1709 | |
| 1710 | 1710 | Handler for tms9901 P0 pin (handset data acknowledge) |
| 1711 | 1711 | */ |
| 1712 | | WRITE8_HANDLER( ti99_handset_set_ack ) |
| 1712 | WRITE8_DEVICE_HANDLER( ti99_handset_set_ack ) |
| 1713 | 1713 | { |
| 1714 | 1714 | if (has_handset && handset_buflen && (data != handset_ack)) |
| 1715 | 1715 | { |
| 1716 | 1716 | handset_ack = data; |
| 1717 | 1717 | if (data == handset_clock) |
| 1718 | 1718 | /* I don't know what the real delay is, but 30us apears to be enough */ |
| 1719 | | timer_set(space->machine, ATTOTIME_IN_USEC(30), NULL, 0, ti99_handset_ack_callback); |
| 1719 | timer_set(device->machine, ATTOTIME_IN_USEC(30), NULL, 0, ti99_handset_ack_callback); |
| 1720 | 1720 | } |
| 1721 | 1721 | } |
| 1722 | 1722 | |
| r3837 | r3838 | |
| 2154 | 2154 | (bit 2: INT2 status) |
| 2155 | 2155 | bit 3-7: keyboard status bits 0 to 4 |
| 2156 | 2156 | */ |
| 2157 | | static READ8_HANDLER( ti99_R9901_0 ) |
| 2157 | static READ8_DEVICE_HANDLER( ti99_R9901_0 ) |
| 2158 | 2158 | { |
| 2159 | 2159 | int answer; |
| 2160 | 2160 | static const char *const keynames[] = { "KEY0", "KEY1", "KEY2", "KEY3" }; |
| r3837 | r3838 | |
| 2163 | 2163 | answer = (ti99_handset_poll_bus() << 3) | 0x80; |
| 2164 | 2164 | else if (has_mecmouse && (KeyCol == ((ti99_model == model_99_4) ? 6 : 7))) |
| 2165 | 2165 | { |
| 2166 | | int buttons = input_port_read(space->machine, "MOUSE0") & 3; |
| 2166 | int buttons = input_port_read(device->machine, "MOUSE0") & 3; |
| 2167 | 2167 | |
| 2168 | 2168 | answer = (mecmouse_read_y ? mecmouse_y_buf : mecmouse_x_buf) << 4; |
| 2169 | 2169 | |
| r3837 | r3838 | |
| 2176 | 2176 | } |
| 2177 | 2177 | else |
| 2178 | 2178 | { |
| 2179 | | answer = ((input_port_read(space->machine, keynames[KeyCol >> 1]) >> ((KeyCol & 1) * 8)) << 3) & 0xF8; |
| 2179 | answer = ((input_port_read(device->machine, keynames[KeyCol >> 1]) >> ((KeyCol & 1) * 8)) << 3) & 0xF8; |
| 2180 | 2180 | } |
| 2181 | 2181 | |
| 2182 | 2182 | if ((ti99_model == model_99_4a) || (ti99_model == model_99_4p)) |
| 2183 | 2183 | { |
| 2184 | 2184 | if (! AlphaLockLine) |
| 2185 | | answer &= ~ (input_port_read(space->machine, "ALPHA") << 3); |
| 2185 | answer &= ~ (input_port_read(device->machine, "ALPHA") << 3); |
| 2186 | 2186 | } |
| 2187 | 2187 | |
| 2188 | 2188 | return answer; |
| r3837 | r3838 | |
| 2197 | 2197 | (bit 4: IR remote handset interrupt) |
| 2198 | 2198 | bit 5-7: weird, not emulated |
| 2199 | 2199 | */ |
| 2200 | | static READ8_HANDLER( ti99_R9901_1 ) |
| 2200 | static READ8_DEVICE_HANDLER( ti99_R9901_1 ) |
| 2201 | 2201 | { |
| 2202 | 2202 | int answer; |
| 2203 | 2203 | static const char *const keynames[] = { "KEY0", "KEY1", "KEY2", "KEY3" }; |
| r3837 | r3838 | |
| 2206 | 2206 | answer = 0x07; |
| 2207 | 2207 | else |
| 2208 | 2208 | { |
| 2209 | | answer = ((input_port_read(space->machine, keynames[KeyCol >> 1]) >> ((KeyCol & 1) * 8)) >> 5) & 0x07; |
| 2209 | answer = ((input_port_read(device->machine, keynames[KeyCol >> 1]) >> ((KeyCol & 1) * 8)) >> 5) & 0x07; |
| 2210 | 2210 | } |
| 2211 | 2211 | |
| 2212 | 2212 | /* we don't take CS2 into account, as CS2 is a write-only unit */ |
| 2213 | | /*if (cassette_input(device_list_find_by_tag( machine->config->devicelist, CASSETTE, "cassette1" )) > 0) |
| 2213 | /*if (cassette_input(device_list_find_by_tag( device->machine->config->devicelist, CASSETTE, "cassette1" )) > 0) |
| 2214 | 2214 | answer |= 8;*/ |
| 2215 | 2215 | |
| 2216 | 2216 | return answer; |
| r3837 | r3838 | |
| 2221 | 2221 | |
| 2222 | 2222 | bit 1: handset data clock pin |
| 2223 | 2223 | */ |
| 2224 | | static READ8_HANDLER( ti99_R9901_2 ) |
| 2224 | static READ8_DEVICE_HANDLER( ti99_R9901_2 ) |
| 2225 | 2225 | { |
| 2226 | 2226 | return (has_handset && handset_clock) ? 2 : 0; |
| 2227 | 2227 | } |
| r3837 | r3838 | |
| 2232 | 2232 | bit 26: IR handset interrupt |
| 2233 | 2233 | bit 27: tape input |
| 2234 | 2234 | */ |
| 2235 | | static READ8_HANDLER( ti99_R9901_3 ) |
| 2235 | static READ8_DEVICE_HANDLER( ti99_R9901_3 ) |
| 2236 | 2236 | { |
| 2237 | 2237 | int answer; |
| 2238 | 2238 | |
| r3837 | r3838 | |
| 2244 | 2244 | /* we don't take CS2 into account, as CS2 is a write-only unit */ |
| 2245 | 2245 | if ( ti99_model != model_99_8 ) |
| 2246 | 2246 | { |
| 2247 | | if (cassette_input(device_list_find_by_tag( space->machine->config->devicelist, CASSETTE, "cassette1" )) > 0) |
| 2247 | if (cassette_input(device_list_find_by_tag( device->machine->config->devicelist, CASSETTE, "cassette1" )) > 0) |
| 2248 | 2248 | answer |= 8; |
| 2249 | 2249 | } |
| 2250 | 2250 | else |
| 2251 | 2251 | { |
| 2252 | | if (cassette_input(device_list_find_by_tag( space->machine->config->devicelist, CASSETTE, "cassette" )) > 0) |
| 2252 | if (cassette_input(device_list_find_by_tag( device->machine->config->devicelist, CASSETTE, "cassette" )) > 0) |
| 2253 | 2253 | answer |= 8; |
| 2254 | 2254 | } |
| 2255 | 2255 | |
| r3837 | r3838 | |
| 2260 | 2260 | /* |
| 2261 | 2261 | WRITE key column select (P2-P4) |
| 2262 | 2262 | */ |
| 2263 | | static WRITE8_HANDLER( ti99_KeyC ) |
| 2263 | static WRITE8_DEVICE_HANDLER( ti99_KeyC ) |
| 2264 | 2264 | { |
| 2265 | 2265 | if (data) |
| 2266 | 2266 | KeyCol |= 1 << (offset-2); |
| r3837 | r3838 | |
| 2275 | 2275 | /* |
| 2276 | 2276 | WRITE alpha lock line - TI99/4a only (P5) |
| 2277 | 2277 | */ |
| 2278 | | static WRITE8_HANDLER( ti99_AlphaW ) |
| 2278 | static WRITE8_DEVICE_HANDLER( ti99_AlphaW ) |
| 2279 | 2279 | { |
| 2280 | 2280 | if ((ti99_model == model_99_4a) || (ti99_model == model_99_4p)) |
| 2281 | 2281 | AlphaLockLine = data; |
| r3837 | r3838 | |
| 2291 | 2291 | bit 5: ??? |
| 2292 | 2292 | bit 6-7: keyboard status bits 0 through 1 |
| 2293 | 2293 | */ |
| 2294 | | static READ8_HANDLER( ti99_8_R9901_0 ) |
| 2294 | static READ8_DEVICE_HANDLER( ti99_8_R9901_0 ) |
| 2295 | 2295 | { |
| 2296 | 2296 | int answer; |
| 2297 | 2297 | static const char *const keynames[] = { "KEY0", "KEY1", "KEY2", "KEY3", "KEY4", "KEY5", "KEY6", "KEY7", |
| r3837 | r3838 | |
| 2299 | 2299 | |
| 2300 | 2300 | if (has_mecmouse && (KeyCol == 15)) |
| 2301 | 2301 | { |
| 2302 | | int buttons = input_port_read(space->machine, "MOUSE0") & 3; |
| 2302 | int buttons = input_port_read(device->machine, "MOUSE0") & 3; |
| 2303 | 2303 | |
| 2304 | 2304 | answer = ((mecmouse_read_y ? mecmouse_y_buf : mecmouse_x_buf) << 7) & 0x80; |
| 2305 | 2305 | |
| r3837 | r3838 | |
| 2309 | 2309 | } |
| 2310 | 2310 | else |
| 2311 | 2311 | { |
| 2312 | | answer = (input_port_read(space->machine, keynames[KeyCol]) << 6) & 0xC0; |
| 2312 | answer = (input_port_read(device->machine, keynames[KeyCol]) << 6) & 0xC0; |
| 2313 | 2313 | } |
| 2314 | 2314 | |
| 2315 | 2315 | return answer; |
| r3837 | r3838 | |
| 2324 | 2324 | (bit 4: IR remote handset interrupt) |
| 2325 | 2325 | bit 5-7: weird, not emulated |
| 2326 | 2326 | */ |
| 2327 | | static READ8_HANDLER( ti99_8_R9901_1 ) |
| 2327 | static READ8_DEVICE_HANDLER( ti99_8_R9901_1 ) |
| 2328 | 2328 | { |
| 2329 | 2329 | int answer; |
| 2330 | 2330 | static const char *const keynames[] = { "KEY0", "KEY1", "KEY2", "KEY3", "KEY4", "KEY5", "KEY6", "KEY7", |
| r3837 | r3838 | |
| 2332 | 2332 | |
| 2333 | 2333 | if (has_mecmouse && (KeyCol == 15)) |
| 2334 | 2334 | { |
| 2335 | | int buttons = input_port_read(space->machine, "MOUSE0") & 3; |
| 2335 | int buttons = input_port_read(device->machine, "MOUSE0") & 3; |
| 2336 | 2336 | |
| 2337 | 2337 | answer = ((mecmouse_read_y ? mecmouse_y_buf : mecmouse_x_buf) << 1) & 0x03; |
| 2338 | 2338 | |
| r3837 | r3838 | |
| 2342 | 2342 | } |
| 2343 | 2343 | else |
| 2344 | 2344 | { |
| 2345 | | answer = (input_port_read(space->machine, keynames[KeyCol]) >> 2) & 0x07; |
| 2345 | answer = (input_port_read(device->machine, keynames[KeyCol]) >> 2) & 0x07; |
| 2346 | 2346 | } |
| 2347 | 2347 | |
| 2348 | 2348 | /* we don't take CS2 into account, as CS2 is a write-only unit */ |
| r3837 | r3838 | |
| 2355 | 2355 | /* |
| 2356 | 2356 | WRITE key column select (P0-P3) |
| 2357 | 2357 | */ |
| 2358 | | static WRITE8_HANDLER( ti99_8_KeyC ) |
| 2358 | static WRITE8_DEVICE_HANDLER( ti99_8_KeyC ) |
| 2359 | 2359 | { |
| 2360 | 2360 | if (data) |
| 2361 | 2361 | KeyCol |= 1 << offset; |
| r3837 | r3838 | |
| 2366 | 2366 | mecmouse_select(KeyCol, 14, 15); |
| 2367 | 2367 | } |
| 2368 | 2368 | |
| 2369 | | static WRITE8_HANDLER( ti99_8_WCRUS ) |
| 2369 | static WRITE8_DEVICE_HANDLER( ti99_8_WCRUS ) |
| 2370 | 2370 | { |
| 2371 | 2371 | ti99_8_CRUS = data; |
| 2372 | 2372 | } |
| 2373 | 2373 | |
| 2374 | | static WRITE8_HANDLER( ti99_8_PTGEN ) |
| 2374 | static WRITE8_DEVICE_HANDLER( ti99_8_PTGEN ) |
| 2375 | 2375 | { |
| 2376 | 2376 | /* ... */ |
| 2377 | 2377 | } |
| r3837 | r3838 | |
| 2379 | 2379 | /* |
| 2380 | 2380 | command CS1/CS2 tape unit motor (P6-P7) |
| 2381 | 2381 | */ |
| 2382 | | static WRITE8_HANDLER( ti99_CS_motor ) |
| 2382 | static WRITE8_DEVICE_HANDLER( ti99_CS_motor ) |
| 2383 | 2383 | { |
| 2384 | 2384 | const device_config *img; |
| 2385 | 2385 | |
| 2386 | 2386 | if ( ti99_model != model_99_8 ) |
| 2387 | 2387 | { |
| 2388 | | img = device_list_find_by_tag( space->machine->config->devicelist, CASSETTE, ( offset-6 ) ? "cassette2" : "cassette1" ); |
| 2388 | img = device_list_find_by_tag( device->machine->config->devicelist, CASSETTE, ( offset-6 ) ? "cassette2" : "cassette1" ); |
| 2389 | 2389 | } |
| 2390 | 2390 | else |
| 2391 | 2391 | { |
| 2392 | | img = device_list_find_by_tag( space->machine->config->devicelist, CASSETTE, "cassette" ); |
| 2392 | img = device_list_find_by_tag( device->machine->config->devicelist, CASSETTE, "cassette" ); |
| 2393 | 2393 | } |
| 2394 | 2394 | cassette_change_state(img, data ? CASSETTE_MOTOR_ENABLED : CASSETTE_MOTOR_DISABLED, CASSETTE_MASK_MOTOR); |
| 2395 | 2395 | } |
| r3837 | r3838 | |
| 2403 | 2403 | We do not really need to emulate this as the tape recorder generates sound |
| 2404 | 2404 | on its own. |
| 2405 | 2405 | */ |
| 2406 | | static WRITE8_HANDLER( ti99_audio_gate ) |
| 2406 | static WRITE8_DEVICE_HANDLER( ti99_audio_gate ) |
| 2407 | 2407 | { |
| 2408 | 2408 | } |
| 2409 | 2409 | |
| r3837 | r3838 | |
| 2411 | 2411 | tape output (P9) |
| 2412 | 2412 | I think polarity is correct, but don't take my word for it. |
| 2413 | 2413 | */ |
| 2414 | | static WRITE8_HANDLER( ti99_CS_output ) |
| 2414 | static WRITE8_DEVICE_HANDLER( ti99_CS_output ) |
| 2415 | 2415 | { |
| 2416 | 2416 | if (ti99_model != model_99_8) /* 99/8 only has one tape port!!! */ |
| 2417 | 2417 | { |
| 2418 | | cassette_output(device_list_find_by_tag( space->machine->config->devicelist, CASSETTE, "cassette1" ), data ? +1 : -1); |
| 2419 | | cassette_output(device_list_find_by_tag( space->machine->config->devicelist, CASSETTE, "cassette2" ), data ? +1 : -1); |
| 2418 | cassette_output(device_list_find_by_tag( device->machine->config->devicelist, CASSETTE, "cassette1" ), data ? +1 : -1); |
| 2419 | cassette_output(device_list_find_by_tag( device->machine->config->devicelist, CASSETTE, "cassette2" ), data ? +1 : -1); |
| 2420 | 2420 | } |
| 2421 | 2421 | else |
| 2422 | 2422 | { |
| 2423 | | cassette_output(device_list_find_by_tag( space->machine->config->devicelist, CASSETTE, "cassette" ), data ? +1 : -1); |
| 2423 | cassette_output(device_list_find_by_tag( device->machine->config->devicelist, CASSETTE, "cassette" ), data ? +1 : -1); |
| 2424 | 2424 | } |
| 2425 | 2425 | } |
| 2426 | 2426 | |
src/mess/drivers/tm990189.c
| r3837 | r3838 | |
| 271 | 271 | field_interrupts(device->machine); |
| 272 | 272 | } |
| 273 | 273 | |
| 274 | | static WRITE8_HANDLER( usr9901_led_w ) |
| 274 | static WRITE8_DEVICE_HANDLER( usr9901_led_w ) |
| 275 | 275 | { |
| 276 | 276 | if (data) |
| 277 | 277 | LED_state |= (1 << offset); |
| r3837 | r3838 | |
| 286 | 286 | tms9901_set_single_int(device_list_find_by_tag(device->machine->config->devicelist, TMS9901, "tms9901_0"), 5, intreq); |
| 287 | 287 | } |
| 288 | 288 | |
| 289 | | static READ8_HANDLER( sys9901_r0 ) |
| 289 | static READ8_DEVICE_HANDLER( sys9901_r0 ) |
| 290 | 290 | { |
| 291 | 291 | int reply = 0x00; |
| 292 | 292 | static const char *const keynames[] = { "LINE0", "LINE1", "LINE2", "LINE3", "LINE4", "LINE5", "LINE6", "LINE7", "LINE8" }; |
| 293 | 293 | |
| 294 | 294 | /* keyboard read */ |
| 295 | 295 | if (digitsel < 9) |
| 296 | | reply |= input_port_read(space->machine, keynames[digitsel]) << 1; |
| 296 | reply |= input_port_read(device->machine, keynames[digitsel]) << 1; |
| 297 | 297 | |
| 298 | 298 | /* tape input */ |
| 299 | | if (cassette_input(device_list_find_by_tag( space->machine->config->devicelist, CASSETTE, "cassette" )) > 0.0) |
| 299 | if (cassette_input(device_list_find_by_tag( device->machine->config->devicelist, CASSETTE, "cassette" )) > 0.0) |
| 300 | 300 | reply |= 0x40; |
| 301 | 301 | |
| 302 | 302 | return reply; |
| 303 | 303 | } |
| 304 | 304 | |
| 305 | | static WRITE8_HANDLER( sys9901_digitsel_w ) |
| 305 | static WRITE8_DEVICE_HANDLER( sys9901_digitsel_w ) |
| 306 | 306 | { |
| 307 | 307 | if (data) |
| 308 | 308 | digitsel |= 1 << offset; |
| r3837 | r3838 | |
| 310 | 310 | digitsel &= ~ (1 << offset); |
| 311 | 311 | } |
| 312 | 312 | |
| 313 | | static WRITE8_HANDLER( sys9901_segment_w ) |
| 313 | static WRITE8_DEVICE_HANDLER( sys9901_segment_w ) |
| 314 | 314 | { |
| 315 | 315 | if (data) |
| 316 | 316 | segment |= 1 << (offset-4); |
| r3837 | r3838 | |
| 322 | 322 | } |
| 323 | 323 | } |
| 324 | 324 | |
| 325 | | static WRITE8_HANDLER( sys9901_dsplytrgr_w ) |
| 325 | static WRITE8_DEVICE_HANDLER( sys9901_dsplytrgr_w ) |
| 326 | 326 | { |
| 327 | 327 | if ((!data) && (digitsel < 10)) |
| 328 | 328 | { |
| r3837 | r3838 | |
| 331 | 331 | } |
| 332 | 332 | } |
| 333 | 333 | |
| 334 | | static WRITE8_HANDLER( sys9901_shiftlight_w ) |
| 334 | static WRITE8_DEVICE_HANDLER( sys9901_shiftlight_w ) |
| 335 | 335 | { |
| 336 | 336 | if (data) |
| 337 | 337 | LED_state |= 0x10; |
| r3837 | r3838 | |
| 339 | 339 | LED_state &= ~0x10; |
| 340 | 340 | } |
| 341 | 341 | |
| 342 | | static WRITE8_HANDLER( sys9901_spkrdrive_w ) |
| 342 | static WRITE8_DEVICE_HANDLER( sys9901_spkrdrive_w ) |
| 343 | 343 | { |
| 344 | 344 | speaker_level_w(0, data); |
| 345 | 345 | } |
| 346 | 346 | |
| 347 | | static WRITE8_HANDLER( sys9901_tapewdata_w ) |
| 347 | static WRITE8_DEVICE_HANDLER( sys9901_tapewdata_w ) |
| 348 | 348 | { |
| 349 | | cassette_output(device_list_find_by_tag( space->machine->config->devicelist, CASSETTE, "cassette" ), data ? +1.0 : -1.0); |
| 349 | cassette_output(device_list_find_by_tag( device->machine->config->devicelist, CASSETTE, "cassette" ), data ? +1.0 : -1.0); |
| 350 | 350 | } |
| 351 | 351 | |
| 352 | 352 | /* |