Arduino as GameCube controller (for GBA)

Discussion in 'Repair, Restoration, Conservation and Preservation' started by Bearking, Mar 28, 2018.

  1. AndehX

    AndehX You got boost power!

    Joined:
    Apr 7, 2016
    Messages:
    356
    Likes Received:
    68
    I'm not super familiar with arduino stuff... How do I tell if its 16mhz?
     
  2. Gunstar

    Gunstar Member

    Joined:
    Apr 9, 2014
    Messages:
    20
    Likes Received:
    4
    According to this vid you might be able to tell from code on the SMD Crystal/Ceramic resonator:
    8xx - 8mhz
    A.x - 16mhz
    [​IMG]
    Might also be able to google the model number on the regulator if it has one written on it. Not sure if the Nano V3.0 comes in 8mhz but I only did a quick search.
     
  3. gorgyrip

    gorgyrip Gutsy Member

    Joined:
    Oct 26, 2007
    Messages:
    450
    Likes Received:
    16
    The simplest way to connect snes to gamecube is to use the schematic on raphnet.net
    atmega8 + crystal+caps.
    Cheap and simple.
     
    Gunstar likes this.
  4. AndehX

    AndehX You got boost power!

    Joined:
    Apr 7, 2016
    Messages:
    356
    Likes Received:
    68
    So i have this all set up, and it kinda works, although certain buttons will work like 1 in 50 presses.

    Left and A are the 2 buttons that I have to press like 50 times just to get them to register once. The rest all seem to work ok

    Edit: Ok, I think it may have something to do with me powering the arduino with 5v (it doesn't work when powered with 3.3v)
    I'm gonna order some 3.3v Nano Pro's

    Edit2: So I did some more digging, and I found that some of the input pins are not showing 3.3v. However, if I plug in a USB cable to the arduino, all the input pins appear to work. So whats going on here? Is the gamecube not providing enough current on the 5v wire? I have LED's connected to the 5v pins on each of the Gamecube's controller ports. Would they take enough current away from the arduino to stop some of the input pins from working?
     
    Last edited: Dec 29, 2018
  5. Gunstar

    Gunstar Member

    Joined:
    Apr 9, 2014
    Messages:
    20
    Likes Received:
    4
    Good job on getting this set up!

    I think the Data line is bi-directional 3.43v so might be risky powering that board with 5v without a regulator/logic level converter. Kind of weird that Left and A don't work well when the others do. Might be a faulty board? seems the Nano v3 is very similar to the Mini pro so I'm not sure why it shouldn't be okay being powered by the 3.43 logic supply alone like how Bearking has done.

    The 3.3v Nano Pro's your plan to order, are they 16mhz? I don't think the firmware (NicoHood's Library) is written for something lower or higher in Mhz
     
  6. AndehX

    AndehX You got boost power!

    Joined:
    Apr 7, 2016
    Messages:
    356
    Likes Received:
    68
    As far as I'm aware the 3.3v ones only come as 8mhz. All the 16mhz ones I've seen all run on 5v....

    Edit: Ok I done goofed. The 16Mhz Pro mini's can run on either 5v or 3.3v apparently. Nevermind, I'll just grab a couple of these:
    https://www.ebay.co.uk/itm/262945527227
     
    Gunstar likes this.
  7. Gunstar

    Gunstar Member

    Joined:
    Apr 9, 2014
    Messages:
    20
    Likes Received:
    4
    Yeah, I was confused about that until I checked, they can run at 3.3v too. I've seen some people mention that it might underclock itself but seems to work okay without any ill effects for what we want to achieve going by Bearking's example.
     
  8. AndehX

    AndehX You got boost power!

    Joined:
    Apr 7, 2016
    Messages:
    356
    Likes Received:
    68
    Yeah well, whatever the reason... It doesn't quite work off the Gamecube's 5v line. (weather that's because of the LED's I have installed, who knows) and my Arduino Nano 3 doesn't seem to run off of 3.3v so it looks like the Pro Mini is the go to for this mod.

    Overall though, this is a great mod, and not hard at all to setup if you know your way round a soldering iron. Did take me an hour to figure out that I needed a custom Arduino library before I could upload the sketch... :D
     
    Last edited: Dec 30, 2018
  9. TriMesh

    TriMesh Site Supporter 2013-2017

    Joined:
    Jul 3, 2008
    Messages:
    2,355
    Likes Received:
    778
    Atmel's official position is that when running on a VCC in the range of 2.7V to 4.5V you should not try and clock the chip faster than 10MHz. In practice, they usually work at 16MHz @3.3V anyway, but it's outside the recommended operating conditions.
     
  10. AndehX

    AndehX You got boost power!

    Joined:
    Apr 7, 2016
    Messages:
    356
    Likes Received:
    68
    Well when i have it powered by the 3.3v line, i get no response from any buttons on the SNES controller.
     
  11. TriMesh

    TriMesh Site Supporter 2013-2017

    Joined:
    Jul 3, 2008
    Messages:
    2,355
    Likes Received:
    778
    OK, there are two possibilities - one is simply that your chip won't run at 16MHz with a 3.3V supply (this is outside the recommended operating conditions, after all). The other is that the chip fuses have been set up with the BOD level set to 4.3V and hence the chip simply isn't coming out of reset at all.
     
  12. AndehX

    AndehX You got boost power!

    Joined:
    Apr 7, 2016
    Messages:
    356
    Likes Received:
    68
    Yeah, it's most likely one of those 2 scenarios. Never the less, I have a couple of 3.3v 16mhz boards on the way, so I should have the controller up and running in the next few days.
     
  13. AndehX

    AndehX You got boost power!

    Joined:
    Apr 7, 2016
    Messages:
    356
    Likes Received:
    68
    Success! So the dual 3.3v/5v 16mhz Pro Mini is definitely the go to Arduino for this mod. I got a couple delivered today, installed it and I have a working controller, no worries!
    Excellent mod, and saved me so much money over that stupid Hori controller.

    Images of mine:
    [​IMG]
    [​IMG]
     
    sa1, Gunstar and Bearking like this.
  14. Bearking

    Bearking Konsolkongen

    Joined:
    Aug 2, 2010
    Messages:
    856
    Likes Received:
    100
    Kewl! :)

    Also, the problem I had with the Qoob bios is not related to this controller at all. It appears that it happens with all wired controllers now that I have the GCHDMI installed with pad support. I never realized this as I mainly use a wavebird which doesn’t cause any problems during boot :D
     
    Nully likes this.
  15. Nully

    Nully Dauntless Member

    Joined:
    Nov 23, 2010
    Messages:
    740
    Likes Received:
    103
    Just ordered the parts to try this out, definitely cheaper than $200 for the Hori.
     
  16. Gunstar

    Gunstar Member

    Joined:
    Apr 9, 2014
    Messages:
    20
    Likes Received:
    4
    Nice work, AndehX
     
  17. Gunstar

    Gunstar Member

    Joined:
    Apr 9, 2014
    Messages:
    20
    Likes Received:
    4
    Playing games on the GBA player is so much better now.
     

    Attached Files:

    Bearking likes this.
  18. Nully

    Nully Dauntless Member

    Joined:
    Nov 23, 2010
    Messages:
    740
    Likes Received:
    103
    Love it, didn't take too long aside from not being familiar with Arduino/chinese clone driver nonsense.

    Didn't notice you removed the IC, guess it doesn't matter? Why'd you both remove it?

    [​IMG]
     
    Last edited: Feb 10, 2019
  19. AndehX

    AndehX You got boost power!

    Joined:
    Apr 7, 2016
    Messages:
    356
    Likes Received:
    68
    Honestly? Now that I think about it, I don't even know xD
     
  20. Nully

    Nully Dauntless Member

    Joined:
    Nov 23, 2010
    Messages:
    740
    Likes Received:
    103
    Fair enough :cool:
     

Share This Page