Actions

SCHG

SCHG:Sonic the Hedgehog 3 & Knuckles/Music Editing

From Sonic Retro

(Redirected from SCHG:Sonic 3 & Knuckles/Music Editing)
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

For general information on SMPS, see Sega Retro.

Music locations

Sonic 3

  • Music Pointers (These add to $C8000): $E761A
  • Music Pointers (These add to $D0000): $E762E
  • Music Pointers (These add to $D8000): $E7652
  • Music Pointers (These add to $C0000): $E7674
  • Sound Effect Pointers (These add to $F8000): $E767E

Sonic & Knuckles

  • Music Pointers: $F793E
Music ID Music pointer Song name
These add to 2C8000:
01 8000 AIZ1
02 9B6D AIZ2
03 B0BC HZ1
04 C0C6 HZ2
05 D364 MGZ1
06 D97B MGZ2
07 E48F CNZ1
08 DDA9 CNZ2
These add to E8000:
09 8000 FBZ1
0A 8597 FBZ2
0F 8AFE MHZ1
  • NOTE: This one is a bit tricky... The FE is right before the FF. Make sure to skip the FF or the driver will crash.
10 9106 MHZ2
11 9688 SZ1
12 9CF2 SZ2
13 A2E5 LRZ1
14 ACF3 LRZ2
15 BE80 SSZ
16 C2B4 DEZ1
17 C79F DEZ2
18 CBB1 Act 1 Boss
19 CEE1 Act 2 Boss
1A D3DD Doomsday
1B DCC0 Rolling Jump Bonus Stage
1C E223 Special Stage
1D EABB Slot Machine Bonus Stage
1F F5A3 Knuckles' Theme
25 F88E Title
2A FD4B 1UP
2B FE75 Chaos Emerald
2E CBB1 Act 1 Boss (same as 18)
These add to 2D0000:
0B 86AA ICZ1
0C 8000 ICZ2
0D 9345 LBZ1
0E 8DC8 LBZ2
1E 8AE8 Gum Ball Machine Bonus Stage
20 99F7 Azure Lake
21 A4FD Balloon Park
22 B0EC Desert Palace
23 C324 Chrome Gadget
24 DA47 Endless Mine
26 E587 S3 credits
2D F5E4 Competition Menu
31 FABE S3 countdown
These add to E0000:
27 DD4B Game/Time Over
28 DFA6 Continue
29 E3C0 Bonus Screen
2C E574 Invincible
2F E7AF Menu
1F F74C Knuckles' Theme
32 FCDE S&K outro
DC C104 S&K credits
  • Sound Effect Pointers (These add to $F8000): $F79AD
    • Specifics...
Sound Test ID Pointer Value
$33 DE30
$34 DE5E
$35 DE6F
$36 DEA1
$37 DEC5
$38 DEF4
$39 DF2A
$3A DF6B
$3B DF96
$3C DFE5
$3D E023
$3E E05D
$3F E088
$40 E0AB
$41 E0CE
$42 E0F1
$43 E109
$44 E122
$45 E14F
$46 E177
$47 E1A4
$48 E1C4
$49 E1DE
$4A E206
$4B E22E
$4C E278
$4D E2A2
$4E E2CF
$4F E313
$50 E322
$51 E35A
$52 E38B
$53 E3A8
$54 E3E8
$55 E42B
$56 E453
$57 E463
$58 E481
$59 E49A
$5A E4F6
$5B E523
$5C E530
$5D E558
$5E E581
$5F E5B2
$60 E5DA
$61 E61B
$62 E64C
$63 E662
$64 E68C
$65 E6AB
$66 E6E1
$67 E730
$68 E75C
$69 E7B0
$6A E7DD
$6B E811
$6C E823
$6D E833
$6E E852
$6F E886
$70 E896
$71 E8E0
$72 E8EA
$73 E917
$74 E94B
$75 E978
$76 E9A7
$77 E9D1
$78 EA1B
$79 EA48
$7A EA93
$7B EAC7
$7C EAF7
$7D EB28
$7E EB55
$7F EB6D
$80 EB8B
$81 EBBA
$82 EC05
$83 EC32
$84 EC7E
$85 ECAB
$86 ECD8
$87 ED05
$88 ED3B
$89 ED68
$8A ED75
$8B EDA9
$8C EDDF
$8D EE10
$8E EE2A
$8F EE5B
$90 EE91
$91 EEC3
$92 EEF9
$93 EF2D
$94 EF77
$95 EFA6
$96 EFD5
$97 F009
$98 F01C
$99 F068
$9A F090
$9B F0AF
$9C F114
$9D F14B
$9E F17F
$9F F1C0
$A0 F1FC
$A1 F214
$A2 F23C
$A3 F274
$A4 F2A1
$A5 F2CE
$A6 F2FB
$A7 F313
$A8 F33B
$A9 F365
$AA F38F
$AB F3EA
$AC F42A
$AD F49C
$AE F4AB
$AF F4DA
$B0 F507
$B1 F582
$B2 F5D7
$B3 F603
$B4 F67D
$B5 F6AA
$B6 F6D2
$B7 F713
$B8 F745
$B9 F76C
$BA F794
$BB F7BE
$BC F7CE
$BD F7F9
$BE F837
$BF F86A
$C0 F89C
$C1 F8D1
$C2 F907
$C3 F91E
$C4 F94E
$C5 F97E
$C6 F9B7
$C7 F9F2
$C8 FA21
$C9 FA2B
$CA FA66
$CB FA9C
$CC FAD7
$CD FB12
$CE FB45
$CF FB60
$D0 FB6A
$D1 FBA1
$D2 FBBE
$D3 FBF4
$D4 FC2D
$D5 FC64
$D6 FC9D
$D7 FCCE
$D8 FCFF
$D9 FD32
$DA FD62
$DB FD94
$DC FD94
$DD FD94
$DE FD94
$DF FD94

DAC Samples

  • DAC $81-$9A Pointer Index (Adds to $E0000): $E0000
  • DAC $9B-$AA Pointer Index (Adds to $E8000): $E8000
  • DAC $AB-$C0 Pointer Index (Adds to $F0000): $F0000

These pointer indexes work by pointing to the sample setup data for the particular samples. You'll notice there are 3 pointer indexes - this is since not all the samples can fit in a single bank, so they span 3 banks. The pointers are repeated at all 3 indexes, but only the defined samples for the index (listed above) will be in the relevant ROM bank.

The format for a DAC sample entry is pretty simple. Follow along:

Offset Size Function
$00 Byte Sample rate/pitch. The lower the value, the faster the sample will play.
$01-$02 Word Size of the DAC sample, in bytes.
  • NOTE: Value is little endian, so remember to swap the bytes to get the real value.
$03-$04 Word Pointer to the DAC sample, within the current bank.
  • NOTE: Value is little endian, so remember to swap the bytes to get the real value.

The DAC sample definitions within songs:

Value Sample
$81 Snare
$82 High-Tom
$83 Mid-Tom
$84 Low-Tom
$85 Floor Tom
$86 Kick
$87 Muffled Snare
$88 Crash Cymbal
$89 Ride Cymbal(?)
$8A Low Metal Hit
$8B Metal Hit
$8C High Metal Hit
$8D Higher Metal Hit
$8F Clap
$90 Electric High-Tom
$91 Electric Mid-Tom
$92 Electric Low-Tom
$93 Electric Floor Tom
$94 Tight Snare
$95 Mid-pitch Snare
$96 Loose Snare
$97 Looser Snare
$98 Hi-Timpani
$99 Low-Timpani
$9A Mid-Timpani
$9B Quick Loose Snare
$9C Click
$9D Power Kick
$9E Quick Glass Crash
$9F Glass Crash with Snare
$A0 Glass Crash
$A1 Glass Crash with Kick
$A2 Quiet Glass Crash
$A3 Odd Snare with Kick
$A4 Kick with extra bass
$A5 "Come on!"
$A6 Dance Snare
$A7 Loose Kick
$A8 Moderately Loose Kick
$A9 "Woo!"
$AA "Go!"
$AB Snare with voice going "Go!"
$AC Power Tom
$AD Hi-Wood Block
$AE Low-Wood Block
$AF Hi-Hit Drum
$B0 Low-Hit Drum
$B1 Metal Crash Hit
$B2 Echoed Clap Hit
$B3 Lower Echoed Clap Hit
$B4 Hip-Hop style hit with a kick
$B5 Hip-Hop style hit with a Power Kick
$B6 Some Bass with a voice going "Hey!"
$B7 Dance Style Kick
$B8 Hip-Hop hit with a kick
$B9 Hip-Hop hit with a kick
$BA Reverse Fading Wind Sound
$BB Scratch
$BC Loose Snare with noise
$BD Power Kick
$BE Crashing noise with voice going "Woo!"
$BF Quick Hit
$C0 Kick with a voice going "Hey!"
$C1 Power Kick with hit
$C2 Low Power Kick with hit
$C3 Lower Power Kick with hit
$C4 Lowest Power Kick with hit

Universal Voice Bank

In Sonic 3, some songs have the value "$D817" as their voice pointer (which maps to Z80 RAM location $17D5). When a song has this in its voice pointer, that means it's being prepped to use a global set of multiple voices that any song in the game can use. This is generally used to save space for songs that use the same voices. Interestingly enough, though, the Special Stage music has the first 5 voices used in the Universal Voice Bank, and all in the same order, so it's puzzling why they didn't just have the song use the bank (as it's fully capable of doing so).

  • Universal Voice Bank in Sonic 3: $E77D8

Universal Voice Bank definitions

Using the Universal Voice Bank is akin to using voices in a normal song - each voice has a value, defined by coordination flag $EF. Here are some of the voices used in the Universal Voice Bank.

Value Description
$00 Synth Bass 2
$01 Trumpet 1
$02 Slap Bass 2
$03 Synth Bass 1
$04 Bell Synth 1
$05 Bell Synth 2
$06 Synth Brass 1
$07 Synth like Bassoon
$08 Bell Horn type thing
$09 Synth Bass 3
$0A Synth Trumpet
$0B Wood Block
$0C Tubular Bell
$0D Strike Bass
$0E Elec Piano
$0F Bright Piano
$10 Church Bell
$11 Synth Brass 2
$12 Bell Piano
$13 Wet Wood Bass
$14 Silent Bass
$15 Picked Bass
$16 Xylophone
$17 Sine Flute
$18 Pipe Organ
$19 Synth Brass 2
$1A Harpischord
$1B Metallic Bass
$1C Alternate Metallic Bass
$1D Backdropped Metallic Bass
$1E Sine like Bell
$1F Synth like Metallic with Small Bell.
$20 Nice Synth like lead.
$21 Rock Organ
$22 Strike like Slap Bass

Real-Time Music editing

Offset Z80 RAM Location Purpose
$001A8C 1618 Music Pointers (Sonic & Knuckles)
$001A8E 161A Music Pointers (Sonic 3)
$001778 1304 Pointer for Music Pointers
$000FD9 0B65 Music Bank IDs (Sonic & Knuckles)
$000FBC 0B48 Music Bank IDs (Sonic 3)
$00177A 1306 Pointer for Sound Effect Pointers
$001AF2 167E Sound Effect Pointers

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