Monitor help

29 posts in this topic

Posted

In Sonic 2, I am trying to change to change either the robotnik monitor or the static monitor into the 'S' monitor. I've found a guide online, but when I tried putting it into the asm file, I click find and it can never find this line:

; ============== END RELATIVE POINTER LIST ==================================

; badnik_monitor:

robotnik_monitor:

addq.w #1,(a2)

jmp Touch_ChkHurt2

; ===========================================================================

First I tried using Notepad, but then I found a free program called HxD to edit the file.

I'm using the dissasembly from here:

http://svn.sonicretr...sasm_hg/summary

I know I probably sound like a noob, but PLEASE HELP!

0

Share this post


Link to post
Share on other sites

Posted

......just look up "robotnik_monitor:".....it should be there. Hell, if you tried pasting that whole code, it probably wouldn't even find it.

0

Share this post


Link to post
Share on other sites

Posted

^Didn't work. And no, I didn't paste the whole code -.-

0

Share this post


Link to post
Share on other sites

Posted

fuck that shit then, use Notepad++. Less of a hassle. I found it by looking it up in under 4 seconds.

0

Share this post


Link to post
Share on other sites

Posted

^Thanks! That program found it!

But now I have another problem:

When I tried using S2LVL to build it and test it, this happened:

error.jpg

Here's what I added in (In the red outline):

error1.jpg

Can someone tell me what I'm doing wrong?

0

Share this post


Link to post
Share on other sites

Posted (edited)

First off check the log file that has the list of errors and copy/paste it here, so we can see what errors have occured. Also looks like you didn't copy/paste the code in the correct place,

addq.w #1,(a2)
and
bra.w Touch_ChkHurt2
is the specific code for the monitor, and this is where your code belongs. Just for now, copy and paste over those lines and check the log file. :( Edited by Ravenfreak
0

Share this post


Link to post
Share on other sites

Posted (edited)

^ okay, I'll try to find it when I get back on the computer (I'm using my ipad to write this).

I think this is it:

> > >s2.asm(23210): error: unknown opcode

> > > +

> > > +

> > >s2.asm(23212): error: range overflow

> > > addq.w #32,($FFFFFE20).w; add 50 to rings

> > >s2.asm(23212): error: operand must be in range 1..8

> > > addq.w #32,($FFFFFE20).w; add 50 to rings

> > >s2.asm(23216): error: short addressing not allowed

> > > move.b #$F,(Palette_frame_count).w

> > >s2.asm(23216): error: addressing mode not allowed here

> > > move.b #$F,(Palette_frame_count).w

Edited by CrashSG32
0

Share this post


Link to post
Share on other sites

Posted (edited)

All of them seems to be 'out of range' errors. Did you tried to jump the subroutine to another place of the ROM?

Edited by Eduardo Knuckles
0

Share this post


Link to post
Share on other sites

Posted (edited)

> > >s2.asm(23210): error: unknown opcode

> > > +

> > > +
You see the "+" and then your code underneath? The plus is too far to the right, so it doesn't show up as a label. In other words, instead of:
	+

	lea   (Ring_count).w,a2

	addq.w  #$32,(Player_mode).w ; is player Tails?
Do this:
+

	lea   (Ring_count).w,a2

	addq.w  #$32,(Player_mode).w ; is player Tails?
> > >s2.asm(23212): error: range overflow

> > > addq.w #32,($FFFFFE20).w; add 50 to rings

> > >s2.asm(23212): error: operand must be in range 1..8

> > > addq.w #32,($FFFFFE20).w; add 50 to rings

> > >s2.asm(23216): error: short addressing not allowed
Put a $ in front of the 32. So instead of #32, you will have #$32
> > > move.b #$F,(Palette_frame_count).w

> > >s2.asm(23216): error: addressing mode not allowed here

> > > move.b #$F,(Palette_frame_count).w
Not too sure on this one. Can "Palette_frame_count" go as high as F? EDIT: A thought occured. Have you made an equate for "Palette_frame_count"? If not, try replacing it with $FFFFF65E. For example, instead of:
move.b  #$F,(Palette_frame_count).w
Try this:
move.b  #$F,($FFFFF65E).w

Edited by redhotsonic
0

Share this post


Link to post
Share on other sites

Posted

> > >s2.asm(23212): error: operand must be in range 1..8

> > > addq.w #32,($FFFFFE20).w; add 50 to rings

ADDQ and SUBQ only allow numbers 1 to 8. For larger values, use ADDI and SUBI.

Put a $ in front of the 32. So instead of #32, you will have #$32

$ sign indicates that number is hexadecimal, it doesn't affect addressing mode used or something. No sign indicates decimal number.

By putting '$' you will basically get another value, $32, while it used to be 32 = $20. So, it won't help.

Choosing numeric system doesn't influence on anything, use whichever you like. For example, you can write

  	 addq.w	#32,(68719476256).w

instead of

  	 addq.w	#32,($FFFFFE20).w

and it will be the same memory address =P

RAM locations are easier to present in HEX though.

> > >s2.asm(23216): error: addressing mode not allowed here

> > > move.b #$F,(Palette_frame_count).w

I'm not sure about this one, as I don't know much about the AS assembler.

I've seen how people were getting builds errors everywhere on correct instructions because something went wrong earlier, so it seems AS is vary volatile sometimes, maybe that's the case.

Anyways, check out the 'Palette_frame_count' constant. Short addressing can only use addresses $0000-$7FFF and $FFFF8000-$FFFFFFFF, other values are not reachable, so the assembler may complain about them.

0

Share this post


Link to post
Share on other sites

Posted

Put a $ in front of the 32. So instead of #32, you will have #$32

$ sign indicates that number is hexadecimal, it doesn't affect addressing mode used or something. No sign indicates decimal number.

By putting '$' you will basically get another value, $32, while it used to be 32 = $20. So, it won't help.

You see, I did know aboutt his, but for some strange reason, I had it in my head it would only work for 20 and below, anything above that, you would have to put a $ in front, Where I got that from, I can't remember =P

Choosing numeric system doesn't influence on anything, use whichever you like. For example, you can write

	   addq.w	#32,(68719476256).w

instead of

	   addq.w	#32,($FFFFFE20).w

and it will be the same memory address =P

RAM locations are easier to present in HEX though.

I learn something new everyday.

0

Share this post


Link to post
Share on other sites

Posted (edited)

Thanks to your help guys, I got it to work! But, it transforms Sonic into Super Sonic, but he's not invincible, and it gives an extra life aswell. How could I make him invincible and stop it giving an extra life?

Also, how can I change the picture on the monitor to the S?

Edited by CrashSG32
0

Share this post


Link to post
Share on other sites

Posted (edited)

Thanks to your help guys, I got it to work! But, it transforms Sonic into Super Sonic, but he's not invincible, and it gives an extra life aswell. How could I make him invincible and stop it giving an extra life?

Comment or remove the code that Gives Sonic a Life (If you're using the 1-up box as a base), it should be a RAM Counter, but I don't know what it is in Sonic 2, and remove or comment the code that plays the 1-up sound as well, don't know why it's not making you invincible (Maybe try copying some things from the Invincibility Box as a Base to help you get started).

Also, how can I change the picture on the monitor to the S?

You could do that by copying the tile graphics from the Sonic 1 "monitors.bin" in the "artnem" folder using TLPfixed (after you've decompressed the art into an editable form) ( and I've never been able to edit monitor art in SonMapEd (It pastes it over the first monitor for some reason)) into the corresponding place in the S2 Monitor File (after you've decompressed that art as well) (Don't know what it's called exactly because I haven't hacked Sonic 2 or gone into a Sonic 2 disassembly) and made the proper art edit to make the "S" work with the S2 Pallet. Then recompress that monitor art and build your ROM. This may not be the best way to do that, but that is how I would do it.

Hope that helped in any way ;)

Edited by DarkLeach7
0

Share this post


Link to post
Share on other sites

Posted (edited)

I managed to make him invincible by copying some of the invincible monitor code.

Now I'm gonna try and fix the extra life problem ;)

Also, how can I change the picture on the monitor to the S?

You could do that by copying the tile graphics from the Sonic 1 "monitors.bin" in the "artnem" folder using TLPfixed (after you've decompressed the art into an editable form) ( and I've never been able to edit monitor art in SonMapEd (It pastes it over the first monitor for some reason)) into the corresponding place in the S2 Monitor File (after you've decompressed that art as well) (Don't know what it's called exactly because I haven't hacked Sonic 2 or gone into a Sonic 2 disassembly) and made the proper art edit to make the "S" work with the S2 Pallet. Then recompress that monitor art and build your ROM. This may not be the best way to do that, but that is how I would do it.

Hope that helped in any way :)

Is there a different/quicker way? Rather than going into Sonic 1 taking it out of there, and all that other stuff.

Edited by CrashSG32
0

Share this post


Link to post
Share on other sites

Posted (edited)

I managed to make him invincible by copying some of the invincible monitor code.

Now I'm gonna try and fix the extra life problem ;)

If you're using the 1-Up Monitor as a base then just comment or remove the code that says Give Sonic an Extra Life, Update the Lives Counter, and the code that plays the 1-up Tune. Comment or remove the lines that are commented below


sonic_1up:

;addq.w #1,(Monitors_Broken).w

;addq.b #1,(Life_count).w

;addq.b #1,(Update_HUD_lives).w

;move.w #MusID_ExtraLife,d0

;jmp (PlayMusic).l ; Play extra life music



;Comment or remove these Commented lines.

[/CODE]

Is there a different/quicker way? Rather than going into Sonic 1 taking it out of there, and all that other stuff.

There may be but to my knowledge this might be the only way, you could ask one of the more experienced members if there is a different way. However to get it the only games that have the "S" Monitors are Sonic 1, Sonic CD, and Sonic 3/Knuckles, You'd have to get art from one of those games, and I believe it would be WAY Easier to port from Sonic 1 because I think Sonic 1 is the easiest of the three to edit. Anyway unless you want to draw it out on your own, this really might be the only way to do it. If you don't feel like doing it I will, just tell me, I'm kind of stuck on what to do in my hack right now, So I'd be happy to help :)

Edited by DarkLeach7
0

Share this post


Link to post
Share on other sites

Posted

You can get it from a spritesheet and rip it and save it as the S monitor or whatever. Then import it over the desired icon into SonMapED. Or you could open up the monitors.bin in SonMapED from the Sonic 1 Disassembly, open the maps(obj26.asm in _maps folder). Then export the S icon from there, unload everything and open the monitors file in Sonic 2(Don't know if its the same name), and its mappings proberly still obj26, and then import the S icon you just exported.

I know it may sound complicated and I explain things a bit orquidly, but it really isn't that hard. To make things easier, if you haven't already follow this guide: http://info.sonicretro.org/SCHG_How-to:Use_SonMapEd/Part_1 it will be explain the basics of using this program and I would recommend this.

0

Share this post


Link to post
Share on other sites

Posted (edited)

You can get it from a spritesheet and rip it and save it as the S monitor or whatever. Then import it over the desired icon into SonMapED. Or you could open up the monitors.bin in SonMapED from the Sonic 1 Disassembly, open the maps(obj26.asm in _maps folder). Then export the S icon from there, unload everything and open the monitors file in Sonic 2(Don't know if its the same name), and its mappings proberly still obj26, and then import the S icon you just exported.

The how come whenever I try importing custom monitor art It overwrites the first monitor graphic even if I import the graphic over the art I want to replace? :

Edited by DarkLeach7
0

Share this post


Link to post
Share on other sites

Posted

You are obviously doing something wrong. You press '[' and ']' to scroll through which sprite you want to edit/replace. I think I may speed up the process and get my art tutorial going because it seems like people are needing it.

0

Share this post


Link to post
Share on other sites

Posted

you have to also copy the new tiles. if you copy the sprite, it is just that, you are just copying the sprite, using the tiles it is set to. You have to press copy tiles or whatever the jazz button maybe, and have it duplicate the tiles. then create a new sprite with the duplicates, export it, do whatever, import, save, profit.

0

Share this post


Link to post
Share on other sites

Posted (edited)

You can get it from a spritesheet and rip it and save it as the S monitor or whatever. Then import it over the desired icon into SonMapED. Or you could open up the monitors.bin in SonMapED from the Sonic 1 Disassembly, open the maps(obj26.asm in _maps folder). Then export the S icon from there, unload everything and open the monitors file in Sonic 2(Don't know if its the same name), and its mappings proberly still obj26, and then import the S icon you just exported.

I know it may sound complicated and I explain things a bit orquidly, but it really isn't that hard. To make things easier, if you haven't already follow this guide: http://info.sonicretro.org/SCHG_How-to:Use_SonMapEd/Part_1 it will be explain the basics of using this program and I would recommend this.

Okay, I'll try that ;)

@Darkleach7: I put it over the robotnik monitor, which is directly above the 1up monitor code, so maybe that has something to do with it.

Also: VIDEO!:

Edited by CrashSG32
0

Share this post


Link to post
Share on other sites

Posted

@Darkleach7: I put it over the robotnik monitor, which is directly above the 1up monitor code, so maybe that has something to do with it.

Try putting an "rts" at the end of your Super Sonic routine, because what this seems like is that you hit the monitor and your code runs but because you didn't end it it keeps going and activates the 1-up routine. So try putting an "rts" after your Super Sonic Monitor Code. Also are you using the Static Monitor or the Robotnik monitor, it sounds like you're using the Static Monitor because the 1-up is activating right after your routine.

0

Share this post


Link to post
Share on other sites

Posted

^I added an rts at the end of the code and it worked ;)

0

Share this post


Link to post
Share on other sites

Posted

^I added an rts at the end of the code and it worked ;)

Glad to see it worked well. :) How's your "S" Monitor art doing?

0

Share this post


Link to post
Share on other sites

Posted

^ I haven't started that yet, but I'll let you know of any updates :)

0

Share this post


Link to post
Share on other sites

Posted

I tried changing the monitor art in SonMapEd but I couldn't find where the monitor art is located. Could someone tell me where to find it?

0

Share this post


Link to post
Share on other sites
This topic is now closed to further replies.