src/mess/drivers/pc6001.c
| r8713 | r8714 | |
| 397 | 397 | |
| 398 | 398 | static READ8_DEVICE_HANDLER(nec_ppi8255_r) |
| 399 | 399 | { |
| 400 | | //printf("%02x R\n",offset); |
| 401 | | static UINT8 test; |
| 402 | | |
| 403 | | if(input_code_pressed_once(device->machine,KEYCODE_Z)) |
| 404 | | test^=1; |
| 405 | | |
| 406 | | if(test) |
| 407 | | { |
| 408 | | static int test2; |
| 409 | | |
| 410 | | if(input_code_pressed_once(device->machine,KEYCODE_A)) |
| 411 | | test2++; |
| 412 | | if(input_code_pressed_once(device->machine,KEYCODE_S)) |
| 413 | | test2--; |
| 414 | | |
| 415 | | cur_keycode = test2; |
| 416 | | popmessage("%02x",test2); |
| 417 | | } |
| 418 | | |
| 419 | 400 | if (offset==2) |
| 420 | 401 | return port_c_8255; |
| 421 | 402 | else if(offset==0) |
| r8713 | r8714 | |
| 431 | 412 | |
| 432 | 413 | static WRITE8_DEVICE_HANDLER(nec_ppi8255_w) |
| 433 | 414 | { |
| 434 | | // printf("%02x %02x W\n",offset,data); |
| 435 | | |
| 436 | 415 | if (offset==3) |
| 437 | 416 | { |
| 438 | 417 | if(data & 1) |