Gaming GBA as GameCube Controller

Aliogeek

Well-Known Member
OP
Member
Joined
Mar 29, 2013
Messages
93
Trophies
1
XP
1,577
Country
France
Hello everybody !

Required hardware :
- 1 GBA/GBA SP
- 1 GBA to GCN Cable
- 1 FlashCard running the program to make the GBA looking like a GC Controller

I have made some edits to the original program that was made by EXTREMSCORNER (Many thanks to him !). The original source code can be downloaded there : https://github.com/ExtremsCorner/gba-as-controller

23/11/2019 :
- It's now on GitHub (with a pre-compiled binary) : https://github.com/CapitaineBidouille/gba-as-controller
- Many improvements. Added an hybrid game profile system. Profiles hardcoded should have no impact on timings/performance as they are just a simple switch. Game profile builder is available but might break compatibility with some GC adapters.

Changelog of my version :
- Added the possibility to select a game profile before start. You can add your own profiles by editing the source code and compile the program again. There is already some profiles that i've made for the games I play with (Mario Kart 8 Deluxe/Smash Ultimate/Mario Kart Double Dash).
- Show all input presses, and the number of simultaneously pressed buttons
- Cleaned the code a bit

23/06/2019 version changelog :
- You can now choose the timer0 value at launch. It can be useful to make the program work with some third party controller adapters. 3.99 microseconds is the default value, which works with Nintendo and Mayflash controller adapter.
- Removed input presses printing. It was causing timer desync, consequently the compatibility with many controller adapters (except mine, which is one from MayFlash :mellow:) was broken.

09/07/2019 version changelog :
- Added a new game profile : New Super Mario Bros (works for Mario Maker 2/New Super Mario Bros U Deluxe)
- Added a game profile builder, to map GBA <==> GC keys
- Input presses are showed (again !), this time without causing any regression
- Improved timer0 choice at launch : possibility to define a completely custom coefficient, between 50 and 1000. Default is 67 and should work in most cases.
- Modifications to the console, in order to make everything look nicer and give more informations to the user
- Added a softreset key combo : A+B+SELECT+START to change game profile fastly without having to load the program again
- Code cleanups

11/07/2019 version changelog :
- Many code cleanups
- Fixed timing regressions. Should now be equals again with the original program.
- Showing input presses is removed again :( Definitely causing timer problems with some gc pad adapters
- Fixed analog buttons status with custom game profiles
- Added Licence in the zip

12/07/2019 version changelog :
- Code cleanups
- Show in real time if a rumble cartridge is connected
- Possibility to map GC D-Pad keys in a custom profile

25/07/2019 version changelog :
- Restarted from the original code (code cleanups)
- Added a lite version, using a lite version of the game profile system. This version might be necessary with some third-party GC controller adapters which need to receive a very fast status answer to work. The lite version lacks of the game profile builder, but has exactly the same timings as the original program made by EXTREMS.

You can use your GBA to play PC games with something like the MayFlash GC Adapter, which makes any GC Controller appearing as a standard DInput controller. It works on a real GameCube or a Wii U/Switch just perfectly. I prefer this method over using the "GBA Wireless Controller", which has random connection drops and latency spikes.

04/03/2021 :
- Added EZFlash Omega Definitive Edition rumble support :)

03/01/2022 :
- Implement last changes from Extrems repo

How to use it ?
Very simple, just load the program and connect the GBA to the gamecube/mayflash/wii u/switch gcn adapter using the cable. It will be recognized exactly as a GameCube Controller while the program is running.

TIP : You can connect as many gba as you wish with one single flash cart. When the program is loaded, it stay on the RAM as long as the GBA is powered on so you can just withdraw the catridge from the GBA and load the program on another one. Rumble is supported if you insert a rumble gba game (or the slot2 Nintendo DS Rumble Pack)

Happy gaming :yaysp:

P.S : The source code of the latest version is on the archive below, with a ready-to-use binary

0aecddee56befeabe2388325ec27f081.png


c37bf36b2301e418801cd9bd8e56e274.png


8146339ce549368d7ff6886507f15a1c.png


d54e8055bb074a65d12f3a3238a924d3.png


Copyright (c) 2016-2018, Extrems' Corner.org
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
BSD 2-Clause License
 
Last edited by Aliogeek,

Aliogeek

Well-Known Member
OP
Member
Joined
Mar 29, 2013
Messages
93
Trophies
1
XP
1,577
Country
France
Uploaded a new version :
- You can now choose the timer0 value at launch. It can be useful to make the program work with some third party controller adapters. 3.99 microseconds is the default value, which works with Nintendo and Mayflash controller adapter.
- Removed input presses printing. It was causing timer desync, consequently the compatibility with many controller adapters (except mine, which is one from MayFlash :mellow:) was broken.

Enjoy :sp:
 
Last edited by Aliogeek,

Aliogeek

Well-Known Member
OP
Member
Joined
Mar 29, 2013
Messages
93
Trophies
1
XP
1,577
Country
France
New version !
- Added a new game profile : New Super Mario Bros (works for Mario Maker 2/New Super Mario Bros U Deluxe)
- Added a game profile builder, to map GBA <==> GC keys
- Input presses are showed (again !), this time without causing any regression
- Improved timer0 choice at launch : possibility to define a completely custom coefficient, between 50 and 1000. Default is 67 and should work in most cases.
- Modifications to the console, in order to make everything look nicer
- Added a softreset key combo : A+B+SELECT+START to change game profile fastly without having to load the program again

Hope you guys enjoy it B-)

70658f13d3d8ace69b9d949a2358c6df.png


6beea2110504ee9cbfcc9a2480a29f80.png


0ad38253c44e15b69677f6381836a2fb.png


e1673bb50fe2ccc1b3813b788269cbc4.png
 
Last edited by Aliogeek,

Aliogeek

Well-Known Member
OP
Member
Joined
Mar 29, 2013
Messages
93
Trophies
1
XP
1,577
Country
France
New version uploaded ! It may be the final one.

- Many code cleanups
- Fixed timing regressions. Should now be equals again with the original program.
- Showing input presses is removed again :( Definitely causing timer problems with some gc pad adapters
- Fixed analog buttons status with custom game profiles
- Added Licence in the zip

Happy gaming :gba:
 

Aliogeek

Well-Known Member
OP
Member
Joined
Mar 29, 2013
Messages
93
Trophies
1
XP
1,577
Country
France
25/07/2019 version changelog :
- Restarted from the original code (code cleanups)
- Added a lite version, using a lite version of the game profile system. This version might be necessary with some third-party GC controller adapters which need to receive a very fast status answer to work. The lite version lacks of the game profile builder, but has exactly the same timings as the original program made by EXTREMS.

Enjoy :sp:
 

smitty96

Member
Newcomer
Joined
May 16, 2009
Messages
24
Trophies
0
Age
27
Location
New Jersey
Website
www.freewebs.com
XP
218
Country
United States
This is awesome! I've been using Extrem's original version a bit lately, the ability to have multiple profiles should be really handy. I'm not sure how much you know about the rumble code involved, but do you think it'd be possible to use the built-in rumble of the EZ-Flash 3 in 1? I believe it has to be "set" to rumble pack mode before launching an official DS game, but DS homebrew like Lameboy are able to use it without doing anything ahead of time.
 

zerofalcon

Well-Known Member
Member
Joined
Mar 14, 2009
Messages
814
Trophies
1
Location
Somewhere close to my NES
XP
2,921
Country
Hi! Thanks for this great app is really useful for some games, emus,etc. The GC adapter on android doesnt register the main joystick (left) at all, Is there a way to change the code to act as the digital pad instead of the Analog?
 

Aliogeek

Well-Known Member
OP
Member
Joined
Mar 29, 2013
Messages
93
Trophies
1
XP
1,577
Country
France
This is awesome! I've been using Extrem's original version a bit lately, the ability to have multiple profiles should be really handy. I'm not sure how much you know about the rumble code involved, but do you think it'd be possible to use the built-in rumble of the EZ-Flash 3 in 1? I believe it has to be "set" to rumble pack mode before launching an official DS game, but DS homebrew like Lameboy are able to use it without doing anything ahead of time.
Seems possible, but don't know how. I don't have one to make tests, so it's not planned to add this.

Hi! Thanks for this great app is really useful for some games, emus,etc. The GC adapter on android doesnt register the main joystick (left) at all, Is there a way to change the code to act as the digital pad instead of the Analog?
It might be a timing issue of my version. You can edit my source code or use the original program of Extrems which can be downloaded there : http://files.extremscorner.org/gamecube/apps/gbi/latest-extra

I'm currently studying the C language and doing tests in order to make an update. The objectives :
- Make standard version equals in terms of timing as the original program (or enough to pass all tests), so the "lite profile system" branch will become useless
- Double check timings on 3 different adapters, and a real gamecube. I don't own any logic analyzer, which makes debug very difficult.
- Show input presses in real time ? (still not sure if this is really possible without causing any problems... I've managed to make it work with my Mayflash GC adapter again, but i need to do more tests.)

:)
 
Last edited by Aliogeek,

Aliogeek

Well-Known Member
OP
Member
Joined
Mar 29, 2013
Messages
93
Trophies
1
XP
1,577
Country
France
06/02/2021 :
- Fix gc pad button presses, sometimes never released when switching on a different game profile using soft reset
- Implement last code improvements from Extrems repo
 
Last edited by Aliogeek,

SonicRings

Well-Known Member
Member
Joined
Oct 7, 2012
Messages
1,827
Trophies
1
Location
Johto
XP
1,851
Country
Canada
I'm really amazed that this software is being supported after all this time! It's such a niche software that I would have fully expected it to have been abandoned after a few bugs were fixed, yet here we are with the most recent fixes being only 6 days old. Major props to you, @Aliogeek!
 
  • Like
Reactions: Aliogeek

N7Kopper

Lest we forget... what Nazi stood for.
Member
Joined
Aug 24, 2014
Messages
975
Trophies
0
Age
30
XP
1,295
Country
United Kingdom
It should still work with cloneboot since the file size is inferior than 256 Ko (which is the quantity of RAM of a GameBoy Advance).
The GBA isn't the thing I'm most familiar with, so I wouldn't know if it needed a special format or something. Guess it's worth a go.
 
  • Like
Reactions: Aliogeek

Aliogeek

Well-Known Member
OP
Member
Joined
Mar 29, 2013
Messages
93
Trophies
1
XP
1,577
Country
France
Hello !

A new update has been released to fix it for my new needs.

09/01/2022 (these changes concerns only the GC edition, not the N64 branch) :
- Add ability to configure if the GBA DPAD should be mapped as the NGC Analog or NGC D-Pad during configuration process. (allows notably to move more confortably in "Swiss" gamecube homebrew menus). Before that update, the Analog mode was forced.
- Add a new fix to SoftReset, in some cases (I've noticed it in Swiss or in the GameBoy Interface HF) after a soft reset most inputs were not working anymore. The program had to be completely reloaded, which was kindly frustrating (:
- GBA AS CONTROLLER SoftReset does not trigger instantly anymore. From now, key combo has to be maintained between 0,5s and 5s (depending on the polling rate of the game, on GBI it is very fast). This modification allows to SOFT RESET gba games in GameBoy Interface with the key combo, so the GBA AS CONTROLLER own SoftReset will not take the priority anymore in this case :).
 
Last edited by Aliogeek,
  • Like
Reactions: SonicRings

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • BakerMan
    The snack that smiles back, Ballsack!
    BakerMan @ BakerMan: @salazarcosplay yeah cod's still up