Picade Board Firmware Update

I spent today, and most of this evening, developing and testing both a new Picade firmware and a quick and dirty update script which should let you easily get it installed hopefully without even opening up your Picade.

Complete instructions for the process are here: https://github.com/pimoroni/Picade-Sketch/tree/master/update

You’ll need either a keyboard to type in the necessary commands, or a network connection to your Picade so you can do so remotely.

Note: RetroPie by default shows up on your network as RETROPIE and the default SSH login is the same as Raspbian: pi // raspberry

I’ve made some quite significant changes to how buttons are handled, which should improve the performance of multiple simultaneous button presses, and repeated button presses.

I’d really love any feedback, especially from fighter aficionados.

Other changes include the ability to hold the volume buttons to ramp the volume up/down, auto-saving of volume level.

This is all open-source, albeit fairly ugly code. I have tried to make the Arduino sketch as beginner-friendly as possible, with some comments at the top to guide you through things like remapping and turning the Vol Up/Down buttons into extra game buttons.

Enjoy!

2 Likes

Installed via SSH without any trouble thank you.
Tested a couple of old arcade button masher sports games before and after and it does appear that the buttons performed better after the firmware update. Cant help with fighting games sorry.

1 Like

Is this for the “old” kickstarter picades or the recent retail ones?

Thanks.

This is for the recent retail ones- I will backport to the “old” PiCade if I can make it work. I suspect it’s mostly compatible but I’ve never used the old board so I’ll have to find one and check.

1 Like

I have yet to look at it directly, it’s just a thought right now, but does the atmel chip know when a headphone is plugged? (directly or via the amplifier)

If yes, it would be nice to store two different values for amplification, one for the main HP, one for when headphones are conencted, we may not want the same output level on both output :)

Yes, the chip does know the headphones are plugged in. Unfortunately there’s no amplification on the headphone output at all- it’s a direct pass through. This does allow a neat trick which I discovered by accident, though, you can plug an audio source into the headphone socket and play it through the Picade speakers. It’s something that’s obvious in retrospect- the audio in and out jacks are pretty much identically and are electrically connected- but you don’t think of it until it happens.

In summary - whatever volume you set the Pi to, is what you’ll get out of your headphones. The Picade has no control over it.

That’s not to say it’s completely impossible to gain control over the headphone volume, but Retropie would need to respond sanely to volume up/down commands, known as “Multimedia Keys” - http://stefanjones.ca/blog/arduino-leonardo-remote-multimedia-keys/

There’s a crusty YouTube video mentioning how to do this for Raspbian, this might work in Retropie if you have a keyboard with multimedia keys and some time to burn: https://www.youtube.com/watch?v=1GLRcJZjrWI

This is a bit of a niche fiddle and probably not something we’d ever build into the firmware officially, but it looks possible if you’re sufficiently adventurous!

Interesting! Thanks!

Something else I’ll tinker with when I get home next week by the looks of it. It’s great to have an excuse to really explore what the Leonardo/ATmega32u4 can actually do.

Would be very interested in the new firmware for the Kickstarter Picade :)

2 Likes

Just ordered a Picade and as soon as it’s set up i’ll update the firmware - will let you know how it goes.

1 Like

Hi,

Just to let you know, the firmware went on flawlessly with no hitches!

Cheers

1 Like

I’ve also put this firmware on my board, and last night connected a small set of headphones to the Picade 3.5 output. Is it normal that the audio continues to be output from the speakers mounted to the cab ?

I assumed that it would mute when external headphones were connected.

Spacemonkey

Hi, I’m Paul, new to this forum and also a total Raspberry Pi fan.

Recently purchased the PiCade from the pirates… Awesome bit of kit. got it all working with RetroPie.
but… Mame requires coin button press of ‘5’, which is not mapped through the PiCade PCB.

I’m a total newb when it comes to boards, wires, etc… I’m a software person.

How does one compile a new sketch to be flashed to the Picade PCB? All I want to do is change the coin button to be ‘5’ instead of ‘c’

Your help is most appreciated.

P.

Ahoy! It’s fairly straight-forward to modify and compile the Picade firmware, it’s just an Arduino Sketch;

  • Download the Arduino IDE from here: https://www.arduino.cc/en/Main/Software
  • Download the Picade firmware source from here: https://github.com/pimoroni/Picade-Sketch
  • Open Picade/Picade.ino in Arduino
  • Go into “File > Preferences” and make sure the boxes next to “Show verbose output during:” are both ticked.
  • Select “Arduino Leonardo” in the “Tools > Board” menu
  • Make your changes to the key bindings
  • Hit the tick button to compile
  • You should see something like: C:\Users\username\AppData\Local\Temp\build0982374982794723.tmp/Picade.cpp.hex
  • Copy this file over to your Picade Pi as picade.hex and flash it using the updater: https://github.com/pimoroni/Picade-Sketch/tree/master/update

Give me a shout if you need help with any of those steps.

I plan to make the Picade firmware dynamically re-configurable as soon as I can so we can have a utility to change the key bindings without uploading a new firmware.

Woah… Thank you so much for your rapid response.
I will give this a go tonight and report back.

Thank you once again… You Pirates are awesome in so many ways.

P-Dizzle of the shire

It worked great for me without issue, I updated via SSH in linux with the update command.

I’m really pleased that the volume isn’t on 10 anymore when I first boot up and like the smooth volume up, volume down.

Having said that, I’m thinking of routing sound through HDMI, screen sound out and so at some point will want to disable the volume controls and map them to keys instead (so they can be used for pinball games). I can see what to change in the sketch files which looks straight forward enough but how do you go about compiling the sketch into the picade.hex file for the update script to flash ?, or is this built autoagically?

See my post above ^^

…oh, sorry, yes I see it now

So, followed your flawless instructions, and hey presto… I can now play pacman via MAME.

Thank you so much for your quick reply and simple steps… oh and your update script…

Im on the way to making the most awesome arcade machine ever made. (in my mind)

Thanks again,

P.