Actions

SCHG

Sonic Heroes/Model Format

From Sonic Retro

Revision as of 09:47, 10 October 2021 by Crazy Muzzarino (talk | contribs) (Taking a close look through parsing, that is the world flag whereat enables certain things not in the atomic section like lightning so on.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
SCHG: Sonic Heroes
Main Article
Mechanic Editing

DOL Editing
EXE Editing
Music Pointers
Object Parameter Data
Relocatable Editing (PC)
File Offsets

Model Editing
Collision Format
Model Format
Level Editing

Camera Editing
Event Editing
ID list
Indirect Editing
Light Editing
Level List
Object Editing
Object Porting
Spline Editing
Texture Animation Editing
Visibility Editing

Particle Editing
Particle Editing
Sound Editing
Music List

Sound Editing
Voices

SCHG How-Tos

Custom Object Material Effect Tutorial
Level Editing Tutorial


Sonic Heroes runs on a version of the RenderWare engine, and most of the game's models are in DFF or BSP format. The information on this page applies to the PC version only.

Object models

Models for objects and characters are located in DFF files, contained inside ONE archives. Those models can be imported and viewed in model editors using existing scripts for other games.

Materials

Unlike BSPs even stage object names with the geometry identifiers like the waterfalls used in Ocean Palace, rendering properties (such as texture filtering, blend factors, face culling, z-depth and alpha referencing) and their actual flags (also variables in some addresses) are hardcoded in each SET object functions.

Limited renderstate overriding can be done (though complicated) from an unused integer before the RGBA value via hex editing the exe values below:

Basic setup
Address Bytes
2FA1 90 90 90 90 90
2FAB E8 8F 9D 31 00
3157 90 90 90 90 90
3161 E8 E5 9B 31 00
330B 90 90 90 90 90
3315 E8 3D 9A 31 00
35E7 90 90 90 90 90 90
3614 E9 5D 96 31 00 90 90 90 90 90
3672 E9 36 96 31 00 90 90 90 90
3721 E9 BE 95 31 00 90 90 90 90
24CA10 E8 BB 68 0C 00
24CA20 E8 AB 68 0C 00
2525E0 E8 EB 0C 0C 00 8B C8 8B 15 A0 53 AA 00 83 EC 08 31 C0 56 83 7C 11 3C 00
26D7D3 E9 AC F1 0A 00 90
26D578 E9 22 F4 0A 00 90 90
279E7C E9 E2 2E 0A 00 90 90 90
279F46 E9 47 2E 0A 00 90 90 90 90 90
273862 E9 52 95 0A 00 90
273958 E9 86 94 0A 00 90 90 90 90 90
2787BA 01
2B7DD8 E9 2D 50 06 00 90 90
2B815E E9 D9 4C 06 00 90 90
2B89B5 14
2B92E5 E9 76 3B 06 00 90 90
2B9050 E9 31 3E 06 00
2B7860 E9 48 56 06 00 90 90
2B7BE9 E9 F1 52 06 00 90 90
2B3106 E9 BE 98 06 00 90
3132D0 31 C0 80 3D E8 FF BC 00 00 74 11 A0 EC FF BC 00 2C 02 74 08 2C 06 74 04 2C 0D 75 06 A1 4C 0A 8E 00 C3 83 C4 04 C3
31C984 8B 44 24 1C 60 BB 18 00 00 00 E8 5E 00 00 00 61 8B 44 24 28 85 C0 E9 39 0E F5 FF 51 52 E8 0A 00 00 00 89 56 08 5A 59 E9 CD 0B F5 FF 8B 0D 58 99 79 00 31 D2 89 54 31 F0 89 54 31 F4 89 54 31 F8 89 54 31 FC C3 60 8B 46 64 8B F7 25 00 FF FF FF C1 E8 08 BB 14 00 00 00 E8 10 00 00 00 61 F6 46 64 01 0F 84 40 67 F9 FF E9 17 67 F9 FF E8 BA FF FF FF 50 83 C2 04 83 FA 10 0F 8E 0F 00 00 00 81 24 24 FF 00 00 00 C1 E8 08 E9 07 00 00 00 83 24 24 0F C1 E8 04 39 DA 7C D9 83 FB 18 0F 8D 02 00 00 00 6A 00 31 D2 42 58 83 FA 02 0F 85 09 00 00 00 89 44 31 FC E9 B4 00 00 00 83 FA 03 0F 85 8E 00 00 00 C1 E0 04 8B 2C 24 09 E8 83 C4 04 83 E9 06 8B E8 31 C0 B0 08 F7 C5 20 00 00 00 0F 84 02 00 00 00 2C 03 88 44 31 FF 49 B0 01 21 E8 88 44 31 FF 49 B0 01 F7 C5 08 00 00 00 0F 84 02 00 00 00 FE C8 88 44 31 FF B0 01 F7 C5 04 00 00 00 0F 84 02 00 00 00 FE C8 88 44 31 FE 83 E9 02 B0 03 F7 C5 02 00 00 00 0F 85 02 00 00 00 B0 02 F7 C5 40 00 00 00 0F 84 02 00 00 00 B0 01 88 44 31 FF 49 B0 03 F7 C5 10 00 00 00 BD 01 00 00 00 0F 44 C5 83 FA 04 0F 8C 10 00 00 00 31 DB 83 FA 04 0F 94 C3 83 C3 05 3C 00 0F 44 C3 88 44 31 FF 49 83 FA 05 0F 8C 2E FF FF FF C3 8B 74 24 04 85 F6 0F 85 0A 00 00 00 BE F0 FF BC 00 E9 7F 00 00 00 8B 36 03 35 58 99 79 00 83 EE 10 56 BE 00 CA 64 00 68 F0 FF BC 00 6A 0A E8 34 01 00 00 FF 04 24 E8 2C 01 00 00 81 EE 30 50 00 00 81 04 24 A0 00 00 00 E8 1A 01 00 00 81 C6 30 50 00 00 81 2C 24 97 00 00 00 E8 08 01 00 00 83 2C 24 0E E8 FF 00 00 00 83 04 24 02 E8 F6 00 00 00 83 04 24 06 E8 ED 00 00 00 81 EE 30 50 00 00 83 04 24 0B E8 DE 00 00 00 FF 0C 24 E8 42 AE F2 FF 83 C4 08 5E 0F B6 0E 51 6A 0A E8 13 FE F2 FF 46 FF 04 24 E8 B5 00 00 00 E8 05 FE F2 FF 81 04 24 A0 00 00 00 E8 A4 00 00 00 E8 C4 AD F2 FF 81 2C 24 97 00 00 00 E8 93 00 00 00 E8 E3 FD F2 FF 83 2C 24 0E E8 85 00 00 00 E8 D5 FD F2 FF 83 04 24 02 E8 77 00 00 00 E8 C7 FD F2 FF 83 04 24 06 E8 69 00 00 00 8B 15 B8 AE 8C 00 21 54 24 04 E8 AF FD F2 FF 83 04 24 0B E8 51 00 00 00 E8 71 AD F2 FF FF 0C 24 0F B6 4E 03 89 4C 24 04 E8 61 AD F2 FF 31 D2 42 83 C4 08 83 3D E8 FF BC 00 00 0F 84 28 00 00 00 81 FE F8 FF BC 00 0F 84 1C 00 00 00 0F B6 56 07 31 DB B3 02 83 FA 00 0F 44 D3 3B 15 EC FF BC 00 BA 00 00 00 00 0F 94 C2 C3 0F B6 0E 46 89 4C 24 08 C3 FF 74 24 08 FF 74 24 08 FF D6 83 C4 08 FF 44 24 08 C3 50 BA 01 00 00 00 8B 84 93 54 72 00 00 89 04 24 89 54 24 18 E8 8B 00 00 00 FF 56 FC 8B 4E 04 E8 96 00 00 00 8B D0 7E DE C7 05 E8 FF BC 00 00 00 00 00 E9 71 69 CE FF B8 01 00 00 00 89 44 24 18 69 C0 04 01 00 00 8B 8C 18 B8 72 00 00 89 0C 24 E8 4F 00 00 00 FF 56 FC E8 5D 00 00 00 7E DD C7 05 E8 FF BC 00 00 00 00 00 E9 97 69 CE FF B8 01 00 00 00 89 44 24 18 6B C0 41 01 F8 8B 8C 83 B8 72 00 00 89 0C 24 E8 19 00 00 00 FF 56 FC E8 27 00 00 00 7E DE C7 05 E8 FF BC 00 00 00 00 00 E9 0C 6A CE FF 8B 06 A3 EC FF BC 00 C7 05 E8 FF BC 00 01 00 00 00 E9 0E 00 00 00 8B 1D B0 D8 9D 00 8B 44 24 1C 40 83 F8 18 C3 83 7C 24 30 01 0F 84 E6 6D D2 FF C3 83 7C 24 30 01 0F 84 6A 6E D2 FF C3 83 7C 24 30 01 0F 84 2E 6F D2 FF C3 60 6A 00 6A 10 E8 96 01 00 00 83 C4 08 83 C6 10 56 E8 84 FD FF FF 83 C4 04 85 D2 61 0F 84 0D 00 00 00 85 DB 0F 85 B0 D1 F5 FF E9 F2 D0 F5 FF 60 6A 01 6A 10 E8 67 01 00 00 83 C4 08 6A 00 E8 57 FD FF FF 83 C4 04 61 83 C6 2C 4D 0F 85 C8 D0 F5 FF E9 97 D1 F5 FF 60 6A 00 6A 00 E8 40 01 00 00 83 C4 08 56 E8 31 FD FF FF 83 C4 04 85 D2 61 0F 84 0B 00 00 00 8B 44 24 2C 85 C0 E9 85 6A F5 FF 60 6A 01 6A 00 E8 16 01 00 00 83 C4 08 6A 00 E8 06 FD FF FF 83 C4 04 61 83 C6 2C 4B 0F 85 5D 6A F5 FF E9 58 6B F5 FF 60 6A 00 6A F0 E8 EF 00 00 00 83 C4 08 83 EE 10 56 E8 DD FC FF FF 83 C4 04 85 D2 61 0F 84 10 00 00 00 85 DB 0F 84 D5 AF F9 FF 8B 46 F0 E9 A3 AF F9 FF 60 6A 01 6A F0 E8 BD 00 00 00 83 C4 08 6A 00 E8 AD FC FF FF 83 C4 04 61 8B 44 24 54 83 C6 2C E9 05 B3 F9 FF 60 6A 01 6A 00 8B F5 E8 97 00 00 00 83 C4 08 6A 00 E8 87 FC FF FF 83 C4 04 61 8B 44 24 28 83 C5 2C E9 66 C4 F9 FF 8B 5D 00 60 6A 00 6A 00 8B F5 E8 6E 00 00 00 83 C4 08 55 E8 5F FC FF FF 83 C4 04 85 D2 61 74 BA 31 F6 E9 A8 C1 F9 FF 60 6A 00 6A F0 E8 4C 00 00 00 83 C4 08 83 EE 10 56 E8 3A FC FF FF 83 C4 04 85 D2 61 0F 84 10 00 00 00 85 DB 0F 84 BA A9 F9 FF 8B 46 F0 E9 88 A9 F9 FF 60 6A 01 6A F0 E8 1A 00 00 00 83 C4 08 6A 00 E8 0A FC FF FF 83 C4 04 61 8B 44 24 54 83 C6 2C E9 ED AC F9 FF 03 74 24 04 50 A1 E4 FF BC 00 0F AF 05 58 99 79 00 F6 44 24 0C 01 0F 85 07 00 00 00 01 06 E9 02 00 00 00 29 06 58 2B 74 24 04 C3 FF 74 24 0C 8B 44 24 08 A3 E4 FF BC 00 E8 B0 E5 F4 FF E8 04 00 00 00 83 C4 0C C3 C7 05 E4 FF BC 00 00 00 00 00 C3 C7 05 E4 FF BC 00 01 00 00 00 FF 54 24 58 55 E8 E1 FF FF FF E9 FD F5 D0 FF 8B 47 28 8A 48 24 B8 00 00 00 00 F6 C1 04 0F 95 C0 50 E8 AA FF FF FF FF 35 68 7B A4 00 E8 9F FF FF FF 50 E8 99 FF FF FF 53 E8 93 FF FF FF 51 E8 8D FF FF FF 52 E8 87 FF FF FF 56 E8 81 FF FF FF 57 E8 7B FF FF FF 55 E8 75 FF FF FF 6A 01 E8 6E FF FF FF 6A 02 E8 67 FF FF FF 90
Object setup
Address Bytes
21A76 80 3D EC FF BC 00 02 74 01 C3
22066 80 3D EC FF BC 00 02 74 01 C3
225B6 80 3D EC FF BC 00 02 74 01 C3
2C523 00 00 80 BF
2C565 E9 EA 09 2F 00
2FCFA EB 72 80 3D EC FF BC 00 02 74 AB C3 90
2FD20 80 3D EC FF BC 00 15 75
2FD92 A1 F4 77 A7 00 85 C0 74 F6 EB 83
2FDEA EB 82 80 3D EC FF BC 00 08 74 AB C3 90
71FDF 90 83 EC 0C 56 90 90
7614E 06
7615C 03 0D 58 99 79 00 A0 E6 60 47 00 89 41 04 5E 59 C3
76446 E8 6E 6B 2A 00
78382 E8 32 4C 2A 00
7839A E8 21 4C 2A 00
8AC2A E8 8A 23 29 00
96596 E8 1E 6A 28 00
C5196 E8 1E 7E 25 00
FBC84 E8 30 13 22 00
FBCAD E8 07 13 22 00
FE8C4 E8 F0 E6 21 00
11D9B6 E8 FE F5 1F 00
131199 E8 E6 BD 1E 00
1311FB E8 84 BD 1E 00
138F9C E8 CC 3F 1E 00
1D2BCF E8 E5 A3 14 00
1D31D8 E8 DC 9D 14 00
1D87AF E8 05 48 14 00
1D87E8 E8 CC 47 14 00
1D8821 E8 93 47 14 00
1D8BBD E8 F7 43 14 00
1D8C24 E8 C7 28 09 00
1D8C85 E8 2F 43 14 00
1DEB1A E8 9A E4 13 00
20715F E8 55 5E 11 00
212DF8 E8 BC A1 10 00
Object renderers
Address Bytes
34978C FC
349790 92
349794 EC
348A08 B6
348A58 66
348AA8 76
35150C B0 1F 47 00 B0 1F 47 00
37573C 90 33 50 00
375744 90 33 50 00
375CC0 80 7B 50 00 80 7B 50 00 80 7B 50 00
387BB8 40 37 63 00 40 37 63 00
387C34 90 3A 63 00
387C7C D0 48 63 00 D0 48 63 00 D0 48 63 00

Section Integer layout (Models)

Offset Description
0x00 Source/Destination Blend factors
0x01 Flags
0x02 Alpha referencing
0x03 Stage model identifier See the section below for a list of identifiers (in decimal).

Section Integer layout (Maestro Section 0xC0)

Offset Description
0x65 Source/Destination Blend factors
0x66 Flags
0x67 Alpha referencing

RwBlendFunction

  • 0 - N/A
  • 1 - Zero
  • 2 - One
  • 3 - Source Color
  • 4 - Inverse Source Color
  • 5 - Source Alpha
  • 6 - Inverse Source Alpha
  • 7 - Destination Alpha
  • 8 - Inverse Destination Alpha
  • 9 - Destination Color
  • 10 - Inverse Destination Color
  • 11 - Source Alpha Saturated

Flags

Offset Description
0x01 Fog
0x02 counter clockwise culling
0x04 anti z-test
0x08 anti z-buffer
0x10 Subtractive blending
0x20 Punch alpha
0x40 No culling

UV animation

Animating UVs can only be applied to certain models named in the executable for Sonic Heroes in UVB format.

The file's formatted in little endian.

// UV Animation (named Anim Animation)
int32 0x1B // section identifier
int32 // section size
int32 0x1400FFFF
int16 materialIndex // Material to animate UVs
int32 0x14 // Unknown
int32 numAnimations // Number of animations. Multipliy 0x1C by the animation number to obtain the offset.
int32 unknown // Presumably hash code from section build
float32 coordinateOffsets[7] // Coordinate Speed, X position, Y Position, Z position, Scale X, Scale Y, Scale Z

Morph Animations

Delta Morph Animations

Morph Animations stored as Delta Morph Animations are in .DMA format assigned to specific objects.

// Delta Morph Animation
int32 0x1E // section identifier
int32 sectionsize // overall section size
int32 0x1400FFFF
int32 sectionsize2 // section size
int32 0x1400FFFF
int16 unknown
int32 unknown
int32 unknown
int32 numberofAnimations
int32 unknown
float32 verticies[4] // X position, Y Position, Z position, Speed?
int32 animNumber

Level models

Level models in Sonic Heroes are located in little endian BSP (binary space partitioning) files, contained inside .ONE archives in the dvdroot folder. Multiple BSPs are in each ONE archive. The archives can be opened with HeroesONE. Heroes Power Plant has support for viewing and editing the files.

File names

The BSP files are named in the form of SLL_XX_NN.BSP (or STG instead of S for some levels). LL is the level number, XX are letters that identify which part of the geometry is in that file and NN is the chunk number. All files with the same number make up the same chunk. For the game to know which chunk to display at a given time, it uses the *_blk.bin file. The following letters are accepted for the geometry identifier:

  • A
  • AF
  • AFN
  • AFNS
  • AFS
  • AN
  • ANS
  • AS
  • DA
  • DN
  • K
  • KW
  • O
  • ON
  • ONS
  • ONW
  • ONWS
  • OS
  • P
  • PN
  • PNS
  • PNW
  • PNWS
  • PS

Notes: Object names with any of these identifiers still provide these effects in the executables rather than file names themselves.

File format

Each BSP is a stream of binary data, divided into multiple sections, which can have multiple children and sibling sections. Each section starts with an array of three int32: the first one is an identifier for the section type, then there's the total size of the section, then there's 0x1400FFFF, which is the RenderWare engine version identifier.

The total size of the section, as said above, includes the section itself and all children sections, but does not include this 0x0C byte "header". So get the total number of bytes in the section and subtract 0x0C to put there.

Note that "struct" sections have an identifier of 0x01, "extension" sections have an identifier of 0x03 and all other sections have different identifiers. Most extensions do nothing, except for the Atomic Extension, which contains the Bin Mesh PLG section which contains triangle strips. As with Material Effects, the world rendering function doesn't use these yet although they're loaded, the 4 byte boolean of the plugin should be placed below Bin Mesh PLG in-order to activate in-game. A list of effect types can be found here.

The file is little endian.

// WORLD
int32 0x0B // section identifier
int32 // section size
int32 0x1400FFFF

// WORLD STRUCT
int32 0x01 // section identifier
int32 // section size (always 0x40)
int32 0x1400FFFF
int32 0x01 // unknown, always this value
00 00 00 80 // unknown, always this value
00 00 00 80 // unknown, always this value
00 00 00 80 // unknown, always this value
int32 // number of triangles (numTriangles)
int32 // number of vertices (numVertices)
int32 // number of planes (numPlanes)
int32 // number of atomics (numAtomics)
00 00 00 00 // unknown, always this value
int32 // world flags, e.g. (0xD || 0x30) adds lightning to the geometry.
float32[3] // Boundary box maximum
float32[3] // Boundary box minimum // Maximum values must be the bigger than minimum

// END WORLD STRUCT

// MATERIAL LIST
int32 0x08 // section identifier
int32 // section size
int32 0x1400FFFF

// MATERIAL LIST STRUCT
int32 0x01 // section identifier
int32 // section size
int32 0x1400FFFF
int32 // number of materials (numMaterials), materials are ordered by a zero-based index
int32[numMaterials] 0xFFFFFFFF // there is a -1 for each material

// END MATERIAL LIST STRUCT

// MATERIAL // this section occours numMaterials times
int32 0x07 // section identifier
int32 // section size
int32 0x1400FFFF

// MATERIAL STRUCT
int32 0x01 // section identifier
int32 // section size (always 0x1C)
int32 0x1400FFFF
int32 0x00 // ununsed flags (See materials for replicating rendering effects to models)
int8[4] RGBA // Material RGBA (usually 255, 255, 255, 255)
int32 84 3E F5 2D // always this value, unused
bool32 // uses texture? (usually 0x01)
float32[3] // ambient, specular, diffuse // don't know if these are used. always (1, 1, 1)

// END MATERIAL STRUCT

// TEXTURE
int32 0x06 // section identifier
int32 // section size
int32 0x1400FFFF

// TEXTURE STRUCT
int32 0x01 // section identifier
int32 // section size (always 0x04)
int32 0x1400FFFF
int8 // byte, texture filtering mode (usually 0x02)
4bit // half the byte: U adressing mode (usually 0001)
4bit // half the byte: V adressing mode (usually 0001)
bool16 // byte: use mipmap? (usually 0x01)

// END TEXTURE STRUCT

// DIFFUSE TEXTURE NAME
int32 0x02 // section identifier
int32 // section size
int32 0x1400FFFF
string // texture name

// END DIFFUSE TEXTURE NAME

// ALPHA TEXTURE NAME // unused section, alphas are set in the TXD
int32 0x02 // section identifier
int32 // section size (always 0x04)
int32 0x1400FFFF
string // alpha texture name (unused, always left blank)

// END ALPHA TEXTURE NAME

// TEXTURE EXTENSION // this section does absolutely nothing
int32 0x03 // section identifier
int32 // section size (0x00)
int32 0x1400FFFF

// END TEXTURE EXTENSION

// END TEXTURE

// MATERIAL EXTENSION // this section does absolutely nothing
int32 0x03 // section identifier
int32 // section size (0x00)
int32 0x1400FFFF

// END MATERIAL EXTENSION

// END MATERIAL

// END MATERIAL LIST

// Here, there's either a Plane Section or an Atomic Section.

// PLANE SECTION
int32 0x0A // section identifier
int32 // section size
int32 0x1400FFFF

// PLANE STRUCT
int32 0x01 // section identifier
int32 // section size
int32 0x1400FFFF
int32 type
int32 value
bool32 leftIsAtomic
bool32 rightIsAtomic
float32 leftValue
float32 rightValue
// END PLANE STRUCT

// Plane Sections contain two sub sections (left and right), each which can be either an Atomic Section (which contains model data) or another Plane Section. They are located here.

// END PLANE SECTION

// ATOMIC SECTION
int32 0x09 // section identifier
int32 // section size
int32 0x1400FFFF

// ATOMIC STRUCT
int32 0x01 // section identifier
int32 // section size
int32 0x1400FFFF
int32 // model flags (usually 0x00)
int32 // number of triangles (numTriangles)
int32 // number of vertices (numVertices)
float32[3] // Boundary box maximum
float32[3] // Boundary box minimum // These last 4 values are the same ones in the model header
84 D9 50 2F // always this, unknown
int32 0x00 // unknown, always 0x00
numVertices*float32[3] // X, Y, Z position coordinate for each vertex
numVertices*int8[4] // RGBA vertex color for each vertex; Lightning colors only used when flag's enabled in the world section.
numVertices*float32[2] // U, V texture mapping coordinate for each vertex
numTriangles*int16[4] // (materialIndex, vertex1, vertex2, vertex3) index for each triangle, culling is counterclockwise

// END ATOMIC STRUCT

// ATOMIC EXTENSION
int32 0x03 // section identifier
int32 // section size
int32 0x1400FFFF

// BIN MESH PLG
int32 0x50E // section identifier
int32 // section size
int32 0x1400FFFF
uint32 // flags (0 = triangle lists, 1 = triangle strips)
uint32 // number of objects/meshes (numMeshes; usually same number of materials)
uint32 // total number of indices
numMeshes*(
    uint32 // number of vertex indices in this mesh (numIndices)
    uint32 // material index
    uint32[numIndices] // vertex indices
)

// END BIN MESH PLG

// END ATOMIC EXTENSION

// END ATOMIC SECTION

// WORLD EXTENSION // this section does absolutely nothing
int32 0x03 // section identifier
int32 // section size (0x00)
int32 0x1400FFFF

// END WORLD EXTENSION

// END WORLD

Texture Struct settings

Texture filtering modes (Some use their respective rendering functions to provide these filtering options)
  • 0 - FILTERNAFILTERMODE (filtering is disabled)
  • 1 - FILTERNEAREST (Point sampled)
  • 2 - FILTERLINEAR (Bilinear)
  • 3 - FILTERMIPNEAREST (Point sampled per pixel mipmap)
  • 4 - FILTERMIPLINEAR (Bilinear per pixel mipmap)
  • 5 - FILTERLINEARMIPNEAREST (Mipmap interp point sampled)
  • 6 - FILTERLINEARMIPLINEAR (Trilinear)
Texture addressing modes (Some use their respective rendering functions to provide these filtering options)
  • 0 - TEXTUREADDRESSNATEXTUREADDRESS (no tiling)
  • 1 - TEXTUREADDRESSWRAP (tile in U or V direction)
  • 2 - TEXTUREADDRESSMIRROR (mirror in U or V direction)
  • 3 - TEXTUREADDRESSCLAMP
  • 4 - TEXTUREADDRESSBORDER

References


Sonic Community Hacking Guide
General
SonED2 Manual | Subroutine Equivalency List
Game-Specific
Sonic the Hedgehog (16-bit) | Sonic the Hedgehog (8-bit) | Sonic CD (prototype 510) | Sonic CD | Sonic CD (PC) | Sonic CD (2011) | Sonic 2 (Simon Wai prototype) | Sonic 2 (16-bit) | Sonic 2 (Master System) | Sonic 3 | Sonic 3 & Knuckles | Chaotix | Sonic Jam | Sonic Jam 6 | Sonic Adventure | Sonic Adventure DX: Director's Cut | Sonic Adventure DX: PC | Sonic Adventure (2010) | Sonic Adventure 2 | Sonic Adventure 2: Battle | Sonic Adventure 2 (PC) | Sonic Heroes | Sonic Riders | Sonic the Hedgehog (2006) | Sonic & Sega All-Stars Racing | Sonic Unleashed (Xbox 360/PS3) | Sonic Colours | Sonic Generations | Sonic Forces
Technical information
Sonic Eraser | Sonic 2 (Nick Arcade prototype) | Sonic CD (prototype; 1992-12-04) | Dr. Robotnik's Mean Bean Machine | Sonic Triple Trouble | Tails Adventures | Sonic Crackers | Sonic 3D: Flickies' Island | Sonic & Knuckles Collection | Sonic R | Sonic Shuffle | Sonic Advance | Sonic Advance 3 | Sonic Battle | Shadow the Hedgehog | Sonic Rush | Sonic Classic Collection | Sonic Free Riders | Sonic Lost World
Legacy Guides
The Nemesis Hacking Guides The Esrael Hacking Guides
ROM: Sonic 1 | Sonic 2 | Sonic 2 Beta | Sonic 3

Savestate: Sonic 1 | Sonic 2 Beta/Final | Sonic 3

Sonic 1 (English / Portuguese) | Sonic 2 Beta (English / Portuguese) | Sonic 2 and Knuckles (English / Portuguese)
Move to Sega Retro
Number Systems (or scrap) | Assembly Hacking Guide | 68000 Instruction Set | 68000 ASM-to-Hex Code Reference | SMPS Music Hacking Guide | Mega Drive technical information