Jump to content

  •  

Photo

Monitor help


  • This topic is locked This topic is locked
28 replies to this topic

#1 CrashSG32

CrashSG32

    Classy and I know it

  • Member
  • 54 posts
  • Gender:Male
  • Location:Australia

Posted 31 January 2012 - 04:15 AM

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

#2 SuperEgg

SuperEgg

    Say what again Mutha Fucka! I dare you, no I DOUBLE dog dare

  • Pro User
  • 733 posts
  • Gender:Male
  • Location:Bitch, as if I'm gonna tell you

Posted 31 January 2012 - 04:32 AM

......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

#3 CrashSG32

CrashSG32

    Classy and I know it

  • Member
  • 54 posts
  • Gender:Male
  • Location:Australia

Posted 31 January 2012 - 04:37 AM

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

#4 SuperEgg

SuperEgg

    Say what again Mutha Fucka! I dare you, no I DOUBLE dog dare

  • Pro User
  • 733 posts
  • Gender:Male
  • Location:Bitch, as if I'm gonna tell you

Posted 31 January 2012 - 04:46 AM

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

#5 CrashSG32

CrashSG32

    Classy and I know it

  • Member
  • 54 posts
  • Gender:Male
  • Location:Australia

Posted 31 January 2012 - 06:18 AM

^Thanks! That program found it!

But now I have another problem:

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

Posted Image

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

Posted Image

Can someone tell me what I'm doing wrong?
  • 0

#6 Ravenfreak

Ravenfreak

    The 8-bit games need more love!

  • Pro User
  • 220 posts
  • Gender:Female
  • Location:O'Fallon, MO
  • Interests:Hacking both the 8-bit and 16-bit Sonic games, collecting Sonic merchandise, cats, hedgehogs.

Posted 31 January 2012 - 07:04 AM

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, 31 January 2012 - 07:05 AM.

  • 0

#7 CrashSG32

CrashSG32

    Classy and I know it

  • Member
  • 54 posts
  • Gender:Male
  • Location:Australia

Posted 31 January 2012 - 07:51 AM

^ 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, 31 January 2012 - 08:11 AM.

  • 0

#8 TheEchidna

TheEchidna

    6 Chaos Emeralds

  • Exile
  • 536 posts
  • Gender:Not Telling

Posted 31 January 2012 - 10:35 AM

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, 31 January 2012 - 10:35 AM.

  • 0

#9 redhotsonic

redhotsonic

    Also known as RHS

  • Pro User
  • 1878 posts
  • Gender:Male
  • Location:United Kingdom

Posted 31 January 2012 - 01:27 PM

> > >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, 31 January 2012 - 01:35 PM.

  • 0

#10 vladikcomper

vladikcomper

    5 Chaos Emeralds

  • Pro User
  • 315 posts
  • Gender:Male
  • Location:Russia

Posted 31 January 2012 - 02:40 PM

> > >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

#11 redhotsonic

redhotsonic

    Also known as RHS

  • Pro User
  • 1878 posts
  • Gender:Male
  • Location:United Kingdom

Posted 31 January 2012 - 05:18 PM

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

#12 CrashSG32

CrashSG32

    Classy and I know it

  • Member
  • 54 posts
  • Gender:Male
  • Location:Australia

Posted 01 February 2012 - 12:39 AM

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, 01 February 2012 - 12:41 AM.

  • 0

#13 DarkLeach

DarkLeach

    Behold the Power of DarkLeach7! Tomorrow...

  • Member
  • 191 posts
  • Gender:Male
  • Location:I don't even know...

Posted 01 February 2012 - 01:46 AM

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, 01 February 2012 - 01:47 AM.

  • 0

#14 CrashSG32

CrashSG32

    Classy and I know it

  • Member
  • 54 posts
  • Gender:Male
  • Location:Australia

Posted 01 February 2012 - 08:35 AM

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, 01 February 2012 - 08:39 AM.

  • 0

#15 DarkLeach

DarkLeach

    Behold the Power of DarkLeach7! Tomorrow...

  • Member
  • 191 posts
  • Gender:Male
  • Location:I don't even know...

Posted 01 February 2012 - 12:46 PM

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.


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, 01 February 2012 - 12:51 PM.

  • 0

#16 Animemaster

Animemaster

    Lets get to work!

  • Pro User
  • 1035 posts
  • Gender:Male
  • Location:UK

Posted 01 February 2012 - 04:13 PM

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.sonicret...SonMapEd/Part_1 it will be explain the basics of using this program and I would recommend this.
  • 0

#17 DarkLeach

DarkLeach

    Behold the Power of DarkLeach7! Tomorrow...

  • Member
  • 191 posts
  • Gender:Male
  • Location:I don't even know...

Posted 01 February 2012 - 09:56 PM

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, 01 February 2012 - 09:56 PM.

  • 0

#18 Animemaster

Animemaster

    Lets get to work!

  • Pro User
  • 1035 posts
  • Gender:Male
  • Location:UK

Posted 01 February 2012 - 10:40 PM

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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users