MaplePad icon indicating copy to clipboard operation
MaplePad copied to clipboard

Rumble issues in Windows CE titles

Open mackieks opened this issue 3 years ago • 5 comments

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 avatar Mar 02 '23 22:03 mackieks

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.

mackieks avatar Mar 04 '23 02:03 mackieks

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

megavolt85 avatar Mar 22 '24 23:03 megavolt85

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

mackieks avatar Mar 22 '24 23:03 mackieks

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

megavolt85 avatar Mar 23 '24 00:03 megavolt85

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.

mackieks avatar Mar 23 '24 03:03 mackieks