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

[preview] new joypad library does not work on iQue #509

Open
rasky opened this issue Mar 17, 2024 · 2 comments
Open

[preview] new joypad library does not work on iQue #509

rasky opened this issue Mar 17, 2024 · 2 comments

Comments

@rasky
Copy link
Collaborator

rasky commented Mar 17, 2024

The new joypad library is completely non functional on iQue. We have been reported that this is because iQue sports a limited hardware emulator of the PIF chip that only knows how to parse a subset of valid joybus commands.

This is a quote apparently by Zoinkity:

Did get the N64 test cart rom to boot on an ique to verify the RCP works identically. One quirk it has is
it doesn't use libultra controller functions and iQue doesn't appear to parse the bytecode correctly
(or at all, it could pattern-match like some emulators did).
OxFF is a NOP, used to align other commands to make them easier to read out or place them at
predictable addresses. They aren't necessary and the test cart doesn't write them (it keeps pointers
instead). However, iQue ignores commands if they don't contain the normal padding libultra adds in.
Utterly maddening to figure out.
Controller input reads are PIF command 1:
01 04 01 --------
iQue will only respond to it if it's preceded by a NOP:
FF 01 04 01 -------
Not sure if that breaks any common homebrew code. It might not seem like much, but if the iQue
can't forward commands that limits what will work or if slot devices can be used with/as attached
MP controllers.

The above would also apply to the new joypad library that doesn't put the FF padding.

@rasky rasky changed the title [preview] joypad library does not work on iQue [preview] new joypad library does not work on iQue Mar 17, 2024
rasky added a commit to rasky/libdragon that referenced this issue Mar 28, 2024
This fixes controller reading on port 1. Port 2 is still not working,
to be investigated.

Updates DragonMinded#509
@rasky
Copy link
Collaborator Author

rasky commented Apr 6, 2024

Basic controller input works on iQue now (de5b8a0). There are still two possible issues:

  • Inspector does not work (it uses a different codepath)
  • Only the first controller is detected. This is a confirmed regression from trunk, though we have no clue at the moment.

@rasky
Copy link
Collaborator Author

rasky commented Aug 17, 2024

In 2223a5d and 2f1407a we fixed the regression that prevented multiple controllers to work on iQue.

Now the only issue left is the inspector not working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant