How-To: Integrate SF4 in a MAME Cab

How to Modify Sf4 to integrate with your MAME Arcade cabinet.

SF4 only allows one person to use the keyboard as a controller, the 2nd player must use a controller plugged into the computer. This poses a huge problem for thos eof us that have an arcade cabinet and use a keyboard encoder such as an iPac. Here is how to make it work so that you can play 2 players, and have the game start without prompting from your Arcade cabinet front end software.

EDIT: Here is an easier, faster, and more elegant solution, (Tutorial by DeLusional29 from ARCADECONTROLS.COM) THE BEST PART IS THAT THIS WORKS WITH Win7/Vista!

(Old PPJOY method kept for posterity)

Hello all. I just thought I?d share some great news! A member of Capcom-unity forums has posted a patch that allows 2 player keyboard control in Street Fighter IV. PPJOY no longer required! (Thanks to lingpanda for the link) It is based on forum user RacerS? X360 emulator which was later modded by user Viirus. Capcom-unity forum user pkt has based his SFIV patch on these previous works. See here for more info:

However, I have made a quick tutorial on how to get it working (for those using PPJOY, please make sure it is not running):

  1. Download the patch attached to the end of this post ( It contains both the dll and ini files that you need. The source files are also included for your convenience.

  2. Unzip the file and copy the two files located in the ?dll? folder (x360kb.ini and xinput1_3.dll) into your Street Fighter IV directory next to the executable for the game.

  3. Edit the x360kb.ini file to match your keyboard layout (see readme.txt for usage) (sample listed below for default ipac and X-Arcade configs).
    3a) IMPORTANT: When editing the x360kb.ini file, the SF layout follows the following sequence:
    A=(light kick)
    B=(medium kick)
    X=(light punch)
    Y=(medium punch)
    Right Shoulder=(heavy punch)
    Right Trigger=(heavy kick)

  4. Run Street Fighter IV (no need to configure joysticks in the first option screen)

  5. Make sure your Options for the ?Button Config? and ?Keyboard Settings? match exactly to the following. IMPORTANT!: Keyboard setting MUST be set to ?none?

Sample x360kb.ini (for ipac MAME defaults)

A=Left Shift
X=Left Control
Y=Left Alt
Right Shoulder=Space
Right Trigger=X
D-Pad Up=Up
D-Pad Down=Down
D-Pad Left=Left
D-Pad Right=Right

D-Pad Up=R
D-Pad Down=F
D-Pad Left=D
D-Pad Right=G
Right Shoulder=Q
Right Trigger=K

Sample x360kb.ini (for X-Arcade Mode 1 MAME defaults)

A=Left Shift
X=Left Control
Y=Left Alt
Right Shoulder=Space
Right Trigger=X
D-Pad Up=num8
D-Pad Down=num2
D-Pad Left=num4
D-Pad Right=num6

D-Pad Up=R
D-Pad Down=F
D-Pad Left=D
D-Pad Right=G
Right Shoulder=Q
Right Trigger=left bracket

Sample x360kb.ini (for Hotrod SE MAME defaults)


A=Left Shift
X=Left Control
Y=Left Alt
Right Trigger=x
Right Shoulder=Space
D-Pad Up=num8
D-Pad Down=num2
D-Pad Left=num4
D-Pad Right=num6

D-Pad Up=r
D-Pad Down=f
D-Pad Left=d
D-Pad Right=g
Right Shoulder=q
Right Trigger=Left Bracket

Known bugs: The default setting for the ipac has Player 2 button 1 as the letter A. As such, during the menus, the letter A is hard coded to Player 1?s select button in the menus (A = select B = Back). So both players can press the letter A during menus. No biggie in my opinion.

Hope you guys found this tutorial easy. A lot simpler than using PPJOY (which only worked in a 32 bit OS).

All the info here was used with permission from Capcom-unity forum member pkt. Thanks again! I have simply compiled it into an easy to understand, “one-stop” document.
Although this workaround is great, I still encourage everyone to send Capcom a note. I’m sure if they receive enough requests, they cannot ignore re-examining the possibility of a patch.


or here at X-Arcade’s website:


What you need:

-An arcade cabinet with a computer inside that is capable of playing SF4 RUNNING WINDOWS XP**
-Front end software already configured
-an encoder board for your Joysticks already configured.
-A copy of Street Fighter IV for the PC
-SF4 No-CD crack (I’m not putting a link but it’s available at gamecopyworld)
-a little patience

First, I reconfigured my entire Mapping for my Joysticks in order to have My Weak Kick button be the “A” key, and the Medium kick as the “B” key. The reason is that no matter how you map, or configure, the Windows LIVE menu system still recognizes A keyboard input as “A” on a controller, even after we setup the virtual controllers. and I like having everything be as integrated as possible, seeing my friends online is a cool little addition, even if I can’t send them a message with my joystick :slight_smile:

On the the procedure:

  1. Install all the latest Video card drivers and CPU optimization software for AMD cpu’s

2)Install SF4, it takes FOREVER.

  1. Make sure the game works with just the keyboard, try it out, it’s lame, but we don’t want to get into troubleshooting other problems here. After it is working, I recommend downloading and installing the NO DVD CRACK because the spinup and security check time gets annoying when doing all of this. Read the directions in the download’s README file, and remember to backup the original EXE and Scan the thing with a virus scanner before you use it just to be safe!

  2. Install PPJOY

  3. After it installs find it on your Start Menu under PARALLEL PORT JOYSTICK and run the CONFIGURE JOYSTICKS tool.

5)Click ADD to add Controller 1, click ADD again to confirm.

  1. You should see it listed as PPJOY VIRTUAL JOYSTICK1 in the CONFIGURED JOYSTICKS window. At this time a WINDOWS HAS DETECTED A NEW DEVICE window will pop-up, so have it search automatically for the drivers and it will install them. (if it says they are unsigned, just click CONTINUE ANYWAY and let it install)

  2. Repeat step #5 and then Step #6, only this time it will add CONTROLLER 2 and it will be listed as PPJOY VIRTUAL JOYSTICK2

  3. Close the PPJOY CONFIGURATION utility. Now you have 2 Virtual Controllers installed.

  4. Find PARALLEL PORT JOYSTICK in your start menu again, and run the PPJOYKEY tool.

  5. From this screen you need to map out all of the buttons you want for Joystick #1. HINT: BUTTON1 should be the A key, Button2 should be the B key, and BUTTON8 (START in SF4) should be whatever is your 1P button, 3-7 and the directions are up to you and your configuration.

  6. After you have the buttons mapped out, click SAVE .INI and find a place to save the file, I recommend just saving it in the SF4 folder. Name it SF4JOY1.INI
    (at this time you can start Street Fighter 4 and you should be able to play with your Arcade Joysticks on the 1P side)

  7. at the top of the screen there is a drag down box called JOYSTICK DEVICE, click it and drag it down to your VIRTUAL JOYSTICK2

  8. Repeat step #10, this time none of the buttons need to be anything specific because only the first player is going to drive the menu system. Repeat Step #11 but this time name the file SF4JOY2.INI and save it in the same folder. Click CLOSE to close the PPJOYKEY tool.

  9. Install AUTOHOTKEY

  10. after you install it, it will ask if you want it to create a sample script, click YES and it will open your text editor with a sample script in it. Erase all of the text, and copy the following script:

After you copy that text into the editor, Save it in your Street Fighter 4 folder as SF4STARTUP.AHK


What that script does is a number of things necessary for this to be launched smoothly, firstly, it creates a big black screen to hide what it doing in the background, then it opens 2 instances of PPJOY, loads the INI files for the 1P side and 2P side, starts the SF4 Launcher program, then it finally Presses ENTER to start the game. It also is set up so that when you press the ESCAPE command on your keyboard or joystick, it closes the game, PPJOY, and Autohotkey. Groovy huh?

So now test it by double clicking on the SF4STARTUP.AHK file you saved earlier.

If all goes well you should see black for a couple seconds, then the capcom logo and the game will start, and you should be able to play with both Joysticks now. You may have to configure the keys in game, but that’s no biggie.

*IF IT HANGS AT THE BLACK SCREEN SOMETHING IS WRONG IN THE BACKGROUND. You’ll need to press CTRL-ALT-DELETE and access task manager in order to regain control of the machine, and shutdown the HSHHIDE process, and then you should be able to see what the problem is. The most common problem is the path is incorrect to the INI files for PPJOY which will cause it to hang. To help with trouble shooting you can edit the script and comment out the following line by adding a ; to the front so it looks like this

so you can see what’s going on.

That is the hard part, after it is all working you can compile the SF4STARTUP.AHK as an EXE then just go to the control panel of your Front end software and point it to C:\PROGRAM FILES\CAPCOM\STREETFIGHTERIV\SF4STARTUP.EXE and it should launch from your Arcade front end no Problem.

BOOM! have fun folks.

Awesome, thanks! I installed SF4 on my MAME cabinet and was disappointed the game didn’t support 2 players on keyboard. I’ll give this a shot!

Thanks for posting this.

Thank you, SO VERY MUCH

could you upload a custom exe that will just launch the game bypassing launch or configure screen ?

as my sticks are alread configured in game, so i can direct my front end to let me play sfiv without going to the launch menu and then pulling out my mouse to click launch.

thank you

any 1?


just read my OP then remove the parts that have to do with PPJOY in the script.

its easy man autohotkey has a website you know, with directions on it :slight_smile:

I think my post was sufficient, I’m not going to jiggle your wang after you urinate :wink:

I spent 3 hours making this work/writing the tutorial, you can spend 20 minutes playing with autohotkey.

Thanks for the info, I’m going to give this a try this week.

note that if you buy SF4 through Impulse:

you don’t need the CD and you don’t need a crack to get around it

then again, given the ridiculous shenanigans we’re getting away with using cheatengine already, I don’t think Capcom will notice anyone putting on a no-cd hack

SendMode Input
SetWorkingDir %A_ScriptDir%
Blockinput on
SetBatchLines -1
Run, SF4Launcher.exe, , Max
Send, {enter}
Blockinput off
Process, WaitClose, StreetFighterIV.exe
Process, Close, StreetFighterIV.exe
sleep 200

that should do the trick i dont have to press enter now thanks budd

Long-time SRK visitor, first time posting…

Good info, Mekishiko. One quick fix for everyone though. Make sure to add “ExitApp” after “Process, WaitClose, StreetFighterIV.exe” like so:

Otherwise, if you exit using “Quit” in the menu, the game will close and you’ll be staring at a black screen until you also press ESC.

Specifically because of SF4, I finally replaced my aging I-PAC/4 with a gamepad encoder to avoid the whole mess with PPJoy. I can definitely recommend that option too if you don’t mind spending the money and you were considering a new encoder anyway.

Bloodshed thanks for the tip, I think I fixed that in mine but i forgot to update the post, so, now it’s updated!

what encoder did you get?

This is all working except for one thing.

I can’t get ppjoy to emulate the start button. You mentioned in your post the start button is button 8. I set my white start buttons on my arcade up for both joystick 1 and joystick 2, but when I go into vs mode it says “Press start on the controller you wish to use” and when I hit the button I assigned to start for player 2, nothing happens.

I even tried setting all the buttons in ppjoy to the button I want to use for start, nothing. It looks like PPjoy isn’t emulating the start button at all. Without that button, I can’t start a player vs player match. How do I get this to work?

I’ve also got other issues which may be related.

I have a slikstik cabinet and slikstik controller. It’s setup like this:

…left…right…7 H 9
…down…0 Z X

…D…G…A S Q
…F…W I K

Player 2 light punch is A, and player 1 medium punch is H. In the game, even with all keyboard buttons disabled, H will try to back you up a menu. During character select, A selects a character for player 1. So P2 can hit A and pick player 1’s character, lol.

I know this is a result of the way my joystick is setup and you mentioned reconfiguring it above to make this work, but I thought I’d mention it to make sure this isn’t causing my start button issue.

I have a 4 player control panel so I got 2 A-PACs. Each encoder actually shows up as 2 gamepads with 16 inputs per player. Works great with SF4. I had a friend over last night for verses.

I was looking at the GP-Wiz but I liked how the A-PAC actually splits into 2 gamepads (necessary for SF4 anyway) on a single USB and the it can support analog joysticks if I decide later.

My only complaint about the A-PAC is that I hate the shift function. P1 start shifts P1 and P2 controls. So, you can screw up your opponents controls by pounding start. Apparently P1 start is only supposed to shift P1 and P2 start shifts P2 so they’re looking into the problem for me. I’m supposed to get new firmware to fix it.

Otherwise, I could recommend it!

I’m not actually using PPJoy but maybe I can help.

You have your controls mapped in your post but what about the P1 and P2 start? What keyboard keys are those buttons? I would assume P1 is “1” and P2 is “2” and you’ve mapped these to gamepad button 8 in PPJoy? Is that how it shows up in control panel > game controls with PPJoy running?

Next, you have to worry about SF4 mapping. Because SF4 is literally a direct port of the 360 version, you have to map your “gamepad” as a 360 controller. This might be the issue. In the SF4 Launcher, use the Controller Settings option and map your gamepad button 8 (mapped to keyboard “1”) as 360 “Start”.

I didn’t even know about the controller config in the launcher, I overlooked it. I was configuring all the controls in game.

I opened that up, left everything set how it was, closed it, and now my start buttons work. Weird.

However, I had left shift on player 1 and right shift on player 2 bound to focus attack. They were working before, now they don’t… No idea why.

At least I can play now. I still have the weird issue of the player 2 a button selecting player 1 and player 2’s character but I can’t do anything about that. I can just tell whoever plays it player 1 needs to pick first.

Whatever I assign to LT and RT in game doesn’t work now. On the launcher controller config screen they are listed as being Z and -Z.

Ok, I just had to configure Z Axis - and Z Axis +, now my LT and RT buttons work.

For anyone else out there doing this, in PPjoy, using the standard controller config from the launcher, you need to configure buttons:

Z Axis -
Z Axis +

skip intro screens and main menu?

all okei with this authotkey script, thanks but a question

how you can skip intro screens and main menu? and go to the one player arcade mode automatically? the first screen of “SF4Launcher.exe” is easy to send return of enter key stroke, but under the game is difficult

the sequens of key strokes is:

wait until the game is fullscreen and ready

escape, escape, escape, escape (video intro), return(, return (skip window of windows live) , return (enter arcade mode),return(difficult) and it is all

but in the game, i cannot send keystrokes by software. I try with autohotkey and visual basic 6 sp6 with the instructions “keybd_event” but nothing, i dont have good results…

anyone have a idea? a answer? thanks :slight_smile:

pd: sorry by my english

Has anybody had problems with some button combinations not working? Mine’s hooked up via J-PAC to the cabinet. It all works great, except I can’t get buttons 5 and 6 to work together on the player-2 side?

Found this out while trying Chun-Li’s ultra. Tried out some of her EX moves and I can use 4 and 5 together, 4 and 6 work too, but just can’t use 5 and 6. Any thoughts?