Actions

SCHG

Sonic 2/Object Editing

From Sonic Retro

SCHG: Sonic 2
Main Article
Art Editing
Editing Art
Uncompressed Art
Nemesis Format Art
Kosinski Format Art
Palette Editing
Pattern Load Requests
Object Editing
Editing Objects
Sounds and Objects
Object Pointer List
Sprite Mappings
Dynamic PLCs
Level Editing
Editing Levels
Object Placement
Ring Placement
Level Layout
16x16 Block Mappings
128x128 Block Mappings
Level Specific Info
Text Editing
Editing Text
Two-Player Mode Text
Options Text
Level Select Text
© 1992 SEGA Text
Credits/Intro Text
Title Card Text
Music Editing
Editing Music
Pointer Format
Header Format
DAC Samples
Master Playlist and Compression
Music Pointers
RAM Editing
Editing RAM
Main System Memory Locations
Object Status Table Format
Miscellaneous
Miscellaneous Editing
Game Configuration
Cheats Editings
Debug Mode
Demo Recording

Sounds

If you change the "ring" sound effect, all objects using that sound will have the new sound. This may not be desired, however - you may have only wanted the Super Ring powerup to play the new sound. With this list, you can edit the sound effect that an object plays. If you change the sound for the Super Ring power-up, only the Super Ring will have the new sound. Note that you are not changing any sound effects - you are only changing which effect will play.

These notes are for those who don't want see the programming stuff of the objects to change its sounds.

To change the sound, first, take a value from the sound test (Ex: 1-up sound is $18) , add $80 to it and you get $98. This is the way you have to replace sounds (take a value from sound test, add $80 to it, and after that, insert the byte in the offset where you wish change the sound.)

Offset List

The following list is the offset where you will place the new sound. I not will make a list with the values and its respective sounds. Use the trick (explained above) and Sound Test. Of course you can place the objects in any level you want (see Object Placement below), I'm just saying the level the object is used in for a better description.

Level Description Offset
ALL Invincibility power-up $12A81
ALL Shield power-up $12A37
ALL Super Ring $129CD
ALL Lamp Post: $1F191
Casino Night Bumper $1F7F5
ALL Red and Yellow Springs Facing Up $18A69
ALL Red and Yellow Springs Facing Right $18BBF
ALL Red Spring Facing Down $18D63
Chemical Plant Speed booster $223DB
Chemical Plant Blue worm (The sound is repeated 3 Times.) $224EA
Aquatic Ruin Arrow launcher $257B7
Casino Night Slot machine cage $2BE1F
Casino Night Point cage $2BE6B
Hill Top Zip line $21E75
Casino Night Blue Bumper $2C577
Casino Night Green flipper $2B30B
Casino Night Orange flipper $2B3BF
Casino Night Impulse spring facing up $2AE4F
Wing Fortress Propellor (repeat infinitely) $3B3A3

Object Pointer List

See SCHG:Sonic 2/Object Editing/Pointers.

Sprite Mappings

Reference

Each sprite mapping consists of four words. A contiguous list of sprite mappings preceded with a word-length number of mappings defines one frame for an object. The four words have the following purposes:

  • First word:
    • High byte is the relative signed top edge position of the sprite from the center of the object.
    • Low byte is the size of the sprite, in tiles minus one. The upper four bits are ignored, the next two bits control the width and the lowest two bits control the height. Thus sprites can be of any size from 1x1 tile to 4x4 tiles. For example, $01 is a 1x2 sprite, $02 is a 1x3 sprite, $04 is a 2x1 sprite, and so on.
  • Second and third words:
    • The second word applies to one-player mode; the third applies to two-player mode.
    • The relevant word will be added to the object's VRAM offset and then used as the pattern index for that sprite. Like all SEGA Genesis VDP pattern indices, it is a bitmask of the form PCCY XAAA AAAA AAAA. P is the priority flag, CC is the palette line to use, X and Y indicate that the sprite should be flipped horizontally and vertically respectively and AAA AAAA AAAA is the actual tile index, i.e. the VRAM offset of the pattern divided by $20 (or bit-shifted right by 5).
  • Fourth word: This is the relative signed left edge position of the sprite from the center of the object.

Dynamic PLCs

Dynamic PLCs (pattern load cues) were hard-coded and for the most part unnoticed in Sonic the Hedgehog. In Sonic 2, they are more flexible and used for many more objects. The format of DPLCs is simple: the first word is the number of DPLC requests to make, and each successive word (up to the value of the first word) is split up so that the first nybble is the number of tiles to load minus one, and the last three nybbles are the offset (in tiles, i.e. multiples of $20 bytes) of the art to load from the beginning of the object's specified art offset in ROM. Therefore, in order to request x tiles to be loaded, you need 1+floor(x/16) words in the DPLC.


Sonic Community Hacking Guide
General
Sonic Music Hacking Guide | SonED2 Manual
Game-Specific
Sonic the Hedgehog (16-bit) | Sonic the Hedgehog (8-bit) | Sonic Eraser | Sonic CD (prototype 510) | Sonic CD | Sonic CD (PC) | Sonic 2 (Nick Arcade prototype) | Sonic 2 (Simon Wai prototype) | Sonic 2 (16-bit) | Sonic 2 (8-bit) | Sonic 2 & Knuckles | Dr. Robotnik's Mean Bean Machine | Sonic Triple Trouble | Sonic 3 | Sonic & Knuckles | Sonic 3 & Knuckles | Sonic & Knuckles Collection | Sonic Crackers | Sonic 3D: Flickies' Island | Chaotix | Sonic R PC | Sonic Jam 6 | Sonic Advance | Sonic Advance 2 | Sonic Advance 3 | Sonic Battle | 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 | Shadow the Hedgehog | Sonic Riders | Sonic the Hedgehog (2006) | Sonic & Sega All-Stars Racing | Sonic Unleashed (Xbox 360/PS3) | Sonic Generations
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 | Subroutine Equivalency List | 68000 Instruction Set | 68000 ASM-to-Hex Code Reference | VDP Documentation | Official Sega 32X Documentation | Official Mega-CD Documentation | Official Sega Mega Drive Documentation