Cube64-DX - Ameliored GC controller to N64 adapter.

Discussion in 'Nintendo Game Development' started by DarthCloud, Mar 29, 2011.

  1. Nully

    Nully Dauntless Member

    Joined:
    Nov 23, 2010
    Messages:
    738
    Likes Received:
    102
    Oh cool, thanks.
     
  2. DarthCloud

    DarthCloud Fiery Member

    Joined:
    Dec 26, 2007
    Messages:
    874
    Likes Received:
    14
    Btw I did another small update.

    When doing the button mapping layout reset combo keys (AL+AR+Z), you now only erase the currently active button layout instead of erasing everything.
     
  3. DarthCloud

    DarthCloud Fiery Member

    Joined:
    Dec 26, 2007
    Messages:
    874
    Likes Received:
    14
    First official release!! Build r37

    Precompiled .hex available in download section and pdf schematic too:
    http://code.google.com/p/cube64-dx/downloads/list

    Also this is the last build that will support PIC16F84A, 12F629 and 12F675. Precompiled .hex will stay available in the download section however. I flaged then "Deprecated" so you need to search in the download section in "All downloads" to find then.

    Their is no reason to use those PICs anyway, maybe only if you have some of those chip already and want to try out while waiting to receive your 12F683 ;)

    I also made a tutorial like promised to help people building it:

    http://code.google.com/p/cube64-dx/wiki/BuildingAdapter

    This is targeted to beginner.

    If you have good skill already you can skip this and build a nice pcb with SMD component :)
     
  4. APE

    APE Site Supporter 2015

    Joined:
    Dec 5, 2005
    Messages:
    6,416
    Likes Received:
    138
    A few months ago I grabbed the interface for the microphone used in Hey You Pikachu! With no microphone and no idea what I was going to use it for.

    Now I have the PERFECT box for this.
     
  5. Annoying_one

    Annoying_one Peppy Member

    Joined:
    Dec 24, 2006
    Messages:
    338
    Likes Received:
    9
    that would make a nice case to house it in. and look rather pro
     
  6. Nully

    Nully Dauntless Member

    Joined:
    Nov 23, 2010
    Messages:
    738
    Likes Received:
    102
    Wow you built the whole adapter on top of a DIP socket. That's genius and cost effective. Awesome.
     
    Last edited: Apr 18, 2011
  7. Nully

    Nully Dauntless Member

    Joined:
    Nov 23, 2010
    Messages:
    738
    Likes Received:
    102
    I finally ordered all my parts to build this. This is my first venture into microcontrollers and I want to thank you for finally motivating me to do it. I'll report back with results in a week.
     
  8. derekb

    derekb Well Known Member

    Joined:
    Jan 7, 2009
    Messages:
    1,964
    Likes Received:
    44
    wow this is some straight up McGuyver adapter
     
  9. DarthCloud

    DarthCloud Fiery Member

    Joined:
    Dec 26, 2007
    Messages:
    874
    Likes Received:
    14
    At some point I had a better looking adapter but I dismantled it since I needed the GC/N64 cable to build some sniffing interface for my LA.

    Using a dip socket make development easier and quick.

    What it could look like with pcb and smd component (This included the charge pump circuit to provide +5v to the rumble motor):

    [​IMG]
     
    Last edited: Apr 20, 2011
  10. derekb

    derekb Well Known Member

    Joined:
    Jan 7, 2009
    Messages:
    1,964
    Likes Received:
    44
    the charge pump would certainly be nice, is it complicated to add?
     
  11. DarthCloud

    DarthCloud Fiery Member

    Joined:
    Dec 26, 2007
    Messages:
    874
    Likes Received:
    14
    Not really if you are ok with SMD soldering, the chip used is only available in SMD package. You need 3 additional capacitors and one more resistor for the charge pump circuit.
     
  12. Nully

    Nully Dauntless Member

    Joined:
    Nov 23, 2010
    Messages:
    738
    Likes Received:
    102
    So the 5v is just for the rumble motor? It's not needed at all for a basic controller?
     
  13. DarthCloud

    DarthCloud Fiery Member

    Joined:
    Dec 26, 2007
    Messages:
    874
    Likes Received:
    14
    Correct.
     
  14. link83

    link83 Enthusiastic Member

    Joined:
    Mar 22, 2008
    Messages:
    526
    Likes Received:
    8
    Thanks for your continued work DarthCloud :)
    Well i'm glad the axis conversion is still there :nod: If you will be upgrading to a 64MHz PIC at some point I guess the CPU and flash usage issue will become redundant?

    Also, maybe this is just me, but I have been looking at the schematic and it doesnt seem clear to me where capacitors C3, C4 and C5 fit in? Especially since C3 and C4 both connect to +3.3V.

    Has anyone tried making an eagle board/schematic for the Cube64-DX? I am tempted to have a go, but theres no point if someones already done it.

    Oh and slightly OT but could I just ask something which has been bugging me for a while - what is the maximum possible size for the N64 controller pak's SRAM? I previously thought it was 32 kilobytes, since that is the size of the SRAM chip used in official controller pak's, and I read in the 'n64-observations' doc from the original Cube64 here:-
    http://svn.navi.cx/misc/trunk/wasabi/devices/cube64/notes/n64-observations
    However, in the same doc it also says there are 16 address lines labelled A0-A15? :confused:
     
    Last edited: Apr 20, 2011
  15. DarthCloud

    DarthCloud Fiery Member

    Joined:
    Dec 26, 2007
    Messages:
    874
    Likes Received:
    14
    I found some problem regarding Wavebird controller. The joystick look to be rotated to the right more than regular controller. Didn't made any precise measurement but if I look a both pcb side by side, The joystick indeed look more rotated. I did some measurement with my LA however for example the center idle horizontal position is always near ~0x80 but if you push the stick straight up in the "alignment hole" (Don't know how to call it) I read a value -8 below the center, but I should be in the center in the X axis!!

    This create the problem that in adventure game when you want to run straight up and put the joystick at what you believe the center you will turn a little bit to the left.

    I played with the Wavebird with some VC N64 game on my Wii and I noticed a little dead-zone around the center, you push the joystick for about 3/4 of millimeter nothing happen. I believe this dead-zone is to avoid problem with misaligned controller.

    I implemented a dead-zone in the adapter and this fixed that problem.

    Doing so I modified the possible range of the Gamecube controller from [-0x64, 0x64] to [-0x5A, 0x5A] this still an higher range than n64 range [-0x54, 0x54] but it's damn close. I modified the axis range function so it fit to new spec but it don't really make any difference now that the range is so close to the real one. So I removed that. The code exist so I can put it back at some point if I receive some feadback about that.

    But honestly I think it's better without that function. It will fill more sensitive but it's more caused by the fact the GC joystick is better than because the range is a bit higher.

    Capacitors in middle of nowhere is a schematic are always decoupling caps. You need to put then very close to the power and ground pin of ICs. So C3 is a regular 0.1µF caps so it go between the power pin of the micro-controller.

    If you check the MAX682 datasheet you can see that C4 go between +3.3v input and gnd of the IC, and C5 go on the +5v output and gnd of the charge pump.
    I'm planning to do one once I implement the N64 controller input for peripheral (Got my sample SPDT switch for that today btw)

    The mazimum adressable memory is 32k. Bigger memory card use the old trick of switching between memory bank with a switch. So It's like if you had 4 independant memory card into one single package. You select between then with a physical switch.
     
    Last edited: Apr 20, 2011
  16. link83

    link83 Enthusiastic Member

    Joined:
    Mar 22, 2008
    Messages:
    526
    Likes Received:
    8
    How strange...I wonder if this applies to all Wavebird's? Might this just be your Wavebird? Just seems like an odd thing for Nintendo's designers not to notice.

    180 steps is quite close to 168 steps, but doesnt this mean that the GC analog stick area mapped to N64 analog stick is now 10% smaller? So when you press full in one direction it has already reached the maximum value earlier.

    I see, thank you for the info - I learn something new every day!

    I am curious how much extra drain does MAX682 and wired GC Controller with rumble on max setting put on N64's +3.3V power rail?

    Thats great, I look forward to seeing it.

    Hmm, maybe I am missing something, but if the biggest addressable memory is 32k then why are there 16 address lines which allows up to 64k?
     
    Last edited: Apr 20, 2011
  17. DarthCloud

    DarthCloud Fiery Member

    Joined:
    Dec 26, 2007
    Messages:
    874
    Likes Received:
    14
    The fact they used a deadzone suggest that they indeed noticed! I have two Wavebird like this, one gray which is probably quite old, and my personal platinium one which a buy brand new some month after the Wii release, and I didn't used it much.

    I'm currently watching an auction on ebay for 3 Wavebird without receiver, so they are cheap. I will try to get them so I have a better sampling for testing.

    No it reach the maximum value later in comparison of the direct value mapping (But a bit sooner in comparison of the adapted value). The first 10 value in either direction are always mapped to 0. and value higher than 10 are subtract by 10. So you have 0 for the first 10 value them the joystick value start to increase from 1 to 0x5A

    Good point! I must admit I have no idea why it's only 32k if their is 16 address line. Micah in is doc talk about 15 address line but it's controller pak pinout suggest their is 16. :O
     
    Last edited: Apr 20, 2011
  18. DarthCloud

    DarthCloud Fiery Member

    Joined:
    Dec 26, 2007
    Messages:
    874
    Likes Received:
    14
    Checked again both controller pcb and maybe their are not misaligned, maybe it just en illusion created by the mark on pcb which are present on the wavebird and not printed on my regular controller. Very hard to tell.

    But still from my reading the idle center don't match the value you got at either the top or bottom position.

    Wavebird:
    [​IMG]

    Regular:
    [​IMG]
     
    Last edited: Apr 20, 2011
  19. link83

    link83 Enthusiastic Member

    Joined:
    Mar 22, 2008
    Messages:
    526
    Likes Received:
    8
    I see, so the GameCube analog stick gives readings for 208 steps, and you added a dead-zone of 10 steps on either side bringing the total to 188 steps, and then you minus off another 10 from the reading each side to give 168 steps - is that right?

    I decided to look into this further, and I think A15 might only be for the Rumble Pak? I found some info in the Controller Pak patent:-
    http://www.google.com/patents?id=GW0FAAAAEBAJ&printsec=abstract&zoom=4
    Page 23
    [​IMG]
    Page 24
    [​IMG]
    Also the patent seems to suggest that Nintendo had planned to make a combined Controller Pak/Rumble Pak at some point?
     
    Last edited: Apr 21, 2011
  20. DarthCloud

    DarthCloud Fiery Member

    Joined:
    Dec 26, 2007
    Messages:
    874
    Likes Received:
    14
    The GC range is more close to 200 actually after making an average of all my controller value. I only remove the 10 on either side of the middle so it reduce to range to 180. I leave it like that. Nothing is done to adapt it to 168.

    Anyway while N64 range is -0x54 to 0x54, from my iQue controller (which use very same hardware) the range I get is -0x58 to 0x58. I believe it's because the joystick hole is not high enough so the stick can go a bit further.

    I played a lot last night to test the latest r44 build (Now available in the project download page) and I'm very happy by how it's performing.

    N64 issue a write to address 0x8001 to identify what the controller slot contain. So A0-A14 is for controller pak memory, and A15 is to access a virtual memory area for device "management".

     
    Last edited: Apr 21, 2011
sonicdude10
Draft saved Draft deleted
Insert every image as a...
  1.  0%

Share This Page