| 677 | static const double PDL_CNTR_INTERVAL = 2816.0 / 255.0; // 11.04 (From KEGS) |
| 678 | |
| 679 | BYTE __stdcall JoyReadPosition(WORD programcounter, WORD address, BYTE, BYTE, ULONG nExecutedCycles) |
| 680 | { |
| 681 | CpuCalcCycles(nExecutedCycles); |
| 682 | |
| 683 | BOOL nPdlCntrActive = g_nCumulativeCycles <= g_paddleInactiveCycle[address & 3]; |
| 684 | |
| 685 | // If no joystick connected, then this is always active (GH#778) && no copy-protection dongle connected |
| 686 | const UINT joyNum = (address & 2) ? 1 : 0; // $C064..$C067 |
| 687 | if (joyinfo[joytype[joyNum]] == DEVICE_NONE && CopyProtectionDonglePDL(address & 3) < 0) |
| 688 | nPdlCntrActive = TRUE; |
| 689 | |
| 690 | return MemReadFloatingBus(nPdlCntrActive, nExecutedCycles); |
| 691 | } |
| 692 | |
| 693 | //=========================================================================== |
| 694 | void JoyReset() |
no test coverage detected