Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct PC-FX controller control port behaviour ( #119 ) #163

Merged
merged 1 commit into from
Jul 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions mednafen/src/pcfx/input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,12 @@ uint16 FXINPUT_Read16(uint32 A, const v810_timestamp_t timestamp)
if(A == 0x00 || A == 0x80)
{
int w = (A & 0x80) >> 7;
int scanning = (LatchPending[w] > 0) ? 1 : 0;

if(latched[w])
ret = 0x8;
ret = 0x8 | scanning;
else
ret = 0x0;
ret = 0x0 | scanning;
}
else
{
Expand Down Expand Up @@ -287,6 +288,7 @@ void FXINPUT_Write16(uint32 A, uint16 V, const v810_timestamp_t timestamp)
TapCounter[w] = 0;
}
LatchPending[w] = 1536;
latched[w] = false;
PCFX_SetEvent(PCFX_EVENT_PAD, CalcNextEventTS(timestamp));
}
control[w] = V & 0x7;
Expand Down
Loading