Page 1 of 1

controller input for psyq

Posted: October 28th, 2022, 11:46 pm
by Tylerpsx
Hi I thought I would post a new thread because I did not see my question in any of the threads

can anyone help explain to me how to program the anolog controller inputs on psyq
I am trying to program the DualShock/analog stick controllers for a FPS game I understand the controller keys padlup padldown padlleft padlright padl1 padl2 and padRup padrdown padrleft padrright padr1 padr2 finally padstart and padselect. I don't know anything about the analog or vibration functions.

Sorry If I sound really stupid I am new to playstation development the only low level experience was on hardware for x86,and x64.

Re thread

Where should I look at getting information about controller interrupts and learning about programming timings

Re: controller input for psyq

Posted: October 29th, 2022, 3:36 am
by nocash
Low Level
Use the controller I/O ports. There you can do whatever you want. But you'll have to transfer data byte-by-byte and deal with timings and use polling or interrupts.

Kernel
Use InitPad and StartPad. That can read controller data, including analog inputs. It can't send data to the pads (=no vibration control, and no way to automatically switch to analog mode; the user must manually press the "analog" button).

PsyQ
I've never used that. Looking at their Run-Time Library Reference, PadSetAct seems to allow to control vibration.

Re: controller input for psyq

Posted: October 30th, 2022, 9:09 am
by Tylerpsx
Where can I find how to configure the io iterrupt table and timings and data transfer for the controllers

Re: controller input for psyq

Posted: October 31st, 2022, 2:02 pm
by nocash
My own document: http://problemkaputt.de/psxspx-contents.htm contains info about low level hardware I/O, and also higher level kernel functions (the latter is about same as the psyq docs - check out which one is easier to read - note: I've documented only the built-in kernel functions, not the psyq extensions for things like vibration).
Or try to find some homebrew psx games with source code and analog support.