n64input source code

Mudlords had the urge to play some n64...... so he wrote a new xinput plugin to do it with.


mudlord
Senior Member
Posts: 306
Joined: Sun Feb 08, 2009 1:16 am

n64input source code

Post by mudlord »

Iconoclast
Member
Posts: 79
Joined: Sun Mar 23, 2008 11:57 am

n64input source code

Post 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.
mudlord
Senior Member
Posts: 306
Joined: Sun Feb 08, 2009 1:16 am

n64input source code

Post 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" />
Iconoclast
Member
Posts: 79
Joined: Sun Mar 23, 2008 11:57 am

n64input source code

Post 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.
mudlord
Senior Member
Posts: 306
Joined: Sun Feb 08, 2009 1:16 am

n64input source code

Post by mudlord »

Plugin seems to freeze on motion blurred mask intro.
Squall Leonhart
Posting Freak
Posts: 1217
Joined: Tue Mar 18, 2008 2:21 am

n64input source code

Post by Squall Leonhart »

i used to think the controller would vibrate as the mask passes offscreen
mudlord
Senior Member
Posts: 306
Joined: Sun Feb 08, 2009 1:16 am

n64input source code

Post by mudlord »

Do any plugins rumble during that sequence?
Squall Leonhart
Posting Freak
Posts: 1217
Joined: Tue Mar 18, 2008 2:21 am

n64input source code

Post by Squall Leonhart »

nrage doesn't

 


i'll have to test my rumblepak on the console
ExtremeDude2
Junior Member
Posts: 29
Joined: Fri Jun 03, 2011 9:16 am

n64input source code

Post 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" />
Iconoclast
Member
Posts: 79
Joined: Sun Mar 23, 2008 11:57 am

n64input source code

Post 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" />.
Locked