Sonic and Sega Retro Message Board: redhotsonic - Viewing Profile - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
Loading News Feed...
 

Group:
Tech Member: Tech Members
Active Posts:
969 (0.32 per day)
Most Active In:
Engineering & Reverse Engineering (515 posts)
Joined:
31-January 05
Profile Views:
548
Last Active:
User is offline Today, 10:38 AM
Currently:
Offline

My Information

Member Title:
Also known as RHS
Age:
24 years old
Birthday:
January 25, 1989
Gender:
Male Male
Location:
United Kingdom

Previous Fields

Other Contact Info:
N/A
Project:
Sonic 2 Recreation
National Flag:
gb
Wiki edits:
24

Latest Visitors

Posts I've Made

  1. In Topic: How to fix speed issues in Sonic 2

    Yesterday, 07:12 PM

    View PostMoDule, on Yesterday, 06:57 PM, said:

    Next, you can get away with a smaller data table without the blank words. Just multiply d0 with 6 instead of 8. Adding to that, I think you can save a few cycles by multiplying the bit-values themselves with 6, instead of doing it at the end. You'll need to change the second and third addq.w to addi.w, but the cycles those two changes add (4 each) are mitigated by not having to do three add.w's at the end (12 cycles, saving 4 cycles total). Admittedly, not much, and this isn't exactly a routine where optimization is very important, but you'll at least save some ROM space while you're at it.


    Thanks for the tip, but it's not much point changing it. My maths isn't too great and that's why I came up with the longword routine. But you can change it this way by all means in your hack :)


    View PostMoDule, on Yesterday, 06:57 PM, said:

    Finally, I think you're going to have to make the routine character-specific, or else Tails is going to use the wrong values when Sonic turns super.



    ...shit. Didn't think of that. Never crossed my mind. Anyway, simple fix. Under the label "ApplySpeedSettings:", just before "tst.b (Super_Sonic_flag).w", add this:

    	cmpa.w	#MainCharacter,a0		; Is it Tails currently following this code?
    	bne.s	+				; If so, branch and ignore next question
    



    So you end up with this:

    ApplySpeedSettings:
    	moveq	#0,d0				; Quickly clear d0
    	tst.w	speedshoes_time(a0)		; Does character have speedshoes?
    	beq.s	+				; If not, branch
    	addq.b	#1,d0				; Quickly add 1 to d0
    +
    	btst	#6,status(a0)			; Is the character underwater?
    	beq.s	+				; If not, branch
    	addq.b	#2,d0				; Quickly add 2 to d0
    +
    	cmpa.w	#MainCharacter,a0		; Is it Tails currently following this code?
    	bne.s	+				; If so, branch and ignore next question
    	tst.b	(Super_Sonic_flag).w		; Is the character Super?
    	beq.s	+				; If not, branch
    	addq.b	#4,d0				; Quickly add 4 to d0
    +
    	add.b	d0,d0				; Multiply itself
    	add.b	d0,d0				; And again
    	add.b	d0,d0				; And again
    	lea	Speedsettings(pc,d0.w),a1	; Load correct speed settings into a1
    	addq.l	#2,a1				; Increment a1 by 2 quickly
    	move.l	(a1)+,(a2)+			; Set character's new top speed and acceleration
    	move.w	(a1),(a2)			; Set character's deceleration
    	rts					; Finish subroutine
    



    Fixed in first post. Thanks for pointing that bug out.
  2. In Topic: General Project Screenshot/Video Thread

    15 May 2013 - 05:34 PM

    Wouldn't it of made more sense posting this in the topic where you were talking about it? =P
  3. In Topic: Basic Questions & Answers thread

    15 May 2013 - 05:31 PM

    Ah I see, that's probably why he moves by some certain pixels due to the slope. If I get time this weekend, I'll have a look into it (and try to pull the bug off myself =P)
  4. In Topic: Basic Questions & Answers thread

    15 May 2013 - 02:02 PM

    Sorry if I am misunderstanding here, but if in the normal Sonic 2, it doesn't use it's "normal" form, why not just use it as they're are in all other Sonic 2 levels?


    And what do you mean by "normal" form?
  5. In Topic: Basic Questions & Answers thread

    14 May 2013 - 05:04 PM

    3) I can't see this bug. Where abouts did you notice this?