Plugin development

BIOS, Controllers, Memory Cards, Serial I/O, Parallel I/O, etc.
Post Reply
Rectangle
What is PSXDEV?
What is PSXDEV?
Posts: 2
Joined: Aug 11, 2012

Plugin development

Post by Rectangle » August 11th, 2012, 9:39 am

I'm writing an input plugin using the standard PSEmu interface to get the Nintendo Wiimote to work with different PS emulators. This is my first plugin, and so far I've been able to auto-discover and connect to a Wiimote. The testing operation goes as expected (rumble with an LED light show), and it also successfully disconnects. I am, however, a little confused on how the polling process works in order to tell the emulator what the controller is doing, since PADreadPort1 never gets called. My only assumption, taken from observing other input plugins, is that you are supposed to keep an incremental variable during each poll to determine how many buffers are to be read per frame, and decrease this number during each buffer read, though I can't figure out what return values the emulators are expecting from PADstartPoll and PADpoll. If I have this completely wrong, it'd be nice to know. Alternatively, if anyone here could tell me the expected way to poll for input data, I'd really appreciate it. I'm not asking for source code, as I already have many other plugins by other authors as a reference. I'd just like to know the order of expected input/output.

If I could just get that that out of the way, I'll promptly have the following features in working order for a good number of emulators:

- Buttons
- Accelerometer
- Pitch/Roll
- Rumble
- Speaker
- Nunchuck
- Balance Board
- Classic Controller
- Guitar
- IR
- Gesture Macros?

... This has all been tested in other projects of mine, and does in fact work outside of the emulator. Thanks to any who can point me in the right direction!

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests