Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: XBOXPadMicro - A firmware that turns Arduino Micro (Leonardo) into an XBOX pad!  (Read 58445 times)

0 Members and 1 Guest are viewing this topic.

equlizer

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 363
  • Last login:November 17, 2019, 02:56:48 am
  • All your base are belong to us
I just found a Teensy 2.0 in my box of arcade parts.  Can i use this to program it?  I just want it to simulate a keyboard for my arcade.  Thx

johnnygal2

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 23
  • Last login:October 08, 2022, 03:16:04 am
  • I want to build my own arcade controls!
I just found a Teensy 2.0 in my box of arcade parts.  Can i use this to program it?  I just want it to simulate a keyboard for my arcade.  Thx
I don't think so. The pin mappings are different on the Teensy 2.0.

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9394
  • Last login:Today at 01:01:08 pm
  • Designated spam hunter
I just found a Teensy 2.0 in my box of arcade parts.  Can i use this to program it?  I just want it to simulate a keyboard for my arcade.  Thx
1. The XBOXPadMicro firmware is a gamepad for the XBox -- not a keyboard, not for PC.

2. Like the Micro, the Teensy 2.0 has a 32u4, but less input pins are available.

Most AVR boards label pins according to the port names.

Examples:
- "B0" (lower left on the Teensy) = "PB0" (lower right on the Micro in the yellow "AVR" oval)
- "C7" (lower right on the Teensy) = "PC7" (upper left on the Micro)

 


Scott

Automark

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 169
  • Last login:October 24, 2023, 03:55:08 pm
  • Arcade in Spain ?
Im totally new to Arduino, but if this is possible, is it also possible to program these boards, so they work like an ipac? Arduinos are much cheaper then ipacs or kades. And those cheap chino keyboard encoders are #@$@#$@

hm, first google hit https://www.arduino.cc/en/Reference/MouseKeyboard

bootsector

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 87
  • Last login:December 29, 2018, 12:48:52 am
  • I want to build my own arcade controls!
Im totally new to Arduino, but if this is possible, is it also possible to program these boards, so they work like an ipac? Arduinos are much cheaper then ipacs or kades. And those cheap chino keyboard encoders are #@$@#$@

hm, first google hit https://www.arduino.cc/en/Reference/MouseKeyboard

Here it goes: https://github.com/bootsector/PS3PadMicro

This is a generic HID joystick that works out of the box in several devices, including the Playstation 3.

Flashing procedure is pretty much the same documented in this topic for the XBOXPadMicro, except you need to change the .HEX file.

Attached .HEX file for your convenience.

EDIT: I have no freaking idea what an IPAC is, anyways, this firmware should get you going on several machines who aren't a classic xbox though.

equlizer

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 363
  • Last login:November 17, 2019, 02:56:48 am
  • All your base are belong to us
So once programmed we just guess as to which contact does what? (eg. up, down, left, etc)

EDIT:  I found out what does what for the Teensy 2.0.  I seem to be missing UP on the D-pad.  With the USB facing up on the left:  gnd, dpad left, left axis, dpad down, axis right and button10, button5, 1, 3, 4, dpad right, 7

right side: 5v, up axis, down axis, next 3 nothing?, button12, 11, 9, 8, 6 and below it button 2.  Some dont seem to do anything.  Is there any way to edit the hex file to add dpad up?
« Last Edit: February 12, 2017, 09:33:00 pm by equlizer »

baritonomarchetto

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 805
  • Last login:Yesterday at 02:42:27 am
Some Arduino boards can very easily simulate a PC keyboard (and mouse, and joystick), so the answer is YES, it is a cheap alternative to ipac (or jpac with some additional component).
To make the work easy, you are in the need for an arduino leonardo or pro micro (or DUE, if 20 inputs are not enought for your application)
« Last Edit: February 13, 2017, 12:43:00 am by baritonomarchetto »

equlizer

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 363
  • Last login:November 17, 2019, 02:56:48 am
  • All your base are belong to us
Im also looking into the Mega 2560.  Trying to figure out how to emulate a KB press on it right now.  Lots of inputs and i can get them for $15 inc shipping.  I think its the equiv to the atmega16u2?

bootsector

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 87
  • Last login:December 29, 2018, 12:48:52 am
  • I want to build my own arcade controls!
So once programmed we just guess as to which contact does what? (eg. up, down, left, etc)

EDIT:  I found out what does what for the Teensy 2.0.  I seem to be missing UP on the D-pad.  With the USB facing up on the left:  gnd, dpad left, left axis, dpad down, axis right and button10, button5, 1, 3, 4, dpad right, 7

right side: 5v, up axis, down axis, next 3 nothing?, button12, 11, 9, 8, 6 and below it button 2.  Some dont seem to do anything.  Is there any way to edit the hex file to add dpad up?

Simply follow the diagram at the first post for the XBOXPadMicro and apply some differences:

:. Y, B, X, A become triangle, circle, square, cross
:. L and R become L1 and R1
:. Black and White become L2 and R2
:. Back becomes Select
:. Start + Select triggers PS3 Home Button

Edit: Added reference image:

« Last Edit: February 13, 2017, 02:31:00 am by bootsector »

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9394
  • Last login:Today at 01:01:08 pm
  • Designated spam hunter
Im also looking into the Mega 2560.  Trying to figure out how to emulate a KB press on it right now.  Lots of inputs and i can get them for $15 inc shipping.  I think its the equiv to the atmega16u2?
It has an ATMEGA16u2 chip, but that board uses it for USB communication.

The main processor is the ATMEGA2560.

It won't work with KADE Loader -- only Minimus boards will work with Loader's keyboard firmwares.



I seem to be missing UP on the D-pad.
According to Bruno's diagram, it should be on PC7 (upper left of the Micro) ==> C7 (lower right of the Teensy).




Scott

bootsector

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 87
  • Last login:December 29, 2018, 12:48:52 am
  • I want to build my own arcade controls!
In case someone wants to test a XInput encoder:

https://github.com/bootsector/XInputPadMicro
« Last Edit: November 07, 2017, 03:23:40 am by bootsector »

fablog

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 339
  • Last login:February 18, 2024, 10:30:06 pm
Thanks a lot bootsector. I'm a noob with this kind of project but I will try it!

Envoyé de mon LEX722 en utilisant Tapatalk


fablog

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 339
  • Last login:February 18, 2024, 10:30:06 pm
In case someone wants to test a XInput encoder:

https://github.com/bootsector/XInputPadMicro
Bootsector do you have instructions to install it into an Arduino micro? I bought 2 but I couldn't flash them. I'm a total noob for this kind of things. Thanks

Envoyé de mon LEX722 en utilisant Tapatalk
« Last Edit: October 19, 2018, 08:55:44 pm by fablog »

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9394
  • Last login:Today at 01:01:08 pm
  • Designated spam hunter
Bootsector do you have a guide to install it in an Arduino micro? I bought 2 but I couldn't flash them. I'm a total mob for this kind of things. Thanks

Have you tried ArduinoBuilder?
Programming the Micro can be a bit finnicky sometimes.

You might want to use ArduinoBuilder to load the "XBOXPadMicro.hex" firmware file.

There's a simple 3-step tutorial here.
For step 3, select the COM5 (COM6? COM7?) port instead of the COM1 port.


Scott
« Last Edit: October 19, 2018, 09:01:22 pm by PL1 »

fablog

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 339
  • Last login:February 18, 2024, 10:30:06 pm
Pl1 I'm trying to flash the XInputPadMicro not the XboxPadMicro. On the Git I don't see any .hex so I can't exactly follow the instructions he gave. I don't really know where to start really. Do I need to compile something?
« Last Edit: October 19, 2018, 09:26:37 pm by fablog »

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9394
  • Last login:Today at 01:01:08 pm
  • Designated spam hunter
The compiled firmware hex file is attached to the November 7th post you quoted earlier.

Here's a link to the .zip file containing the firmware .hex.

http://forum.arcadecontrols.com/index.php?action=dlattach;topic=152687.0;attach=363424

Use ArduinoBuilder to load that .hex file on the Arduino Micro -- different filename but same 3-step procedure.


Scott
« Last Edit: October 19, 2018, 09:58:09 pm by PL1 »

fablog

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 339
  • Last login:February 18, 2024, 10:30:06 pm
PL1 I see only Com3 and USBASP. I saw a green light flashin but I didn't succeed to flash it:
 "[FLASHING] Forcing reset using 1200bps open/close on COM3... no new port found"

 Do I need to flash a bootloader first? My arduino micro is a chinese knock off.
« Last Edit: October 19, 2018, 11:39:00 pm by fablog »

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9394
  • Last login:Today at 01:01:08 pm
  • Designated spam hunter
There should be a bootloader installed, even on a chinese knockoff board.

When you press the reset button on the Arduino Micro, it should go into bootloader mode for about 8 seconds.

During that time, does a different COM port appear?  If so, use that port.

If that doesn't work, try the process described here to load a simple sketch like "blink" then load the firmware.

I usually only need to do this process after successfully loading a .hex firmware like XBOXPadMicro or StefanBurger's Illuminated Spinner.


Scott

fablog

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 339
  • Last login:February 18, 2024, 10:30:06 pm
Thanks for your helPl1 I found the right tool to flash this model. Here what I read on reddit:
Quote
Most of the hex uploaders like the Freematics Arduino Builder are actually quite bad at handling Atmega32u4 uploads because most of them were designed for AVR109 with the butterfly bootloader part tacked on.

Use https://github.com/christophediericx/ArduinoSketchUploader if you are uploading hexes and uploading to Leonardos or Pro Micros. don't short the reset pins, just upload with the program.

And.....It worked!  ;D

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9394
  • Last login:Today at 01:01:08 pm
  • Designated spam hunter
Thanks for your helPl1 I found the right tool to flash this model. Here what I read on reddit:
Quote
Most of the hex uploaders like the Freematics Arduino Builder are actually quite bad at handling Atmega32u4 uploads because most of them were designed for AVR109 with the butterfly bootloader part tacked on.

Use https://github.com/christophediericx/ArduinoSketchUploader if you are uploading hexes and uploading to Leonardos or Pro Micros. don't short the reset pins, just upload with the program.

And.....It worked!  ;D
Glad to (indirectly) assist.   :cheers:

Looks like ArduinoSketchUploader might be a good alternative for anyone having problems loading .hex files with ArduinoBuilder.   ;D


Scott

fablog

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 339
  • Last login:February 18, 2024, 10:30:06 pm
For a reason I can't explain, when I plugged my Arduino, Windows 10 showed me a Com4 used. 5 seconds later it showed me Com3!? ArduinoSketchUploader automatically detected the right Com: Com4. ArduinoBuilder didn't let me change the Com.
« Last Edit: October 20, 2018, 10:15:21 am by fablog »

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9394
  • Last login:Today at 01:01:08 pm
  • Designated spam hunter
For a reason I can't explain, when I plugged my Arduino, Windows 10 showed me a Com4 used. 5 seconds later it showed me Com3!? ArduinoSketchUploader automatically detected the right Com: Com4. ArduinoBuilder didn't let me change the Com.
The changing port number is normal behavior.

- When you plug in the Arduino, it goes into bootloader mode for a few seconds. (COM4)

- After that, it reverts to normal mode. (COM3)

- Bootloader mode port number is one higher than normal mode.

In most cases, the ArduinoBuilder GUI works perfectly for loading a .hex the first time, but it can be finnicky when reprogramming.

Haven't tried ArduinoSketchUploader yet, but it looks like it can put the board into bootloader mode, auto-detect the COM port, and upload a .hex file -- all three via a single command line command.

    Pro: Should be easy to write a .bat file for uploading .hex firmwares like Bruno's XBoxPad or StefanBurger's Illuminated Spinner.   :)

    Con: Doesn't appear to support EEPROM uploads like AVRDude does, so it won't work with miniArcade 2.0 firmwares.   :(

Different tools for different jobs.  Choose the tool suited to the job you are doing.   :cheers:


Scott

fablog

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 339
  • Last login:February 18, 2024, 10:30:06 pm
Guys the verdict about this controller is very positive. Windows 10 see an XBox 360 controller and it work with Cuphead and MKX. No more Vjoy for me. For now, I will keep my ipac UIO connected but I will see if I still need it.

Envoyé de mon LEX722 en utilisant Tapatalk


fablog

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 339
  • Last login:February 18, 2024, 10:30:06 pm
PL1 you seem's to know a lot more than me about Arduino. I tried to put a switch to the usb cable connected to my Arduino micro. I connected the switch to the red cable (5v). I can see that in Windows,  the  xinput Arduino controler disconnect/connect without any problem when I activate the switch. But I still see a led activity  when the  switch is off!? Maybe the Arduino take power from the arcade buttons because there are still connected to the Ipac and my usb U360 are connected to the Arduino. Or the red cable wasn't the VCC. Moreover, when I turn on the switch, the red light flash slowly and after maybe 3s the green light turn on too. I don't see that happening when I connect/disconnect the Arduino with a non modified USB cable: all LEDs turn on immediately. Do you think my modified cable could damage the Arduino? Thanks!

Envoyé de mon LEX722 en utilisant Tapatalk

« Last Edit: October 22, 2018, 10:03:39 pm by fablog »

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9394
  • Last login:Today at 01:01:08 pm
  • Designated spam hunter
The red wire should be 5v unless you got one of the cheap cables with non-standard wire colors.

You can do a continuity test from Pin 1 on the USB A cable to the 5v pin on the Arduino Micro to verify that the switch is on the correct wire. (Test with no power applied . . . unless you want to fry your multimeter.   >:D)





There probably is some voltage leakage from the IPac ports to the Arduino ports, but it probably won't cause any damage.
(Disclaimer:  I am not an electrical engineer and am not 100% sure how you've got everything connected.   :dunno)

If you want to prevent power back-feeding from one board to another through the button microswitch wiring, you can use diodes wired like the "Shazaaam! + X (one click)" switch  -- one diode + "Input X" wire to the IPac input and one diode + "Shazaaam!" wire to the Arduino input for each microswitch.

Any common "1N4" series diode like 1N4001 should be suitable for this application.




Scott

fablog

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 339
  • Last login:February 18, 2024, 10:30:06 pm
Thanks Scott. I did more test with a switch and the result is not so good. When I power on the Arduino with my switch  it takes too much time to discover the Xinput controller. When I unplug and plug the USB cable the discovery is way faster. I will try this item to cut the data and power at the same time in the USB cable: https://abra-electronics.com/robotics-embedded-electronics/arduino-boards/dsk-00042-digispark-programming-tool-dsk-00042.html?sl=en
« Last Edit: October 29, 2018, 11:00:56 pm by fablog »

The 80s Man

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 125
  • Last login:March 21, 2019, 03:20:56 pm
  • I'm working on a Crystal Castles MAME Cab
I'm guessing these boards are small enough to fit inside of an original NES, SNES, N64, Atari and Genesis controller, thus making it possible to modify a controler of your choice to work with the original xbox.
« Last Edit: November 08, 2018, 03:35:46 pm by The 80s Man »
Over Four Years and I'm still under 150 Posts (Date Registered:  January 27, 2005, 10:17:25 PM )

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9394
  • Last login:Today at 01:01:08 pm
  • Designated spam hunter
I'm guessing these boards are small enough to fit inside of an original NES, SNES, N64, Atari and Genesis controller, thus making it possible to modify original controlers to work with emulators available on a modified xbox.
You might be able to mod some of those controllers like that, but AFAIK that wasn't Bruno's plan for the XBOXPadMicro.

It is usually used to connect arcade-style joysticks and buttons to an XBox.

If you want to use original (unmodded) console controllers with an XBox, check out the KADE miniArcade 2.0 and the associated KADE Multi-Out expansion board.

Bruno has also developed the RetroPad32 -- a follow-up to the (several-years-overdue-delivering-european-Kickstarter-rewards :embarassed:) KADE miniConsole+.


Scott
« Last Edit: November 08, 2018, 03:45:15 pm by PL1 »

imp

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 9
  • Last login:March 05, 2019, 06:05:10 am
  • I want to build my own arcade controls!
In case someone wants to test a XInput encoder:

https://github.com/bootsector/XInputPadMicro

I flashed this hex file on a cheap Arduino clone with ATMega32u4. Everything went fine. The ATmega32u4 is now showing up as a Xbox 360 controller, but I'm missing some controller functions. I don't have a 'left analog up/down' and no 'digital left/up'. This cheap Arduino clone has only 12 pins left and 12 pins on the right side. The A0, A1, A2 and A3 dont show up as Xinput. These pins show up as Direct Input, resp. Y-axis plus, Y-axis minus, X-axis plus and X-axis minus. Is this normal behaviour or is there any way to use the missing controls as one of the A0-A3 pins?

imp

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 9
  • Last login:March 05, 2019, 06:05:10 am
  • I want to build my own arcade controls!
I found another hex file, here https://github.com/bootsector/XInputPadMicro/issues/2#issuecomment-401362957 with A0 to A3, but now I'm having trouble reflashing my Pro Micro. The COM4 port disappears shortly after reset, so I can't upload any new hex files.

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9394
  • Last login:Today at 01:01:08 pm
  • Designated spam hunter
I found another hex file, here https://github.com/bootsector/XInputPadMicro/issues/2#issuecomment-401362957 with A0 to A3, but now I'm having trouble reflashing my Pro Micro. The COM4 port disappears shortly after reset, so I can't upload any new hex files.
Earlier in this thread, fablog recommended using ArduinoSketchUploader since it does a reset via software, auto-detects the COM port, and reprograms the board -- there's no need to find the correct port and manually reset just before reprogramming.


Scott
« Last Edit: December 24, 2018, 04:57:52 pm by PL1 »

imp

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 9
  • Last login:March 05, 2019, 06:05:10 am
  • I want to build my own arcade controls!
Earlier in this thread, fablog recommended using ArduinoSketchUploader since it does a reset via software, auto-detects the COM port, and reprograms the board -- there's no need to find the correct port and manually reset just before reprogramming.

Yes, I used ArduinoSketchUploader. Before I first flashed it, I got a COM port. After flashing I don't have a COM port, only a Xinput controller. Now when I try to upload, I get an error "Specified COM port name '' is not valid". When I first reset it, I get another error "Port not found"
Next thing I'll try, is using a different computer.

imp

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 9
  • Last login:March 05, 2019, 06:05:10 am
  • I want to build my own arcade controls!
I got a little bit further. In Arduino IDE I uploaded Blink, so this way the Pro Micro wasn't a Xinput device anymore and the COM port stayed active. I was then able to upload a different hex file (this one I mentioned earlier https://github.com/bootsector/XInputPadMicro/issues/2#issuecomment-401362957) with ArduinoSketchUploader. With this other hex file I got my digital right, digital left, digital down and digital up. Only buttons I'm now missing are back and start  :( 

I'm at a loss again ??? Are there perhaps more hex files I can try? Or should I try to alter the source code and compile a configuration specifically for my Pro Micro?

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9394
  • Last login:Today at 01:01:08 pm
  • Designated spam hunter
I got a little bit further. In Arduino IDE I uploaded Blink, so this way the Pro Micro wasn't a Xinput device anymore and the COM port stayed active. I was then able to upload a different hex file
Glad you got your board to reprogram, sometimes they can be a bit finnicky.   :banghead:

Pro Micro
That's the problem.

The Pro Micro board doesn't have connections for seven ports.
(Image is from the miniArcade 2.0 thread.  Ignore the orange and purple.)



Dropped an e-mail to Bruno since he hasn't stopped by the forums recently.

Hopefully he can help you with advice on modding the source if you choose to go that route.


Scott

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9394
  • Last login:Today at 01:01:08 pm
  • Designated spam hunter
Here's Bruno's reply to my e-mail.  Hope it helps.   :cheers:

Quote
This fork from kuwoh should do it:

https://github.com/kuwoh/XInputPadMicro

Taking a look at lines 77 and 78 from:

https://github.com/kuwoh/XInputPadMicro/blob/master/main.c

It looks like start and back (select) are mapped to pins B 4 and B5, which seem available in the Pro Micro board. Are they not working?

I have compiled the hex and attached it to this email.

Let me know!

Cheers,

Bruno


Scott

imp

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 9
  • Last login:March 05, 2019, 06:05:10 am
  • I want to build my own arcade controls!
Here's Bruno's reply to my e-mail.  Hope it helps.   :cheers:

Scott

Thanks for all the time you're putting in this. But the attached hex file was the same as the one here. Result: no 'start' or 'back' buttons. To answer Bruno's question, B 4 and B5 are working:
B 4 = pin 8 = right trigger (Windows button 8 )
B5 = pin 9 = left trigger (Windows button 7)

There are three pins, however, that don't do anything with the hex from kuwoh, but that do work in the original hex from bootsector:
kuwoh
B1 = pin 15 = nothing
B3 = pin 14 = nothing
B2 = pin 16 = nothing

bootsector
B1 = pin 15 = left analog left
B3 = pin 14 = left analog right
B2 = pin 16 = digital down

If I somehow can change two of those three pins in start and back, I would have a perfectly functioning Xinput controller. If it's not possible to change those three, I could maybe change two other pins (only pins that give movement to the right analog stick):
kuwoh
C6 = pin 5 = right analog right
E6 = pin 7 = right analog left

bootsector
C6 = pin 5 = left bumper (Windows button 5)
E6 = pin 7 = right trigger (Windows button 8 )

How difficult is it, to change the source code and compile the hex myself?

plazma

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 26
  • Last login:April 11, 2021, 11:37:54 am
  • I want to build my own arcade controls!
Why not use the KADE miniArcade 2.0 firmware instead and the Windows configuration tool?
http://forum.arcadecontrols.com/index.php/topic,154126.0

imp

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 9
  • Last login:March 05, 2019, 06:05:10 am
  • I want to build my own arcade controls!
Why not use the KADE miniArcade 2.0 firmware instead
But then I won't have a Xinput device. With a Xinput controller I can simply add modern games (SFIV, SFV, Mortal Kombat X, etc) to my bartop. 

I downloaded the source from kuwoh and made a small change to see if it gives me a 'start' button:
line 77: pad_start =  !bit_check(PINB, 4);
Changed to: pad_start =  !bit_check(PINB, 2);

Now, how do I compile this? This would be my first time compiling anything  ???

bootsector

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 87
  • Last login:December 29, 2018, 12:48:52 am
  • I want to build my own arcade controls!
You need to setup the AVR toolchain first.

If you are on Linux or Mac OS:

http://maxembedded.com/2015/06/setting-up-avr-gcc-toolchain-on-linux-and-mac-os-x/

If you are on Windows:

http://fab.cba.mit.edu/classes/863.16/doc/projects/ftsmin/windows_avr.html

After toolchain is installed, running make on the source directory should get you a .HEX file after a successful compilation.

imp

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 9
  • Last login:March 05, 2019, 06:05:10 am
  • I want to build my own arcade controls!
Nice, it works  :applaud: 
I changed two lines in the bootsector source
pad_up = !bit_check(PINC, 7); (changed to F7)
pad_left = !bit_check(PINB, 0);  (changed to F5)
Now I have a working D-pad! The analog sticks are incomplete, but I wasn't planning on wiring them.

Thank you, for all the time you put in this  :)