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

Jump to content

Hey there, Guest!  (Log In · Register) Help

Group:
Trial Member: Trial Members
Active Posts:
3 (0.01 per day)
Most Active In:
Engineering & Reverse Engineering (2 posts)
Joined:
02-September 14
Profile Views:
1230
Last Active:
User is offline Yesterday, 05:58 PM
Currently:
Offline

My Information

Age:
25 years old
Birthday:
January 3, 1990
Gender:
Male Male
Location:
Italy

Contact Information

E-mail:
Click here to e-mail me

Previous Fields

Project:
Phantasy Star Disassemblies
National Flag:
None

Posts I've Made

  1. In Topic: Strange fix to test out

    21 January 2015 - 06:43 AM

    This bug is more noticeable when you apply this fix Fix Camera Y Position for Tails. Then I took a look at vanilla S2: it's hardly noticeable, but when you are aware of this bug, you can barely see that the camera moves a little when the level has just finished loading.

    I applied your changes with the "Camera Y position for Tails" fix and it seems to work just fine.
  2. In Topic: How to fix speed issues in Sonic 2

    27 November 2014 - 07:39 AM

    Hi.

    When I was working on a hack of mine and implementing this fix regarding speed, I tested it and noticed a bug in 2P mode. Perhaps not many people care about 2P mode, but I thought this might be worth mentioning.

    Look at this snippet of code where the speed table is used for Tails when getting the Speed Shoes:


    ;loc_12A10:
    super_shoes_Tails:	
            movem.l	a0-a2,-(sp)
    	lea	(MainCharacter).w,a0  
    	lea	(Tails_top_speed).w,a2
    	jsr	ApplySpeedSettings
    	movem.l	(sp)+,a0-a2
    
    



    This only works when you are using Tails only, thus when he's the main character. When in 2P mode, Tails can break the monitor, but the speed values are not applied for him because he's not the main character, but the "sidekick" (using the disassembly terminology).

    What I did to fix it was this:


    ;loc_12A10:
    super_shoes_Tails:	
            movem.l	a0-a2,-(sp)
    	lea	(MainCharacter).w,a0  
    	tst.w	(Player_mode).w       ; Test which characters we're using
    	bne.s	+                                 ; If we're not using Sonic and Tails together, branch
    	lea	(Sidekick).w,a0                  ; otherwise load sidekick in a0 (for Tails obviously)
    +
    	lea	(Tails_top_speed).w,a2
    	jsr	ApplySpeedSettings
    	movem.l	(sp)+,a0-a2
    
    


    Simple enough. We use the MainCharacter RAM section when we're using Tails only, and we load the Sidekick RAM section in a0 when we're using both Sonic and Tails (for 2P not 1P mode).

    Since we added a + label, the bra.s instruction above the label won't branch correctly. So change

    	movem.l	a0-a2,-(sp)		; Move a0, a1 and a2 onto stack
    	lea	(MainCharacter).w,a0	; Load Sonic to a0
    	lea	(Sonic_top_speed).w,a2	; Load Sonic_top_speed into a2
    	jsr	ApplySpeedSettings	; Fetch Speed settings
    	movem.l	(sp)+,a0-a2		; Move a0, a1 and a2 from stack
    	bra.s	+
    ; ---------------------------------------------------------------------------
    ;loc_12A10:
    super_shoes_Tails:
    	movem.l	a0-a2,-(sp)		; Move a0, a1 and a2 onto stack
    
    


    to this:

    	movem.l	a0-a2,-(sp)		; Move a0, a1 and a2 onto stack
    	lea	(MainCharacter).w,a0	; Load Sonic to a0
    	lea	(Sonic_top_speed).w,a2	; Load Sonic_top_speed into a2
    	jsr	ApplySpeedSettings	; Fetch Speed settings
    	movem.l	(sp)+,a0-a2		; Move a0, a1 and a2 from stack
    	bra.s	++                          ; <-- added a + to make it branch to the correct location
    ; ---------------------------------------------------------------------------
    ;loc_12A10:
    super_shoes_Tails:
    	movem.l	a0-a2,-(sp)		; Move a0, a1 and a2 onto stack
    
    



    I tested it and everything should be OK. I hope it's clear enough.

    Since it's my first post here, I don't know how I should explain stuff, if I forgot to include something or if it's not detailed enough, for an asm edit that is.

Friends

Lorenzo hasn't added any friends yet.