Ocarina of Time

VC Control Stick Mapping

Started by ING-X · 03 Mar 2012 · 206 replies

Page 1 of 7 · All times UTC

Last post ↓

VC Control Stick Mapping

#1
http://pastebin.com/2RNbM9Vm

This is data petrie911 got from the input plugin on Dolphin + the address in the OoT ROM for inputs. The input on the right is the input on the VC version that is needed to get the input on the left. Pretty interesting.

Re: VC Control Stick Mapping

#2
this shows that VC uses 44% of the control stick and the rest is deadzone / max input

i'd love to see a hack that cuts the deadzone in half and cuts the max input into like a quarter (and evenly spaces out the rest of the input).

Re: VC Control Stick Mapping

#3
Me and the guy who made the N64 adapter that most people use (Raphael) are working on making a new version of the adapter that makes the VC control stick the same as N64. I've already talked to jewyama on SDA about this and he said it was fine since it's just for comfort of control (the VC control transformation is really just a big deadzone and a tiny bit of added sensitivity; ESS is still more than possible with it even if it does feel really awkward). It should be ready within the next month.

Re: VC Control Stick Mapping

#4
I did some testing with the F-Zero X WAD, since that game doesn't feel like it has much of a deadzone. On Mupen64, you have to set the controller's x-value to at least 7 to get the car to turn at all; it just goes straight otherwise. On Dolphin, the Gamecube's stick has a default of 128, and you have to set it to at least 150 to turn right (or at most 106 if you want to turn left). Relative to the stick's starting position, you have to push it 7 units left or right on N64, and 22 units left or right on VC to start turning.

What interests me about this is that 22 - 7 = 15. And, from petrie's data 16 - 1 = 15 as well. Perhaps it's nothing, but it seems like that can't be a coincidence.

Re: VC Control Stick Mapping

#5

I did some testing with the F-Zero X WAD, since that game doesn't feel like it has much of a deadzone. On Mupen64, you have to set the controller's x-value to at least 7 to get the car to turn at all; it just goes straight otherwise. On Dolphin, the Gamecube's stick has a default of 128, and you have to set it to at least 150 to turn right (or at most 106 if you want to turn left). Relative to the stick's starting position, you have to push it 7 units left or right on N64, and 22 units left or right on VC to start turning.

What interests me about this is that 22 - 7 = 15. And, from petrie's data 16 - 1 = 15 as well. Perhaps it's nothing, but it seems like that can't be a coincidence.



So 7 on N64 = 22 on VC. Same as on OoT. So it seems Nintendo used the same mapping for each game on VC. Good shit.

Re: VC Control Stick Mapping

#6
Has anyone tried, like, emailing Nintendo and being all "yo, how's the VC control stick mapping? peace."

Very nice work though, you guize.

Re: VC Control Stick Mapping

#7
it would be good if a way to reduce sensitivity existed. FZX is so bad with the VC default.

Re: VC Control Stick Mapping

#8

it would be good if a way to reduce sensitivity existed. FZX is so bad with the VC default.


There probably will be an N64 controller adapter fix for it in the near future (see my above post). :)

Re: VC Control Stick Mapping

#9
Hi there, I am fairly new to running OoT for if you don't know me.  ;)

Basically the fix for this never got made and that's why I started working on this about a week ago. Today I am happy to announce that I got it working and that ess is a lot easier in my experience with the converter I made.

I still need to do some improvements to it, since I still don't fully understand the scaling between N64 analog and GC analog (my N64 analog stick doesn't really reach values higher than about 75), so I don't know if I use the conversion table ING-X links in his first post correctly. The way I do it now was pretty much a guess and it turns out to work good for me and it makes ess a lot easier than normal. There are also some other improvements left for me to do.

The hardware I am using is the same as the raphnet adapter. To make it compatible with the raphnet adapter I think I only need to change an input/output pin I use, so it shouldn't be a problem to get it to work with it.


I will be posting some basic proof (video I guess) very soon and once I think the adapter and code is completely finished I will be looking into a way to supply everyone who wants an adapter with one. :)

Last edited 08 Aug 2012, 14:56 by whyieyesya.

Re: VC Control Stick Mapping

#11
I just tried out Majora's Mask and it doesn't work as expected. If I hold my analog stick up to maximum value Link doesn't walk at full speed. My guess is that Nintendo uses a different mapping between Gamecube input and the input that is generated to the rom. Would it perhaps be possible for someone to see if this is true, by making an input table for Majora's Mask as well. I would love to do this myself, but have no idea how. :(

I was already trying to find out myself if the emulator for MM really input differently by injecting OoT into the MM wad and see if Link also doesn't run at full speed then. I tried to use injectuwad for this, but it says the OoT rom is too big and I can't find another injector.

Re: VC Control Stick Mapping

#12
You said your N64 control stick goes up to a value of 75, right? If so then it does seem like Nintendo used a different mapping for MM :( . Sucks.

At least it should work for OoT. As of right now there's no way to get a mapping table for MM since it just crashes in Dolphin.

Re: VC Control Stick Mapping

#13
I don't know the exact number my control stick goes up to. I am probably gonna hook it up to my pc some time to find out. The thing is, if the mapping in MM was the same, it should work with any N64 controller that is functional.

I can still try to tweak it a little by hand, but it probably won't be exactly the same as on N64.

By the way are there any wads that MM is known to work with as an injected rom. Because then I can see how MM works with another emulator, that perhaps has the same mapping as OoT. That would confirm that MM uses a different mapping.

Edit:
By the way, if I pushed really hard on my analog stick Link would sometimes do run, so the values aren't that much off I think. I think that if we tweak and guess some values MM should still be very playable with this adapter.

Edit2:
I just downloaded Dolphin and tried it on a MM PAL wad and it didn't crash. I must say that it did run really awful and no sound. What I mean with awful is that it just skips through frames and it seems to run at a way too high speed. I do need to say that my graphics card is really bad.  I guess even with the fact that it runs so awful, the input must be functional, so I guess it should be possible to read out the mapping. If I knew how, I would try this!

Edit3:
MM PAL crashes when pressing start to go to the menu for me. But my guess is that the input layer from the Virtual Console emulator is also active before going into the menu, so it should be possible to read out which analog stick values the Virtual console emulator supplies the game for certain Gamecube controller inputs.

Edit4:
Using Dolphin revision 735 64 bits with PAL Majora's Mask wad. Only this version of Dolphin doesn't give me a crash (except that it crashes after pressing start ofcourse).

Last edited 09 Aug 2012, 12:11 by whyieyesya.

Re: VC Control Stick Mapping

#14
Allright I believe I have made a pretty decent mapping for Majora's Mask. I have done this by sending certain analog input values to my Virtual Console version of Majora's Mask and comparing these with corresponding N64 input that I retrieved from the TAS plugin from Mupen. Basically I had three analog stick values to compare with N64: value that Link starts turning, value that Link starts walking, value that Link starts running fastest. Maybe there are more easily recognizable analog input values, if anyone knows them they should tell me, because then I can get a better mapping table for the analog stick.

Here are the values I found:

Link starts turning/essing:
N64: 16
GC : 30

Link starts walking
N64: 28
GC:  41

Link starts running at fastest rate (this one was hard to recognize and might be a little off
N64: 66
GC : 77

Based on these observations I made a mapping table by trying to make a linear function fit with Matlab. I am not very good at math, so I think this process could be done better. One thing to notice is that the region you can hold analog stick to ess in, is kept completely, no matter what conversion is done to generate all the unkown data, because it is generated to go through the values I measured. After this I programmed the new mapping table into my converter and it seems to work very well. I was able to do extended superslides with it.

I also found out that you start essing in OoT at a slighter angle of your analog stick. It only requires a value of 8 and you can hold it up to 26 before Link will start walking. Basically this means that essing was already easier in OoT on the N64 than in MM on the N64. If anyone is able to confirm this is true, then I would be happy, because that would indicate I probably didn't make any mistakes during the process.

Re: VC Control Stick Mapping

#15

Basically this means that essing was already easier in OoT on the N64 than in MM on the N64. If anyone is able to confirm this is true, then I would be happy, because that would indicate I probably didn't make any mistakes during the process.

Yeah, ESS'ing is noticeably easier in OoT.

Re: VC Control Stick Mapping

#16
I would recommend talking to petrie911 about getting the actual mapping table. It is not a linear function at all.

Re: VC Control Stick Mapping

#17
Allright I am pretty certain I have found the mapping table for MM. It can be found here.  ;D

This was done with a PAL wad from MM in Dolphin by looking at certain memory addresses with "memory hacking software". The data I retrieved lines up with the data I found in my last post (N64 value 16 is GC value 30 for instance), so I am pretty certain I read the right memory addresses. Only problem there could be is that PAL and NTSC don't have the same mapping. I don't think this is the case though. Right now I am testing the converter with Darkeye's MM mod on my Wii. I use Darkeye's mod, because I found it really hard to find a legit NTSC wad for MM, most of them are injects into the PAL version (which the WAD I tested in Dolphin and I got the mapping from could very well be too (filename says NTSC, but Dolphin says PAL  ::))).

Re: VC Control Stick Mapping

#18
Good shit. If I may make a recommendation, have it so that holding up on the dpad while starting the adapter triggers the oot mapping and holding down triggers mm mapping (similar to how holding left/right changes sensitivity on the existing adapter).

Re: VC Control Stick Mapping

#19

Good shit. If I may make a recommendation, have it so that holding up on the dpad while starting the adapter triggers the oot mapping and holding down triggers mm mapping (similar to how holding left/right changes sensitivity on the existing adapter).

I was thinking about the same thing. It should fit in the microcontroller.

Unfortunately I have exams next week, so I will be working on the code (needs to be cleaned up a little, maybe add features) the week after that. I don't know yet how I will do the fabrication of this adapter (no clue how much people want one), but I think I will put on a connector so you can reprogram it yourself (programmer is a usb device you can get for 3 bucks from ebay). This way eventual bugs or better mappings (though I am sure mm is correct now too) can be programmed on it and it could be reprogrammed for other games than Zelda.

Re: VC Control Stick Mapping

#21
Just a quick update. Code is pretty much finished. OoT mapping can be selected by holding D-Pad up when powering on the adapter and MM mapping can be selected by holding D-Pad down. I still want to test Majora's Mask a little more to see if the Japanese, US and PAL release feel the same.

Right now I am in the process of designing the circuit boards, so people can actually buy it. 

Re: VC Control Stick Mapping

#23
Good shit. It'll be cool to finally be able to play MM with both good controls AND no lag ;D

Re: VC Control Stick Mapping

#24
Wait, are you actually making a brand new controller or just a code to fix the sensitivity?

Re: VC Control Stick Mapping

#25
It's a new version of the N64->VC adapter with a new code to counteract the VC emulator's control stick mapping (the VC emulator remaps the control stick for the GC and Classic controllers which does not translate well to an N64 control stick).

Re: VC Control Stick Mapping

#26
My N64 sticks are already broken so I'll need to get one of those as well. How much is the adapter?

Re: VC Control Stick Mapping

#27
You need to use your own N64 controller for the adapter, it doesn't come with one.

Re: VC Control Stick Mapping

#28
Quick question, will there be anyway to put the code onto an existing adapter that I own without having to buy a new one or no? Just wondering, if I need to buy another adapter it's fine with me but it'd be nice to not have to buy another one.

Re: VC Control Stick Mapping

#29

You need to use your own N64 controller for the adapter, it doesn't come with one.


I know, I just didn't mean it like that  :P Where can I buy a coded N64 adapter though and how much is it?

Re: VC Control Stick Mapping

#30
The new adapter isn't made yet, so you'll have to wait until it's finished. You can get adapters from http://www.raphnet.net/electronique/x2wii/index_en.php but they're pretty expensive and they don't have the stick fix (which makes the VC version feel really clunky compared to N64, exactly what we're trying to fix with the new version).