Actions

SCHG How-to

Edit the Level Order in Sonic 2 with ASM

From Sonic Retro

Revision as of 20:02, 7 August 2008 by MathUser (talk | contribs)

Editing level order for S2 in ASM (Guide by Malevolence)

Well, since a few people have been asking me lately how to edit the level order in ASM, I figure I might as well created a document which may be able to help some of you out there.

First of all, open your asm files and search for Main game level order. For this part, you'll have to know what each zone's ID is, here's a chart:

<z80>$0-EHZ $1-Unused $2-Unused (Wood Zone in Beta) $3-Unused $4-MTZ 1 and 2 $5-MTZ 3 $6-WFZ $7-HTZ $8-Unused (Hidden Palace in Beta) $9-Unused $A-OOZ $B-MCZ $C-CNZ $D-CPZ $E-DEZ $F-ARZ $10-SCZ And $FFFF is the ending</z80>

Okay, so, now go to that part in you're rom. The zones go in that order, and there are two acts for every zone. Each act tells which act and zone to go to next. For the first one you have dc.w 1. Think of it as 001. Since this is in EHZ's (act 1) spot, it's telling it where to go after EHZ act 1. 0 is the zone to go to (EHZ) and 01 is the act (act 2). Here is a list of the order with comments of where to go to:

<z80> dc.w 1 ; EHZ act 1 to EHZ (0) act 2 (01) dc.w $D00 ; 1 ; EHZ act 2 to CPZ (D) act 1 (00) dc.w 0 ; 2 ; Unused level to EHZ (0) act 1 (00) (it doesn't matter where it goes, you aren't playing this in the game unless you change it yourself) dc.w 0 ; 3 ; Unused level to EHZ (0) act 1 (00) dc.w $201 ; 4 ; Unused level (was Wood Zone act 1) to Unused level (WZ) (2) act 2 (01) dc.w $400 ; 5 ; Unused level (was Wood zone act 2) to MTZ (4) act 1 (00) dc.w 0 ; 6 ; Unused level to EHZ (0) act 1 (00) dc.w 0 ; 7 ; Unused level to EHZ (0) act 1 (00) dc.w $401 ; 8 ; MTZ act 1 to MTZ (4) act 2 (01) dc.w $500 ; 9 ; MTZ act 2 to MTZ (now 5, act 3 uses a different ID because there are two acts per zone ID) act 3 (00, uses a new zone ID, so it's the first act) dc.w $1000 ; 10 ; MTZ act 3 to SCZ (10) act 1 (00) dc.w 0 ; 11 ; MTZ act 4 (unused) to EHZ (0) act 1 (00) dc.w $E00 ; 12 ; WFZ act 1 to DEZ (E) act 1 (00) dc.w 0 ; 13 ; WFZ act 2 (unused) to EHZ (0) act 1 (00) dc.w $701 ; 14 ; HTZ act 1 to HTZ (7) act 2 (01) dc.w $B00 ; 15 ; HTZ act 2 to MCZ (B) act 1 (00) dc.w $801 ; 16 ; Unused level (was Hidden Palace Zone act 1) to Unused level (HPZ) (2) act 2 (01) dc.w $A00 ; 17 ; Unused level (was Hidden Palace Zone act 2) to OOZ (A) act 1 (00) dc.w 0 ; 18 ; Unused level to EHZ (0) act 1 (00) dc.w 0 ; 19 ; Unused level to EHZ (0) act 1 (00) dc.w $A01 ; 20 ; OOZ act 1 to OOZ (A) act 2 (01) dc.w $400 ; 21 ; OOZ act 2 to MTZ (4) act 1 (00) dc.w $B01 ; 22 ; MCZ act 1 to MCZ (B) act 2 (01) dc.w $A00 ; 23 ; MCZ act 2 to OOZ (A) act 1 (00) dc.w $C01 ; 24 ; CNZ act 1 to CNZ (C) act 2 (01) dc.w $700 ; 25 ; CNZ act 2 to HTZ (7) act 1 (00) dc.w $D01 ; 26 ; CPZ act 1 to CPZ (D) act 2 (01) dc.w $F00 ; 27 ; CPZ act 2 to ARZ (F) act 1 (00) dc.w $FFFF ; 28 ; DEZ act 1 to the ending (FFFF) dc.w 0 ; 29 ; DEZ act 2 (unused) to EHZ (0) act 1 (00) dc.w $F01 ; 30 ; ARZ act 1 to ARZ (F) act 2 (01) dc.w $C00 ; 31 ; ARZ act 2 to CNZ (C) act 1 (00) dc.w $600 ; 32 ; SCZ act 1 to WFZ (6) act 1 (00) dc.w 0 ; 33 ; SCZ act 2 (unused) to EHZ (0) act 1 (00)</z80> It's as simple as that. If you wanted to change something, let's say CPZ act 2 to WFZ act 1, you go to where CPZ act 2 is ($D-CPZ, $D in decimal=13, 13x2=26 (because there are two acts) and then go down one more because it's the second act, so 27) then change $F00 (ARZ normally) to $600, and it'll go to WFZ. Any questions or comments, feel free to contact me.