Resource system: Difference between revisions
m
→Resource size table
imported>Leoetlino m (→Compressed files: use a reference) |
imported>Leoetlino |
||
Line 101: | Line 101: | ||
The ''Resource Size Table'' (RSTB) contains a list of canonical resource names and their sizes. It is loaded from [[ResourceSizeTable.product.rsizetable]] and used to determine how much memory should be allocated when loading a resource. | The ''Resource Size Table'' (RSTB) contains a list of canonical resource names and their sizes. It is loaded from [[ResourceSizeTable.product.rsizetable]] and used to determine how much memory should be allocated when loading a resource. | ||
==== Resource size calculation ==== | |||
It is currently unknown how Nintendo has determined the values in the RSTB. However by REing the resource system it was found that the resource loading heap is, for most factories, only used to allocate the file loading buffer (which is as large as the file to load), the C++ resource class, extra allocations depending on the resource class and some extra bytes to ensure data is aligned correctly in memory. | It is currently unknown how Nintendo has determined the values in the RSTB. However by REing the resource system it was found that the resource loading heap is, for most factories, only used to allocate the file loading buffer (which is as large as the file to load), the C++ resource class, extra allocations depending on the resource class and some extra bytes to ensure data is aligned correctly in memory. | ||