Project:Help wanted: Difference between revisions

Jump to navigation Jump to search
no edit summary
imported>Leoetlino
No edit summary
imported>Leoetlino
No edit summary
Line 42: Line 42:


<code>NoDeathDamageBase</code> (in Link's [[ActorParam/GeneralParamList|GeneralParamList]]) might be related.
<code>NoDeathDamageBase</code> (in Link's [[ActorParam/GeneralParamList|GeneralParamList]]) might be related.
== Resource sizes ==
The [[resource size table]] (RSTB) determines how much memory should be allocated to a given resource (i.e. the size of the resource heap). Unfortunately, the sizes that are listed in there don't quite match the actual file size.
In June 2018, it was discovered that the RSTB sizes include internal memory consumption by the C++ resource classes (see [[Resource system]] for an explanation about the concepts), some of which further dynamically allocate memory from the resource heap! Taking the resource object sizes into account is easy, since they are constant. What's not so easy is determining the amount of memory that will be dynamically allocated for ''complex'' resources such as [[bfres]] and most [[AAMP]] files.
A way to guarantee RSTB sizes are large enough is to reverse each resource class, tracking calls to memory allocation functions. However, this is ''extremely'' time consuming given the sheer amount of resource classes in this game and the fact that the same thing would have to be done for both Switch and Wii U.
The current theory is that either the RSTB is machine generated by special versions of the game, or Nintendo is only calculating approximate file sizes.
A possible way to check whether the listed size is exact or approximate is to dump the memory of the game process and investigate resource heap usage.


== Executable analysis ==
== Executable analysis ==
Anonymous user

Navigation menu