Vivid Abstractions Where Programming Becomes An Abstraction

29May/114

How To Repair The Nintendo 64 3D Analog Stick

This guide will show you how to repair your Nintendo 64 Controller 3D Analog Stick.

I will start of by saying that I am no expert at this. I grew up with a Nintendo 64 and still 13 years later I play it occasionally with friends. A common sickness with the N64 controllers was the 3D Analog Stick which worn out after some time.

There is a video on YouTube floating around which shows you how to repair the analog stick with tape. Though this might work in some cases if the damage is not severe, it did not really work for me. There is also a flaw in that method which I am going to explain later on.

This repair guide is not free if you don't have all the peripheries at home but if you own 4 controllers with worn out sticks this might be something for you. It is possible to buy the analog stick as a replacement part but they are not produced anymore.

I TAKE NO RESPONSIBILITY WHAT SO EVER FOR ANY KIND OF DAMAGE.

Click here for the guide

Enjoy.

14Dec/091

GetAsyncKeyState not working? Look here!

Especially when running on a 64-bit system you may run into problems. To ensure your application works on 32-bit and 64-bit you have to make some small changes to the API declaration.

To make something clear: Even though it says "user32.dll" it is actually a dll with 64-bit functions. The 32-bit version of it is in the WOW64 folder.
wrap-lines: true
This is the code I am using:

using System.Runtime.InteropServices;
    static class VKeyboard
    {
        [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
        public static extern IntPtr GetAsyncKeyState(IntPtr vKey);
        public static bool CheckKeyDown(System.Windows.Forms.Keys vKey)
        {
            return 0 != ((Int64)GetAsyncKeyState((IntPtr)vKey) & 0x8000);
        }
    }

To call this just use:

if (VKeyboard.CheckKeyDown(Keys.ControlKey))
{
//do something
}

The integer types were changed to IntPtr because IntPtr is a wrapper that changes depending on the system (32-bit or 64-bit). You can change vKey as well to IntPtr to save the typecast but I like the "Keys." calling method.

Enjoy.

   
SEO Powered by Platinum SEO from Techblissonline

Page optimized by WP Minify WordPress Plugin