The Nintendo 64 emulator that brought Ocarina of Time to the Gamecube has been fully decompiled

GCN64.png

Back in the early 2000s, Nintendo re-released their (at the time) 3D Zeldas from the Nintendo 64 console for their then brand new console, the Nintendo Gamecube.

The first re-release was back in February 2003, in the form of a dual bundle disc, which came as a pre-order bonus for people who ordered The Legend of Zelda: The Wind Waker. This re-release included the original Ocarina of Time, and a brand new reworked version of the original OoT called "Master Quest", which remixed all of the original game's dungeons to be more challenging.

The second re-release came in the form of The Legend of Zelda: Collector's Edition, which included a demo for The Wind Waker, the original NES The Legend of Zelda, as well as its NES sequel, Zelda II: The Adventure of Link, followed by The Legend of Zelda: Ocarina of Time, and finally, The Legend of Zelda: Majora's Mask, all bundled in a single disc.

These two re-releases for the Nintendo Gamecube were not actual native ports of the original games, but rather they relied on a custom-made Nintendo 64 emulator by Nintendo of America (and also the NES titles), alongside the original ROMs of the games within the disc, and while the emulator was far from perfect, with Majora's Mask specifically suffering from several drawbacks, with the most prominent being a random crash/freeze that required the player to completely reset the game (those familiar with Majora's Mask save system can know the hurdle), the emulator did its job in bringing these beloved titles from the previous generation to the current one at the time. This N64 emulator by Nintendo themselves, was later reworked and repurposed for use for the Wii's Virtual Console and its measly 21 titles.

Now, thanks to the great effort and research made by Zelda Reverse Engineering Team, also known as ZeldaRET, the Nintendo 64 emulator used on the Gamecube to bring these titles to light has been fully decompiled. With this, some interesting details about the development of the emulator, and also, Nintendo's early dealings in emulation as a whole to bring older titles to modern consoles, could be explored in more detail, and additionally, further research on this emulator could also help towards possibly improving the emulator and bringing a more stable and up-to-date Nintendo 64 emulator for both the Gamecube and the Wii, or even aiding in improving currently existing emulators for the system with currently known Not64 and Cube64 emulators for GC and Wii as well.

:arrow: Source
:arrow: ZeldaRET OoT GC Decompilation on GitHub
 
Sadly the game was not emulated very well in the Gamecube, good grief, I saw a video making comparisons between OG for N64, this "port", the Wii version and Wii U and yeah it was bad.

That is why it was a bonus disk.
 
Whoever did this NEEDS to look at the Game Gear emulator inside of Sonic Adventure DX on the GameCube. The benefit of harnessing that emulator is how with the touch of a button it can emulate 2 Game Gears at once, running at full speed and (optionally) able to link up for multiplayer games.

This really needs to be looked into. It's a small feature, but full speed multiplayer Game Gear games on a GameCube, Wii , and/or Wii U would be a boon for the homebrew scene across all 3 generations.
 
They went from decompiling games to avoid emulators, to decompiling the emulators them self!
Can we finally figure out why Majora's Mask in the Collector's Edition randomly crashes now? 😪
The doggy's ai lags the game. If you get the doggy in Clock town to clip through the ground, you'll get an fps boost.
 
  • Like
Reactions: retrospect
I never actually owned the collection. But I do know the nes pallets are... not good. Like the NES on gba? Makes me wonder, just what is the "Right" pallets for nes systems? The only emulators I know that don't let the player have... different pallets are snes. NES emulators are radically weird, and gameboy/ advance have that "Color correction" that even official nintendo ones seem to try and do. I just have to wonder where these systems went wrong, or do we just blame emulators for this discrepancies. :blink:
We have so many different palettes for the NES, because the NES itself doesn't generate RGB values, but an NTSC (or PAL) signal directly, which gets interpreted by the TV itself, so depending on your TV (and the tint control on NTSC), the colors will look different. Which means: There is no official color palette.
Since SNES, the consoles were able to output RGB directly, so we get concrete values.

The Gameboys are a bit more complicated. You could just use the RGB values the console spits out and display them, but on modern screens, that wouldn't represent what the colors look like on the console itself. Since the Gameboys have built in screens that should be the same across all of them, many games were calibrated to look good on this specific screen and displaying the game on other screens could lead to colors looking odd.
For example, there are GBC and GBA games that have very bright colors to compensate the dark looking screens, since, when they came out, they didn't have any light. If you put this bright image on a screen that is better at reproducing colors, the image will be way too bright.
Here is an example using Zelda Oracle of Seasons. The first image is from a GBA SP (AGS-001) with its front light disabled, which looks fine. But the same game on a newer GBA SP with a backlight (AGS-101) produces way too bright colors, even though the game sends the same color information.
So to reproduce these muted colors, some Gameboy emulators (and sometimes also DS) include color filters that try to get the colors on modern displays more in line with the original screens.
 

Attachments

  • IMG_20221005_103129~3.jpg
    IMG_20221005_103129~3.jpg
    371.2 KB · Views: 34
  • IMG_20221005_102720~3.jpg
    IMG_20221005_102720~3.jpg
    1 MB · Views: 34
I was hoping this would happen. Now maybe we can force certain save types for different ROMs. For instance, if you wanted to play a Debug Ocarina ROM you would need to change its 4-digit ID from CZLE to Majora's Mask's ID of NZSE.

However, doing so would break saving as it would be switched to FlashRAM instead of SRAM. I hacked around quite a lot but only once did I get it to work (expansion pak mode but with SRAM instead of flash) but could not obtain it again.

Also, when looking through the .dol you can see other game names included like Paper Mario and others. Maybe we will eventually be able to play these on GC at full speed with the official emulator.

I bought the Master Quest for GC years ago at only 20$ and I am glad I still have it (it also includes the manual). But then again, I don't sell Zelda games anyway. The newest one I have is botw for Switch and have no interest in the 2023 DLC- I mean totk.

Concerning the emulator (D43E01), here are some of my findings from a few years ago:

N64 COUNT Register
0x80ACE9D2 0000????

N64 Program Count Register
0x806440A8 ????????

Enable Expansion Pack/RAM Size
0x80AA0FF0 00800000 < 8 megabytes

Enable SRAM (Ocarina of Time)
0x80AB2023 435A4C45 (ROM ID)
This is possibly what allowed me to save using a Debug Ocarina hack (The Sealed Palace) with a ROM using the Majora's Mask ID.
 
Last edited by Vetus_Mundi,
  • Like
Reactions: Doblete
We have so many different palettes for the NES, because the NES itself doesn't generate RGB values, but an NTSC (or PAL) signal directly, which gets interpreted by the TV itself, so depending on your TV (and the tint control on NTSC), the colors will look different. Which means: There is no official color palette.
Well I'm more shocked nintendo themselfs can't decided on what their pallets should be, they been inconsistent for years. Is just silly. If I had to choose something, preferable, fceux default or the playchoice-10 pallets, those nes ports to psx (Mega man anniversary collection are not bad looking pallets. Visualboy advance or mgba defaults as well desmume & melonds are good looking overall. Though I do understand the issue with the Gba oversaturation.

If I had to think about it, I would say the 3DS system had the closest pallets to what I prefer or least the emulators I listed above. Even the nintendo switch doesn't look like the 3DS pallets.

Side note, I don't think giving older systems access to full range RGB. Makes things look more colorful, just comparing the sega master system to game gear, nes ports to gbc is night & day. But with the new game console options to choose between full or limited RGB, makes things even more inconsistent. :ninja:
 
  • Like
Reactions: retrospect
Well I'm more shocked nintendo themselfs can't decided on what their pallets should be, they been inconsistent for years. Is just silly. If I had to choose something, preferable, fceux default or the playchoice-10 pallets, those nes ports to psx (Mega man anniversary collection are not bad looking pallets. Visualboy advance or mgba defaults as well desmume & melonds are good looking overall. Though I do understand the issue with the Gba oversaturation.

If I had to think about it, I would say the 3DS system had the closest pallets to what I prefer or least the emulators I listed above. Even the nintendo switch doesn't look like the 3DS pallets.

Side note, I don't think giving older systems access to full range RGB. Makes things look more colorful, just comparing the sega master system to game gear, nes ports to gbc is night & day. But with the new game console options to choose between full or limited RGB, makes things even more inconsistent. :ninja:
VBA, mGBA, DeSmuME and melonDS default to no filter, so you get the raw image. Looks fine in most cases.
Even back then it didn't cross my mind that the colors on those hand-held a were optimized for their screens, so I always thought that the way they look in an emulator must've been the intended look :D
 
  • Like
Reactions: retrospect
VBA, mGBA, DeSmuME and melonDS default to no filter, so you get the raw image. Looks fine in most cases.
Even back then it didn't cross my mind that the colors on those hand-held a were optimized for their screens, so I always thought that the way they look in an emulator must've been the intended look :D
I think more of the problem is just how inconsistent it is. Mostly on nintendo's part. Sure they made the consoles what they are. But what excuse does their emulators have? If they aren't trying to streamline a standard, then it's just chaos. The PC emulators call it "Color correction" but what is correct if nintendo doesn't establish it themselves?

The nes zelda games on the gamecube collection, the animal crossing nes collection, the nes classics on gba, the virtual console on wii & wii u, 3DS, Switch? Just to stretch it further, NES REMIX on wii u, 3DS and switch, or even NES games ported to gbc? They can't settle on anything, especially now digital progressive monitors are more common now. They either streamline the pallets or just have option for raw colors. :blink:
 
Hey this souinds awesome, it could mean that N64 emulation could be feasable on consoles and hopefully on gamecube mostly
 
I think more of the problem is just how inconsistent it is. Mostly on nintendo's part. Sure they made the consoles what they are. But what excuse does their emulators have? If they aren't trying to streamline a standard, then it's just chaos. The PC emulators call it "Color correction" but what is correct if nintendo doesn't establish it themselves?

The nes zelda games on the gamecube collection, the animal crossing nes collection, the nes classics on gba, the virtual console on wii & wii u, 3DS, Switch? Just to stretch it further, NES REMIX on wii u, 3DS and switch, or even NES games ported to gbc? They can't settle on anything, especially now digital progressive monitors are more common now. They either streamline the pallets or just have option for raw colors. :blink:
Unofficial emulators will always call things whatever they want. Color correction in this case would mean that the creators see the colors how they appear on the handheld as "correct."

I don't think Nintendo is very interested in standardizing this either. What would they even gain from that? They don't want you to play their games outside of the most current console anyway. And only the way they intend you to. For example: On the NSO emulators, you can't disable color correction to get just the raw image. You always get their filters.

And like I said, NES is a whole other can of worms, since it doesn't output its own colors and always leaves them up to interpretation. Even if Nintendo were to establish an official palette, what if it just doesn't look as good as fan made ones? The default for unofficial emulators won't change, they would just stick to their own defaults.

But that's also what I like about this. You have the choice. If you don't like how something looks, just change it. Unless you're using Nintendo's emulators, then... tough luck ^^'
 
  • Wow
Reactions: Sonic Angel Knight
I never actually owned the collection. But I do know the nes pallets are... not good. Like the NES on gba? Makes me wonder, just what is the "Right" pallets for nes systems? The only emulators I know that don't let the player have... different pallets are snes. NES emulators are radically weird, and gameboy/ advance have that "Color correction" that even official nintendo ones seem to try and do. I just have to wonder where these systems went wrong, or do we just blame emulators for this discrepancies. :blink:
In the case of NES and SNES on the GBA I think the pallets are bad for visibility on the original model.
 
In the case of NES and SNES on the GBA I think the pallets are bad for visibility on the original model.
I suppose fair points. Though since NES use emulation, that's what I complain about since it's these emulators that have the inconsistent pallets. Snes emulators don't have the same pallet issues nes has. Snes ports on gba are not emulators, just highly saturated to be easier to see. (With rare exceptions like gameboy player altered pallets like Super mario advance 4)
 

Site & Scene News

Popular threads in this forum