<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://gtamods.com/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Relocatable_chunk</id>
	<title>Relocatable chunk - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://gtamods.com/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Relocatable_chunk"/>
	<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Relocatable_chunk&amp;action=history"/>
	<updated>2026-04-17T21:37:15Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.32.0</generator>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Relocatable_chunk&amp;diff=17784&amp;oldid=prev</id>
		<title>GTAKid667 at 23:35, 11 January 2019</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Relocatable_chunk&amp;diff=17784&amp;oldid=prev"/>
		<updated>2019-01-11T23:35:21Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 23:35, 11 January 2019&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l72&quot; &gt;Line 72:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 72:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;(local) pointers, vtables and function pointers. These are described elsewhere.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;(local) pointers, vtables and function pointers. These are described elsewhere.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{N|LCS}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:File Formats]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:File Formats]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:GTA LCS]]&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:GTA VCS]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:GTA VCS]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key gtamodswiki:diff::1.12:old-17245:rev-17784 --&gt;
&lt;/table&gt;</summary>
		<author><name>GTAKid667</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Relocatable_chunk&amp;diff=17245&amp;oldid=prev</id>
		<title>The hero at 15:01, 1 August 2017</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Relocatable_chunk&amp;diff=17245&amp;oldid=prev"/>
		<updated>2017-08-01T15:01:01Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 15:01, 1 August 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l72&quot; &gt;Line 72:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 72:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;(local) pointers, vtables and function pointers. These are described elsewhere.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;(local) pointers, vtables and function pointers. These are described elsewhere.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;3D &lt;/del&gt;File Formats]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:File Formats]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:GTA LCS]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:GTA LCS]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:GTA VCS]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:GTA VCS]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key gtamodswiki:diff::1.12:old-17244:rev-17245 --&gt;
&lt;/table&gt;</summary>
		<author><name>The hero</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Relocatable_chunk&amp;diff=17244&amp;oldid=prev</id>
		<title>The hero: Created page with &quot;In GTA Liberty City Stories and Vice City Stories Rockstar Leeds used a reloctable chunk format for all types of data.   struct base::sChunkHeader  {  	uint32 ident;  	uint32...&quot;</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Relocatable_chunk&amp;diff=17244&amp;oldid=prev"/>
		<updated>2017-08-01T14:55:47Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;In GTA Liberty City Stories and Vice City Stories Rockstar Leeds used a reloctable chunk format for all types of data.   struct base::sChunkHeader  {  	uint32 ident;  	uint32...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;In GTA Liberty City Stories and Vice City Stories Rockstar Leeds used&lt;br /&gt;
a reloctable chunk format for all types of data.&lt;br /&gt;
&lt;br /&gt;
 struct base::sChunkHeader&lt;br /&gt;
 {&lt;br /&gt;
 	uint32 ident;&lt;br /&gt;
 	uint32 shrink;&lt;br /&gt;
 	uint32 fileEnd;&lt;br /&gt;
 	uint32 dataEnd;&lt;br /&gt;
 	uint32 relocTab;&lt;br /&gt;
 	uint32 numRelocs;&lt;br /&gt;
 	uint32 globalTab;&lt;br /&gt;
 	uint16 numClasses;&lt;br /&gt;
 	uint16 numFuncs;&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
Where ident is a character constant and shrink is a boolean&lt;br /&gt;
that coincides with the game's decision to free the relocation&lt;br /&gt;
tables after loading. It is checked together with the character&lt;br /&gt;
constant but does otherwise not seem to be used directly for anything.&lt;br /&gt;
In the following all offsets are from the beginning of the chunk header.&lt;br /&gt;
&lt;br /&gt;
The different file types are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| ident&lt;br /&gt;
| shrink&lt;br /&gt;
| description&lt;br /&gt;
|-&lt;br /&gt;
| WRLD&lt;br /&gt;
| 0&lt;br /&gt;
| level&lt;br /&gt;
|-&lt;br /&gt;
| GTAG&lt;br /&gt;
| 1&lt;br /&gt;
| resource image/game data&lt;br /&gt;
|-&lt;br /&gt;
| mdl&lt;br /&gt;
| 0&lt;br /&gt;
| 3d model&lt;br /&gt;
|-&lt;br /&gt;
| tex&lt;br /&gt;
| 0&lt;br /&gt;
| texture&lt;br /&gt;
|-&lt;br /&gt;
| anim&lt;br /&gt;
| 0&lt;br /&gt;
| animation&lt;br /&gt;
|-&lt;br /&gt;
| col2&lt;br /&gt;
| 0&lt;br /&gt;
| collision&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
FileEnd and DataEnd are offsets to the end of file and actual data respectively.&lt;br /&gt;
&lt;br /&gt;
After the data comes a relocation table (at offset relocTab with numRelocs entries)&lt;br /&gt;
that contains offsets to all pointers in the data. On load those pointers (stored&lt;br /&gt;
as offsets in the file) are converted to pointers by adding to them the address of&lt;br /&gt;
the loaded file in memory.&lt;br /&gt;
&lt;br /&gt;
After the relocation table comes a table of class and function fixups (at offset&lt;br /&gt;
globalTab with numClasses class fixups and numFuncs function fixups).&lt;br /&gt;
The class values in the file are hashes of their class names and are replaced&lt;br /&gt;
by pointers to the vtable on load.&lt;br /&gt;
The function values are indices that are replaced by function pointers.&lt;br /&gt;
Class fixups are used for the classes stored in game.dtz. Function&lt;br /&gt;
fixups are used for atomic render callbacks.&lt;br /&gt;
&lt;br /&gt;
The actual contents of the files are then just C(++) structures with relocated&lt;br /&gt;
(local) pointers, vtables and function pointers. These are described elsewhere.&lt;br /&gt;
&lt;br /&gt;
[[Category:3D File Formats]]&lt;br /&gt;
[[Category:GTA LCS]]&lt;br /&gt;
[[Category:GTA VCS]]&lt;/div&gt;</summary>
		<author><name>The hero</name></author>
		
	</entry>
</feed>