src/mess/drivers/x68k.c
| r4148 | r4149 | |
| 535 | 535 | // typically read from the SCC data port on receive buffer full interrupt per byte |
| 536 | 536 | static int x68k_read_mouse(running_machine *machine) |
| 537 | 537 | { |
| 538 | const device_config *scc = devtag_get_device(machine, SCC8530, "scc"); |
| 538 | 539 | char val = 0; |
| 539 | 540 | char ipt = 0; |
| 540 | 541 | |
| 542 | if(!(scc_get_reg_b(scc,5) & 0x02)) |
| 543 | return 0xff; |
| 544 | |
| 541 | 545 | switch(sys.mouse.inputtype) |
| 542 | 546 | { |
| 543 | 547 | case 0: |
| r4148 | r4149 | |
| 557 | 561 | sys.mouse.inputtype++; |
| 558 | 562 | if(sys.mouse.inputtype > 2) |
| 559 | 563 | { |
| 560 | | const device_config *scc = devtag_get_device(machine, SCC8530, "scc"); |
| 561 | 564 | int val = scc_get_reg_b(scc, 0); |
| 562 | 565 | sys.mouse.inputtype = 0; |
| 563 | 566 | sys.mouse.bufferempty = 1; |