I’m trying to get my Picade (Maxi from the original Kickstarter campaign) to run with a Playstation (Vita) TV. It’s a great fit of course, and works just fine with the screen, but getting the controllers to work is proving to be a bit of a challenge (I’m not an expert at these things).
I’ve tried to reprogram the Picade PCB with the original scancodes switched for ones from a regular Sony Dual Shock controller (published by Sony here: http://developer.sonymobile.com/2013/10/22/how-to-add-xperia-device-support-for-the-dualshock3-wireless-controller-in-your-android-game-video/
Unfortunately, the PS TV doesn’t recognise anything connected (also tried on a PS3, same result), which leads me to believe that either USB-connected joysticks must use completely different scancodes, or the Picade needs to present itself differently in some way.
Anyone here with experience in these matters?
Unfortunately, unless PS TV explicitly supports HID keyboards, joysticks or game pads as an input device you’re going to have a very difficult time getting the Picade PCB to send any useful or valid input.
I can’t find any convincing evidence, or any at all in fact, that the USB port on the Playstation TV is even functional as anything other than charging/syncing Dual Shock controllers. What happens if you plug in a regular USB keyboard? Apparently PS3 controllers actually do send control data over USB, but I don’t know if the PS TV could understand it.
You can build a device to simulate a PS3 controller ( it’s been done: https://github.com/matlo/GIMX ), but it’s somewhat complicated to accomplish and not a project to approach lightly. I also have no idea if it’ll work in your setup, but on the off chance you have the parts it’s worth a try.
It also doesn’t involve the Picade PCB, so there’s still the question of how to add that into the mix. It would appear to be possible to have a Raspberry Pi act as a bridge, but then you’ve got a half a ton of potentially fragile hacked up hardware doing what should be a very simple task… actually, yeah, do that, it’ll be fun :D Probably not useful, but fun!
In theory it should be possible to make the Picade ( Arduino Leonardo more or less ) PCB behave like a PS3 controller, but I can’t find any examples of it being done.
Places to start with that would be here: http://gimx.fr/wiki/index.php?title=Main_Page#GIMX_.22the_hard_way.22
Actually… scratch that, there’s an ATMega32u4 firmware available potentially with source here… hmmmmmmmmmm… https://github.com/matlo/GIMX-firmwares/releases/tag/v4.3
This warrants more investigation, but I’ll leave the above thought process in place because I just spent an hour writing it, haha :D
Looks like the last thing I linked is pretty much the key to getting Picade working as a PS3, PS4 and even Xbox 360/Xbox one controller… in theory. The default build target is the ATmega32u4 and it compiles okay on my laptop… only problems:
- The software is set up to talk to a PC over serial to do most of the heavy lifting, so flashing it to a Picade would do absolutely nothing.
- I’m on holiday and didn’t bring a Picade PCB :D ( I was going to at least grab a PCB, but didn’t think I’d need it )
If you’re familiar with AVR GCC you could probably merge that code, with the Picade source and create your own PS3-supporting franken firmware. Otherwise sit tight and my “challenge accepted” programmer mentality will probably fix it the week after next!
Oh wow, thanks for all your work already! Considering how much greek was in between the english, I think I’ll sit tight a couple of weeks! ;)
But following up on a few of your leads there, I hadn’t tested a USB keyboard with the PS TV but did so now. I had assumed that it would work just as the PS3 but nope. Granted, I only had a wireless keyboard to test with but I confirmed that it works fine on the PS3 and nothing at all happens on the PS TV.
I too have searched for some examples of home-made Playstation arcade cabinets and such but, much to my surprise, came up with little or nothing.
Have a great holiday!
It’s my pleasure. I’ve got a dusty old PS3 somewhere for testing, so I’ll no doubt be unavoidably tempted to try this out. It’s something I’d made a mental note to try anyway, and then completely forgotten.
Making PS3/PS4/Xbox One/Xbox 360 compatible Picade firmwares work would be great news for all owners, and a real feather in the cap of the “Console” version especially. While it has no analog sticks, the 12 buttons could map right onto L1, L2, L3, R1, R2, R3, Square, Circle, Triangle, Cross, Start and Select and the joystick to the D-Pad pretty easily.
That does leave out the PS button, which makes me wonder if L3 and R3 should be relegated to a “Shifted” state ( one button for shift which turns the two front buttons into L3 R3 for example ) and the PS button the remaining button.
The Xbox has pretty much the same layout, so the same applies.
Right I’m thinking out loud here a lot, I need to forget about this for a week or it’ll drive me crazy!
As promised, I dusted off my Xbox 360 and PS3 and began hacking around with code to see if I could make the Picade behave like a compatible controller.
The bad news is that Xbox 360 is proving much, much harder than I expected and it’s borking up on some of the finer points of communication- the Xbox 360 driver on my Mac will recognise the Picade as a 360 controller and detect button presses, but the Xbox itself will not.
The good news is that PS3 appears to be much more promising. I’ve managed to sign in and launch a game using the Picade PCB and a length of jump wire. Woohoo!
**** WARNING: THIS IS EXTREMELY ALPHA ****
Before you continue, this is a very alpha firmware, doesn’t have button debouncing and uses the volume buttons for L1, R1. It’s not at all final, but it should work.
You can grab the alpha firmware here: http://pi.gadgetoid.com/picade_ps3.hex
Use the Picade updater to flash it from your Pi, you can do this by renaming it to
picade.hex or modifying the update script accordingly.
Up, Down, Left, Right = Behave as you would expect
Start = Start
Coin = Select
Button 1 = R2
Button 2 = L2 ( and also the PS button, whoops )
Button 3 = Square
Button 4 = Cross
Button 5 = Circle
Button 6 = Triangle
Vol Down = R1
Vol Up = L1
Yes, this mapping is completely loony at the moment, but I need to grab myself a Picade console and refine it!
Hi there, wow, thanks that sounds very promising! I thought you were going to be on vacation for at least another week. =)
If you mean this updater: https://github.com/pimoroni/Picade-Sketch/tree/master/update I can’t use it since I have the old PCB. Will it be possible to use straight from the Arduino environment as well?
Drat. I forgot you had the old PCB, I’ll have to snag one for testing. I think they’re very, very similar so I suspect it will be a straight-forward port. Don’t quote me on it, but I reckon the updater should work too.
Cool, thanks again! I’ll get started with getting a Pi back in there so I can test with the updater.
And as far as the mapping go, the PS button is definitely wanted for the PS TV at least (needed to quit games). But the rest will probably be very different for every player, depending on favourite games.
Looks like the same update process works as expected on the original Picade. I ported my PS3 firmware to it, made a bunch of improvements, and ported it back.
Documentation of the PS3 controller is heinously light on the ground, so I’m still ironing out the kinks caused by my trial-and-error approach to getting it up and running.
I’ve managed to play several classic arcade style games, navigate my way through my Playstation 3 UI and play Netflix so it’s pretty comprehensive.
Could you possibly throw together a list of your cabinet button mappings and how you would like them mapped to the PS3 buttons?
I’ve also got a test “alt” button which changes the joystick to work as the left analog stick when it’s held down. Seems to work pretty well but it’s obviously not analog.
For anyone who might want Xbox 360 support, I’m afraid it’s a no-go. I found out the hard way that there’s an absurdly strong security chip in official and licensed Xbox 360 controllers which is authenticated against. Unlicensed third party products actually use an onboard USB port to borrow the auth chip from an official wired 360 controller- clever, but not something the Picade can accomplish.
Right now I can’t find any publicly available information on how the auth chip works, and even if I could I’d be hesitant to implement something that might incur the legal wrath of Microsoft. However, you can’t hide secrets from the future- one day this will be solved, but for now I’ll focus on PS3 and HID Joystick modes.
I’ll just keep thanking you for all your hard work! =)
As for mappings, here’s a suggestion.
The Maxi original layout:
// / U Button | GPIO \
// / 1 2 3 | 1 \
// Start | L O R | | Esc
// \ 4 5 6 | 2 /
// \ D /
// | Select Enter |
Suggested PS mapping:
// / U Button | GPIO \
// / S T L1 | R1 \
// PS | L O R | | Alt
// \ X O L2 | R2 /
// \ D /
// | Select Start |
S == square, T == triangle.
The Alt-button was a great addition, I’m sure that could come in handy for a lot of games!
Aha! So that’s how the Maxi was laid out. It’s hard to tell where the side buttons are supposed to be when the guts are all over my living-room floor!
That looks like a pretty sane layout- placing the important buttons on top and keeping PS/Alt out of harm’s way. I intend for “Alt” to be a toggle key once I start tidying up the software.
I swapped around a lot of the joystick wiring, so I’ve probably made a complete hash of my setup, but once I get it corrected to proper original Picade style it should be fine.
In the mean time, if you want to verify that it works with PS TV at all, you should grab this firmware: http://pi.gadgetoid.com/picade_ks_ps3.hex and flash it using the new update script.
Update: I’ve updated the linked hex file with your suggested binding. Now “testing” it :D I clearly need more than 0 PS3 games. Managed to find some demos of arcade titles which are good enough though.
Well, almost. =)
Update flashed and tested. Left, up and down works a charm, but right doesn’t work at all, which makes it a bit harder to test the other buttons as well. From what I managed I think the X, O, T and S are all in the right place, R1 as well. I think the PS-, select- and start buttons have been mixed up somehow as well but all in all I’d say it’s very promising! Great stuff!
Edit: I don’t think there’s anything wrong with the stick either, it worked great on the Pi a couple of days ago.
Brilliant! Must be the analog and digital reports disagreeing with each other breaking the right direction- I’ll go through with a fine tooth comb and fix that up!
Does right work if you hold the alt key?
Well, that was weird. When I boot it up today, all directions work fine!
The mapping seems to be:
// / U Button | GPIO \
// / S T L1 | R1 \
// Alt | L O R | | Start
// \ X O L2 | R2 /
// \ D /
// | Select PS |
But I can’t confirm L1, L2, R2 as I have no software that use them…
Whoops, looks like I transposed a few keys- I had all the GPIO buttons just lying out on the floor and not in a cabinet so I have no idea where they will be placed physically.
I should be able to swap Start/PS and then swap Alt/PS.
@gadgetoid Any progress on this one? Is there a chance to see the firmware code uploaded as well? I was thinking of using it to start testing if I can get it to work on an Ouya as well…
Sheesh, it’s been so long that I’d forgotten which codebase I was using.
I’ve dug up and uploaded the source for both the Kickstarter and 2015 editions to GitHub. This wouldn’t be much use to you for the Ouya I don’t think - although I know nothing of their protocol or what controllers are compatible.
I think the place to start might be LeoJoy: https://github.com/AlanChatham/LeoJoy/tree/master/leojoy