Actions

SCHG How-to

Difference between revisions of "Edit the Level Order in Sonic 2 with ASM"

From Sonic Retro

Line 5: Line 5:
 
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:
 
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
+
<z80>$0-Emerald Hill Zone
 
$1-Unused
 
$1-Unused
 
$2-Unused ([[Wood Zone]] in Beta)
 
$2-Unused ([[Wood Zone]] in Beta)
 
$3-Unused
 
$3-Unused
$4-MTZ 1 and 2
+
$4-Metropolis Zone acts 1 and 2
$5-MTZ 3
+
$5-Metropolis Zone acts 3 and 4 (4 is unused)
$6-WFZ
+
$6-Wing Fortress Zone
$7-HTZ
+
$7-Hill Top Zone
 
$8-Unused (Hidden Palace in Beta)
 
$8-Unused (Hidden Palace in Beta)
 
$9-Unused
 
$9-Unused
$A-OOZ
+
$A-Oil Ocean Zone
$B-MCZ
+
$B-Mystic Cave Zone
$C-CNZ
+
$C-Casino Night Zone
$D-CPZ
+
$D-Chemical Plant Zone
$E-DEZ
+
$E-Death Egg Zone
$F-ARZ
+
$F-Aquatic Ruin Zone
$10-SCZ
+
$10-Sky Chase Zone
 
And $FFFF is the ending</z80>
 
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:
+
Okay, so, now go to the main game level order. The zones go in the order above, 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 Emerald Hill Zone's (act 1) spot, it's telling it where to go after Emerald Hill Zone act 1. 0 is the zone to go to (Emerald Hill Zone) 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)  
+
<z80> dc.w 1 ; Emerald Hill Zone act 1 to Emerald Hill Zone (0) act 2 (01)  
dc.w  $D00 ; 1 ; EHZ act 2 to CPZ (D) act 1 (00)
+
dc.w  $D00 ; 1 ; Emerald Hill Zone act 2 to Chemical Plant Zone (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 ; 2 ; Unused level to Emerald Hill Zone (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 0 ; 3 ; Unused level to Emerald Hill Zone (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  $201 ; 4 ; Unused level (was Wood Zone act 1) to Unused level (Wood Zone) (2) act 2 (01)
dc.w  $400 ; 5 ; Unused level (was Wood zone act 2) to MTZ (4) act 1 (00)  
+
dc.w  $400 ; 5 ; Unused level (was Wood zone act 2) to Metropolis Zone (4) act 1 (00)  
dc.w 0 ; 6 ; Unused level to EHZ (0) act 1 (00)
+
dc.w 0 ; 6 ; Unused level to Emerald Hill Zone (0) act 1 (00)
dc.w 0 ; 7 ; Unused level to EHZ (0) act 1 (00)
+
dc.w 0 ; 7 ; Unused level to Emerald Hill Zone (0) act 1 (00)
dc.w  $401 ; 8 ; MTZ act 1 to MTZ (4) act 2 (01)
+
dc.w  $401 ; 8 ; Metropolis Zone act 1 to Metropolis Zone (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  $500 ; 9 ; Metropolis Zone act 2 to Metropolis Zone (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 $1000 ; 10 ; Metropolis Zone act 3 to SCZ (10) act 1 (00)
dc.w 0 ; 11 ; MTZ act 4 (unused) to EHZ (0) act 1 (00)
+
dc.w 0 ; 11 ; Metropolis Zone act 4 (unused) to Emerald Hill Zone (0) act 1 (00)
dc.w  $E00 ; 12 ; WFZ act 1 to DEZ (E) act 1 (00)
+
dc.w  $E00 ; 12 ; Wing Fortress Zone act 1 to Death Egg Zone (E) act 1 (00)
dc.w 0 ; 13 ; WFZ act 2 (unused) to EHZ (0) act 1 (00)
+
dc.w 0 ; 13 ; Wing Fortress Zone act 2 (unused) to Emerald Hill Zone (0) act 1 (00)
dc.w  $701 ; 14 ; HTZ act 1 to HTZ (7) act 2 (01)
+
dc.w  $701 ; 14 ; Hill Top Zone act 1 to Hill Top Zone (7) act 2 (01)
dc.w  $B00 ; 15 ; HTZ act 2 to MCZ (B) act 1 (00)
+
dc.w  $B00 ; 15 ; Hill Top Zone act 2 to Mystic Cave Zone (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  $801 ; 16 ; Unused level (was Hidden Palace Zone act 1) to Unused level (Hidden Palace Zone) (2) act 2 (01)
dc.w  $A00 ; 17 ; Unused level (was Hidden Palace Zone act 2) to OOZ (A) act 1 (00)  
+
dc.w  $A00 ; 17 ; Unused level (was Hidden Palace Zone act 2) to Oil Ocean Zone (A) act 1 (00)  
dc.w 0 ; 18 ; Unused level to EHZ (0) act 1 (00)
+
dc.w 0 ; 18 ; Unused level to Emerald Hill Zone (0) act 1 (00)
dc.w 0 ; 19 ; Unused level to EHZ (0) act 1 (00)
+
dc.w 0 ; 19 ; Unused level to Emerald Hill Zone (0) act 1 (00)
dc.w  $A01 ; 20 ; OOZ act 1 to OOZ (A) act 2 (01)
+
dc.w  $A01 ; 20 ; Oil Ocean Zone act 1 to Oil Ocean Zone (A) act 2 (01)
dc.w  $400 ; 21 ; OOZ act 2 to MTZ (4) act 1 (00)
+
dc.w  $400 ; 21 ; Oil Ocean Zone act 2 to Metropolis Zone (4) act 1 (00)
dc.w  $B01 ; 22 ; MCZ act 1 to MCZ (B) act 2 (01)
+
dc.w  $B01 ; 22 ; Mystic Cave Zone act 1 to Mystic Cave Zone (B) act 2 (01)
dc.w  $A00 ; 23 ; MCZ act 2 to OOZ (A) act 1 (00)
+
dc.w  $A00 ; 23 ; Mystic Cave Zone act 2 to Oil Ocean Zone (A) act 1 (00)
dc.w  $C01 ; 24 ; CNZ act 1 to CNZ (C) act 2 (01)
+
dc.w  $C01 ; 24 ; Casino Night Zone act 1 to Casino Night Zone (C) act 2 (01)
dc.w  $700 ; 25 ; CNZ act 2 to HTZ (7) act 1 (00)
+
dc.w  $700 ; 25 ; Casino Night Zone act 2 to Hill Top Zone (7) act 1 (00)
dc.w  $D01 ; 26 ; CPZ act 1 to CPZ (D) act 2 (01)
+
dc.w  $D01 ; 26 ; Chemical Plant Zone act 1 to Chemical Plant Zone (D) act 2 (01)
dc.w  $F00 ; 27 ; CPZ act 2 to ARZ (F) act 1 (00)
+
dc.w  $F00 ; 27 ; Chemical Plant Zone act 2 to Aquatic Ruin Zone (F) act 1 (00)
dc.w $FFFF ; 28 ; DEZ act 1 to the ending (FFFF)
+
dc.w $FFFF ; 28 ; Death Egg Zone act 1 to the ending (FFFF)
dc.w 0 ; 29 ; DEZ act 2 (unused) to EHZ (0) act 1 (00)
+
dc.w 0 ; 29 ; Death Egg Zone act 2 (unused) to Emerald Hill Zone (0) act 1 (00)
dc.w  $F01 ; 30 ; ARZ act 1 to ARZ (F) act 2 (01)
+
dc.w  $F01 ; 30 ; Aquatic Ruin Zone act 1 to Aquatic Ruin Zone (F) act 2 (01)
dc.w  $C00 ; 31 ; ARZ act 2 to CNZ (C) act 1 (00)
+
dc.w  $C00 ; 31 ; Aquatic Ruin Zone act 2 to Casino Night Zone (C) act 1 (00)
dc.w  $600 ; 32 ; SCZ act 1 to WFZ (6) act 1 (00)
+
dc.w  $600 ; 32 ; Sky Chase Zone act 1 to Wing Fortress Zone (6) act 1 (00)
dc.w 0 ; 33  ; SCZ act 2 (unused) to EHZ (0) act 1 (00)</z80>
+
dc.w 0 ; 33  ; Sky Chase Zone act 2 (unused) to Emerald Hill Zone (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.
 
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.
  
  
 
[[Category:SCHG How-tos|Edit the Level Order in Sonic 2 with ASM]]
 
[[Category:SCHG How-tos|Edit the Level Order in Sonic 2 with ASM]]

Revision as of 20:21, 7 August 2008

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-Emerald Hill Zone $1-Unused $2-Unused (Wood Zone in Beta) $3-Unused $4-Metropolis Zone acts 1 and 2 $5-Metropolis Zone acts 3 and 4 (4 is unused) $6-Wing Fortress Zone $7-Hill Top Zone $8-Unused (Hidden Palace in Beta) $9-Unused $A-Oil Ocean Zone $B-Mystic Cave Zone $C-Casino Night Zone $D-Chemical Plant Zone $E-Death Egg Zone $F-Aquatic Ruin Zone $10-Sky Chase Zone And $FFFF is the ending</z80>

Okay, so, now go to the main game level order. The zones go in the order above, 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 Emerald Hill Zone's (act 1) spot, it's telling it where to go after Emerald Hill Zone act 1. 0 is the zone to go to (Emerald Hill Zone) 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 ; Emerald Hill Zone act 1 to Emerald Hill Zone (0) act 2 (01) dc.w $D00 ; 1 ; Emerald Hill Zone act 2 to Chemical Plant Zone (D) act 1 (00) dc.w 0 ; 2 ; Unused level to Emerald Hill Zone (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 Emerald Hill Zone (0) act 1 (00) dc.w $201 ; 4 ; Unused level (was Wood Zone act 1) to Unused level (Wood Zone) (2) act 2 (01) dc.w $400 ; 5 ; Unused level (was Wood zone act 2) to Metropolis Zone (4) act 1 (00) dc.w 0 ; 6 ; Unused level to Emerald Hill Zone (0) act 1 (00) dc.w 0 ; 7 ; Unused level to Emerald Hill Zone (0) act 1 (00) dc.w $401 ; 8 ; Metropolis Zone act 1 to Metropolis Zone (4) act 2 (01) dc.w $500 ; 9 ; Metropolis Zone act 2 to Metropolis Zone (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 ; Metropolis Zone act 3 to SCZ (10) act 1 (00) dc.w 0 ; 11 ; Metropolis Zone act 4 (unused) to Emerald Hill Zone (0) act 1 (00) dc.w $E00 ; 12 ; Wing Fortress Zone act 1 to Death Egg Zone (E) act 1 (00) dc.w 0 ; 13 ; Wing Fortress Zone act 2 (unused) to Emerald Hill Zone (0) act 1 (00) dc.w $701 ; 14 ; Hill Top Zone act 1 to Hill Top Zone (7) act 2 (01) dc.w $B00 ; 15 ; Hill Top Zone act 2 to Mystic Cave Zone (B) act 1 (00) dc.w $801 ; 16 ; Unused level (was Hidden Palace Zone act 1) to Unused level (Hidden Palace Zone) (2) act 2 (01) dc.w $A00 ; 17 ; Unused level (was Hidden Palace Zone act 2) to Oil Ocean Zone (A) act 1 (00) dc.w 0 ; 18 ; Unused level to Emerald Hill Zone (0) act 1 (00) dc.w 0 ; 19 ; Unused level to Emerald Hill Zone (0) act 1 (00) dc.w $A01 ; 20 ; Oil Ocean Zone act 1 to Oil Ocean Zone (A) act 2 (01) dc.w $400 ; 21 ; Oil Ocean Zone act 2 to Metropolis Zone (4) act 1 (00) dc.w $B01 ; 22 ; Mystic Cave Zone act 1 to Mystic Cave Zone (B) act 2 (01) dc.w $A00 ; 23 ; Mystic Cave Zone act 2 to Oil Ocean Zone (A) act 1 (00) dc.w $C01 ; 24 ; Casino Night Zone act 1 to Casino Night Zone (C) act 2 (01) dc.w $700 ; 25 ; Casino Night Zone act 2 to Hill Top Zone (7) act 1 (00) dc.w $D01 ; 26 ; Chemical Plant Zone act 1 to Chemical Plant Zone (D) act 2 (01) dc.w $F00 ; 27 ; Chemical Plant Zone act 2 to Aquatic Ruin Zone (F) act 1 (00) dc.w $FFFF ; 28 ; Death Egg Zone act 1 to the ending (FFFF) dc.w 0 ; 29 ; Death Egg Zone act 2 (unused) to Emerald Hill Zone (0) act 1 (00) dc.w $F01 ; 30 ; Aquatic Ruin Zone act 1 to Aquatic Ruin Zone (F) act 2 (01) dc.w $C00 ; 31 ; Aquatic Ruin Zone act 2 to Casino Night Zone (C) act 1 (00) dc.w $600 ; 32 ; Sky Chase Zone act 1 to Wing Fortress Zone (6) act 1 (00) dc.w 0 ; 33 ; Sky Chase Zone act 2 (unused) to Emerald Hill Zone (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.