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

Rumble issues in Windows CE titles #13

Open
mackieks opened this issue Mar 2, 2023 · 5 comments
Open

Rumble issues in Windows CE titles #13

mackieks opened this issue Mar 2, 2023 · 5 comments
Assignees
Labels
bug Something isn't working game rumble Windows CE

Comments

@mackieks
Copy link
Owner

mackieks commented Mar 2, 2023

Description:
One of many, many problems with WinCE software. Some titles don't detect rumble at all. Some titles advise that an unsupported accessory has been connected when rumble is enabled, and work fine with rumble disabled. Sega Rally 2 seems to detect rumble, but hard crashes when rumble actually activates in-game, i.e. when the DC sends a setCondition packet to MaplePad (how this is even possible is beyond me.)

This is probably a packet format issue, or a packet that isn't being handled correctly by MaplePad. I already fixed some bugs where MaplePad wasn't responding to GetMediaInfo packets properly, so maybe there are more issues like that lurking in the code. The worst possible scenario would be if the vibeHandler timer ISR is somehow interfering with the receipt/transmission of rumble-related packets. Also, maybe continuous vibration/AST not being implemented is causing problems...? Really need to address that.

To-do:
Capture logic traces with HKT-7700+stock VMU and MaplePad to compare behavior. Some analysis of Sega Rally 2 already performed last year.

Affected titles:
(tested on 1.4b/c)

  • 4x4 Evolution (VMU icon shows up, but disappears. VMU isn't recognized as formatted)
  • Bust-A-Move 4
  • Ducati World Racing
  • Hundred Swords
  • Q*bert
  • Resident Evil 2
  • Sega Rally 2 (poster child for WinCE issues)
  • Tom Clancy's Rainbow Six
@mackieks
Copy link
Owner Author

mackieks commented Mar 4, 2023

Sega Rally 2 test from 9/17/22:

unknown2

Absolutely baffling... So in Sega Rally, going into the settings, selecting a rumble strength and pressing A will make the game send a SetCondition command to the rumble pack. But with Maplepad, the SetCondition command never gets sent when I press A.
In fact the game instantly freezes
how the controller could make the entire game loop freeze is beyond me

MaplePad's SendControllerStatus packet (A press) looks the same as the HKT-7700's in this capture. I did see some spurious spikes on the data lines after turning off the glitch filter in DSView. Maybe the next step is to capture this particular transaction with the scope and make sure this isn't a SI issue or a bug in the PIO engine.

@megavolt85
Copy link

the problem is that the current implementation of maple in pio is very crap and misses some packets, you need to completely rewrite the pio rx module and get rid of state_machine.c
advice from an experienced programmer, if you want to do it well, write your code, other people's code always contains errors

@mackieks
Copy link
Owner Author

Thanks for the heads up! I'm no longer working on this project, but feel free to open a PR if you want to contribute

@megavolt85
Copy link

I'm currently busy with my project of connecting USB keyboards/mouses to DreamCast.
initially I also used this library to process maple, but when I tried to connect a PS3 controller, I encountered the same problems as you, in the end I had to write PIO RX from scratch and change PIO TX so that it would work stably
P.S. I use only one core for maple, the second core is used for USB processing, and I do not use DMA for maple transfers

@mackieks
Copy link
Owner Author

Sounds like your rewritten Maple Bus core works well. If it's abstracted enough to merge into MaplePad you're welcome to open a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working game rumble Windows CE
Projects
Status: In Progress
Development

No branches or pull requests

2 participants