Sonic and Sega Retro Message Board: Basic Questions & Answers thread - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
  • 355 Pages +
  • ◄ First
  • 268
  • 269
  • 270
  • 271
  • 272
  • Last ►
    Locked
    Locked Forum

Basic Questions & Answers thread NEWBIES: Start here!

#4036 User is offline E-122-Psi 

Posted 11 February 2012 - 12:12 PM

  • Posts: 1457
  • Joined: 29-December 09
  • Gender:Male
  • Wiki edits:41

View PostDestructiox, on 11 February 2012 - 12:10 PM, said:

View PostE-122-Psi, on 11 February 2012 - 11:25 AM, said:

This may sound like a dumb question, but I'm very new to level editing. Is there a way to add solidity to 'walk through' walls in Sonic 1 (eg. I think SonED shows solidity as FF symbols). It's just I want to fill spots in walls that don't have collision and adding objects like unbreakable walls doesn't work properly.


Get on IRC, I can give a hand :v


Usual time or now?

#4037 User is offline Jimmy Hedgehog 

Posted 12 February 2012 - 07:49 AM

  • Posts: 1251
  • Joined: 13-December 07
  • Gender:Male
  • Location:England - Slough
  • Project:RAoSTH (Sprite Comic), Sawnik (Still need a better name)
  • Wiki edits:2
Well, this is embarrassing. It seems I somehow managed to disable debug at some point, but don't know how. Again Sonic 1 Hivebrain disassembly. What would I have done to do this? XD Or a different approach, how/where would I put it back, and how do you change the debug code? Level select still works so I know it's just debug. Weird stuff.

#4038 User is offline Hitaxas 

Posted 13 February 2012 - 08:54 PM

  • SEGA: Sorry Classic Sonic, we are sending you back to 1994
  • Posts: 1420
  • Joined: 30-September 07
  • Gender:Male
  • Location:Back in Litchfield,CT
  • Project:Sonic: Super Deformed (head director) - Slowly working on it.
  • Wiki edits:196
How would I be able to code an object so a subtype uses different art?

EDIT:Or rather, a different animation depending on the subtype?
This post has been edited by Hitaxas: 13 February 2012 - 09:22 PM

#4039 User is offline MarkeyJester 

Posted 13 February 2012 - 10:07 PM

  • GO AHEAD, MAKE MY DAY.
  • Posts: 1544
  • Joined: 22-July 08
  • Gender:Male
  • Location:Japan
  • Wiki edits:16
Your request is really quite simple, something as simple as:

		move.b	$28(a0),$1C(a0)

Would go down well, the above will set that what ever your subtype ID is, will be your animation ID. Of course, if you would like specific ID's based on the subtype you could try something along the lines of:

		moveq	#$00,d0
		move.b	$28(a0),d0
		move.b	AniIDs(pc,d0.w),$1C(a0)

With AniIDs being:

; ===========================================================================
; ---------------------------------------------------------------------------
AniIDs:		dc.b	$00,$02,$20,$1A,$13
		even
; ---------------------------------------------------------------------------
; ===========================================================================

This would make it so that if the subtype is 00, it'll set animation ID 00, if it's 01, it'll set ID 02, if it's 02, it'll set 20, if it's 03, it'll set 1A, and so forth.

You can do the same thing with almost anything, here's an example of setting different mappings and VRam addresses depending on the subtype:

		moveq	#$00,d0
		move.b	$28(a0),d0
		add.w	d0,d0
		move.w	d0,d1
		add.w	d0,d0
		add.w	d1,d0
		lea	ArtIDs(pc,d0.w),a1
		move.w	(a1)+,$02(a0)
		move.l	(a1)+,$04(a0)

With ArtIDs being:

; ===========================================================================
; ---------------------------------------------------------------------------
ArtIDs:		dc.w	$0020
		dc.l	MapList01
		dc.w	$2F60
		dc.l	MapList02
		dc.w	$2027
		dc.l	MapList03
		even
; ---------------------------------------------------------------------------
; ===========================================================================

This will load whichever VRam read address (the word value) and the Mapping list address under it depending on the subtype ID, if the ID is 00, it'll load the first $0020 VRam and MapList01, if it's 01 it'll load $2F60 and MapList02, if it's 02, it'll load $2027 and MapList03.

The important thing is to understand that it's all based on mathematics, to break down the above example:

		move.b	$28(a0),d0	; Load ID
		add.w	d0,d0		; Times by 2
		move.w	d0,d1		; store it
		add.w	d0,d0		; times by 2 (x4)
		add.w	d1,d0		; add x2 (x6)

As you can see the ID is taken out of the Subtype space and is multiplied by 6, if the ID was 00, the result would be 0000, if the ID was 01, the result would be 0006, if the ID was 02, the result would be 000C, etc.

EDIT: changing asm tags to code, the colours make it too damn hard to see.
This post has been edited by MarkeyJester: 13 February 2012 - 10:12 PM

#4040 User is offline KingofHarts 

Posted 14 February 2012 - 01:48 AM

  • Unlike Sonic, I don't chuckle...
  • Posts: 1412
  • Joined: 07-August 10
  • Gender:Male
  • Location:Chicago, IL
  • Project:Sonic Triad Studio, Sonic 1 REV C
  • Wiki edits:1
So I am learning ASM and hacking, and I am, or course, a complete and total noob... So I am starting with the How-To's: Everything is going great and I've made plenty of progress easily... but I've run into a strange phenomenon in regards to Sonic 1's demo play:

I was fixing the code that causes the demo to mess up whenever you hold down buttons... and have successfully fixed it... but something else happened:

GHZ demo playthrough. I am mashing buttions around testing to make sure it doesn't interfere, and Demo Sonic hits the first Crabmeat and receives an EXTRA LIFE for it!!! Certainly weird. I have modded to give you an extra life for 50,000 pts, and last I checked, 100 is certainly not 50,000...

EDIT: It also happens when I'm not pressing buttons as well... but this doesn't happen during normal gameplay.

I am using the latest SVN disassembly (Or HG disassembly... whatever) and have been following the guide pretty well. I'm sure I haven't made any errors, I must have just missed changing something, OR this is another bug not yet reported...???
This post has been edited by KingofHarts: 14 February 2012 - 01:56 AM

#4041 User is offline Hitaxas 

Posted 14 February 2012 - 02:07 AM

  • SEGA: Sorry Classic Sonic, we are sending you back to 1994
  • Posts: 1420
  • Joined: 30-September 07
  • Gender:Male
  • Location:Back in Litchfield,CT
  • Project:Sonic: Super Deformed (head director) - Slowly working on it.
  • Wiki edits:196
How exactly did you go about fixing the demo exactly? Did you simply lock the controls, or did you use another method?

Also, thank you Markey, I figured it was something that simple. =/
This post has been edited by Hitaxas: 14 February 2012 - 02:08 AM

#4042 User is offline KingofHarts 

Posted 14 February 2012 - 02:46 AM

  • Unlike Sonic, I don't chuckle...
  • Posts: 1412
  • Joined: 07-August 10
  • Gender:Male
  • Location:Chicago, IL
  • Project:Sonic Triad Studio, Sonic 1 REV C
  • Wiki edits:1

View PostHitaxas, on 14 February 2012 - 02:07 AM, said:

How exactly did you go about fixing the demo exactly? Did you simply lock the controls, or did you use another method?

Also, thank you Markey, I figured it was something that simple. =/


To do it, I used this HowTo: Guide.
Again, I used the newest Retro disassembly and used the SVN disassembly method.

I'm not exactly sure what it does. But from what I read it changed the value being read from $FFF604 to 602.

I am starting to think it doesn't have to do with the button presses... as I retried the demo and it did this again with NO button press. It only happens on the demo with the first Crabmeat badnik. It doesn't happen in the Marble or Spring Yard demos... nor does it happen in normal gameplay. (Although normal gameplay has been modded to include an extra life per 50,000 pts.)

#4043 User is offline Hitaxas 

Posted 14 February 2012 - 03:02 AM

  • SEGA: Sorry Classic Sonic, we are sending you back to 1994
  • Posts: 1420
  • Joined: 30-September 07
  • Gender:Male
  • Location:Back in Litchfield,CT
  • Project:Sonic: Super Deformed (head director) - Slowly working on it.
  • Wiki edits:196
Strange, I grabbed a fresh copy of the HG version, and I did not run across that issue. It most likely has to do with the edit you did to the 1-up bonus for 50,000 points.

#4044 User is offline KingofHarts 

Posted 14 February 2012 - 03:24 AM

  • Unlike Sonic, I don't chuckle...
  • Posts: 1412
  • Joined: 07-August 10
  • Gender:Male
  • Location:Chicago, IL
  • Project:Sonic Triad Studio, Sonic 1 REV C
  • Wiki edits:1

View PostHitaxas, on 14 February 2012 - 03:02 AM, said:

Strange, I grabbed a fresh copy of the HG version, and I did not run across that issue. It most likely has to do with the edit you did to the 1-up bonus for 50,000 points.


Perhaps. I'll take another look at what I did to that section and get back to ya. All I did to it was remove the part of code where it checks the revision, and then checks the region... so that it would just occur normally. I have it working in game with 0 problems... but for some reason THAT ONE Crabmeat in GHZ demo only is doing this... Perhaps if it goes to Demo mode instead of game mode... something hasn't been cleared or set up correctly???

#4045 User is offline Hitaxas 

Posted 14 February 2012 - 04:35 PM

  • SEGA: Sorry Classic Sonic, we are sending you back to 1994
  • Posts: 1420
  • Joined: 30-September 07
  • Gender:Male
  • Location:Back in Litchfield,CT
  • Project:Sonic: Super Deformed (head director) - Slowly working on it.
  • Wiki edits:196
I have a question reguarding the object I am working on, the Dash Rings from the modern games. You know, these things?.

I've run into a slight issue I cannot seem to fix. If you simply jump into them, they work fine. However if I jumpdash into one, Sonic goes shooting off at some ridiculously insane speed.

What would be a simply and effective way to clear Sonic's previous speed, and still have him shoot off as desired?

Edit: here is the code that I am currently using to "shoot Sonic"

        lea	(MainCharacter).w,a1 ; a1=character
        move.b  #2,$24(a0)           ; increase the routine counter
        bclr	#0,status(a1)	     ; turn him right
        

	move.w #$A00,x_vel(a1)       ; move Sonic forward (X axis)
	btst	#1,subtype(a0)       ; is the subtype 1?
	beq.s	+                    ; if it is, skip move speed and turn delay timer
	move.b  #-$2,y_vel(a1)       ; sends Sonic up a bit
	bra     ++
+
        move.b  #-$47,y_vel(a1)

This post has been edited by Hitaxas: 14 February 2012 - 04:45 PM

#4046 User is online flamewing 

Posted 14 February 2012 - 05:25 PM

  • Emerald Hunter
  • Posts: 770
  • Joined: 11-October 10
  • Gender:Male
  • Location:Brasil
  • Project:Sonic Classic Heroes; Sonic 2 Special Stage Editor; Sonic 3&K Heroes (on hold)
  • Wiki edits:12

View PostHitaxas, on 14 February 2012 - 04:35 PM, said:

        lea	(MainCharacter).w,a1 ; a1=character
        move.b  #2,$24(a0)   		; increase the routine counter
        bclr	#0,status(a1)     	; turn him right
        

	move.w #$A00,x_vel(a1)   	; move Sonic forward (X axis)
	btst	#1,subtype(a0)   	; is the subtype 1?
	beq.s	+                    ; if it is, skip move speed and turn delay timer
	move.b  #-$2,y_vel(a1)   	; sends Sonic up a bit
	bra 	++
+
        move.b  #-$47,y_vel(a1)

I think that you should be using 'move.w' instead of 'move.b' both times you set y_vel; unless you really want Sonic to shoot off at an insanely high speed upwards (that $47 there means that Sonic will shoot up at just under 11 times the speed of a normal jump) when bit 1 of subtype is set, in which case it is right. The code of the dash ring seems fine; the problem might actually be in the way that the jump dash code interacts with this. If there is a flag that causes the jump dash, you may want to clear it on the dash ring code and see what happens.
This post has been edited by flamewing: 14 February 2012 - 05:25 PM

#4047 User is offline Hitaxas 

Posted 14 February 2012 - 05:48 PM

  • SEGA: Sorry Classic Sonic, we are sending you back to 1994
  • Posts: 1420
  • Joined: 30-September 07
  • Gender:Male
  • Location:Back in Litchfield,CT
  • Project:Sonic: Super Deformed (head director) - Slowly working on it.
  • Wiki edits:196
Edit: Ok, your suggestion seems to work well. However, the line move.b #-$47,y_vel(a1) no longer shoots Sonic off at the desired 47 degree angle I originally intended.

The jump dash speed still interacts with the dash ring speed, but to a much lower extent. Clearing the jump dash flag did not help. =/
This post has been edited by Hitaxas: 14 February 2012 - 06:00 PM

#4048 User is online flamewing 

Posted 14 February 2012 - 06:06 PM

  • Emerald Hunter
  • Posts: 770
  • Joined: 11-October 10
  • Gender:Male
  • Location:Brasil
  • Project:Sonic Classic Heroes; Sonic 2 Special Stage Editor; Sonic 3&K Heroes (on hold)
  • Wiki edits:12

View PostHitaxas, on 14 February 2012 - 05:48 PM, said:

Edit: Ok, your suggestion seems to work well. However, the line move.b #-$47,y_vel(a1) no longer shoots Sonic off at the desired 47 degree angle I originally intended.

Unless you rewrote the moving functions (or disabled them while the dash ring controls Sonic), there is no way that 'move.b #-$47,y_vel(a1)' causes Sonic to go off at a 47 degree angle unless you had a corresponding 'move.b #$42,x_vel(a1)' line. A 47-degree angle is very close to a 45-degree angle; at a 45-degree angle, x_vel and y_vel need to be equal in magnitude. The discrepancy in the values you were setting give you an angle of about 82 degrees.

You may be having an issue with the jump flag, which adds a vertical speed limit upwards (unless you are holding a jump button); try also clearing the jumping flag ('clr.b jumping(a1)' in S2 disassemblies).

#4049 User is offline Hitaxas 

Posted 14 February 2012 - 06:18 PM

  • SEGA: Sorry Classic Sonic, we are sending you back to 1994
  • Posts: 1420
  • Joined: 30-September 07
  • Gender:Male
  • Location:Back in Litchfield,CT
  • Project:Sonic: Super Deformed (head director) - Slowly working on it.
  • Wiki edits:196
I had to clear both the jumping flag and the walljump flag. Thank you for your assistance, flamewing. :)

Edit: Ok, new issue. I can get subtype 0 and 1 to work just fine, but subtype 2 does not seem to be affected if I try to set it to do something different. =/
This post has been edited by Hitaxas: 14 February 2012 - 10:10 PM

#4050 User is offline Jimmy Hedgehog 

Posted 15 February 2012 - 04:14 PM

  • Posts: 1251
  • Joined: 13-December 07
  • Gender:Male
  • Location:England - Slough
  • Project:RAoSTH (Sprite Comic), Sawnik (Still need a better name)
  • Wiki edits:2
I've read through the working with objects guide, and I've gotten quite confused. Where on earth would I start with creating a new object by scratch in Sonic 1 (2005 Hivebrain)? And are there are free VRAM locations for something about the size as one signpost sprite? Not sure how much VRAM the "points from enemies" takes and I used some of that to extend Sonic's anyway.

  • 355 Pages +
  • ◄ First
  • 268
  • 269
  • 270
  • 271
  • 272
  • Last ►
    Locked
    Locked Forum

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users