SCAN (Metroid Prime): Difference between revisions

From Retro Modding Wiki
Jump to navigation Jump to search
>Aruki
mNo edit summary
>Aruki
No edit summary
Line 5: Line 5:
__TOC__
__TOC__


== Header ==
== Format ==
 
The SCAN format is very simple; it has a header with data that contains general settings related to the scan, and then four structs defining how the scan images work. Even if a scan doesn't use four images, there's always four image structs, which means the SCAN format has a static size; every SCAN file is 0x89 bytes (or 0xA0 bytes padded).
 
=== Header ===


The header is rather simple, and consists of the following:
The header is rather simple, and consists of the following:
Line 32: Line 36:
| 0x10
| 0x10
| 4
| 4
| '''Scan Speed'''; 0 = Fast Scan, 1 = Slower Scan, usually found in boss fights
| '''Scan Speed Flag'''; 0 = normal fast scan, 1 = slower scan (usually found in boss fights)
|-
|-
| 0x14
| 0x14
| 4
| 4
| '''Scan Type'''; 0 = No message, 1 = Pirate Data, 2 = Chozo Lore, 3 = Creatures, 4 = Research
| '''Logbook Category'''; see below
|-
|-
| 0x18
| 0x18
| 1
| 1
| '''Red Scan Symbol Flag'''; 0 = Orange symbol, 1 = Red symbol
| '''Scan Icon Flag'''; 0 = orange icon, 2 = red icon
|-
|-
| 0x19
| 0x19
Line 46: Line 50:
|}
|}


==== Logbook Category ====


== Entry ==
There's five possible values:
 
{| class="wikitable"
! ID
! Category
|-
| 0
| Not a logbook scan
|-
| 1
| Space Pirate Data
|-
| 2
| Chozo Lore
|-
| 3
| Creatures
|-
| 4
| Research
|}
 
=== Scan Images ===
[[File:Scan_positions1.png|thumb|300px|Offsets for the different scan images and their positions]]
[[File:Scan_positions1.png|thumb|300px|Offsets for the different scan images and their positions]]
[[File:Scan_positions2.png|thumb|300px]]
[[File:Scan_positions2.png|thumb|300px]]
Following the header is an array of 4 structs which follow this format:
Following the header is an array of four structs that contain settings for up to four scan images. Although there can be anywhere from 0 to 4 scan images attached to a scan, there are always four scan image entries here. Entries that aren't used have their TXTR ID set to 0xFFFFFFFF, with the rest of the settings mostly left at defaults. They follow this format:


{| class="wikitable"
{| class="wikitable"
! Offset
! Offset
! Size
! Size
! Type
! Description
! Description
|-
|-
| 0x0
| 0x0
| 4
| 4
| long
| '''[[TXTR (Metroid Prime)|TXTR]] ID'''
| '''[[TXTR (Metroid Prime)|TXTR]] ID'''
|-
|-
| 0x4
| 0x4
| 4
| 4
| '''0.25 Float'''; when the scan download is 25% finished, display this image.  Another 25% is added on to the next float on the next image entry.
| float
| '''Appearance %'''; image will appear when the scan is this% complete
|-
|-
| 0x8
| 0x8
| 4
| 4
| {{unknown|'''Unknown (Fade in duration?)''' - long}}
| long
| {{unknown|'''Unknown (Fade in duration?)'''}}
|-
|-
| 0xC
| 0xC
| 4
| 4
| {{unknown|'''Unknown''' - long}}
| long
| {{unknown|'''Unknown'''}}
|-
|-
| 0x10
| 0x10
| 4
| 4
| {{unknown|'''Unknown''' - long}}
| long
| {{unknown|'''Unknown'''}}
|-
|-
| 0x14
| 0x14
| 4
| 4
| {{unknown|'''Unknown''' - long}}
| long
| {{unknown|'''Unknown'''}}
|-
|-
| 0x18
| 0x18
| 4
| 4
| {{unknown|'''Unknown''' - float}}
| float
| {{unknown|'''Unknown'''}}
|-
|-
| 0x1C
| 0x1C
| colspan=2 {{unknown|End of entry}}
| colspan=3 {{unknown|End of entry}}
|}
|}
This pattern repeats, however the next image will be displayed on the right.  The third image will be displayed on the right again but for smaller pictures and finally, the fourth image will be displayed on the bottom left corner, again for use for smaller pictures.  The float increases with every entry, so the next image will be .50, the third will be .75 and finally the last image will load at 1, when the scan finishes.


[[Category:File Formats]]
[[Category:File Formats]]
[[Category:Metroid Prime]]
[[Category:Metroid Prime]]

Revision as of 14:02, 27 January 2015

The .SCAN file format describes scannable objects, and has references to several resources. It is a relatively simple format and has a static size.

This file format needs more research
Too many unknowns.

Format

The SCAN format is very simple; it has a header with data that contains general settings related to the scan, and then four structs defining how the scan images work. Even if a scan doesn't use four images, there's always four image structs, which means the SCAN format has a static size; every SCAN file is 0x89 bytes (or 0xA0 bytes padded).

Header

The header is rather simple, and consists of the following:

Offset Size Description
0x0 4 Version
0x4 4 Magic; always 0x0BADBEEF
0x8 4 FRME ID
0xC 4 STRG ID
0x10 4 Scan Speed Flag; 0 = normal fast scan, 1 = slower scan (usually found in boss fights)
0x14 4 Logbook Category; see below
0x18 1 Scan Icon Flag; 0 = orange icon, 2 = red icon
0x19 End of header

Logbook Category

There's five possible values:

ID Category
0 Not a logbook scan
1 Space Pirate Data
2 Chozo Lore
3 Creatures
4 Research

Scan Images

File:Scan positions1.png
Offsets for the different scan images and their positions
File:Scan positions2.png

Following the header is an array of four structs that contain settings for up to four scan images. Although there can be anywhere from 0 to 4 scan images attached to a scan, there are always four scan image entries here. Entries that aren't used have their TXTR ID set to 0xFFFFFFFF, with the rest of the settings mostly left at defaults. They follow this format:

Offset Size Type Description
0x0 4 long TXTR ID
0x4 4 float Appearance %; image will appear when the scan is this% complete
0x8 4 long Unknown (Fade in duration?)
0xC 4 long Unknown
0x10 4 long Unknown
0x14 4 long Unknown
0x18 4 float Unknown
0x1C End of entry