Actions

SCHG

Difference between revisions of "SCHG:Sonic the Hedgehog 3 & Knuckles/Art Editing"

From Sonic Retro

m (Text replacement - "{{SCHGuides}}" to "==References== <references /> {{SCHGuides}}")
(Documented Player Characters Tile Counts)
 
(8 intermediate revisions by 3 users not shown)
Line 3: Line 3:
 
There are several different tools that can be used to edit art. [[SonED2]] is probably the best tool to use for editing level art, and can also be used on palettes. [[HivePal]] is also a great tool for editing palettes. [[SonMapEd]] is useful for editing both art and mappings - it can extract data from either a ROM or use split binary files, and has internal compression/decompression support. [[Flex 2]] is a more recent art and mapping editor that supports importing, exporting as well as directly editing art.  
 
There are several different tools that can be used to edit art. [[SonED2]] is probably the best tool to use for editing level art, and can also be used on palettes. [[HivePal]] is also a great tool for editing palettes. [[SonMapEd]] is useful for editing both art and mappings - it can extract data from either a ROM or use split binary files, and has internal compression/decompression support. [[Flex 2]] is a more recent art and mapping editor that supports importing, exporting as well as directly editing art.  
  
==Uncompressed Art Locations==
+
==Uncompressed art locations==
  
 
{| class="prettytable" style="width:auto;"
 
{| class="prettytable" style="width:auto;"
Line 12: Line 12:
 
|$100000
 
|$100000
 
|Sonic
 
|Sonic
|?
+
|4103
 
|-
 
|-
 
|$1200E0
 
|$1200E0
 
|Knuckles
 
|Knuckles
|?
+
|4092
 
|-
 
|-
 
|$140060
 
|$140060
 
|Sonic's extra tiles used in S&K zones
 
|Sonic's extra tiles used in S&K zones
|?
+
|485
 
|-
 
|-
 
|$143D00
 
|$143D00
 
|Tails's extra tiles used in S&K zones
 
|Tails's extra tiles used in S&K zones
|?
+
|329
 
|-
 
|-
 
|$3200E0
 
|$3200E0
 
|Tails
 
|Tails
|?
+
|2858
 
|-
 
|-
 
|$336620
 
|$336620
 
|Tails's tails
 
|Tails's tails
|?
+
|139
 
|-
 
|-
 
|$345010
 
|$345010
 
|Sonic snowboarding
 
|Sonic snowboarding
|?
+
|322
 
|-
 
|-
 
|}
 
|}
  
==[[Nemesis compression|Nemesis Compressed]] Art Locations==
+
==[[sega:Nemesis compression|Nemesis Compressed]] art locations==
 
{{sectstub}}
 
{{sectstub}}
 +
{| class="prettytable" style="width:auto;"
 +
!Offset!!Description!!# of blocks
 +
|-
 +
| $368400
 +
| Hydrocity Zone Miniboss
 +
| ?
 +
|}
 
===Zone Independent===
 
===Zone Independent===
  
Line 74: Line 81:
 
|}
 
|}
  
==[[Kosinski compression|Kosinski Compressed]] Art Locations==
+
==[[sega:Kosinski compression|Kosinski Compressed]] art locations==
 +
 
 +
 
 +
 
 +
==[[sega:Kosinski compression#Kosinski Moduled compression|KosinskiM Compressed]] art locations==
 +
{| class="prettytable" style="width:auto;"
 +
!Offset!!Description!!# of blocks
 +
|-
 +
| $364BF2
 +
| Angel Island Zone Miniboss
 +
| ?
 +
|-
 +
| $365260
 +
| Angel Island Zone Boss
 +
| ?
 +
|-
 +
| $1805A0
 +
| Death Egg Zone Miniboss
 +
| ?
 +
|-
 +
| $181002
 +
| Death Egg Zone Boss (This is not for the Final Boss.)
 +
| ?
 +
|}
  
==Palette Editing==
+
==Palette editing==
 
Usually, it's not really necessary to edit a palette in hex. Palette editors give you instant feedback for each RGB value, and the palette can be easily saved as a separate binary and reimported into the ROM. However, it is sometimes desirable or necessary to do it in hex, and it can't hurt to know how it's done.
 
Usually, it's not really necessary to edit a palette in hex. Palette editors give you instant feedback for each RGB value, and the palette can be easily saved as a separate binary and reimported into the ROM. However, it is sometimes desirable or necessary to do it in hex, and it can't hurt to know how it's done.
  
For palette locations, see [[SCHG:Sonic the Hedgehog 3 & Knuckles/Art Editing/Palette Locations]]. For information about the palette format, see [[Palette#Megadrive_Palette|Megadrive palette]].
+
For palette locations, see [[SCHG:Sonic the Hedgehog 3 & Knuckles/Art Editing/Palette Locations]]. For information about the palette format, see [[sega:Sega Mega Drive/Palettes and CRAM|here]].
  
==Pattern Load Requests==
+
==Pattern load requests==
 
PLRs tell the game engine where to get Nemesis-compressed art data and where to put it. The format is rather simple: each PLR starts off with a one-word header, which is the number of entries to load - 1. The actual entries follow this header - each entry is one longword, which is the location in ROM of the compressed art, followed by one word, which is the location in VRAM to decompress to.
 
PLRs tell the game engine where to get Nemesis-compressed art data and where to put it. The format is rather simple: each PLR starts off with a one-word header, which is the number of entries to load - 1. The actual entries follow this header - each entry is one longword, which is the location in ROM of the compressed art, followed by one word, which is the location in VRAM to decompress to.
  

Latest revision as of 09:11, 19 November 2022

SCHG: Sonic the Hedgehog 3 & Knuckles
Main Article
Art Editing
Editing Art
Uncompressed Art
Nemesis Format Art
Kosinski Format Art
Palette Editing
Palette Locations
Pattern Load Requests
Object Editing
Editing Objects
Object Pointers
Object Pointer List #1
Object Pointer List #2
Objects not in either list
Sprite Mappings
Dynamic PLCs
Level Editing
Editing Levels
Object Placement
Ring Placement
Level Layout
16x16 Block Mappings
128x128 Block Mappings
Music Editing
Editing Music
Pointer Format
Header Format
DAC Samples
Universal Voice Bank
Music Pointers (Sonic & Knuckles)
Music Pointers (Sonic 3)
RAM Editing
Editing RAM
Main System Memory Locations
Object Status Table Format
Sonic & Knuckles Collection
Sonic & Knuckles Collection
Music and sound effects

There are several different tools that can be used to edit art. SonED2 is probably the best tool to use for editing level art, and can also be used on palettes. HivePal is also a great tool for editing palettes. SonMapEd is useful for editing both art and mappings - it can extract data from either a ROM or use split binary files, and has internal compression/decompression support. Flex 2 is a more recent art and mapping editor that supports importing, exporting as well as directly editing art.

Uncompressed art locations

Offset Description # of blocks
Zone Independent
$100000 Sonic 4103
$1200E0 Knuckles 4092
$140060 Sonic's extra tiles used in S&K zones 485
$143D00 Tails's extra tiles used in S&K zones 329
$3200E0 Tails 2858
$336620 Tails's tails 139
$345010 Sonic snowboarding 322

Nemesis Compressed art locations

Sonicretro-round.svg This short section needs expansion. You can help Sonic Retro by adding to it.
Offset Description # of blocks
$368400 Hydrocity Zone Miniboss  ?

Zone Independent

Special Stage

Offset Description # of blocks
$AD430 Character's shadow 16
$AD472 Get Blue Spheres text 42
$AD7BC Special Stage HUD 18

Continue Screen

Offset Description # of blocks
$5CD66 Character sprites 77
$5D3C6 Continue icons 46

Kosinski Compressed art locations

KosinskiM Compressed art locations

Offset Description # of blocks
$364BF2 Angel Island Zone Miniboss  ?
$365260 Angel Island Zone Boss  ?
$1805A0 Death Egg Zone Miniboss  ?
$181002 Death Egg Zone Boss (This is not for the Final Boss.)  ?

Palette editing

Usually, it's not really necessary to edit a palette in hex. Palette editors give you instant feedback for each RGB value, and the palette can be easily saved as a separate binary and reimported into the ROM. However, it is sometimes desirable or necessary to do it in hex, and it can't hurt to know how it's done.

For palette locations, see SCHG:Sonic the Hedgehog 3 & Knuckles/Art Editing/Palette Locations. For information about the palette format, see here.

Pattern load requests

PLRs tell the game engine where to get Nemesis-compressed art data and where to put it. The format is rather simple: each PLR starts off with a one-word header, which is the number of entries to load - 1. The actual entries follow this header - each entry is one longword, which is the location in ROM of the compressed art, followed by one word, which is the location in VRAM to decompress to.

The RAM queue is $60 bytes long, meaning it has space for 16 PLRs. However, a coding error in the clearing routine means that storing a PLR in the last slot screws everything up, so effectively only 15 requests can be stored at one time. Note that the routines that load PLRs into the queue do not do any bounds checking, and it is quite easy to create a buffer overrun condition. Further, both lists seem to be moved into the queue at the same time, so even if neither one is longer than 15 requests, they can still overrun the queue and destroy the variables that are stored just beyond it. Make sure that the primary and secondary PLR lists are no more than 15 requests long.


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