PSX Library

hi

i have a issue which im hoping someone can help me with im looking at the psx library and i can see how it is used to read the commands from a controller, however i want to write those commands rather then reading them. so if anyone can help me emulate the ps2 controller commands that would be great

thank you so much

however i want to write those commands rather then reading them

You want to write to a joystick or some switches? How is that supposed to work?