View Full Version : General GS Code Discussion Thread

31st January 2014, 12:11 AM
A topic for anyone to talk about and make any GS code for any N64 game.

As I mentioned in the idea,anything goes!

*launches nukes EVERYWHERE*

31st January 2014, 12:51 AM
I took a short break from Zelda, but now I'm working on figuring it out. I think I'm getting closer :) . Gameshark + Nemu + Cheat Engine = WIN! Speed Hacking + Teleport + Moon Jump is amazing too!

Here's my problem. I'm able to write a code easy for shield to shine in that ancient ikana place, but when I leave that area, the code at that address changes completely. I think Zelda uses DMA a lot more than some of these other games I've played. Right now I'm debugging to see how the game determines what spots make the shield shine. I found that there's a 4 byte variable that is located just to the left of the shine variable. When I was in the light, it was 0x00020000, and 0 when not in the light. I'm going to also try and find some pointers in cheat engine. Then I'm going to do some exploring in the game since idk my way around the place.

Also is there a code to change Link's color outfit in MM? I liked that tunic color modifier in OOT. Another thing I'm trying to find is the length of swords.

31st January 2014, 01:18 AM
I had no luck with the Majora's laser Shield code Fat/Bat/HatCat.
I could only find the lighting effect when the laser is shot,but I dropped it.:(

31st January 2014, 03:50 AM
My goodness, it's like an endless loop of numbers :( . I tried tracing the source of the light thing, but it's like I'm running in circles. I value leads to one place, then that place leads to something else, and I keep going. Then I eventually end up at one of the previous addresses!

Would I be wrong to say Zelda was poorly coded? Things just don't make any sense at all ;/ .

One thing I will say is, paying attention is a must. I JUST realised that one the variables I was looking at, that determined the light was the coordinates. I was busy just looking at where numbers came from, rather than paying attention to the addresses themselves. I won't give up quite yet :D .

31st January 2014, 04:25 AM
It makes sense the coordinates would determine it.

That's very helpful info.

So if you set RDRAM[point(x, y, z)] to 0x7F and see no light coming out of the shield,
then you set RDRAM[point(x, y, z)] to 0xFF and see light soming out of the shield,
it means that 0x80 is the bit-mask the ROM searches for to treat the Mirror Shield as light-reflecting

So you could search for 0x80 instead and find it in some MIPS instruction like a BNE/BEQ/w/e if that bit was set and conditionally make the light glow effect happen.

31st January 2014, 04:49 AM
Well, when I set coordinates, I teleport. So I made an asm code so that it always branches and in the room, the shield is always shining, but when I leave the room it doesn't shine anymore.

Do me a favor and try out 8017F3D8 0010 in a place where light can shine the mirror shield but not in ancient ikana. I still haven't tried other places yet, since I've been preoccupied on finding out a universal code. So I tried seeing where I end up after that subroutine, and it turns out that the subroutine that I changed using gameshark is called by a switch statement :( . The irony is, I used to think Zelda was well known. I'll keep writing down more addresses so I can understand the game better.

The code I posted probably isn't 100% safe, as in it could effect other aspects of the game.

31st January 2014, 05:16 AM
Well you certainly have found an interesting code.

I ran it in the castle first, and the moment I entered it I got jumped straight over by the glass switch which, when struck, radiates light from above to Link's Mirror Shield. I can't even move away from the area without turning the code back off; I'm locked in. :D

I had to use the Song of Soaring to get out of there, even after disabling it.

I walked into Stone Tower Temple and got teleported straight into the Real Bombchu and the explosion hurt me. :D Seems light for shields ain't the only thing this code will take me to lmao. (Oh shit, not only that, but I forgot to turn the code back on first...so me being instantly bombed by the crawling Real Bombchu mouse rat thingy was without me even turning the code back on after soaring to the temple.)

Oh but this is nice!
In the next room, my Mirror Shield is always glowing on (and the Sun block instantly faded away even though I wasn't pointing my shield at it >.>), even with the code turned off lol. Guess the effect from enabling your code even just once is permanent for a good while.

It stays lit in the next room too. (It doesn't light up in the room after that of course though since there are no spots in that room where the shield is even usable.)

So I guess you found something or other there to be sure...

31st January 2014, 05:24 AM
Lol thanks for testing it. When I teleported to clocktown, it was really glitchy lol. Also, that switch case code seems to be for player actions. It triggers when I roll or swing the sword. The execution address for the jump is 800E660C.

It's hard finding out what code is only specific to mirror shield shining. If that fails, then I will try the damage one. I need to do some testing on how damage works anyway.

Another thing I'm going to try and find are player states, like when you're jynxed.

Just to clarify, you wanted the mirror shield to shine everywhere right? Not just certain places.

31st January 2014, 05:40 AM
Hmm...shining everywhere would be a bonus, but, depending on the place, might not be a very natural code.

It could ruin the purity of the code to make it shine in rooms where it has absolutely no use, lol.

And yeah, I could tell by some of the simple string allocations that the game was poorly coded in spots. You might have a really tough battle of DMA on your hands. T-T

31st January 2014, 06:12 AM
Lol silly me. I was trying to make a shining shield everywhere code. So far I have found a value that I'm guessing is the colision coordinates, because the game compares it to your X and Y coordinates. When I raised the numbers, the mirror always lit up. Too bad it's area specific.

Well I think I found the code you want. It's certainly more stable than the previous code I gave you. It worked in 2 places so far.
8117F3E4 2402
8117F3E6 0001

Edit: It does have strange effects though. Whenever I roll around in Clocktown, the the bell gets hit as if I swung a sword at it. Certain parts of the game are buggy with this code unfortunately. Looks like this is harder than I thought. Even though it's technically easier to make the code for mirror shield shining in specific areas rather than the whole game, DMA makes it very challenging to come up with a bug free code. I'll keep trying a few more things (like activators).

31st January 2014, 09:50 PM
Yeah haha, I just did a magic sword spin attack in Ikana Valley, and Tingle's air ballon just abruptly popped lolwut? :D

In fact, doing a magic sword spin with this code turned on pretty much takes out anyone and anything in the current world XD. Your code accomplishes more than one thing.

Still, it makes it impossible to win in the fight against the King and his two soldiers. If you proceed to the main throne room of the castle, and when the fight begins, use your fire arrows to burn the curtains covering the light through the windows, you'll be able to use your mirror shield there, but you have to transform out of normal Link into something incapable of using the shield to even be able to move anywhere during the battle from that point. :D

31st January 2014, 10:18 PM
Lol last night, just when i was about to give up, I remembered about activator codes. I just tried it and it seems more stable than the other codes I've made.
If this fails, I still have a few more codes to try out. If worst comes to worst, you could just make an individual code for each area or simply patch the rom. I don't feel like patching the rom at this point because then I'd have to worry about CRC and changing rdb settings. I noticed that when you hack SSB64 and change the CRC, you will see black lines in VS mode during a match.

Again, I'm fairly certain that activator codes are stable since it should take care of the DMA problem.
Lol I almost forgot to post the code, here it is.
D140D3E8 3319
8040D3E8 0024
8140D3EA 0002

I will definitely put that mirror shine anywhere code on hold. I will have to learn a lot more about the game to see whether it would be an easy code or not. If it does turn out to be super complicated, then I won't bother lol. I did find weapon length and tunic color :) . Too bad the tunic color code would be pretty big lol.

31st January 2014, 10:47 PM
Hm I'm not sure this one works. I tried disabling and re-enabling it on several intervals and have it installed like so:

D140D3E8 3319
8040D3E8 0024
8140D3EA 0002

My gameplay seemed pretty normal and unaltered in all 3 quick-to-access light spots in the castle: The throne room's windows, the glass switch by the entrance, and in the center of the re-dead. Light only shone when I was in the spots.

I'm using Majora's Mask (U) [!].

31st January 2014, 11:09 PM
Lol my bad, I forgot to check other areas :( . Looks like I spoke too soon.
I guess the code that checks the local variable for shield shine is located at a different address for each location. Do you know of any activator codes that would only trigger in rooms where it's possible for the mirror to reflect light?

1st February 2014, 12:36 AM
Hm no sorry I never thought about checking for those.

I'm surprised the game even stores data that indicates whether or not it's possible to reflect light in any rooms. :D That in its self shows my guess of the situation just isn't concrete enough.

I know what I could add is a activator that only shines light from the mirror shield when pressing R. By checking if the buttons buffer stores the R trigger signal, Link's shield could only glow while raising the shield. It's not really something that would help finding out anything, but it could help prevent the constant bugs and side effects from being susceptible throughout the rest of the game, make testing codes easier so Link can actually move someplace when the codes are on :D, etc.

1st February 2014, 02:11 AM
At this point, the easiest solution would be to just find all the locations with mirror shield and make codes for each area. I pretty much give up on finding this code since it's so buggy to change the game mechanics. I don't get why each location has different adresses for the assembly code.

Eventually if I decide to keep exploring the game's data, I could maybe find out an easier way to make the shield shine.

1st February 2014, 04:24 AM
I'm currently checking out using the very slow, tedious memory increased, memory unchanged method (assuming that the memory increases by masking in a bit flag or using a higher integer when the shield is shining).

It's taking a while but I've got this:
which I've just found from all those years ago when someone first brought up the idea of doing a mirror shield cheat.

1st February 2014, 04:46 AM
Here's a Gameshark code that might help you. It's still buggy, but less buggy than the other codes.
810FFEB0 E481
810FFEB2 0000
Really you only need to change 1 byte, but nemu messes up on codes that are 1 byte and have an odd number for the address. The only thing you need to change is 800FFEB1 0081. Using this code will make the mirror shine in rooms where it's possible. One side effect I noticed was that these skeletons I fought were also shining. There are probably other visual side effects too. Even if you don't want to use a code with side effects, this one should help you with simply finding the addresses of the mirror light.

So for now, I'll need to travel to each area with light and write down info on each location.

1st February 2014, 05:02 AM
Thanks, I'll add that to the list.

So here's what I've come up with so far.
I constantly followed the assumption that light coming out of the shield means an INCREASE in the number of bits set (or at least a higher integer number for enumerating Link's shield property/activity than normal which ideally would default to 0) and a decrease when stepping out of the light.

I eliminated it down to 100 something results, no less without cross-testing other places such as Beneath the Well, then I'm left with 29 possibilities:

offset m2 m1
------ -- --
1F917E 0A 00
1F91BD 1E 13
1F91BE DB 36
1F91BF 7C 68
1F91E6 1F 00
1F91E7 3C 00
1F91F0 80 00
1F91F1 72 00
1F9262 73 00
1F9263 50 00
1F92B8 80 00
1F92B9 1F 00
1F92BA 93 00
1F92BB 5C 00
1F9300 80 00
1F9301 1F 00
1F930A 95 00
1F930B 64 00
1F932C 80 00
1F932D 1F 00
1F932E 95 00
1F932F 70 00
1F9330 80 00
1F9331 1F 00
1F9332 94 00
1F9333 44 00
3FFDE9 02 00
3FFE00 10 00
3FFE01 49 00

m2 means the new value after stepping into the light.
m1 means the old value before Link's shield glowed.
Obviously as we can see the old value when the shield's Normal is almost always 0x00.

One of these 29 addresses, when written to with 0x00, might force Link's Mirror Shield to NOT emit light (or at least not have any effect on undead creatures, sun blocks, etc.).

However, most of them seem to reset back to m2 if I overwrite them with 0x00 or m1. I want to say ALL of them do, but Project64 crashed on me mid-way while I was doing quick RDRAM plugins.

I'll write 29 GameShark codes if I have to. :D One way or another, I'll single this out.

1st February 2014, 05:19 AM
What area were you in, when you did this memory checking?

Also, I think 1F917E has to do with whether the face displays or not. When the face isn't displaying, I don't get A0, and the number constantly changes since Link doesn't just stand still. I will try messing with each of these numbers.

1st February 2014, 05:25 AM
What area were you in, when you did this memory checking?

Also, I think 1F917E has to do with whether the face displays or not. When the face isn't displaying, I don't get A0, and the number constantly changes since Link doesn't just stand still. I will try messing with each of these numbers.

I didn't try any of the areas in Stone Tower Temple, but I did try:
* Beneath the Well (just before sneak entrance to Ancient Castle of Ikana)
* glass switch by entrance of Ancient Castle of Ikana
* before the throne room, in between the 4 re-dead's (needs Powder Keg)
* that thing where the Floormaster hand thingy is, with the sun block and 4 more re-dead (trickier to access this one)

I was going to try the throne room with the King and his two skeleton dudes, but I got impatient and started cracking the addresses first and that's when Project64 crashed and tossed out all my results. :) So oh well, I'll just have to make 29 codes (minus 1 since you just gave me the hint on that very first result being the face showing up or not).

and yea, usually off means 0x00 but with on, I think it does depend on the exact light spot (for some but not all addr's)

EDIT: Also my Internet will time out in 15 min so I'll be forced to go to bed soon anyway but I'll have something by then I'm sure. :D

1st February 2014, 05:37 AM
Well, when I looked at those addresses, I noticed a few of them were pointers. Freezing them all at once crashed my emulator, so I had to do a few at a time. The best thing I could do was get rid of the mirror reflection sound lol..

I'll admit, I was freezing the whole 4 byte values so that might have something to do with the crashing. Still, some of the values constantly change.

10th February 2014, 01:42 AM
Got a retooled Goron Spike roll (no magic) code for Majora's Mask.

Always Spiked Goron Roll
D040090D 0001
80400939 0007
Hit a wall to cancel the roll,it does not cost magic.

You can also mash A or shield when trying to stop in reverse.

11th February 2014, 12:26 AM
Maybe this will peak your interest!

Epona Action Mod
80419DB7 00xx
Works in Clock Town if you use the next code.
07=riding (try when not riding for mind control)
0B=start running
0E=screeching to a halt
11=jump fence

Epona Clocks In
D11EF672 5460
81419C94 C3C0
D11EF672 5460
81419C98 C298
D11EF672 5460
81419C9C 44C0
Get on Epona in Termina Field before enabling.
Disable after entering Clock Town.

Epona Unstuck
D11EF672 5460
81419C94 C3C0
D11EF672 5460
81419C98 C300
D11EF672 5460
81419C9C 4506
Just enable/disable it after exiting to termina while on epona.

These two codes are activated by Termina Field's room value.

27th February 2014, 10:51 PM
I did not make this one,but I found it the manual way before finding it on Acmlm's board by HyperLamer.

It makes the game run super smooth!

Ocarina (U) 1.0

Game Execution Speed
811C6FA0 xx0x
0001=Fastest (unstable)
0002=Fast (stable)
0004 and higher=Skipping Frames
0100=Link does Geddan
FF00=Go to space
7F00=Return from space
xx00=Varying degrees of insanity
Too bad it messes with the gravity and physics.

The credit goes to HyperLamer.

27th February 2014, 11:03 PM
I opened the location in memory viewer to find the number set to 0001 while on the N64 Logo,and 0003 when the intro starts.

I think this is how it works...

0003=1\3 "20FPS"
0002=2\3 "40FPS"
0001=3\3 "60FPS" or 1\1

If someone knows how to hack the physics while using 0001 as the execution speed,then we can have a proper 60FPS ROM-hack of Zelda OOT!

For example,changing all physics to triple strength with execution at 0001.

28th February 2014, 12:28 AM
I'm impressed. How do you find stuff like that?
It would take a lot of work to change the speed of every variable dealing with animation, physics, etc.

28th February 2014, 01:53 AM
Find codes like that in games,or from websites?

I found the site containing the code by Google'ing the address I ended up with.
I Google'd "811C6FA0" (no quotation marks) to find a site with the code.

I like to make sure that nobody else made and posted a code before I claim any credit for finding it manually.

28th February 2014, 05:15 AM
I couldn't find any codes about OOT frame cap on google or in game. I know you credited someone else for it in OOT.

That's interesting how the n64 intro has it set at 1. The frame cap reminds me of SSB64 training mode, but it works somewhat different.

28th February 2014, 08:36 AM
Additionally,the inventory menu in at least MM sets it to 0002.

Also,for Banjo-Kazooie,I am thinking about trying to find a code next week for Banjo to always have the drink and sunglasses.

I can't do any codes until Sunday afternoon.

4th March 2014, 09:15 PM
Got an interesting DK64 code by searching
for 0x3F800000 with 32bits in the 0x00700000 area.

Squished/Stretched Width
81747CD0 xxxx
3E80=Stretch More
4080=Squish More

Edit:Now for a "Wario World" style size modifier!

Polygon Size Modifier?
8161B4A0 xxxx
It works exactly like the Wario World code!

EDIT:You can get stuck in Cranky's lab,just set it to 3F80 to get free.

5th March 2014, 02:47 PM
Squished/Stretched Width
81747CD0 xxxx
3E80=Stretch More
4080=Squish More

Does this effect the screen size or something else?

5th March 2014, 06:49 PM
It affects the game itself by squishing and stretching DK and the world while not changing the "consoles" border.

6th March 2014, 03:02 PM
So would it kind of be like FOV?

6th March 2014, 06:20 PM
Similar to FOV at least,but the game looks distorted at other viewing angles.
If you set it to something like 4280,it should squish beyond visual playability.

You should see the polygon size modifier,it hilariously affects all characters and enemies.

I may try finding the address for sizes when you fall or get crushed by something.

13th March 2014, 01:26 AM
How would one go about finding color data? Say I wanted to change a persons outfit color, how would I find the memory location? For instance, lets pretend the code wasn't already found for tunic color in Zelda MM, what would I need to do to find the addresses?