Resource MAP File (SCI): Difference between revisions

From Sierra Wiki
Jump to navigationJump to search
Andrew Branscom (talk | contribs)
m 1 revision imported
Andrew Branscom (talk | contribs)
No edit summary
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{TechStub}}
{{TechToDo}}
{{TechToDo}}
[[Category:SCI Pages]]
[[Category:Temp SCI Pages]]
[[Category:SCI Pages to be Edited]]


<div align="center" style="font-size: 22pt">'''The SCI Resource MAP File'''</div>&nbsp;
<div align="center"><span style="font-size: 22pt">The SCI Resource MAP File</span></div>
<div align="center">'''''&nbsp;'''''</div>


{{ResourceInfobox
| ResourceName = Resource MAP File
| InUseDates = [[1988]] - [[1996]]
| Developer = {{SierraRes}}
| Type = {{LookupTableRes}}
| DevLanguage = {{C}}
| OpenSource = {{ClosedRes}}
| Source = {{NoSourceRes}}
| License = {{NoLicense}}
| Engine = {{SCIRes}}
}}


<br />
==<br /> Description ==
==<br /> Description ==


<blockquote>
<blockquote>
The SCI Resource MAP File, usually named "RESOURCE.MAP" contains a lookup table for the individual resources.<ref>[[SCI Specifications: Chapter 1 - Introduction#Resource Storage|SCI Specifications Resource Storage]]</ref>
The SCI Resource MAP File, usually named "RESOURCE.MAP" contains a lookup table for the individual resources within the game's volume files.<ref>[[SCI Specifications: Chapter 1 - Introduction#Resource Storage|SCI Specifications Resource Storage]]</ref>
</blockquote>
</blockquote>


Line 33: Line 48:
<references />
<references />


== Also See ==
==<br /> Related Links ==


* [[SCI Specifications: Chapter 1 - Introduction#MAP|MAP Files in the SCI Specifications]]
* [[SCI Specifications: Chapter 1 - Introduction#MAP|MAP Files in the SCI Specifications]]
* [[SCI Specifications: Chapter 1 - Introduction#SCI Resources|SCI Resources in the SCI Specifications]]
* [[SCI Specifications: Chapter 1 - Introduction#SCI Resources|SCI Resources in the SCI Specifications]]
&nbsp;
&nbsp;
[[Category:References]]
[[Category:References]]
[[Category:SCI References]]
[[Category:SCI References]]
Line 45: Line 58:
[[Category:SCI Documentation]]
[[Category:SCI Documentation]]
[[Category:Technical Info]]
[[Category:Technical Info]]
[[Category:SCI Technical Info]]
[[Category:Engine Specifications]]
[[Category:Engine Specifications]]
[[Category:SCI Engine Specifications]]
[[Category:Resources]]
[[Category:Resources]]
[[Category:SCI Resources]]
[[Category:SCI Resources]]
[[Category:LSCI Resources]]
[[Category:LSCI Resources]]
[[Category:SCI Resource MAP File Pages]]
[[Category:SCI Resource MAP File Pages]]

Latest revision as of 18:22, 1 May 2025

  This article is a technical stub page. You
can help the Sierra Wiki by expanding it.



The SCI Resource MAP File
Resource MAP File
Dates Used: 1988 - 1996
Developer(s): Sierra
Type: Res MAP
Dev Language: C
Open Source: Closed
Source Availability:  No
License: None
Engine: SCI




Description

The SCI Resource MAP File, usually named "RESOURCE.MAP" contains a lookup table for the individual resources within the game's volume files.[1]


Format/Specifications


Versions

SCI0 resource.map

The SCI0 map file format is pretty simple: It consists of 6-byte entries, terminated by the sequence 0xffff ffff ffff. The first 2 bytes, interpreted as little endian 16 bit integer, encode resource type (high 5 bits) and number (low 11 bits). The next 4 bytes are a 32 bit LE integer that contains the resource file number in the high 6 bits, and the absolute offset within the file in the low 26 bits. SCI0 performs a linear search to find the resource; however, multiple entries may match the search, since resources may be present more than once (the inverse mapping is not injective).[2]

SCI1 resource.map

The SCI1 resource.map starts with an array of 3-byte structures where the 1st byte is the resource type (0x80 ... 0x91) and next 2 bytes (interpreted as little-endian 16 bit integer) represent the absolute offset of the resource's lookup table (within resource.map). This first array is terminated by a 3-byte entry with has 0xFF as a type and the offset pointing to the first byte after the last resource type's lookup table. SCI1 first goes through this list to find the start of list for the correct resource type and remember this offset and the offset from the next entry to know where it ends. The resulting interval contains a sorted list of 6-byte structures, where the first LE 16 bit integer is the resource number, and the next LE 32 bit integer contains the resource file number in its high 4 bits and the absolute resource offset (in the indicated resource file) in its low 28 bits. Because the list is sorted and its length is known, Sierra SCI can use binary search to locate the resource ID it is looking for.[3]


References


Related Links