Page 1 of 2

n64input source code

Posted: Mon Apr 16, 2012 9:33 am
by mudlord

n64input source code

Posted: Mon Apr 16, 2012 1:25 pm
by Iconoclast

Thanks.

 

Since I am not sure whether to inline-comment onto your source code directly I figured maybe it would be better to keep posts to the forum here.

 

I thought you might want to know that, according to Nintendo, page 0 is reserved by the Controller Pak file system for basically just the device's serial identification number. As they put, each Controller Pak is assigned a unique serial ID, so when the operating system's SI interface accesses the controller RAM and sees that the serial number was changed since the last time the device was accessed, most Nintendo 64 games should consider this as an error, since mempak-switching is not supported by most games.

 

So your aValidCodes[] and aCode[] arrays are mostly based on particular Nintendo serial IDs assigned to someone's Controller Pak (particularly zilmar's, I think, since N-Rage copied those byte values off of Project64's mempak handle it would seem, while other emulators write their own mempak handle).

 

So as a small efficiency plus to handling mempak reformats, what you might do is either reverse your own Controller Pak device that you own to find what its serial number is (i.e., which bytes are stored in page 0) or, what I would do personally, is just set all the serial number bytes to NULL/0x00, since emulating the Controller Pak is just creating a virtual Controller Pak file that was not manufactured by Nintendo.


n64input source code

Posted: Mon Apr 16, 2012 6:44 pm
by mudlord

Nice idea.

I hope to fix rumble support and stuff for Majora's Mask, then fix the issue you described, then this plugin is complete. [img]<fileStore.core_Emoticons>/emoticons/smile.png[/img]/emoticons/smile@2x.png 2x" width="20" height="20" />


n64input source code

Posted: Mon Apr 16, 2012 7:18 pm
by Iconoclast

Yeah looks pretty clean elsewhere, either that or just XInput API stuff I know nothing about lol.

 

I've been spending a lot of time on a Controller Pak memory handler application to support a bunch of stuff, so some technical questions about the page addressing purposes do arise. Things that are never really explained anywhere because Nintendo only documents what game programmers should know.

 

Anyway, what sorts of things in Majora's Mask were you hoping to fix? I had no idea that it had controller issues.


n64input source code

Posted: Mon Apr 16, 2012 8:55 pm
by mudlord

Plugin seems to freeze on motion blurred mask intro.


n64input source code

Posted: Mon Apr 16, 2012 9:26 pm
by Squall Leonhart

i used to think the controller would vibrate as the mask passes offscreen


n64input source code

Posted: Tue Apr 17, 2012 1:55 am
by mudlord

Do any plugins rumble during that sequence?


n64input source code

Posted: Tue Apr 17, 2012 4:06 am
by Squall Leonhart

nrage doesn't

 

i'll have to test my rumblepak on the console


n64input source code

Posted: Tue Apr 17, 2012 8:09 am
by ExtremeDude2

 

i'll have to test my rumblepak on the console

 

o nice [img]<fileStore.core_Emoticons>/emoticons/biggrin.png[/img]/emoticons/biggrin@2x.png 2x" width="20" height="20" />


n64input source code

Posted: Tue Apr 17, 2012 10:48 am
by Iconoclast

i used to think the controller would vibrate as the mask passes offscreen

 

Well, it's the only relative theory I could think of.

 

For as long as I've loved that game I have never known it to use the rumble pak, but I really don't see why mudlord's plugin could be the source of freezing at a part of the game where button strokes are not necessarily sent (the spinning mask animation).

 

This is certainly not being specific, but who knows; maybe there is some fault in the plugin. I know my little 4-KB keyboard-only plugin had no stability issues with this game [img]<fileStore.core_Emoticons>/emoticons/laugh.png[/img]/emoticons/laugh@2x.png 2x" width="20" height="20" />.