Building an GCN->N64 controller adapter

Started by RPGillespie, December 18, 2006, 01:58:23 PM

Previous topic - Next topic

RPGillespie

Alright, I have an idea that is pure speculation, so please feel free to shoot me down if necessary.

I was thinking, would it be possible to take the output of a conventional gamecube controller, run it through a female GCN socket into a microchip or something that could convert it into the n64 controller counterpart, and send it through an exiting n64 male port that could then be plugged into an n64?

I was thinking it would only be a matter of figuring out what kind of data the GCN and the n64 send for each button and making the necessary conversion (the joysticks will be the tricky part I think). The problem is how to figure out which kind of output each has. Perhaps you could use a PC? However, I only have a GCN->USB adapter, not a N64->USB adapter.

Also, I'm not really sure how microchips work, but I think you can "program" them somehow to make the necessary conversions. I am a decent programmer in C++/Java, but I am *very* new to the field this forum seems to be fluent in. Can anyone point me in the right direction?

-RPGillespie

GZeus

these exist.
theyre just more rare than some of the other adaptors as I recall.

NFG

I'm not aware of any instances where you would be unable to convert one controller's protocol to another.  It's a matter of two things: Knowing the FROM and TO protocols intimately, and being able to do the conversion.

Creating a program to do the conversion is pretty easy if you can wrap your head around some machine-language code.  I managed to make a Saturn -> SNES convertor on my first try, and I can't code my way out of a one-sided box.

So yeah, pick a chip (ATMEL and MICROCHIP are very popular manufacturers) and learn to code them.  Buy a programmer and burn the chip, wire up the hardware and attache a couple of plugs, and you're ready to rock.

Oh, yeah, it's not an easy task.  

sepi

it's possible, trust me! i've done it... my setup consists from mega8 and few IC's. Controller conversion is quite simple, but getting the controller protocoll to work is much more difficult.

i don't know if it's possible to build this kind of converter by using only PC, but that's an interesting idea!

-sepi

phreak97

i have done something similar using a pc, but not with anything analogue. i got my friend to program each data line on my printer port so that it would mimick the state of the buttons on a joystick or keyboard.. i then wired the lines of the printer port to the button contacts in a third party psx controller which i plugged into my ps2, the idea was to play ddr with a keyboard originally.. but there was enough lag to be noticable..
using this method you are limited as to how many buttons will work, since theres only one button per data line.

if you can, make a dedicated microcontroller.. i think a pc will introduce lag, and you have to know how to program it all either way anyway.

DarthCloud

#5
http://cia.vc/stats/project/navi-misc/cube64

Go there all the info you need for building one is there, rumble is even supported!

I build four of them and they work fine. But there is a bug with golden eye 007 so you cannot realy play that game with this adapter, also with nearly all n64 games from 1996 (super mario 64, shadows of the empire, cruin'sn usa) you need the start the game first with an orrginal controller and then swap to the adapter, otherwise the game will say "no controller".

http://svn.navi.cx/misc/trunk/wasabi/devices/cube64/

Schematic and code is there, you need to compile the firmware before programming the microcontroller.

Playing Perfect Dark with four working controller is amazing ;)

FM-77

That sounds like a really cool item. Any chance you would sell one?

DarthCloud

Quote from: FM-77 on November 10, 2007, 06:33:45 AM
That sounds like a really cool item. Any chance you would sell one?

I could build you one but I think that you lost the most interesting part witch is altually building it yourself ;), lol

It really cheap to do it will cost near ~5$-15$ to get part for building 4 adapter thecnicaly. The problem is to get en n64 and gamecube connector witch you can get easily from an extension cable but those sell on ebay for 10$ each on ebay (if you add the shipping price witch is alway high for those item unfornutaly).

So I could build you one but I think it would be a lot cheaper and interesting for you to just build one yourself.

sepi

Quote from: DarthCloud on November 10, 2007, 05:05:04 AM
http://cia.vc/stats/project/navi-misc/cube64

Go there all the info you need for building one is there, rumble is even supported!

I build four of them and they work fine. But there is a bug with golden eye 007 so you cannot realy play that game with this adapter, also with nearly all n64 games from 1996 (super mario 64, shadows of the empire, cruin'sn usa) you need the start the game first with an orrginal controller and then swap to the adapter, otherwise the game will say "no controller".

http://svn.navi.cx/misc/trunk/wasabi/devices/cube64/

Schematic and code is there, you need to compile the firmware before programming the microcontroller.

Playing Perfect Dark with four working controller is amazing ;)

My project worked fine with Goldeneye, and Perfect dark too! though some games are buggy (duke nukem zero hour, mission impossible) and rumblepak refuses to work :(

<speculation>
Some games transmit a status request almost immediately after the joystick polling (or rumble init), unless you don't respond something to it, game might interpret that your controller is not connected.
</speculation>

DarthCloud

Quote from: sepi on November 19, 2007, 09:42:27 PM

My project worked fine with Goldeneye, and Perfect dark too! though some games are buggy (duke nukem zero hour, mission impossible) and rumblepak refuses to work :(

<speculation>
Some games transmit a status request almost immediately after the joystick polling (or rumble init), unless you don't respond something to it, game might interpret that your controller is not connected.
</speculation>

The problem with golgen eye with the Cube64 adapter is related to the rumble pak emulation with cause the game to run slowly, if you disable the rumble feature on the adapter firmware by changing the controller id to one without nothing in the controller connector them golgen eye work fine.

sepi

Hey DarthCloud! do you have a succefull emulation for other devices as well? i mean controller pak, transfer and vru?

They do work similar way to rumblepak?

-sepi

DarthCloud

Quote from: sepi on November 20, 2007, 09:12:00 PM
Hey DarthCloud! do you have a succefull emulation for other devices as well? i mean controller pak, transfer and vru?

They do work similar way to rumblepak?

-sepi

In the documentation that you can find if you download the whole svn tree the author (witch is not me by the way ;) ) have done most of the revert egenering of the n64 controller protocol including rumble pak and controller. But controller pak emulation would be hard to add to the current Cube64 design since the clock is only 20~24 MHz. Like the author said:

Quote from: Micah Dowty
Status
------

The protocol used between the N64 and controller, and between the controller
and controller pak is well-understood now. An RS-232 to N64 bridge and several
Python programs demonstrate just about all of the protocol.

The necessary subset of the protocol has been implemented in the cube64
firmware to emulate an official N64 controller with rumble pak. If 5V power
for the motor can be supplied to the gamecube controller, its rumble motor
will be used to emulate the N64 rumble pak.

It should be possible to emulate the N64 memory pak using the results of my
reverse engineering, but a 20 MHz PIC probably isn't fast enough to run the
CRC algorithm in time to return a status byte to the N64. If a faster
implementation of the CRC is discovered or a processor about twice as fast is
used, the memory pak could be emulated easily.


So just read the doc you may find what you looking for

http://svn.navi.cx/misc/trunk/wasabi/devices/cube64/

sepi

Quote
;;   0x00 :   Asks the controller to identify itself. Returns a 24-bit word.
;;            An official N64 controller will respond with 0x050002 if it has
;;            nothing in the expansion slot, 0x050001 if it has a memory or
;;            rumble pak installed. I've seen 0x050003 from a controller with
;;            a memory pak, but I don't know what the extra bit signifies.

During my research, i noticed this extra bit as well, and i think it means
that the user has swapped the device n the controller slot.

Duke Nukem zero hour gives this message "device exchanged", and
perfect dark starts probing controller slot when this bit combination is issued.

I'm really impressed by your work! i never got my research this far because my logic analyser was so ancient it had only 4k of memory (with a single trigger)

next i'm going to get my rumblepak working! and thanks a lot for providing all this information!

- sepi

DarthCloud

Quote from: sepi on November 21, 2007, 05:04:42 AM
I'm really impressed by your work!

By the way like I said I'm not the author of this, I'm just reporting the information ;)

But when I got some free time with my university work I would like to take a look to the detection probleme with early n64 game and the problem with gogden eye and rumble emu. And maybe add some feature.

Maybe in my xmas vacation :D

sepi

QuoteDuke Nukem zero hour gives this message "device exchanged", and
perfect dark starts probing controller slot when this bit combination is issued.

Also, this extra bit is resetted to 0x050001 after reading.

Well, it's really cool that someone has made effort to put all this information together! when i started my project, i only had the "n64 adapter" document by stephan hans. All this information is like a 'holy grail' to me :D

and also, there's also a command 0xFF that you can send to controller. It works just like 0x00 (status request), i'm not sure if any games use this.

- sepi