AGSC (File Format): Difference between revisions

Jump to navigation Jump to search
>Aruki
imported>Jackoalan
 
(8 intermediate revisions by 2 users not shown)
Line 103: Line 103:
==== ObjectID ====
==== ObjectID ====


After this are four tables of objects. Each object is identified with a 16-bit '''ObjectID''':
After this are four tables of objects. Each object is identified with a 16-bit '''ObjectID'''.


{| class="wikitable"
Factor5 designed ObjectIDs to used in a polymorphic manner. The top 2 bits of the ID are used
! Offset
to differentiate between SoundMacros, Keymaps, and Layers. If the ID passes a mask of 0x4000,
! Size
the object is a ''Keymap''. If the ID passes a mask of 0x8000, the object is a ''Layer''.
! Description
Otherwise, the object is assumed to be a ''SoundMacro''. ''Tables'' don't require this type of
|-
polymorphism due to the context in which they are accessed.
| 0x0
| 1
| '''Sound object type''' <ol start="0"><li>SoundMacro</li><li>Table</li><li value=4>Keymap</li><li value=8>Layer</li></ol>
|-
| 0x1
| 1
| '''Unique ID''' (per type namespacing)
|-
| 0x2
| colspan=2 {{unknown|End of ObjectID}}
|}
 
'''Note:''' This is the ID structure produced by MusyX data export tool used for ''Metroid Prime''
(which allocates all group ObjectIDs on export). The ObjectID structure is actually an arbitrary 16-bits in MusyX
(limited to 14-bit uniqueness). Based on findings from other games, this upper-byte type source is not 100% reliable,
since Factor5 updated the tool during the console's lifetime.


==== SoundMacros ====
==== SoundMacros ====
Line 508: Line 492:
| colspan="5" {{unknown|}}
| colspan="5" {{unknown|}}
|-
|-
| 0x34
| 0x36
| SETPRIORITY
| SETPRIORITY
| Prio
| Prio
| colspan="6" {{unknown|}}
| colspan="6" {{unknown|}}
|-
|-
| 0x35
| 0x37
| ADDPRIORITY
| ADDPRIORITY
| {{unknown|}}
| {{unknown|}}
Line 519: Line 503:
| colspan="4" {{unknown|}}
| colspan="4" {{unknown|}}
|-
|-
| 0x36
| 0x38
| AGECNTSPEED
| AGECNTSPEED
| colspan="3" {{unknown|}}
| colspan="3" {{unknown|}}
| colspan="4" | Time
| colspan="4" | Time
|-
|-
| 0x37
| 0x39
| AGECNTVEL
| AGECNTVEL
| {{unknown|}}
| {{unknown|}}
Line 738: Line 722:
| colspan="2" | Immediate
| colspan="2" | Immediate
| {{unknown|}}
| {{unknown|}}
|-
| 0x65
| SET_VAR
| Ctrl
| A =
| colspan="1" {{unknown|}}
| colspan="2" | Immediate
| colspan="2" {{unknown|}}
|-
|-
| 0x70
| 0x70
Line 1,070: Line 1,062:


These function the same way as the SoundMacro ID table, but indexes other types of entities instead.
These function the same way as the SoundMacro ID table, but indexes other types of entities instead.
'''Note:''' Keymap and Layer IDs in these tables have their top 2 bits (indicating their type) masked off.
Keymaps must be OR'd with 0x4000 and Layers must be OR'd with 0x8000 in order to reconstruct the actual IDs.


==== Normal / Drum Page Entry ====
==== Normal / Drum Page Entry ====
Line 1,101: Line 1,096:
| '''Padding'''
| '''Padding'''
|}
|}
'''Note:''' The drum table is accessed when the MIDI channel is 10, otherwise the normal table is accessed.


==== SFX Entry ====
==== SFX Entry ====
Line 1,138: Line 1,135:
|-
|-
| 0x8
| 0x8
| 2
| 1
| '''Definite Key'''; The default pitch (usually 0x3C00... the second byte may possibly be the MIDI channel)
| '''Definite Key'''; The default pitch - usually 0x3C (MIDI C4)
|-
| 0x9
| 1
| '''Padding'''
|}
|}


Anonymous user

Navigation menu