The current URL is datacrystal.tcrf.net.
Star Fox/Level Data: Difference between revisions
(Added notes on executing native code events.) |
m (Xkeeper moved page Star Fox:Level Data to Star Fox/Level Data: normalize subpages and titles) |
||
(6 intermediate revisions by one other user not shown) | |||
Line 17: | Line 17: | ||
== Level Events == | == Level Events == | ||
Each event starts with an event type byte. Each event type has a different structure length. | Each event starts with an event type byte. Each event type has a different structure length. Events that contain a timer field will set a delay timer AFTER the event has occurred, which will delay the next event. | ||
Offset Size Description | Offset Size Description | ||
------- ---- ----------- | ------- ---- ----------- | ||
0x00 1 Type (0x00 - 3D Object) | 0x00 1 Type (0x00 - 3D Object) | ||
0x01 2 | 0x01 2 Timer | ||
0x03 2 X | 0x03 2 X | ||
0x05 2 Y | 0x05 2 Y | ||
0x07 2 | 0x07 2 Z | ||
0x09 1 Object Index | 0x09 1 Object Index | ||
0x0A 1 Behavior Index | 0x0A 1 Behavior Index | ||
Line 42: | Line 42: | ||
------- ---- ----------- | ------- ---- ----------- | ||
0x00 1 Type (0x0A - Random Object) | 0x00 1 Type (0x0A - Random Object) | ||
0x01 2 | 0x01 2 Timer | ||
0x03 2 X | 0x03 2 X | ||
0x05 2 Y | 0x05 2 Y | ||
0x07 2 | 0x07 2 Z | ||
0x09 2 Object | 0x09 2 Object | ||
0x0A 5 Group | 0x0A 5 Group | ||
Line 76: | Line 76: | ||
------- ---- ----------- | ------- ---- ----------- | ||
0x00 1 Type (0x26 - Unknown) | 0x00 1 Type (0x26 - Unknown) | ||
0x01 | 0x01 11 Data | ||
Offset Size Description | Offset Size Description | ||
Line 111: | Line 111: | ||
Offset Size Description | Offset Size Description | ||
------- ---- ----------- | ------- ---- ----------- | ||
0x00 1 Type (0x3C - | 0x00 1 Type (0x3C - Set Extended Property Byte) | ||
0x01 1 | 0x01 2 Offset | ||
0x03 1 Value | |||
0x03 | |||
Offset Size Description | |||
------- ---- ----------- | |||
0x00 1 Type (0x3E - Set Extended Property Short) | |||
0x01 2 Offset | |||
0x03 2 Value | |||
Offset Size Description | Offset Size Description | ||
------- ---- ----------- | ------- ---- ----------- | ||
0x00 1 Type ( | 0x00 1 Type (0x40 - Set Extended Property Long) | ||
0x01 | 0x01 2 Offset | ||
0x03 3 Value | |||
Offset Size Description | Offset Size Description | ||
Line 133: | Line 139: | ||
0x00 1 Type (0x48 - Move Previous Object By Parent) | 0x00 1 Type (0x48 - Move Previous Object By Parent) | ||
0x01 5 Data | 0x01 5 Data | ||
Offset Size Description | |||
------- ---- ----------- | |||
0x00 1 Type (0x4a - Attach Parent To Previous Object) | |||
0x01 3 Data | |||
Offset Size Description | Offset Size Description | ||
Line 175: | Line 186: | ||
0x00 1 Type (0x70 - 3D Object) | 0x00 1 Type (0x70 - 3D Object) | ||
0x01 1 Timer | 0x01 1 Timer | ||
0x02 1 | 0x02 1 X | ||
0x03 1 | 0x03 1 Y | ||
0x04 1 | 0x04 1 X | ||
0x05 1 Object Index | 0x05 1 Object Index | ||
0x06 1 Behavior Index | 0x06 1 Behavior Index | ||
Line 185: | Line 196: | ||
0x00 1 Type (0x74 - 3D Object) | 0x00 1 Type (0x74 - 3D Object) | ||
0x01 2 Timer | 0x01 2 Timer | ||
0x03 2 | 0x03 2 X | ||
0x05 2 | 0x05 2 Y | ||
0x07 2 | 0x07 2 Z | ||
0x09 1 Behavior Index | 0x09 1 Behavior Index | ||
Line 193: | Line 204: | ||
------- ---- ----------- | ------- ---- ----------- | ||
0x00 1 Type (0x76 - 3D Object) | 0x00 1 Type (0x76 - 3D Object) | ||
0x01 1 | 0x01 1 Timer | ||
0x02 1 X | 0x02 1 X | ||
0x03 1 Y | 0x03 1 Y | ||
0x04 1 | 0x04 1 Z | ||
0x05 1 Behavior Index | 0x05 1 Behavior Index | ||
Line 222: | Line 233: | ||
------- ---- ----------- | ------- ---- ----------- | ||
0x00 1 Type (0x86 - 3D Object) | 0x00 1 Type (0x86 - 3D Object) | ||
0x01 2 | 0x01 2 Timer | ||
0x03 2 X | 0x03 2 X | ||
0x05 2 Y | 0x05 2 Y | ||
0x07 2 | 0x07 2 Z | ||
0x09 2 Object | 0x09 2 Object | ||
0x0A 3 Behavior | 0x0A 3 Behavior | ||
Line 456: | Line 467: | ||
| 0x0D012D | | 0x0D012D | ||
|- | |- | ||
| | | Corneria 1/2 Level | ||
| 0x068920 | | 0x068920 | ||
| 0x0D0920 | | 0x0D0920 | ||
Line 520: | Line 531: | ||
| 0x0D4DA3 | | 0x0D4DA3 | ||
|- | |- | ||
| | | Attack Carrier Boss Fight | ||
| 0x06CF1D | | 0x06CF1D | ||
| | | 0x0D4F1D | ||
|- | |- | ||
| Unknown | | Unknown |
Latest revision as of 02:42, 24 January 2024
This is a sub-page of Star Fox.
Level Data | |
Game | Star Fox |
Start Address | 0x028000 |
End Address | 0x06ffff |
# of Entries | unknown |
Entry Length | unknown |
Total Length | 65,536 bytes (0x10000) |
Back to the ROM map |
Level Data
Level data is located in 2 separate pages in ROM memory. Each level has a starting address, where a list of events are read. Some events jump to other addresses, and can even jump to a "subroutine" of events that will be executed, and then the level will return to the event immediately after the calling event. The level data can be viewed as a language or instruction set to be read one instruction at a time and interpreted like any other language. Some events include native CPU instructions that will be executed before the next event is processed.
Level Events
Each event starts with an event type byte. Each event type has a different structure length. Events that contain a timer field will set a delay timer AFTER the event has occurred, which will delay the next event.
Offset Size Description ------- ---- ----------- 0x00 1 Type (0x00 - 3D Object) 0x01 2 Timer 0x03 2 X 0x05 2 Y 0x07 2 Z 0x09 1 Object Index 0x0A 1 Behavior Index
Offset Size Description ------- ---- ----------- 0x00 1 Type (0x02 - End Level)
Offset Size Description ------- ---- ----------- 0x00 1 Type (0x04 - Loop) 0x01 2 Address 0x03 2 Times
Offset Size Description ------- ---- ----------- 0x00 1 Type (0x0A - Random Object) 0x01 2 Timer 0x03 2 X 0x05 2 Y 0x07 2 Z 0x09 2 Object 0x0A 5 Group
Offset Size Description ------- ---- ----------- 0x00 1 Type (0x0C - Random Data) 0x01 4 Data
Offset Size Description ------- ---- ----------- 0x00 1 Type (0x0E - Show Stage Number)
Offset Size Description ------- ---- ----------- 0x00 1 Type (0x10 - Initialize Level) 0x01 4 Level
Offset Size Description ------- ---- ----------- 0x00 1 Type (0x12 - Set Timer) 0x01 2 Timer
Offset Size Description ------- ---- ----------- 0x00 1 Type (0x14 - Change Music) 0x01 1 Music
Offset Size Description ------- ---- ----------- 0x00 1 Type (0x26 - Unknown) 0x01 11 Data
Offset Size Description ------- ---- ----------- 0x00 1 Type (0x28 - Call Sub-Level Routine) 0x01 3 Address
Offset Size Description ------- ---- ----------- 0x00 1 Type (0x2A - Return To Caller)
Offset Size Description ------- ---- ----------- 0x00 1 Type (0x2C - Branch) 0x01 3 Address 0x04 2 Condition
Offset Size Description ------- ---- ----------- 0x00 1 Type (0x2E - Jump) 0x01 3 Address
Offset Size Description ------- ---- ----------- 0x00 1 Type (0x36 - Rotate Previous Object) 0x01 1 Mode 0x02 2 Angle
Offset Size Description ------- ---- ----------- 0x00 1 Type (0x38 - Define Area For Previous Object) 0x01 4 Area
Offset Size Description ------- ---- ----------- 0x00 1 Type (0x3C - Set Extended Property Byte) 0x01 2 Offset 0x03 1 Value
Offset Size Description ------- ---- ----------- 0x00 1 Type (0x3E - Set Extended Property Short) 0x01 2 Offset 0x03 2 Value
Offset Size Description ------- ---- ----------- 0x00 1 Type (0x40 - Set Extended Property Long) 0x01 2 Offset 0x03 3 Value
Offset Size Description ------- ---- ----------- 0x00 1 Type (0x42 - Unknown)
Offset Size Description ------- ---- ----------- 0x00 1 Type (0x44 - Fade Out)
Offset Size Description ------- ---- ----------- 0x00 1 Type (0x48 - Move Previous Object By Parent) 0x01 5 Data
Offset Size Description ------- ---- ----------- 0x00 1 Type (0x4a - Attach Parent To Previous Object) 0x01 3 Data
Offset Size Description ------- ---- ----------- 0x00 1 Type (0x4C - Unknown)
Offset Size Description ------- ---- ----------- 0x00 1 Type (0x4E - Unknown)
Offset Size Description ------- ---- ----------- 0x00 1 Type (0x50 - Unknown)
Offset Size Description ------- ---- ----------- 0x00 1 Type (0x5A - Palette Change Previous Object)
Offset Size Description ------- ---- ----------- 0x00 1 Type (0x5C - Set Address To Value) 0x01 1 Value 0x02 3 Address
Offset Size Description ------- ---- ----------- 0x00 1 Type (0x5E - Screen Transition) 0x01 5 Data
Offset Size Description ------- ---- ----------- 0x00 1 Type (0x64 - Reset Camera) 0x01 1 Value
Offset Size Description ------- ---- ----------- 0x00 1 Type (0x6A - Unknown) 0x01 5 Data
Offset Size Description ------- ---- ----------- 0x00 1 Type (0x70 - 3D Object) 0x01 1 Timer 0x02 1 X 0x03 1 Y 0x04 1 X 0x05 1 Object Index 0x06 1 Behavior Index
Offset Size Description ------- ---- ----------- 0x00 1 Type (0x74 - 3D Object) 0x01 2 Timer 0x03 2 X 0x05 2 Y 0x07 2 Z 0x09 1 Behavior Index
Offset Size Description ------- ---- ----------- 0x00 1 Type (0x76 - 3D Object) 0x01 1 Timer 0x02 1 X 0x03 1 Y 0x04 1 Z 0x05 1 Behavior Index
Offset Size Description ------- ---- ----------- 0x00 1 Type (0x78 - Native Code) 0x01 * SNES Native Instructions
Offset Size Description ------- ---- ----------- 0x00 1 Type (0x7A - Transition) 0x01 3 Data
Offset Size Description ------- ---- ----------- 0x00 1 Type (0x82 - Unknown) 0x01 1 Data
Offset Size Description ------- ---- ----------- 0x00 1 Type (0x84 - Change Palette) 0x01 1 Data
Offset Size Description ------- ---- ----------- 0x00 1 Type (0x86 - 3D Object) 0x01 2 Timer 0x03 2 X 0x05 2 Y 0x07 2 Z 0x09 2 Object 0x0A 3 Behavior
Offset Size Description ------- ---- ----------- 0x00 1 Type (0x8A - Timer) 0x01 1 Value
Offset Size Description ------- ---- ----------- 0x00 1 Type (0x8C - Attach Behavior To Previous Object) 0x01 2 Data
Native Code
The Native Code event (0x78) executes the bytes immediately following the event type byte as native CPU instructions. These events do not have a fixed length, and do not include a length field to specify how many bytes follow the event type field. You must interpret the instructions in order to determine how many bytes are included in this event. A simple approach is to scan for bytes with the value of 0xA2, and storing the following 2 bytes in a list. Then, when you reach an address that matches one of these values, this address will be the address of the next event. (This works because there is no way to resume processing events without writing the address of the next event to a CPU register.)
Level Entry Points
Name | ROM Address | System Address |
---|---|---|
Black Hole | 0x06C89A | 0x0D489A |
Out Of This World | 0x06C8E5 | 0x0D48E5 |
Scramble | 0x06D068 | 0x0D5068 |
Corneria 1/2 | 0x06D0BB | 0x0D50BB |
Asteroid 1 | 0x06D268 | 0x0D5268 |
Space Armada | 0x06D2C3 | 0x0D52C3 |
Meteor | 0x06D586 | 0x0D5586 |
Venom 1/2 Space | 0x06D602 | 0x0D5602 |
Venom 1 Surface | 0x06D67F | 0x0D567F |
Sector X | 0x06DF4C | 0x0D5F4C |
Titania | 0x06DFA8 | 0x0D5FA8 |
Sector Y | 0x06E02A | 0x0D602A |
Venom 1/2 Space | 0x06E085 | 0x0D6085 |
Highway | 0x06E0F5 | 0x0D60F5 |
Asteroid 3 | 0x06E62A | 0x0D662A |
Fortuna | 0x06E651 | 0x0D6651 |
Sector Z | 0x06E6D8 | 0x0D66D8 |
Macbeth | 0x06E81C | 0x0D681C |
Venom 3 Space | 0x06E8B9 | 0x0D68B9 |
Venom 3 Surface | 0x06E929 | 0x0D6929 |
Training | 0x06EE9A | 0x0D6E9A |
Sub-Level Entry Points
Name | ROM Address | System Address |
---|---|---|
Unknown | 0x028042 | 0x050042 |
Unknown | 0x0283b2 | 0x0503b2 |
Unknown | 0x028691 | 0x050691 |
Unknown | 0x028774 | 0x050774 |
Unknown | 0x0287DA | 0x0507DA |
Unknown | 0x028CE5 | 0x050CE5 |
Unknown | 0x029380 | 0x051380 |
Unknown | 0x029982 | 0x051982 |
Unknown | 0x02998A | 0x05198A |
Unknown | 0x02A0AD | 0x0520AD |
Unknown | 0x02B280 | 0x053280 |
Unknown | 0x02B488 | 0x053488 |
Unknown | 0x02BB7C | 0x053B7C |
Unknown | 0x02BE53 | 0x053E53 |
Unknown | 0x02C2FB | 0x0542FB |
Unknown | 0x02C301 | 0x054301 |
Unknown | 0x02D885 | 0x055885 |
Unknown | 0x02DA0E | 0x055A0E |
Unknown | 0x02DA3F | 0x055A3F |
Unknown | 0x02DBAE | 0x055BAE |
Unknown | 0x02DD53 | 0x055D53 |
Unknown | 0x02DEED | 0x055EED |
Unknown | 0x02E07A | 0x05607A |
Unknown | 0x02E1F1 | 0x0561F1 |
Unknown | 0x02E72B | 0x05672B |
Unknown | 0x02EF16 | 0x056F16 |
Launch Sequence | 0x068000 | 0x0D0000 |
Unknown | 0x06812D | 0x0D012D |
Corneria 1/2 Level | 0x068920 | 0x0D0920 |
Unknown | 0x0690AD | 0x0D10AD |
Unknown | 0x06995D | 0x0D195D |
Unknown | 0x06A8A7 | 0x0D28A7 |
Unknown | 0x06AB67 | 0x0D2B67 |
Unknown | 0x06ACE5 | 0x0D2CE5 |
Unknown | 0x06AE09 | 0x0D2E09 |
Unknown | 0x06AF49 | 0x0D2F49 |
Unknown | 0x06B17C | 0x0D317C |
Unknown | 0x06B2B3 | 0x0D32B3 |
Unknown | 0x06B4FB | 0x0D34FB |
Unknown | 0x06B5D3 | 0x0D35D3 |
Unknown | 0x06BC57 | 0x0D3C57 |
Unknown | 0x06C92E | 0x0D492E |
Unknown | 0x06CC27 | 0x0D4C27 |
Unknown | 0x06CDA3 | 0x0D4DA3 |
Attack Carrier Boss Fight | 0x06CF1D | 0x0D4F1D |
Unknown | 0x06E97E | 0x0D697E |
Unknown | 0x06EB76 | 0x0D6B76 |
Unknown | 0x06ED02 | 0x0D6D02 |
Unknown | 0x06ED21 | 0x0D6D21 |
Unknown | 0x06F2DD | 0x0D72DD |
Unknown | 0x06F52D | 0x0D752D |