Monitor help
#1
Posted 31 January 2012 - 04:15 AM
; ============== 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!
#2
Posted 31 January 2012 - 04:32 AM
#3
Posted 31 January 2012 - 04:37 AM
#4
Posted 31 January 2012 - 04:46 AM
#5
Posted 31 January 2012 - 06:18 AM
But now I have another problem:
When I tried using S2LVL to build it and test it, this happened:

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

Can someone tell me what I'm doing wrong?
#6
Posted 31 January 2012 - 07:04 AM
addq.w #1,(a2)
bra.w Touch_ChkHurt2
Edited by Ravenfreak, 31 January 2012 - 07:05 AM.
#7
Posted 31 January 2012 - 07:51 AM
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.
#8
Posted 31 January 2012 - 10:35 AM
Edited by Eduardo Knuckles, 31 January 2012 - 10:35 AM.
#9
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
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.
#10
Posted 31 January 2012 - 02:40 PM
ADDQ and SUBQ only allow numbers 1 to 8. For larger values, use ADDI and SUBI.> > >s2.asm(23212): error: operand must be in range 1..8
> > > addq.w #32,($FFFFFE20).w; add 50 to rings
$ sign indicates that number is hexadecimal, it doesn't affect addressing mode used or something. No sign indicates decimal number.Put a $ in front of the 32. So instead of #32, you will have #$32
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.
I'm not sure about this one, as I don't know much about the AS assembler.> > >s2.asm(23216): error: addressing mode not allowed here
> > > move.b #$F,(Palette_frame_count).w
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.
#11
Posted 31 January 2012 - 05:18 PM
$ sign indicates that number is hexadecimal, it doesn't affect addressing mode used or something. No sign indicates decimal number.Put a $ in front of the 32. So instead of #32, you will have #$32
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 ofaddq.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.
#12
Posted 01 February 2012 - 12:39 AM
Also, how can I change the picture on the monitor to the S?
Edited by CrashSG32, 01 February 2012 - 12:41 AM.
#13
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.
#14
Posted 01 February 2012 - 08:35 AM
Now I'm gonna try and fix the extra life problem
Is there a different/quicker way? Rather than going into Sonic 1 taking it out of there, and all that other stuff.
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 CrashSG32, 01 February 2012 - 08:39 AM.
#15
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.
#16
Posted 01 February 2012 - 04:13 PM
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.
#17
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.
#18
Posted 01 February 2012 - 10:40 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users



This topic is locked








