Open daslord opened 3 years ago
Hey,
Yeah, you should definitely be able to make that modification fairly easily. Sounds a cool project.
#if POPNMUSIC
InfoPacket.Info.FuncData[0] = __builtin_bswap32(0x000006ff); // What buttons it supports
#else
InfoPacket.Info.FuncData[0] = __builtin_bswap32(0x000f06fe); // What buttons it supports
#endif
The Pop'n'Music controller says it has a C button (bit 0 is set) as well as the normal buttons while the Dreamcast controller line says it has an analogue stick and analogue triggers (bits 16,17,18,19 are set) and no C button (bit 0 is clear). http://mc.pp.se/dc/controller.html has some tables that show what bits mean what.
By setting the POPNMUSIC define to 0 everything should just work as long as you leave pin 27 floating (as it's the C button and a regular controller would never send that).
Only problem you might have is you'd have no sticks or triggers but that might be OK depending on the game. You could always add some code to set them in SendControllerStatus as long as you change the CRC also.
Hope that helps, Charlie
I'm actually curious about this as well and have done a bit of research to understand the function_data. Would you mind verifying if I have this correct?
Also, you mention modifying the CRC to add analog sticks and triggers. I don't currently need this function but, if I did, what needs to be done?
Thanks for taking time to answer these rudimentary questions. I've made my own fork and pushed my initial commits if you wouldn't mind taking a look :)
@misteraddons Feel free to check out my fork. I've set up the Pico's ADC and gotten the joystick working. I'll add the analog triggers soon as well as implement block writes to the VMU's LCD with a SPI OLED display.
Many thanks to @charcole for writing such great code! This is super useful for portablizers who need a compact DC controller replacement for Dreamcast handheld builds.
Oh, rad, awesome! I’ll check out what you did. I was thinking of linking C to RT and Z to LT with RT/LT being set to digital by sending a 255 value when pressed for games that don’t support joystick.
Cheers!
On Thu, Aug 19, 2021 at 8:07 PM mackieks @.***> wrote:
@misteraddons https://github.com/misteraddons Feel free to check out my fork. I've set up the Pico's ADC and gotten the joystick working. I'll add the analog triggers soon as well as implement block writes to the VMU's LCD with a SPI OLED display.
Many thanks to @charcole https://github.com/charcole for writing such great code! This is super useful for portablizers who need a compact DC controller replacement for Dreamcast handheld builds.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/charcole/Dreamcast-PopnMusic/issues/3#issuecomment-902374983, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMFWWHUQIKPC2XT6B77ZTB3T5W2E3ANCNFSM5A26TMAA .
Hi, this is a great project, thank you for making it happen, would it work for emulating a regular DC controller instead of a Pop'n'Music one? I see you put some parts like:
But I don't believe just setting the flag
#define POPNMUSIC 1
to 0 would make it work since there are other parts of the code that do not seem to have the regular controller counterpart, like this part:Can you bring some guidance about what stuff would have to be modified in the code of this project in order to make the raspberry pico work as a generic DC pad? I would love to use it as a JAMMA to DC adapter, that's why I'm asking. Thanks a lot!!