Actions

SCHG How-to

Difference between revisions of "Add New Monitors"

From Sonic Retro

m (I removed "perfectly" because frankly it doesn't work at all in it's current state.)
(Revamped the entire thing. it woks now.)
Line 1: Line 1:
= '''''IMPORTANT NOTE: THIS GUIDE IS UNDER CONSTRUCTION! IT DOES NOT WORK YET!''''' =
+
Let's say you want another monitor. I've given the monitor files a once-over, and found an easy way to free up 10 monitors, the 'S', the Goggles, the Blank, and 7 "invalid" monitors. 2 notes before we begin: This uses the HV build, and I will mention this later, but whenever you want to input more art through SonMapED you HAVE to open up the file Monitors under the folder ''_maps'' and add the label ''map_monitor:'' to the file before the first piece of code.
Let's say you want another monitor. I've given the monitor files a once-over, and found an easy way to free up 10 monitors, the 'S', the Goggles, the Blank, and 7 "invalid" monitors. 2 notes before we begin: This uses the SVN build, and '''there may be errors in unrelated files'''. If there are, then it's probably the amount of branches you have. I used a copy of the DisASM that wasn't clean, so I might tell you to do stupid things that break your own build if I tried to give instructions on how to fix the unrelated errors. If someone could do this tutorial on a fresh build and post fixes for those errors at the end of the guide, I'd be very thankful.
 
  
 
==Step 1: _incObj\2E Monitor Content Power-Up.asm==
 
==Step 1: _incObj\2E Monitor Content Power-Up.asm==
Line 87: Line 86:
 
; ===========================================================================</asm>
 
; ===========================================================================</asm>
  
Now you can use the Eggman monitor (before the rest of the monitors in the code), the 'S' monitor, the Goggles monitor, the 7 invalid monitors, and the Blank monitor. There's just one problem: the invalid monitors have glitchy graphics.
+
Now you can use the Eggman monitor (before the rest of the monitors in the code), the 'S' monitor, the Goggles monitor, the 7 invalid monitors, and the Blank monitor. There's just a few problems: the invalid monitors have glitchy graphics, they don't flash like the other ones, AND when we destroy them it shows the "S" monitor instead of the broken one.
 +
 
  
 
==Step 2: _maps\Monitor.asm==
 
==Step 2: _maps\Monitor.asm==
Delete everything in the file and paste this in:
+
Now, let's worry about fixing some mapping errors.
<asm>; ---------------------------------------------------------------------------
+
<asm>; --------------------------------------------------------------------------------
; Sprite mappings - monitors
+
; Sprite mappings - output from SonMapEd - Sonic 1 format
; ---------------------------------------------------------------------------
+
; --------------------------------------------------------------------------------
Map_Monitor: dc.w @static0-Map_Monitor, @static1-Map_Monitor
+
 
dc.w @static2-Map_Monitor, @eggman-Map_Monitor
+
SME_TP0l7:
dc.w @sonic-Map_Monitor, @shoes-Map_Monitor
+
map_monitor:
dc.w @shield-Map_Monitor, @invincible-Map_Monitor
+
dc.w SME_TP0l7_1A-SME_TP0l7, SME_TP0l7_20-SME_TP0l7
dc.w @rings-Map_Monitor, @s-Map_Monitor
+
dc.w SME_TP0l7_2B-SME_TP0l7, SME_TP0l7_36-SME_TP0l7
dc.w @goggles-Map_Monitor, @s2-Map_Monitor
+
dc.w SME_TP0l7_41-SME_TP0l7, SME_TP0l7_4C-SME_TP0l7
dc.w @s3-Map_Monitor, @s4-Map_Monitor
+
dc.w SME_TP0l7_57-SME_TP0l7, SME_TP0l7_62-SME_TP0l7
dc.w @s5-Map_Monitor, @s6-Map_Monitor
+
dc.w SME_TP0l7_6D-SME_TP0l7, SME_TP0l7_78-SME_TP0l7
dc.w @s7-Map_Monitor, @s8-Map_Monitor
+
dc.w SME_TP0l7_83-SME_TP0l7, SME_TP0l7_8E-SME_TP0l7
dc.w @broken-Map_Monitor
+
dc.w SME_TP0l7_99-SME_TP0l7
@static0: dc.b 1 ; static monitor
+
SME_TP0l7_1A: dc.b 1
dc.b $EF, $F, 0, 0, $F0
+
dc.b $EF, $F, 0, 0, $F0
@static1: dc.b 2 ; static monitor
+
SME_TP0l7_20: dc.b 2
dc.b $F5, 5, 0, $10, $F8
+
dc.b $F5, 5, 0, $10, $F8
dc.b $EF, $F, 0, 0, $F0
+
dc.b $EF, $F, 0, 0, $F0
@static2: dc.b 2 ; static monitor
+
SME_TP0l7_2B: dc.b 2
dc.b $F5, 5, 0, $14, $F8
+
dc.b $F5, 5, 0, $14, $F8
dc.b $EF, $F, 0, 0, $F0
+
dc.b $EF, $F, 0, 0, $F0
@eggman: dc.b 2 ; Eggman monitor
+
SME_TP0l7_36: dc.b 2
dc.b $F5, 5, 0, $18, $F8
+
dc.b $F5, 5, 0, $18, $F8
dc.b $EF, $F, 0, 0, $F0
+
dc.b $EF, $F, 0, 0, $F0
@sonic: dc.b 2 ; Sonic monitor
+
SME_TP0l7_41: dc.b 2
dc.b $F5, 5, 0, $1C, $F8
+
dc.b $F5, 5, 0, $1C, $F8
dc.b $EF, $F, 0, 0, $F0
+
dc.b $EF, $F, 0, 0, $F0
@shoes: dc.b 2 ; speed shoes monitor
+
SME_TP0l7_4C: dc.b 2
dc.b $F5, 5, 0, $24, $F8
+
dc.b $F5, 5, 0, $24, $F8
dc.b $EF, $F, 0, 0, $F0
+
dc.b $EF, $F, 0, 0, $F0
@shield: dc.b 2 ; shield monitor
+
SME_TP0l7_57: dc.b 2
dc.b $F5, 5, 0, $28, $F8
+
dc.b $F5, 5, 0, $28, $F8
dc.b $EF, $F, 0, 0, $F0
+
dc.b $EF, $F, 0, 0, $F0
@invincible: dc.b 2 ; invincibility monitor
+
SME_TP0l7_62: dc.b 2
dc.b $F5, 5, 0, $2C, $F8
+
dc.b $F5, 5, 0, $2C, $F8
dc.b $EF, $F, 0, 0, $F0
+
dc.b $EF, $F, 0, 0, $F0
@rings: dc.b 2 ; 10 rings monitor
+
SME_TP0l7_6D: dc.b 2
dc.b $F5, 5, 0, $30, $F8
+
dc.b $F5, 5, 0, $30, $F8
dc.b $EF, $F, 0, 0, $F0
+
dc.b $EF, $F, 0, 0, $F0
@s: dc.b 2 ; 'S' monitor
+
SME_TP0l7_78: dc.b 2
dc.b $F5, 5, 0, $34, $F8
+
dc.b $F5, 5, 0, $34, $F8
dc.b $EF, $F, 0, 0, $F0
+
dc.b $EF, $F, 0, 0, $F0
@goggles: dc.b 2 ; goggles monitor
+
SME_TP0l7_83: dc.b 2
dc.b $F5, 5, 0, $20, $F8
+
dc.b $F5, 5, 0, $20, $F8
dc.b $EF, $F, 0, 0, $F0
+
dc.b $EF, $F, 0, 0, $F0
@s2: dc.b 2 ; 'S' monitor (2)
+
SME_TP0l7_8E: dc.b 2
dc.b $F5, 5, 0, $34, $F8
+
dc.b $F5, 5, 0, $40, $F8
dc.b $EF, $F, 0, 0, $F0
+
dc.b $EF, $F, 0, 0, $F0
@s3: dc.b 2 ; 'S' monitor (3)
+
SME_TP0l7_99: dc.b 1
dc.b $F5, 5, 0, $34, $F8
+
dc.b $FF, $D, 0, $38, $F0
dc.b $EF, $F, 0, 0, $F0
 
@s4: dc.b 2 ; 'S' monitor (4)
 
dc.b $F5, 5, 0, $34, $F8
 
dc.b $EF, $F, 0, 0, $F0
 
@s5: dc.b 2 ; 'S' monitor (5)
 
dc.b $F5, 5, 0, $34, $F8
 
dc.b $EF, $F, 0, 0, $F0
 
@s6: dc.b 2 ; 'S' monitor (6)
 
dc.b $F5, 5, 0, $34, $F8
 
dc.b $EF, $F, 0, 0, $F0
 
@s7: dc.b 2 ; 'S' monitor (7)
 
dc.b $F5, 5, 0, $34, $F8
 
dc.b $EF, $F, 0, 0, $F0
 
@s8: dc.b 2 ; 'S' monitor (8)
 
dc.b $F5, 5, 0, $34, $F8
 
dc.b $EF, $F, 0, 0, $F0
 
@broken: dc.b 1 ; broken monitor
 
dc.b $FF, $D, 0, $38, $F0
 
 
even</asm>
 
even</asm>
  
These will be used when the monitor explodes, so that's why the animations file can't just link the the 'S' image. Speaking of the animations file...
+
Yeah I know the labels don't look pretty, but at least they work. This adds an extra monitor sprite before the breaking one. You will also need to add some new sprites through SonMapED.
 +
 
 +
So now we have one new monitor.
 +
 
 +
I want to point out a line of code near the top, the one that says "map_monitor" This links from a lot of over places throughout the ROM and if this label wasn't here it wouldn't know where you go and you would get a build error. So every time you use SonMapED REINSERT THAT LABEL!
  
 
==Step 3: _anim\Monitor.asm==
 
==Step 3: _anim\Monitor.asm==
Delete everything and paste this in:
+
This is a small file so I want you to take a gander at the beginning, see the labels how the correspond to the labels in a list?
<asm>; ---------------------------------------------------------------------------
+
 
 +
This is the animation linking. (what tells the monitors to flash) notice how "breaking" monitor only has one animation.
 +
 
 +
Also see how the Eggman monitor is listed 1, 0, 3, 3, 1, 3, 3, 2, 3, 3, and then the Sonic monitor is 1, 0, 4, 4, 1, 4, 4, 2, 4, 4, the shoes are 5, 5, 5, 5, ect.
 +
 
 +
Now right before "@breaking:" insert this coding:
 +
 
 +
<asm>
 +
@Invalid_1: dc.b 1, 0, $B, $B, 1, $B, $B, 2, $B, $B, afEnd
 +
even
 +
</asm>
 +
now add to the pointer in the index at the top of the file.
 +
 
 +
Replace this line.
 +
<asm>
 +
dc.w  @breaking-Ani_Monitor
 +
</asm>
 +
with this one
 +
<asm>
 +
dc.w  @Invalid_1-Ani_Monitor, @breaking-Ani_Monitor
 +
</asm>
 +
 
 +
If you did it right, it should look like this.
 +
 
 +
<asm>; ; ---------------------------------------------------------------------------
 
; Animation script - monitors
 
; Animation script - monitors
 
; ---------------------------------------------------------------------------
 
; ---------------------------------------------------------------------------
Line 171: Line 181:
 
dc.w @shoes-Ani_Monitor, @shield-Ani_Monitor, @invincible-Ani_Monitor
 
dc.w @shoes-Ani_Monitor, @shield-Ani_Monitor, @invincible-Ani_Monitor
 
dc.w @rings-Ani_Monitor, @s-Ani_Monitor, @goggles-Ani_Monitor
 
dc.w @rings-Ani_Monitor, @s-Ani_Monitor, @goggles-Ani_Monitor
dc.w @s2-Ani_Monitor, @s3-Ani_Monitor, @s4-Ani_Monitor
+
dc.w @Invalid_1-Ani_Monitor, @breaking-Ani_Monitor
dc.w @s5-Ani_Monitor, @s6-Ani_Monitor, @s7-Ani_Monitor
 
dc.w @s8-Ani_Monitor, @breaking-Ani_Monitor
 
 
@static: dc.b 1, 0, 1, 2, afEnd
 
@static: dc.b 1, 0, 1, 2, afEnd
 
even
 
even
Line 192: Line 200:
 
@goggles: dc.b 1, 0, $A, $A, 1, $A, $A, 2, $A, $A, afEnd
 
@goggles: dc.b 1, 0, $A, $A, 1, $A, $A, 2, $A, $A, afEnd
 
even
 
even
@s2: dc.b 1, 0, $B, $B, 1, $B, $B, 2, $B, $B, afEnd
+
@Invalid_1: dc.b 1, 0, $B, $B, 1, $B, $B, 2, $B, $B, afEnd
even
+
even
@s3: dc.b 1, 0, $C, $C, 1, $C, $C, 2, $C, $C, afEnd
+
@breaking: dc.b 2, 0, 1, 2, $C, afBack, 1
even
 
@s4: dc.b 1, 0, $D, $D, 1, $D, $D, 2, $D, $D, afEnd
 
even
 
@s5: dc.b 1, 0, $E, $E, 1, $E, $E, 2, $E, $E, afEnd
 
even
 
@s6: dc.b 1, 0, $F, $F, 1, $F, $F, 2, $F, $F, afEnd
 
even
 
@s7: dc.b 1, 0, 10, 10, 1, 10, 10, 2, 10, 10, afEnd
 
even
 
@s8: dc.b 1, 0, 11, 11, 1, 11, 11, 2, 11, 11, afEnd
 
even
 
@breaking: dc.b 2, 0, 1, 2, $D, afBack, 1
 
 
even</asm>
 
even</asm>
And now your monitors should all work right! Except they look like 'S' monitors when destroyed...
+
And now your monitors all work right! Except they look like 'S' monitors when destroyed...
  
==Step 4: _incObj\26 Monitor.asm==
 
Now for a final tweak. Search for "move.b #9,obAnim(a0)" and replace it with "move.b #12,obAnim(a0)". Now your monitors will display the correct mappings after being destroyed.
 
  
'''NOTE:''' ''It always displays the 'S' monitor instead of the broken monitor. I have 12 above because it worked before I added 3-7, but now it doesn't and I can't find the right value.''
+
==Step 4: Errors==
  
==Step 5: SonED2 Projects\objdef\s1obj.lst==
+
Now open up ''26 Monitor.asm'' under the folder _incObj Search for "move.b #9,obAnim(a0)" and replace it with "move.b #10,obAnim(a0)". Now your monitors will display the correct mappings after being destroyed. We had 9 monitors to begin with + 1 new one = 10, simple.
You now have 10 new monitors. But when you try and place them in SonED 2, you notice that all the "invalid" monitors are labeled "Invalid". How do you know which one's which? You could remember how many times you've pressed the 1 key, or or could have it tell you.Search for "   Description: Monitor". Now scroll down until you see "      Desc  9: Invalid". Now change that to Invalid 1, the one below to Invalid 2, etc... Now you can tell which monitor is which. Of course, if you have a function for that monitor, you can actually just type it's function, such as "Infinte Speed Shoes" or "50 Rings".
 
  
==Step 6: Misc Errors==
+
Now assemble the code and... oh noes! The code doesn't work and the ROM refuses to assemble.
 
 
First of all assemble the code and... oh noes! The code doesn't work and the ROM refuses to assemble.
 
  
 
It's because of the added code. Now Some branches are now to far away to work.  
 
It's because of the added code. Now Some branches are now to far away to work.  
  
Never fear, open up ''Sub SolidObject'' in the _incObj folder and change  
+
Let's fix that, open up ''Sub SolidObject'' in the ''_incObj'' folder and change  
  
 
<asm>bsr.w MvSonicOnPtfm</asm>
 
<asm>bsr.w MvSonicOnPtfm</asm>
Line 236: Line 227:
 
<asm>jmp    DisplaySprite</asm>
 
<asm>jmp    DisplaySprite</asm>
  
This happens at both line 37 and 58 (If My memory is any good)
+
This happens at both line 37 and 58  
 +
 
 +
And you done.
 +
 
 +
 
 +
==Step 5: SonED2 Projects\objdef\s1obj.lst==
 +
You now have 1 new monitor. But when you try and place them in SonED 2, you notice that all the "invalid" monitors are labeled "Invalid". How do you know which one's which? You could remember how many times you've pressed the 1 key, or or could have it tell you.Search for "  Description: Monitor". Now scroll down until you see "      Desc  9: Invalid". Now change that to Invalid 1, the one below to Invalid 2, etc... Now you can tell which monitor is which. Of course, if you have a function for that monitor, you can actually just type it's function, such as "Infinite Speed Shoes" or "50 Rings".
 +
 
 +
==Step 6: Adding More monitors==
  
have fun with your new monitors !
+
So we added one monitor. To add more, do the same as above starting form step 3 BUT you need to pay attention to the animations script. you NEED to add 1 to the digit before "afBack" on the line with "@breaking:" and insert your monitor code BEFORE the "@breaking:" and add another label to the index. (you can only have up to three labels per line so you might need to add a new line)
  
<b>NOTE:</b> this still doesn't fix the wonky graphic errors.
+
Also to add the Sprites, use [[SonMapEd]]
  
 
[[Category:SCHG How-tos|{{PAGENAME}}]]
 
[[Category:SCHG How-tos|{{PAGENAME}}]]

Revision as of 11:47, 23 January 2014

Let's say you want another monitor. I've given the monitor files a once-over, and found an easy way to free up 10 monitors, the 'S', the Goggles, the Blank, and 7 "invalid" monitors. 2 notes before we begin: This uses the HV build, and I will mention this later, but whenever you want to input more art through SonMapED you HAVE to open up the file Monitors under the folder _maps and add the label map_monitor: to the file before the first piece of code.

Step 1: _incObj\2E Monitor Content Power-Up.asm

Find the following code: <asm>Pow_ChkS: cmpi.b #7,d0 ; does monitor contain 'S'? bne.s Pow_ChkEnd nop

Pow_ChkEnd: rts ; 'S' and goggles monitors do nothing</asm>

Replace it with this template: <asm>Pow_ChkS: cmpi.b #7,d0 ; does monitor contain 'S'? bne.s Pow_ChkGoggles

nop ;Insert code here.

===========================================================================

Pow_ChkGoggles: ;The Goggles monitor still does nothing. cmpi.b #8,d0 ; does monitor contain goggles? bne.s Pow_ChkInvalid1

nop ;Insert code here.

==========================================================================

Pow_ChkInvalid1: cmpi.b #9,d0 ; Is this the 1st invalid monitor? bne.s Pow_ChkInvalid2

nop ;Insert code here.

==========================================================================

Pow_ChkInvalid2: cmpi.b #$A,d0 ; Is this the 2nd invalid monitor? bne.s Pow_ChkInvalid3

nop ;Insert code here.

==========================================================================

Pow_ChkInvalid3: cmpi.b #$B,d0 ; Is this the 3rd invalid monitor? bne.s Pow_ChkInvalid4

nop ;Insert code here.

==========================================================================

Pow_ChkInvalid4: cmpi.b #$C,d0 ; Is this the 4th invalid monitor? bne.s Pow_ChkInvalid5

nop ;Insert code here.

==========================================================================

Pow_ChkInvalid5: cmpi.b #$D,d0 ; Is this the 5th invalid monitor? bne.s Pow_ChkInvalid6

nop ;Insert code here.

==========================================================================

Pow_ChkInvalid6: cmpi.b #$E,d0 ; Is this the 6th invalid monitor? bne.s Pow_ChkInvalid7

nop ;Insert code here.

==========================================================================

Pow_ChkInvalid7: cmpi.b #$F,d0 ; Is this the 7th invalid monitor? bne.s Pow_ChkBlank

nop ;Insert code here.

==========================================================================

Pow_ChkBlank: cmpi.b #0,d0 ; Is this the blank monitor? bne.s Pow_ChkEnd

nop ;Insert code here.

==========================================================================

Pow_ChkEnd: rts

===========================================================================</asm>

Now you can use the Eggman monitor (before the rest of the monitors in the code), the 'S' monitor, the Goggles monitor, the 7 invalid monitors, and the Blank monitor. There's just a few problems: the invalid monitors have glitchy graphics, they don't flash like the other ones, AND when we destroy them it shows the "S" monitor instead of the broken one.


Step 2: _maps\Monitor.asm

Now, let's worry about fixing some mapping errors. <asm>; --------------------------------------------------------------------------------

Sprite mappings - output from SonMapEd - Sonic 1 format
--------------------------------------------------------------------------------

SME_TP0l7: map_monitor: dc.w SME_TP0l7_1A-SME_TP0l7, SME_TP0l7_20-SME_TP0l7 dc.w SME_TP0l7_2B-SME_TP0l7, SME_TP0l7_36-SME_TP0l7 dc.w SME_TP0l7_41-SME_TP0l7, SME_TP0l7_4C-SME_TP0l7 dc.w SME_TP0l7_57-SME_TP0l7, SME_TP0l7_62-SME_TP0l7 dc.w SME_TP0l7_6D-SME_TP0l7, SME_TP0l7_78-SME_TP0l7 dc.w SME_TP0l7_83-SME_TP0l7, SME_TP0l7_8E-SME_TP0l7 dc.w SME_TP0l7_99-SME_TP0l7 SME_TP0l7_1A: dc.b 1 dc.b $EF, $F, 0, 0, $F0 SME_TP0l7_20: dc.b 2 dc.b $F5, 5, 0, $10, $F8 dc.b $EF, $F, 0, 0, $F0 SME_TP0l7_2B: dc.b 2 dc.b $F5, 5, 0, $14, $F8 dc.b $EF, $F, 0, 0, $F0 SME_TP0l7_36: dc.b 2 dc.b $F5, 5, 0, $18, $F8 dc.b $EF, $F, 0, 0, $F0 SME_TP0l7_41: dc.b 2 dc.b $F5, 5, 0, $1C, $F8 dc.b $EF, $F, 0, 0, $F0 SME_TP0l7_4C: dc.b 2 dc.b $F5, 5, 0, $24, $F8 dc.b $EF, $F, 0, 0, $F0 SME_TP0l7_57: dc.b 2 dc.b $F5, 5, 0, $28, $F8 dc.b $EF, $F, 0, 0, $F0 SME_TP0l7_62: dc.b 2 dc.b $F5, 5, 0, $2C, $F8 dc.b $EF, $F, 0, 0, $F0 SME_TP0l7_6D: dc.b 2 dc.b $F5, 5, 0, $30, $F8 dc.b $EF, $F, 0, 0, $F0 SME_TP0l7_78: dc.b 2 dc.b $F5, 5, 0, $34, $F8 dc.b $EF, $F, 0, 0, $F0 SME_TP0l7_83: dc.b 2 dc.b $F5, 5, 0, $20, $F8 dc.b $EF, $F, 0, 0, $F0 SME_TP0l7_8E: dc.b 2 dc.b $F5, 5, 0, $40, $F8 dc.b $EF, $F, 0, 0, $F0 SME_TP0l7_99: dc.b 1 dc.b $FF, $D, 0, $38, $F0 even</asm>

Yeah I know the labels don't look pretty, but at least they work. This adds an extra monitor sprite before the breaking one. You will also need to add some new sprites through SonMapED.

So now we have one new monitor.

I want to point out a line of code near the top, the one that says "map_monitor" This links from a lot of over places throughout the ROM and if this label wasn't here it wouldn't know where you go and you would get a build error. So every time you use SonMapED REINSERT THAT LABEL!

Step 3: _anim\Monitor.asm

This is a small file so I want you to take a gander at the beginning, see the labels how the correspond to the labels in a list?

This is the animation linking. (what tells the monitors to flash) notice how "breaking" monitor only has one animation.

Also see how the Eggman monitor is listed 1, 0, 3, 3, 1, 3, 3, 2, 3, 3, and then the Sonic monitor is 1, 0, 4, 4, 1, 4, 4, 2, 4, 4, the shoes are 5, 5, 5, 5, ect.

Now right before "@breaking:" insert this coding:

<asm> @Invalid_1: dc.b 1, 0, $B, $B, 1, $B, $B, 2, $B, $B, afEnd even </asm>

now add to the pointer in the index at the top of the file.

Replace this line. <asm> dc.w @breaking-Ani_Monitor </asm> with this one <asm> dc.w @Invalid_1-Ani_Monitor, @breaking-Ani_Monitor </asm>

If you did it right, it should look like this.

<asm>; ; ---------------------------------------------------------------------------

Animation script - monitors
---------------------------------------------------------------------------

Ani_Monitor: dc.w @static-Ani_Monitor, @eggman-Ani_Monitor, @sonic-Ani_Monitor dc.w @shoes-Ani_Monitor, @shield-Ani_Monitor, @invincible-Ani_Monitor dc.w @rings-Ani_Monitor, @s-Ani_Monitor, @goggles-Ani_Monitor dc.w @Invalid_1-Ani_Monitor, @breaking-Ani_Monitor @static: dc.b 1, 0, 1, 2, afEnd even @eggman: dc.b 1, 0, 3, 3, 1, 3, 3, 2, 3, 3, afEnd even @sonic: dc.b 1, 0, 4, 4, 1, 4, 4, 2, 4, 4, afEnd even @shoes: dc.b 1, 0, 5, 5, 1, 5, 5, 2, 5, 5, afEnd even @shield: dc.b 1, 0, 6, 6, 1, 6, 6, 2, 6, 6, afEnd even @invincible: dc.b 1, 0, 7, 7, 1, 7, 7, 2, 7, 7, afEnd even @rings: dc.b 1, 0, 8, 8, 1, 8, 8, 2, 8, 8, afEnd even @s: dc.b 1, 0, 9, 9, 1, 9, 9, 2, 9, 9, afEnd even @goggles: dc.b 1, 0, $A, $A, 1, $A, $A, 2, $A, $A, afEnd even @Invalid_1: dc.b 1, 0, $B, $B, 1, $B, $B, 2, $B, $B, afEnd even @breaking: dc.b 2, 0, 1, 2, $C, afBack, 1 even</asm> And now your monitors all work right! Except they look like 'S' monitors when destroyed...


Step 4: Errors

Now open up 26 Monitor.asm under the folder _incObj Search for "move.b #9,obAnim(a0)" and replace it with "move.b #10,obAnim(a0)". Now your monitors will display the correct mappings after being destroyed. We had 9 monitors to begin with + 1 new one = 10, simple.

Now assemble the code and... oh noes! The code doesn't work and the ROM refuses to assemble.

It's because of the added code. Now Some branches are now to far away to work.

Let's fix that, open up Sub SolidObject in the _incObj folder and change

<asm>bsr.w MvSonicOnPtfm</asm> to <asm>jsr MvSonicOnPtfm</asm>


Then open up 89 Ending Sequence STH in the same folder and change <asm>bra.w DisplaySprite</asm> to <asm>jmp DisplaySprite</asm>

This happens at both line 37 and 58

And you done.


Step 5: SonED2 Projects\objdef\s1obj.lst

You now have 1 new monitor. But when you try and place them in SonED 2, you notice that all the "invalid" monitors are labeled "Invalid". How do you know which one's which? You could remember how many times you've pressed the 1 key, or or could have it tell you.Search for " Description: Monitor". Now scroll down until you see " Desc 9: Invalid". Now change that to Invalid 1, the one below to Invalid 2, etc... Now you can tell which monitor is which. Of course, if you have a function for that monitor, you can actually just type it's function, such as "Infinite Speed Shoes" or "50 Rings".

Step 6: Adding More monitors

So we added one monitor. To add more, do the same as above starting form step 3 BUT you need to pay attention to the animations script. you NEED to add 1 to the digit before "afBack" on the line with "@breaking:" and insert your monitor code BEFORE the "@breaking:" and add another label to the index. (you can only have up to three labels per line so you might need to add a new line)

Also to add the Sprites, use SonMapEd