Actions

Difference between revisions of "Sonic Lost World/Technical information/EXE editing"

From Sonic Retro

 
(19 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
{{back}}
 +
{{WIP}}
 
{{SCHG SLW}}
 
{{SCHG SLW}}
The main EXE of the PC game release is slw.exe and it is in little endian.
+
The main EXE of the PC game release is slw.exe and it is in little endian. The RAM address pointer changes after launching the game or modifying it.
  
==Materials==
+
==Materials functions==
===Blend Parameters===
+
===Blend parameters===
 
Certain parameters that go to certain effects like Sonic's trail effects are stored in the exe rather than the .material files packed in the archives. These set the blending options according to the parameter loaded on the start of the level.
 
Certain parameters that go to certain effects like Sonic's trail effects are stored in the exe rather than the .material files packed in the archives. These set the blending options according to the parameter loaded on the start of the level.
  
{| class="prettytable"
+
{|class="prettytable" style="width:auto;"
 +
!Parameter ID||Blend Mode||Result
 +
|-
 +
|00 and 01
 +
|Normal Alpha
 +
|[[File:SLW Trail Normal Blend.png|75px]]
 +
|-
 +
|02
 +
|Additive Alpha
 +
|[[File:SLW Trail Additive Blend.png|75px]]
 +
|-
 +
|03
 +
|Subtractive Alpha
 +
|[[File:SLW_Trail_Subtractive_Blend.png|75px]]
 +
|-
 +
|04
 +
|Somewhat no alpha but with darker shade
 +
|[[File:SLW Trail Dark Blend.png|75px]]
 +
|}
 +
 
 +
{|class="prettytable" style="width:auto;"
 
!Effect||Address (January 6th Update)||Default Parameter ID
 
!Effect||Address (January 6th Update)||Default Parameter ID
 
|-
 
|-
Line 13: Line 35:
 
|02
 
|02
 
|}
 
|}
 +
 +
===Colors===
 +
====Sonic Model Materials====
 +
=====Glossy Sonic Mode=====
 +
To achieve a glossy look of Sonic the Hedgehog in the game, you'll need to hex edit the bytes provided in the address of the executable.
 +
{|class="prettytable" style="width:auto;"
 +
!Address (January 6th Update)||Original Bytes||Replace With||Result
 +
|-
 +
|45BA8E
 +
|0F 84 DB 00 00 00
 +
|90 90 90 90 90 90
 +
|[[File:Sonic Lost World Glossy Sonic.png|200px]]
 +
|}
 +
 +
After that, you will need to jump or use spin dash in-order for it to take effect.
 +
 +
====Sonic Trail Colors====
 +
The colors for the trail effects are located in the following addresses of the EXE.
 +
 +
{|class="prettytable" style="width:auto;"
 +
!Address (January 6th Update)||Default RGBA Hex||Type
 +
|-
 +
|BB3C08
 +
|00 00 FF FF
 +
|Blue Sonic
 +
|-
 +
|BB3C0C
 +
|00 64 00 FF
 +
|Green Sonic
 +
|-
 +
|BB3C10
 +
|FF 00 1E FF
 +
|Red Sonic
 +
|-
 +
|BB3C14
 +
|6E 64 32 FF
 +
|Super Sonic
 +
|}
 +
 +
The color parameters for the effects can be set by changing the code since Multiplayer isn't present on the Windows version of the game.
 +
 +
{|class="prettytable" style="width:auto;"
 +
!Address (January 6th Update)||Original Bytes||Replace With||Byte Parameters ({{Laser Lemon|Offset 0x01}})
 +
|-
 +
|4F094B
 +
|8B 82 6C 03 00 00
 +
|{{grey|0C}} {{Laser Lemon|00}} {{grey|90 90 90 90}}
 +
|00 = Blue<br>01 = Green/Lime<br>02 = Red
 +
|}
 +
 +
===Material Opcodes===
 +
A list of material types are implemented in the EXE.
 +
 +
{|class="prettytable" style="width:auto;"
 +
!Material type parameters||Hexadecimal type||Description||Parameters||Example(s)||Notes
 +
|-
 +
|13 & 14
 +
|Byte
 +
|Source Blend<br>Destination Blend
 +
|01 = Zero<br>02 = One<br>03 = Source Color<br>04 = Inverse Source Color<br>05 = Source Alpha<br>06 = Inverse Source Alpha<br>07 = Destination Alpha<br>08 = Inverse Destination Alpha<br>09 = Destination Color<br>0A = Inverse Destination Color<br>0B = Source Alpha Saturate
 +
|6A 05 6A 13<br>6A 06 6A 14
 +
|The 7th blend function is the same as with the 2nd blend parameter, but it produces bloom effect if used as a destination factor.
 +
|}
 +
 +
====EXE offsets====
 +
These are a list of addresses that have codes that provide special effects to models and the interface.
 +
{|class="prettytable" style="width:auto;"
 +
!Targeting Object||Addresses (January 6th Update)||Materials||Default Values
 +
|-
 +
|Misc. Sonic Effects
 +
|87D2B<br>87D36<br>87D3A<br>87D45<br>87D49<br>87D54<br>87D58<br>87D63
 +
|Source Blend<br>Destination Blend<br>Source Blend #2<br>Destination Blend #2<br>Source Blend #3<br>Destination Blend #3<br>Source Blend #4<br>Destination Blend #4
 +
|05<br>06<br>05<br>02<br>01<br>04<br>01<br>03
 +
|-
 +
|HUD Interface
 +
|96FE30<br>96FE34<br>96FE38
 +
|Source Blend<br>Blend Equation<br>Destination Blend
 +
|05<br>01<br>06
 +
|-
 +
|HUD Interface (Additive Layer)
 +
|96FE48<br>96FE4C<br>96FE50
 +
|Source Blend<br>Blend Equation<br>Destination Blend
 +
|05<br>01<br>02
 +
|}
 +
 +
==References==
 +
<references/>
 +
 +
{{SLWOmni}}
 +
{{SCHGuides}}

Latest revision as of 14:14, 1 October 2020

Back to: Sonic Lost World/Technical information.
Exclamation.svg This article is a work in progress.
Its content and location may change completely and frequently until this notice is removed.
Sonic Lost World
Technical information
Main article
EXE editing
EXE editing

The main EXE of the PC game release is slw.exe and it is in little endian. The RAM address pointer changes after launching the game or modifying it.

Materials functions

Blend parameters

Certain parameters that go to certain effects like Sonic's trail effects are stored in the exe rather than the .material files packed in the archives. These set the blending options according to the parameter loaded on the start of the level.

Parameter ID Blend Mode Result
00 and 01 Normal Alpha SLW Trail Normal Blend.png
02 Additive Alpha SLW Trail Additive Blend.png
03 Subtractive Alpha SLW Trail Subtractive Blend.png
04 Somewhat no alpha but with darker shade SLW Trail Dark Blend.png
Effect Address (January 6th Update) Default Parameter ID
Trail Effects 95EF3C 02

Colors

Sonic Model Materials

Glossy Sonic Mode

To achieve a glossy look of Sonic the Hedgehog in the game, you'll need to hex edit the bytes provided in the address of the executable.

Address (January 6th Update) Original Bytes Replace With Result
45BA8E 0F 84 DB 00 00 00 90 90 90 90 90 90 Sonic Lost World Glossy Sonic.png

After that, you will need to jump or use spin dash in-order for it to take effect.

Sonic Trail Colors

The colors for the trail effects are located in the following addresses of the EXE.

Address (January 6th Update) Default RGBA Hex Type
BB3C08 00 00 FF FF Blue Sonic
BB3C0C 00 64 00 FF Green Sonic
BB3C10 FF 00 1E FF Red Sonic
BB3C14 6E 64 32 FF Super Sonic

The color parameters for the effects can be set by changing the code since Multiplayer isn't present on the Windows version of the game.

Address (January 6th Update) Original Bytes Replace With Byte Parameters (Offset 0x01)
4F094B 8B 82 6C 03 00 00 0C 00 90 90 90 90 00 = Blue
01 = Green/Lime
02 = Red

Material Opcodes

A list of material types are implemented in the EXE.

Material type parameters Hexadecimal type Description Parameters Example(s) Notes
13 & 14 Byte Source Blend
Destination Blend
01 = Zero
02 = One
03 = Source Color
04 = Inverse Source Color
05 = Source Alpha
06 = Inverse Source Alpha
07 = Destination Alpha
08 = Inverse Destination Alpha
09 = Destination Color
0A = Inverse Destination Color
0B = Source Alpha Saturate
6A 05 6A 13
6A 06 6A 14
The 7th blend function is the same as with the 2nd blend parameter, but it produces bloom effect if used as a destination factor.

EXE offsets

These are a list of addresses that have codes that provide special effects to models and the interface.

Targeting Object Addresses (January 6th Update) Materials Default Values
Misc. Sonic Effects 87D2B
87D36
87D3A
87D45
87D49
87D54
87D58
87D63
Source Blend
Destination Blend
Source Blend #2
Destination Blend #2
Source Blend #3
Destination Blend #3
Source Blend #4
Destination Blend #4
05
06
05
02
01
04
01
03
HUD Interface 96FE30
96FE34
96FE38
Source Blend
Blend Equation
Destination Blend
05
01
06
HUD Interface (Additive Layer) 96FE48
96FE4C
96FE50
Source Blend
Blend Equation
Destination Blend
05
01
02

References


Sonic Lost World
SLW WiiU title.jpg

Main page
Comparisons
Achievements
Downloadable content
Credits


Manuals
Promotional material
Magazine articles


Development
Bugs
Technical information
Wisps

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