ResourceSizeTable.product.rsizetable: Difference between revisions

no edit summary
imported>BravelyPeculiar
No edit summary
imported>Leoetlino
No edit summary
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<onlyinclude>
<onlyinclude>{{Resloc|path=System/Resource/ResourceSizeTable.product.rsizetable}}
{{Resloc|path=System/Resource/ResourceSizeTable.product.rsizetable}}{{NoRstb}}
'''ResourceSizeTable.product.rsizetable''' is the file where the [[resource size table]] is stored.</onlyinclude>
'''ResourceSizeTable.product.rsizetable''' is the file where the [[resource size table]] is stored.</onlyinclude>
== Editing ==
The resource size table must be edited when making game files larger than they originally were, in order to avoid crashes. It can be edited using [https://github.com/leoetlino/rstb <code>rstb</code>].


== Structure ==
== Structure ==
Line 12: Line 8:
<syntaxhighlight lang="c++">
<syntaxhighlight lang="c++">
struct RstbHeader {
struct RstbHeader {
   u32 magic;           // 'RSTB'
   char magic[4];       // 'RSTB'
   u32 crc32TableSize;  // number of entries - can be 0 to indicate there is no crc32 table
   u32 crc32TableSize;  // number of entries - can be 0 to indicate there is no crc32 table
   u32 nameTableSize;  // number of entries - can be 0 to indicate there is no name table
   u32 nameTableSize;  // number of entries - can be 0 to indicate there is no name table
Line 60: Line 56:
* VfxResourceMgr, when loading Effect/%s.esetlist files: must not be zero.
* VfxResourceMgr, when loading Effect/%s.esetlist files: must not be zero.
* bfres loading code at 0x7100FE3978 (v1.5.0): unclear, but must not be zero. It appears to check whether the file size listed in the RSTB is larger than the heap size.
* bfres loading code at 0x7100FE3978 (v1.5.0): unclear, but must not be zero. It appears to check whether the file size listed in the RSTB is larger than the heap size.
* res::ResourceMgrTask::getHeapSizeForResLoad (0x710120BDE0 in v1.5.0): called during resource load.<syntaxhighlight lang="c++">
* res::ResourceMgrTask::getHeapSizeForResLoad (0x710120BDE0 in v1.5.0): called during resource load.
<source lang="c++">
constant = 0x128 + 0x40;
constant = 0x128 + 0x40;
if (auto* entry_factory = dynamic_cast<res::EntryFactoryBase*>(factory))
if (auto* entry_factory = dynamic_cast<res::EntryFactoryBase*>(factory))
Line 72: Line 69:
else
else
   out->readHeapSize = (unsigned int)(float)(loadDataAlignment + totalSize + sizeof(void*));
   out->readHeapSize = (unsigned int)(float)(loadDataAlignment + totalSize + sizeof(void*));
</syntaxhighlight>
</source>
* 0x7100FE1630 (v1.5.0): unclear. If the file is loaded by the resource memory or loading thread, or if the file size listed in the RSTB is larger than a TempResourceLoader field, the game prints: "Texture archive size: %u MB" (translated from Japanese).
* 0x7100FE1630 (v1.5.0): unclear. If the file is loaded by the resource memory or loading thread, or if the file size listed in the RSTB is larger than a TempResourceLoader field, the game prints: "Texture archive size: %u MB" (translated from Japanese).
== Editing ==
The resource size table must be edited when making game files larger than they originally were, in order to avoid crashes.
=== Tools ===
{{tool table|category=Tools (RSTB)}}


[[Category:Content (BotW)]]
[[Category:Content (BotW)]]
[[Category:Content (BotW, product)]]
[[Category:File formats]]
[[Category:File formats]]
Anonymous user