Code Editing


by SGYT

In order to edit the Code (RAM) in Luigi's Mansion (2001) you must have two things:


In order to enable the debugger, you must do the following:

Go to the location in which the Dolphin Emulator .exe is present. In this case, my path is: D:\Dolphin\Dolphin-x64.

Next, we're going to need to create a shortcut of the .exe file which is fairly simple. Right click on the exe and click "Create Shortcut".


Once a shortcut has been created, (in this case I'll name it Dolphin Debug Mode just for convenience), you then want to go to your shortcut and open the Properties section on the right-click menu.

From there, the thing you are looking for is Target. Do not modify the Start In, Shortcut Key or Run sections. 


When you have reached the properties menu and have access to the Target path, simply add a space and write -d. (D meaning Debug.) (For example, for me: D:\Dolphin\Dolphin-x64\Dolphin.exe -d)

Now, once you open the Shortcut WITH -D set, you should be greeted with a regular Dolphin, except you have a code window.


Once you have your code window open, you are all set! You can begin your journey of modifying RAM/Code in Luigi's Mansion!!!


All of this may look very freaky at first, which it is.

Luigi's Mansion and the GameCube use ASM (Assembly Language) or better known as PowerPC (PPC).

In order to understand ASM, you need to study it. For example, you were raised to know the English language and say for example you wish to know German. It's the same for any programming language; you need to learn it's instructions and know how to write it. ASM is a very tough language to learn, and it's okay if you don't understand it at first! Even people who attempt to study at it struggle. I recommend to any beginners to begin with the NOP (NO-OP 60000000) function in Dolphin Debugger, it's the most effective way to find out if you have found a function in the game and is editable. For example: if you place a NO-OP in an address (random: 801e2690) and it crashes the game or causes something weird to happen, you found a function! An address is basically what you're seeing in the screenshot on the left

Now, you may be asking, what's this "NOP" or "NO-OP" I'm speaking of?

A NOP is the value 60000000. NO-OP stands for No-Operation, and therefore 60000000 makes said function do nothing. If you place a NOP in an address and the game crashes, don't worry! It's expected. Making a random function do nothing is prone to make the game crash. Other times you may get more interesting results (for example Luigi or ghosts may have broken actions or act strange.)

How do I place a NOP?

Simple. If you right click on an address (example: 801e2680) and press Insert NOP, you can place a NOP in the address. You may also want to fiddle with Replace Instruction. That is the actual values of the address, and is more advanced than NO-OP (obviously.) You can start by "value scavenging" aka changing up the values on the address. If you're lucky, you may find something interesting! Good luck to all who wish to mess with RAM of Luigi's Mansion!!!