controller input for psyq

BIOS, Controllers, Memory Cards, Serial I/O, Parallel I/O, etc.
Post Reply
User avatar
Tylerpsx
Curious PSXDEV User
Curious PSXDEV User
Posts: 10
Joined: Oct 28, 2022
I am a: Programmer
Motto: You can do it if you know how
PlayStation Model: 5501
Location: United States

controller input for psyq

Post by Tylerpsx » October 28th, 2022, 11:46 pm

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
Last edited by Tylerpsx on October 30th, 2022, 9:14 am, edited 1 time in total.

User avatar
nocash
Verified
PSX Aficionado
PSX Aficionado
Posts: 614
Joined: Nov 12, 2012
Contact:

Post by nocash » October 29th, 2022, 3:36 am

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.

User avatar
Tylerpsx
Curious PSXDEV User
Curious PSXDEV User
Posts: 10
Joined: Oct 28, 2022
I am a: Programmer
Motto: You can do it if you know how
PlayStation Model: 5501
Location: United States

Post by Tylerpsx » October 30th, 2022, 9:09 am

Where can I find how to configure the io iterrupt table and timings and data transfer for the controllers

User avatar
nocash
Verified
PSX Aficionado
PSX Aficionado
Posts: 614
Joined: Nov 12, 2012
Contact:

Post by nocash » October 31st, 2022, 2:02 pm

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest