3D rendering: Difference between revisions
Marius851000 (talk | contribs) Initial page creation |
Marius851000 (talk | contribs) First version of Memory use table |
||
| Line 16: | Line 16: | ||
=== Memory === | === Memory === | ||
The bank D is dedicated to store the textures used for the 3D render, and bank F is used to store the palettes. Bank D is 128KiB large, and bank F is 16KiB large. The game seems to | The bank D is dedicated to store the textures used for the 3D render, and bank F is used to store the palettes. Bank D is 128KiB large, and bank F is 16KiB large. The game seems to mostly allocate texture on a multiple of 1KiB, and palette on a multiple of 0x100B, but there it is possible to perform allocation not aligned on those arbitrary values (but it still (maybe, untested) need to be 4-bytes aligned). | ||
The game store it’s 3D data in WTE files. It contain the texture and the palette, but not where the file will be stored in the RAM, which is specified in the game’s code. Here is table of the (known) allocation the game make. It is probably exhaustive. | |||
ProcessWTE is the function used to load them. | |||
{| class="wikitable" | |||
|+ | |||
!file location | |||
!dungeon or overworld | |||
!description | |||
!call to ProcessWTE | |||
!texture offset | |||
!texture size (bytes) | |||
!palette offset | |||
!note | |||
|- | |||
|1025 in dungeon pack | |||
|dungeon | |||
| | |||
|overlay_29::022eda20 | |||
|0x400 | |||
|0xc00 | |||
|0x1d00 | |||
| | |||
|- | |||
|1007 to 1011 in dungeon pack | |||
|dungeon | |||
| | |||
|overlay_29::02336200 | |||
|0x0 | |||
|0x400 | |||
|0x0 | |||
|which one is loaded depend on language | |||
|- | |||
|1031 or 1003 in dungeon pack | |||
|dungeon | |||
|both are fogs texture | |||
|overlay_29::023394e4 or overlay_29::023395f8 | |||
|0xB000 | |||
|0x2000 | |||
|0x1400 | |||
|unknown how which one is choosed | |||
|- | |||
|1005 in dungeon pack | |||
|dungeon | |||
| | |||
|overlay_29::023394e4 | |||
|0xD000 | |||
|0x2000 | |||
|0x1500 | |||
| | |||
|- | |||
|1001 in dungeon pack | |||
|dungeon | |||
| | |||
|overlay_29::023394e4 | |||
|0xF000 | |||
|0x2000 | |||
|0x1600 | |||
| | |||
|- | |||
|some between 1012 to 1020 in dungeon pack | |||
|dungeon | |||
| | |||
|overlay_29::0233614c | |||
|0x1000 | |||
|0x400 | |||
|0x200 | |||
|which one depend on language | |||
|- | |||
|c_wipe.wte or w_wipe2.wte | |||
| | |||
| | |||
|0x0206afb0 | |||
| | |||
|0x8000 | |||
| | |||
| | |||
|- | |||
|w_heart.wte | |||
| | |||
| | |||
|0x0206b000 | |||
| | |||
|0x2000 | |||
| | |||
| | |||
|- | |||
|circle.wte | |||
| | |||
| | |||
|0x0206b050 | |||
| | |||
|0x2000 | |||
| | |||
| | |||
|- | |||
|s13p01t1.wte | |||
|overworld | |||
| | |||
|overlay_11::02316d4c | |||
|0x8000 | |||
| | |||
| | |||
| | |||
|- | |||
|d04p31t1.wte | |||
|overworld | |||
| | |||
|overlay_11::02314b9c | |||
|0x0 | |||
|0x4800 | |||
| | |||
| | |||
|- | |||
|v15p03t1.wte | |||
|overworld | |||
| | |||
|overlay_11::02314d20 | |||
|0x0 | |||
| | |||
| | |||
| | |||
|- | |||
|p03p01t1.wte | |||
|overworld | |||
| | |||
|overlay_11::02314eec | |||
|0x0 | |||
| | |||
| | |||
| | |||
|- | |||
|frameX.wte (where X is from 0 to 4) | |||
|both | |||
| | |||
|0x020274e4 | |||
|0x1F000 | |||
|0x800 | |||
|0x1F00 | |||
| | |||
|- | |||
|t01p01t1.wte | |||
|overworld | |||
| | |||
|overlay_11::022f3368 | |||
|0x0 | |||
| | |||
| | |||
| | |||
|- | |||
|t01p01t2.wte | |||
|overworld | |||
| | |||
|overlay_11::022f3394 | |||
|0x4000 | |||
| | |||
| | |||
| | |||
|- | |||
|p03p01t1.wte | |||
|overworld | |||
| | |||
|overlay_11::022f33d8 | |||
|0x0 | |||
| | |||
| | |||
| | |||
|- | |||
|d73p41t1.wte | |||
|overworld | |||
| | |||
|overlay_11::022f341c | |||
|0x0 | |||
| | |||
| | |||
| | |||
|} | |||