Project64 Forums

Project64 Forums (
-   Project 64 - v1.6 (
-   -   Majora's Mask Game help with debug rom (

dezthenekodudexD 13th June 2013 03:18 AM

Majora's Mask Game help with debug rom
Hi guys, I'm just lookin' for some little help or advice.

I'm currently playing Majora's Mask (U) rom, almost completed the game, I'm just missing one heart quarter, I've already tried to do them all over again (to get them) but I still can't find it. I've got the Debug rom, it works fine with 1.6 for me, all I just wanted to know is that if there's anyway to use the debug rom (since you can check the in-game programming) to see which heart container is missing. To check code, I dunno... anything that could help? I hope you guys can help me with this! Anything helps!

btw sorry for bad english, not my main language

HatCat 13th June 2013 03:35 AM

Hm.. I dunno.

I reversed the Flash RAM for Zelda MM and wrote a save editor for Zelda progress, but the one thing I could never figure out were the heart pieces.

I only figured out some of them.
Like, heart piece atop Clock Tower is stored at 0xblah bit 4, heart piece in Postman's Office is stored like 800 bytes later at bit 7, heart piece you get at the Inn shitter is 300 bytes in-between at bit 2, w/e it was.

The heart piece Boolean array in the FLASHRAM save table is just so screwed up and random that I can't say for sure if I could help you, as I dunno how to use the debug ROM.

squall_leonhart 13th June 2013 06:37 AM

Tick them off one by one.

HatCat 13th June 2013 02:03 PM

If you do decide to take squall's advice, what you could do is check the bit/byte locations in the RDRAM-relative local buffer of the zs Flash mem, stored this time with big endian, and tell them to me so I can implement all 52 of them. :D

I have played through the game several times and myself gotten all 52 heart pieces, but a few of the heart pieces take a lot of time to get, and time is something I've had more of in the past like when I was writing the editor.

Like, the Super Mario 64 EEPROM is so incredibly simple, the star bit array is exactly what you would expect (7 bits per byte representing the 7 stars of each world), but there appears to be no discernable pattern for Zelda. They get mixed in with other junk bits like true/false did you try to get this heart piece once before but fail? Junk we don't immediately care about supporting in the save editor.

However, if you knew / had the time to find all the byte positions, I would implement them.
Then I could easily make a version of my save editor that reads in the flash memory and analyzes all 52 heart piece bits to tell you which ones you're missing.

dezthenekodudexD 16th June 2013 04:01 PM

I've finally found it! I took squall's advice, it was the one at the Southern Swamp shooting gallery, I was just scoring 2120 points, but got nothing. I've finishied the minigame with 32 seconds left and perfect score, and THEN i've accquired the Heart piece xD

@FatCat I've tried to find some ways to check the RDRAM buffer on the Flash memory, but I couldn't figure out how to do so correctly, my brother helped me with a Byte reader/loader program of his tools (something of his System engineering class, i dunno .-. ) but it resulted in a crash. So I'm sorry :( but well! I'll be checking some other ways to identify them, also I'll be exploring the Debug Rom more-in-depth so I can associate the bytes data to the heart pieces (if I have some tiem left xD) hehe but thank you so much guys! You've been really generous for your help! Thanks! :D

pd: sorry for bad english ^^"

HatCat 16th June 2013 04:11 PM

It was probably Renegade.
But you shouldn't need to use that because Project64 has its own built-in debugger.

In fact, I can give you the exact RDRAM offset that the Flash backup save memory gets buffered to from the FLA save file when a game file is loaded; it just depends on the exact version of the MM ROM (for debug I don't think I extracted that yet).

But I'll admit, it would make things even easier if you found a way to use the debug ROM to directly access the 52 heart piece bits. (They are all 1-bit Boolean like in C++, just jumbled around with crap bits like y/n user has already attempted to get this heart piece before, etc., things useless to save progress.)

HatCat 22nd June 2013 02:37 PM

Too bad he had to post that only on EmuTalk and not this forum.
Invoking my save editor on any Zelda MM FlashRAM save with:


zs ZELDAM~1.FLA 0 --file-erase
zs ZELDAM~1.FLA 0 --file-new true
zs ZELDAM~1.FLA 0 --file-rename "Link    "
zs ZELDAM~1.FLA 0 --owl-statues 0000000011000001
zs ZELDAM~1.FLA 0 --inv-subscreen 0000
zs ZELDAM~1.FLA 0 --inv-subscreen 0101
zs ZELDAM~1.FLA 0 --inv-subscreen 1D32
zs ZELDAM~1.FLA 0 --songs 0000000011100001
zs ZELDAM~1.FLA 0 --temple-Woodfall 00000111
zs ZELDAM~1.FLA 0 --boss-masks 0001

... would have given him a save file with everything he asked + more.
  • Resets File 1 to a new empty file named "Link"
  • Marks owl statue warp locations at Woodfall, Southern Swamp, and South Clock Town
  • In his subscreens, gives him the Ocarina of Time, Deku Mask and Hero's Bow
  • Already learned ocarina melodies "Song of Healing", "Song of Time", "Oath to Order", and "Sonata of Awakening"
  • Have Woodfall Temple dungeon items (the Map, Compass, Boss Key)
  • Already finished Woodfall Temple (have Odolwa's Remains boss mask)

dezthenekodudexD 24th June 2013 04:51 PM

Ah yes! i forgot about the built-in debugger :P lelz But that info you gave me is very useful (Are they really boolean bits? O_O oh man, I just complicated myself! xP) So I'll start checking all those bytes inside the Flash save data, but already using the normal (U) rom, I just got tired of the debug rom, after checking over and over the heart pieces and any changes in the byte data using this rom just gives me headaches. I'll take your advice using the Pj64 debug and the U rom.

You're right, it would be a lot simpler if the storage and progress data in the debug rom would be like "neatly associated" with their respective identifiers, (they look like a lot of weird hex? data and 0-1 operators, none of them that tell which one you've already got, just telling how many you have, up to where I checked) but as I told you, I think that using the debug rom just turned this more complicated . Anyways I'll start out checking all of this as soon as I can, any interesting discovering or result I'll make sure to be posted here. So thanks a lot FatCat! Cheers!

HatCat 24th June 2013 05:31 PM

Where did you get that avatar from XD

Damn, I remember when I used to be that slim, as a little kitten.
When I could fit my paws over my keyboard and tap them keys.

Nowadays I have to struggle to hump my fat belly over it to reach mah keys that way.

Btw, I did see something of a Booleans display in the MM debug ROM when I was in the pause screen and pressed L I think it was. I'm not sure if those might have been 48 of the 52 heart pieces (the non-boss ones) or something; I guess we could check that later.

The Flash RAM might be slightly tricker for you to debug...I had to do a few things to get flash ram hacks to work, but the checksum implemented in place of a CRC was not too difficult to figure out.

HatCat 24th June 2013 06:01 PM

You can also always reverse the Flash RAM save bits from within the CPU emulation thread of Project64 1.7+.
If you use Debugger > Memory search, for USA version of the ROM the flash backup memory data is buffered for the file you start the game with, forgot where I wrote the RDRAM range.

Still, it's possible preferable to just check the flash RAM save after closing emulator. Active data changes in PJ64 DRAM debug do not always take effect to the game's progress loader (e.g. modifying time of day, owl statue warp location requires changing the FLASHRAM, not GameShark cheat codes unless you time them exactly).

If you decide to experiment with the Flash memory save more, here's a couple key points you might need.
  • The byte order is wrong in N64 emulators. Every aligned pair of 4 bytes you find, it should be swapped in the reverse order: DCBA, not ABCD.
  • Each 8K block buffer within the 128K flash RAM will become invalidated on game access if the checksum is incorrect. The 16-bit checksum stored at *(INT16 *)(FRAM + 0x100A) must be a 16-bit sum of all bytes stored from the 8K-block-relative page entry address up til that one.

All times are GMT. The time now is 06:37 AM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.