[Rookie Hack] Money Making Controller Hack for Forza 3

Keep a log of a project build here. Be sure to include pictures and as much documentation as possible.

[Rookie Hack] Money Making Controller Hack for Forza 3

Postby nikescar » February 2nd, 2011, 1:10 am

"Forza 3 MoneyMaker"

All in all, this is a pretty simple hack but it's my first use of a microcontroller.

I've had an Arduino laying around that I never did anything with besides a few of the beginner tutorials. I finally got to put it to use when I manually swapped out my Xbox 360 20GB HDD with a 250GB model. Apparently when you do an unofficial upgrade there are certain games that can detect this and corrupt the game saves thinking you're tampering with them. That's what happened to my Forza 3 save after accumulating millions of dollars, a large garage and completing 75% of the game. A couple hundred hours of gameplay were lost.

I begrudgingly started over and have been slowly working my way back pretty quick. One of the ways I am doing this is having the AI run enduro races while I'm doing other things and when I go to bed. It's a pain in the ass to keep checking on it and restarting a race every hour.

That's where the Arduino comes in. I'm sure something like this has been done before. I wired up a salvaged 4-wire connector to the A button and the up and down on the Dpad. This was pretty simple. I stripped some single wires off of an old HDD IDE cable and then poked it through the holes in the controller board. Then I hot glued them in place. I cut a small hole in the side of the controller for the female side of the connector and superglued it in place and put everything back together.

I then recorded all the steps I had to go through to get from one race to the next and all the pauses I would need to add while waiting for the game to load at various times. I converted this to a simple program and loaded it on the Arduino.

Here's the code:
/*
  Forza 3 MoneyMaker
  
  1. Pick a car and race for the computer to run.
  2. Plug in Arduino and load up this sketch. (do not pug into controller yet)
  3. At the final screen in the main menu when you are staring at
     the track overview and the A Button is labeled "Go Race" at 
     the bottom of the screen, tap the reset button on the Arduino.
  4. You have 10 seconds to plug the Arduino to the controller before
     it executes the first button press.
  5. Sit back and enjoy the endless loop of money and races, races
     and money!
     
  Make a separate sketch for each race you wanna run the loop on.
  
  by Wes Jurica 2011
 */

int buttonA = 10; // Button "A" on the controller
int up = 12; // Dpad Up on the controller
int down = 11; // Dpad Down on the controller

void setup() {
                                                                            
  pinMode(buttonA, OUTPUT);
  pinMode(up, OUTPUT);
  pinMode(down, OUTPUT);
  
  // set all pins to HIGH at start
  digitalWrite(buttonA, HIGH);
  digitalWrite(up, HIGH);
  digitalWrite(down, HIGH);
    
}
  
void loop() {
  
  delay(10000);
  
  digitalWrite(buttonA, LOW); // send button press for...
  delay(50); // .05 seconds
  digitalWrite(buttonA, HIGH); // release button press
  delay(60000); // wait for game to load...
  
  digitalWrite(down, LOW); // then send next command
  delay(50); // and so on...
  digitalWrite(down, HIGH);
  delay(1000);
  digitalWrite(down, LOW);
  delay(50);
  digitalWrite(down, HIGH);
  delay(1000);
  digitalWrite(down, LOW);
  delay(50);
  digitalWrite(down, HIGH);
  delay(1000);
  digitalWrite(down, LOW);
  delay(50);
  digitalWrite(down, HIGH);
  delay(1000);
  
  digitalWrite(buttonA, LOW);
  delay(50);
  digitalWrite(buttonA, HIGH);
  delay(2000);
  
  digitalWrite(buttonA, LOW);
  delay(50);
  digitalWrite(buttonA, HIGH);
  delay(20000);
  
  digitalWrite(up, LOW);
  delay(50);
  digitalWrite(up, HIGH);
  delay(1000);
  digitalWrite(up, LOW);
  delay(50);
  digitalWrite(up, HIGH);
  delay(1000);
  digitalWrite(up, LOW);
  delay(50);
  digitalWrite(up, HIGH);
  delay(1000);
  digitalWrite(up, LOW);
  delay(50);
  digitalWrite(up, HIGH);
  delay(1000);
  
  digitalWrite(buttonA, LOW);
  delay(50);
  digitalWrite(buttonA, HIGH);
  delay(3720000); // ENTER race duration in milliseconds (Round up
                  // to the nearest minute and then add a few extra
                  // minutes just in case. Then multiply times 60000)
  digitalWrite(buttonA, LOW);
  delay(50);
  digitalWrite(buttonA, HIGH);
  delay(1000);
  digitalWrite(buttonA, LOW);
  delay(50);
  digitalWrite(buttonA, HIGH);
  delay(1000);
  
  digitalWrite(buttonA, LOW);
  delay(50);
  digitalWrite(buttonA, HIGH);
  delay(20000);
  
}



It works great and I'll have my game back in no time. I'd show a video but it would just be me filming the menu of a video game. Not too exciting.

Here's some pics:
Image
Image
Image

On a side note, maybe HaD should add a newbie hack of the week feature... thoughts?
Last edited by nikescar on February 2nd, 2011, 1:55 pm, edited 1 time in total.
nikescar
 
Posts: 44
Joined: February 2nd, 2011, 12:08 am

Re: [Rookie Hack] Money Making Controller Hack for Forza 3

Postby wellernumber7 » February 2nd, 2011, 5:51 am

Very nice hack!

I hope you get your game money back soon.
wellernumber7
 
Posts: 84
Joined: January 27th, 2011, 3:54 pm

Re: [Rookie Hack] Money Making Controller Hack for Forza 3

Postby lance.johnson » February 3rd, 2011, 1:24 am

Gran Turismo 5 has a similar mode called b-spec and I was trying this hack for a ps3 controller. I opened the controller up and found the pins for the X button. This is where I am stuck. When I slap my volt meter between the power coming into the button and the ground on the battery it reads 2.5V. The battery is reading 4V. I am a noob when it comes to electronics but I was expecting the voltage to the button to be 4V and simply connecting it to ground would complete the connection and thus trigger the button. However, when I connect the button voltage to battery a 'right on direction pad' is triggered rather than the X button. When I connect the button voltage to the button's ground (not battery ground) I do get the X press. In theory I could just bridge the voltage coming to the button and the ground that the button uses to get X. I am just not sure how that circuit would look w/ my arduino. Not sure where to go from here but if anyone has suggestions I am all ears.

Lance
lance.johnson
 
Posts: 1
Joined: February 3rd, 2011, 1:07 am

Re: [Rookie Hack] Money Making Controller Hack for Forza 3

Postby nikescar » February 3rd, 2011, 3:31 am

I did a search for PCB pics of a PS3 controller and I came across this awesome site: http://www.slagcoin.com/joystick/pcb_wiring.html

There they have a ton of info on hacking controllers. Try this and this to see if your controller looks similar. If it does, solder a wire to the X location circled in blue and then plug that wire into pin 12 on your Arduino.

Then upload this code to your Arduino:
/*
  PS3 Button Test
 */

int buttonX = 12; // X on the controller

void setup() {
                                                                            
  pinMode(buttonX, OUTPUT);
  
  // set all pins to HIGH at start
  digitalWrite(buttonX, HIGH);
  
}
  
void loop() {
  
  digitalWrite(buttonX, LOW);
  delay(1000);
  digitalWrite(buttonX, HIGH);
  delay(1000);
  
}



Now you should be getting a alternating press/release for 1 second each.

I don't know too much about electronics either but this is my understanding of what's going on. The X button is powered by 3v. When the button is pressed, it connects to the ground thus allowing the current to flow. The controller detects this. When the Arduino is connected to the button we start of with the pin set to HIGH (on) and it is sending 5v to the button. The controller sees this as a normal unpressed button. To initiate a button press we set the pin to LOW (off) and it acts as a ground to let the current flow and the controller detects the button as pressed.

Note: Since you said that when you connected to the 4v on the battery terminal that you got a another button detected as pressed you might have to use a PWM pin and set it to around 127 (I'm guessing around 2.5-2.6v) for the unpressed condition and 0 for the pressed condition. Check out http://principialabs.com/arduino-pulse-width-modulation/ for more PWM info. I'm new to Arduino but that should work.
nikescar
 
Posts: 44
Joined: February 2nd, 2011, 12:08 am

Re: [Rookie Hack] Money Making Controller Hack for Forza 3

Postby neonpolaris » February 3rd, 2011, 7:30 am

You are pressing each button by pulling each button's pin low with an Arduino pin, but I see no ground connection between the controller and the Arduino. I guess that you are powering the Arduino from a USB port on the same console (getting a shared ground that way), or are just very lucky that it works.
neonpolaris
 
Posts: 7
Joined: January 28th, 2011, 7:20 am

Re: [Rookie Hack] Money Making Controller Hack for Forza 3

Postby nikescar » February 3rd, 2011, 7:38 am

That's exactly how it's setup. Should I wire into the controllers ground and connect that to the Arduino? I have a spare pin in the connector that's not being used.

edit:
It's actually being powered by my PC's USB port. If I need to change something do let me know.
nikescar
 
Posts: 44
Joined: February 2nd, 2011, 12:08 am

Re: [Rookie Hack] Money Making Controller Hack for Forza 3

Postby beamsjr » February 3rd, 2011, 8:48 am

Thats great, I have been running my b-spec in Gran-Tourismo with my arduino for a little while now. I used my wife's guitar hero guitar and stole the electronics out of it (She dosnt know).


I actually designed a board and am having it made from batchPCB now just for this, which will remove the need to use a controller to talk to the ps3 and will also be able to use it as an arcade controller if I ever decide to build one.
Attachments
Capture3.JPG
Here is the board I designed, Hopefully it will work....
(35.94 KiB) Downloaded 3975 times
Capture2.JPG
Here is a picture of my first board, its really hard to see anything because my iphone camera sux.
(35.81 KiB) Downloaded 3975 times
beamsjr
 
Posts: 14
Joined: February 3rd, 2011, 8:30 am

Re: [Rookie Hack] Money Making Controller Hack for Forza 3

Postby beamsjr » February 6th, 2011, 1:54 pm

Here is some better pictures of my adventure...
Attachments
GTAuto3.jpg
Sencond prototype, this time using HID requests instead of the PS3 Guitar hero board.
(84.82 KiB) Downloaded 3473 times
GTAuto2.jpg
(55.71 KiB) Downloaded 3473 times
GTAuto1.jpg
(67.62 KiB) Downloaded 3473 times
beamsjr
 
Posts: 14
Joined: February 3rd, 2011, 8:30 am

Re: [Rookie Hack] Money Making Controller Hack for Forza 3

Postby beamsjr » February 6th, 2011, 2:00 pm

I just got my boards in from batchPCB, waiting on a few parts to finish them up.
Attachments
GTAuto4.jpg
(48.87 KiB) Downloaded 3473 times
beamsjr
 
Posts: 14
Joined: February 3rd, 2011, 8:30 am

Re: [Rookie Hack] Money Making Controller Hack for Forza 3

Postby nikescar » February 7th, 2011, 6:40 am

Wow! Your project deserves it's own thread... with MORE DETAILS! What are some of the features/capabilities of your rig?
nikescar
 
Posts: 44
Joined: February 2nd, 2011, 12:08 am

Next

Return to Project Logs

Who is online

Users browsing this forum: No registered users and 3 guests