Welcome Guest [Log In] [Register]

Announcements

Welcome to Zelda64.net. Announcements can be found below!

6.26.2018  Make sure you keep your passwords safe. If you use the same password on here as on other sites, it is highly recommended that you change it. If you can't change your password, and want it changed, let me or other active staff know, and we can force a reset or change it for you. ~PwnzLPs
Welcome to Zelda64. We hope you enjoy your visit.


You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. A valid email address is required. Your email address will NOT be sold as it is only needed to prevent spammers (and admittedly, some still get around this, but this makes it a bit more difficult, plus, if the moderators need to contact you, we have an email on file to do so). Thanks for considering us!


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
[OoT Debug] Expand & Optimize Your ROM; Faster loading, RAM expansion, etc...
Topic Started: Jun 13 2016, 10:36 PM (1,769 Views)
ChriisTiian
Member Avatar
Estoy seguro que esto será traducido... =P
Writing this, if you want to make your Debug ROM more faster and extended, you can add some of this hacks to your project, remember that some codes need a CRC Fix:


Removing printf Debug Function: (Require CRC Fix)
0x00002CF0 -> 03E0000800000000

Remove The Exception Handler On osStartThread: (Require CRC Fix)
0x00005250 -> 00000000
0x00005278 -> 00000000

Faster Subscreen Delay:
0x00B36B6B -> 03
0x00B3647B -> 00
0x00B36483 -> CA

Faster Loading Area:
0x00B74FE0 -> 00000000
0x00B75094 -> 00000000
0x00ACEE2C -> 00000000

Faster Boot Loading (For RAM) And RAM Expansion: (Require CRC Fix)
0x00005DF8 -> 3C010080AFA1000800000000

RAM Expansion Hack: (This can broke some GS Codes)
0x00B415B0 -> 3C188074
0x00B33C5C -> 3C05004D

More RAM Space For Loaded Objects: (More Space For Scenes/Maps, Allow More Polygons):
0x00B0EF9C -> 3C110020
0x00B0EFBC -> 3C110020
0x00B0EFE4 -> 3C110020
0x00B0F00C -> 3C110020
0x00B0F010 -> 3C110020


Credits:
Airikitascave: All RAM codes.
▲ChriisTiian▲: Converting all RAM codes to ROM and writing this.
Offline Profile Quote Post Goto Top
 
zelda5655
Member Avatar
project 3ds team leader.
Wow you probably read my post on Project 3d quest anyways thanks for this information my question has been answered. :D
Offline Profile Quote Post Goto Top
 
z64offline
Member Avatar
Empath mapmaker
ChriisTiian
Jun 13 2016, 10:36 PM
More RAM Space For Loaded Objects: (More Space For Scenes/Maps, Allow More Polygons):
0x00B0EF9C -> 3C110020
0x00B0EFBC -> 3C110020
0x00B0EFE4 -> 3C110020
0x00B0F00C -> 3C110020
0x00B0F010 -> 3C110020
Would you be able to explain a little more what this means/ how this works exactly?

Would this change affect the file of each scene based on this http://spinout182.com/mqd/s.html?

Does this mean that the scene size of your choice increases? If so, then by how much?
Edited by z64offline, Jun 13 2016, 10:49 PM.
Offline Profile Quote Post Goto Top
 
zelda5655
Member Avatar
project 3ds team leader.
I believe the reason why your not understanding this is because this is Ram code and not Hax.
But don't worry I don't understand it much either but least my question was answered.

If I'm wrong he'll correct me. :)
as for fixing the CRC.

I can help anyone with that in fact I made a batch file that makes it a lot easier. :D
Edited by zelda5655, Jun 13 2016, 10:49 PM.
Offline Profile Quote Post Goto Top
 
aroenai
Member Avatar
Sentient Hunk of Green Cheese
I think z64offline's question was more related to the mechanics on how the changes affect the game engine.

My guess (and mind you my knowledge of the Zelda 64 engine is limited), it allocates more of the reserved heap (assigned by 0x00B33C5C), to the area of ram assigned for the currently loaded scene/room/actors so more information can be loaded at a time. Those values are all bumped up from 0x0F to 0x20, but what those addresses correlate to... I don't know.
Offline Profile Quote Post Goto Top
 
mzxrules

Might as well explain what all the memory expansion mods do. To understand things a little better, I recommend trying out my Spectrum program.

For the most part, Ocarina of Time's ram can be thought of as being broken down into two blocks: "Static" Memory and Heap Memory. Static Memory falls roughly between addresses 80000000 to 802109E0 in the Debug Rom, while the Heap Memory is roughly between 802109E0 and 8044BE80 I believe

Data structures in Static Memory are addressed directly... that is to say that there is some hardcoded address used to reference all data within Static Memory. For example, the save data variables are located at address 8015E660. In order to reference say Link's age, you'll typically see code that looks sort of like this:

Code:
 
lui at, 0x8016
addiu at, 0xE660 //at has been harcoded to store the address 8015E660
lw v0, 0x0004(at)


Data structures in Heap Memory are addressed indirectly (aside from overlays)... that is to say that there is no hardcoded start address for items in Heap Memory, meaning that they can be given any address within the heap and function just fine. Overlays are a bit of an exception since they are designed in such a way that they can be loaded anywhere in ram while still being able to use direct addressing for a lot of things.

Code:
 
RAM Expansion Hack: (This can broke some GS Codes)
0x00B415B0 -> 3C188074

The first hack sets the upper bounds of addressable ram. Another way to look at it is that this sets the end address for the game's frame buffer, and possibly sets the end address of the usable Memory Heap.

With the upper bounds of addressable ram set, the game allocates the heap, starting from a high address to a low one. Without the mod, the end result is that this leaves 802109E0 to 80400E80 left of free space. Changing this value bumps the end address to 80740E80. However, this won't actually give you any extra free ram to work with.

Code:
 
0x00B33C5C -> 3C05004D

That's where this comes in. When you load into the playable game, the remaining free space is split into 4 blocks:

The "Static" Context (0x15E0 bytes) as I like to call it, which contains a number of gameplay-wide variables, including ones that the Debug Rom's memory able is able to modify
The "Global Context" (0x12518 bytes), which contains key gameplay and engine related variables
The "Game Heap" (0x1D47A0 bytes), which contains all free space available to the main game. The above hack modifies the size of this block from 0x1Dxxxx bytes to 0x4Dxxxx
And lastly, an unknown extra chunk of ram (0x8140 bytes) which simply contains an extra pool of free ram. I've never seen anything allocated here though.

Now on to the the "More RAM Space For Loaded Objects" hack. This hack actually shouldn't affect how much space is reserved for scene and room files at all.

For scene files, the game calculates the size of the file (rounded to the nearest 0x10 block), and places it such that the end address is at the upper bounds of the remaining space in the "Game Heap" block. There isn't a hardcoded size cap. For room files, the game either reserves enough space for the largest room file in the scene's room list, or the largest pair of rooms connected by the transition actor list. Again, no cap.

Rather, what this set of hacks does is it sets the size of the space reserved for Object Files and Pause Screen texture data. From my testing, this space is always a fixed 0xFA000, so this hack bumps it up to 0x20A000. This space is reserved immediately after the Scene File

Edit: Fixed small typos
Edited by mzxrules, Jul 17 2016, 02:03 PM.
Offline Profile Quote Post Goto Top
 
ChriisTiian
Member Avatar
Estoy seguro que esto será traducido... =P
mzxrules rules!

Thanks for your explaintation!, very well redacted!
Offline Profile Quote Post Goto Top
 
zelda5655
Member Avatar
project 3ds team leader.
Him and both @ideka.

Are experts at these type of things.

The owner of the site is probably an expert at this stuff too but he doesn't do modding anymore.
Offline Profile Quote Post Goto Top
 
Zamboni

Maybe he's an embedded systems engineer?
Offline Profile Quote Post Goto Top
 
Three Pendants
Member Avatar

Now this is some useful information! It may allow me to expand my options elsewhere as well, I'll have to give these a try, thanks for posting these ChriisTiian! And as always, thanks to Airikita for finding these in the first place.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Documentation · Next Topic »
Add Reply