LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-26-2019, 11:55 AM   #1
Katemonster
LQ Newbie
 
Registered: Aug 2019
Posts: 12

Rep: Reputation: Disabled
Gamecon_gpio_rpi driver modifications causing unexpected kernel messages


Hi all! First post here. Hope this isn't too much of a doozy.

I've made a hobby out of taking old Playstation consoles, ripping out the guts and putting a Raspberry Pi with Retropie in their place to make a powerful little retro gaming system. When I first started doing this, the first thing I insisted on, no matter which old system I used, was to make the original controllers function with the system.

So to that end I started using the gamecon_gpio_rpi driver to do the controller communication. However, one thing I noticed very early on was that the wiring for 2 controllers using this driver was different than how the original playstation system wired them. If you consider the following list of signals coming from a PSX controller:

P1: DATA
P2: CMD
P4: GND
P5: +3.3V
P6: ATT(Attention/Select)
P7: CLOCK
P9: ACK(Acknowledge)

On the original driver, all wires except the DATA wire are intended to be tied together between both controllers. On the PSX, everything but the ATT wires are tied. Also, the ACK pin is left unconnected in the Pi driver.

So the main focus of my changes was to change the wiring and code, so that I could wire the Pi like the PSX. I also added code to consider the ACK line between each byte transmitted.

I originally wrote my code for the Pi 3. And it all worked nicely. But then the 3B+ came out, and it stopped working. I verified several times that this was the case. It wasn't a problem a little while ago, I could just go buy a 3 in lieu of the 3B+ and I'd be fine, but now the local store doesn't carry the 3, not to mention the 4 is out, so i have to figure this thing out.

Where I'm at now is that it's almost working. When you configure the driver for 2 controllers and hook a single controller in, the input recognition is sketchy, and unreliable. But configure it for 1 controller and it works pretty well. When it's not working so well, dmesg fills up with errors like this:

Code:
huh, entered softirq 1 TIMER 08090dd0 preempt_count 00000101, exited with 08351ac5?
I'll post the full code when I get home, I'm on my phone. But I wanted to get this written out and I was hoping someone could shed some light on what that cryptic error is. It's almost assured that when I insert the driver with it configured for a pin that doesn't have a controller hooked up, those errors show up. Anyone know what causes this?

Last edited by Katemonster; 08-26-2019 at 03:00 PM.
 
Old 08-26-2019, 09:43 PM   #2
Katemonster
LQ Newbie
 
Registered: Aug 2019
Posts: 12

Original Poster
Rep: Reputation: Disabled
OK, finally got around to upload my code. The github repo (forked from the original) is here:

https://github.com/katemonster33/gamecon_gpio_rpi
 
Old 08-28-2019, 06:17 PM   #3
Katemonster
LQ Newbie
 
Registered: Aug 2019
Posts: 12

Original Poster
Rep: Reputation: Disabled
I fixed it. No idea what the messages were.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Command line execution error: unexpected EOF while looking for matching `"' bash: -c: line 25: syntax error: unexpected end of file maheshreddy690 Linux - Newbie 1 12-25-2018 01:13 PM
[SOLVED] USB PSX joystick adaptor and kernel modifications r.russo Linux - Hardware 1 06-25-2012 08:48 AM
Kernel modifications, settings, compiling, how? phsythax Linux - Software 2 03-17-2006 08:41 AM
Shell modifications starting with the system MS3FGX Linux - General 6 06-01-2004 12:19 PM
how to make modifications to a custom kernel build? h/w Linux - Newbie 2 11-09-2003 03:47 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration