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

Jump to content

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

Group:
Member: Members
Active Posts:
1433 (0.5 per day)
Most Active In:
Engineering & Reverse Engineering (719 posts)
Joined:
30-September 07
Profile Views:
8599
Last Active:
User is offline Jul 15 2015 04:17 AM
Currently:
Offline

My Information

Member Title:
SEGA: Sorry Classic Sonic, we are sending you back to 1994
Age:
26 years old
Birthday:
June 6, 1989
Gender:
Male Male
Location:
Back in Litchfield,CT
Interests:
Sonic, lots of other stuff, and my Fiancee, LovelyAyriana!

Previous Fields

Other Contact Info:
Skype: hitaxas
Project:
Sonic: Super Deformed (head director) - Slowly working on it.
National Flag:
us
Wiki edits:
196

Latest Visitors

Topics I've Started

  1. Static Splash Screen Guide

    31 October 2014 - 12:33 AM

    As of November 3rd, I have changed a lot of this guide to work with Retro Graphics Toolkit, which required a slight edit of the code.

    Time for something I've been wanting to post up for a little while.

    I recently sat down and thought to myself "Splash screens are neat and all. However most of them are rather lengthy in code and almost all come with something complete they can just slap in there and call it a day. Not all, but most I've seen."

    From there I proceeded to write my own, using as few lines as I could.

    So today (or tonight for me!) I figured I would release this code. Yes, the code is complete and could simply be slapped into a ROM. BUT there is a difference here, I will provide example files for the code and a compiled ROM for it as well. HOWEVER, this example is purely that. Replacing the art/mappings and palette for the screen will be necessary due to the disclaimer the screen has. =P
    This screen is also static, and does not use any fancy effects or objects, that is up to whoever uses that to do on their own.

    ALSO, this was made with Xenowhirl's 2007 disassembly of Sonic 2, and that is what this tutorial will cover. It should be fairly easy to port to any other version of Sonic 2 or Sonic 3 & Knuckles, if you know basic assembly. For a version that works with Hivebrain's 2005 disassembly of Sonic 1, click HERE!

    But enough about that, lets get down to it!
    For this example I will be replacing the SEGA screen, you do not need to implement it this way if you know how to correctly add screen modes and set the code to go the the correct one next.

    First open S2.asm then search and locate the original sega screen at this label:
    segascreen:
    Once you have located this replace everything (including the original label) with this:

    ; ============================================================================================
    ; Sega Screen example - This code only works as a replacement for the SEGA screen
    ; For regular Splash screens, read the guide this code comes with!
    ; 2014, Hitaxas
    ; ============================================================================================
    SegaScreen: ; Stop previous music, clear vram and screen to set up this new screen
        moveq  #$FD,d0                  ; set music ID to stop
        jsr    (PlayMusic).w            ; play music ID
        jsr    (Pal_FadeFrom).w         ; fade palette out
        move   #$2700,sr                ; disable interrupts
        move.w ($FFFFF60C).w,d0         ; load VDP register 81XX data
        andi.b #%10111111,d0            ; set display to "disable"
        move.w d0,(VDP_control_port).l  ; save to VDP
        jsr    (ClearPLC).w             ; clear pattern load cues
        jsr    (ClearScreen).w          ; clear VRAM planes, sprite buffer and scroll buffer
        lea    (Metablock_Table).l,a1   ; load dump location
        lea    (MAPS_SEGA).l,a0         ; load compressed mappings address
        move.w #320,d0                  ; prepare pattern index value to patch to mappings
        jsr    (EniDec).w               ; decompress and dump
        move.l #$60000003,d0            ; prepare VRAM write mode address (Plane B E000)
        moveq  #$28-$01,d1              ; set map box draw width
        moveq  #$1E-$01,d2              ; set map box draw height
        bsr.w  ShowVDPGraphics          ; flush mappings to VRAM
        lea    (VDP_control_port).l,a6  ; load VDP control port
        move.l #$68000000,(a6)          ; set VDP to VRAM write mode (Address 2800)
        lea    (ART_SEGA).l,a0          ; load compressed art address
        jsr    (NemDec).w               ; decompress and dump to VDP memory
        lea    (Pal_SEGANew).l,a0          ; load palette address
        lea    (Second_palette).w,a1    ; load palette buffer address
        moveq  #$F,d0                   ; set repeat times
    
    SegaScreen_PalLoop:
        move.l (a0)+,(a1)+              ; copy colours to buffer
        move.l (a0)+,(a1)+              ; ''
        dbf    d0,SegaScreen_PalLoop    ; repeat until done
        move.w ($FFFFF60C).w,d0         ; load VDP register 81XX data
        ori.b  #%01000000,d0            ; set display to "enable"
        move.w d0,(a6)                  ; save to VDP
        jsr    Pal_FadeTo               ; fade palette in
        move.w #3*60,(Demo_Time_left).w ; set delay time (3 seconds on a 60hz system)
    
    Sega_MainLoop:
        move.b #$02,(Delay_Time).w      ; set V-blank routine to run
        jsr    (DelayProgram).w         ; wait for V-blank (decreases "Demo_Time_left")
        tst.b  ($FFFFF605).w            ; has player 1 pressed start button?
        bmi.s  sega_GotoTitle           ; if so, branch
        tst.w  (Demo_Time_left).w       ; has the delay time finished?
        bne.s  Sega_MainLoop            ; if not, branch
    
    sega_GotoTitle:
        move.b #$04,(Game_Mode).w       ; set the screen mode to Title Screen
        rts                             ; return
    


    This is already completely written for this purpose. All that is left is to binclude the files I have provided here

    Put these files in a folder in the root of you hack with the name NEWSEGASCREEN

    To get these files to load into the game go to the bottom of your S2.ASM and just before the ; end of 'ROM' add these lines:

    ART_SEGA:		binclude	"NEWSEGASCREEN/SEGAARTNEM.bin"
    			even
     
    MAPS_SEGA:		binclude	"NEWSEGASCREEN/SEGAMAPSE.bin"
    			even
    
    Pal_SEGANew:		binclude	"NEWSEGASCREEN/SEGAPAL.bin"
    			even
    

    Now save the asm file and build your ROM, everything should be in working order.

    You will be greeted with a screen that looks almost like this:

    Posted Image

    However you will notice a slight difference with which you want to change. You will notice it if you've followed through with this guide.

    If you would like to download an already compiled ROM with this screen in it and see what it would look like when you implement it on your own click HERE

    From here it is up to you to change the art/mappings/palette. I suggest using a combination of Retro Graphics toolkit and Photoshop to do this, if you know how to use those programs. I will not be walking you through how to do this here.

    If you are looking to use this code as a splash screen rather than a replacement for the SEGA screen, you need to make a few changes.

    However, since I am too lazy right now, here is the complete code that allows for splash screens AFTER the SEGA screen:

     ; ============================================================================================
    ; Sega Screen example
    ; This version is for splash screens that load AFTER the SEGA screen
    ; For A version that replaces the SEGA screen, read the guide this code came from!
    ; 2014, Hitaxas
    ; ============================================================================================
    SegaScreen2:
            move.b  #$FD,d0                         ; set music ID to "stop music"
            jsr     PlayMusic                       ; play ID
            jsr     (Pal_FadeFrom).w                ; fade palettes out
            jsr     (ClearScreen).w                 ; clear the plane mappings
            dmaFillVRAM 0,$0000,$10000              ; fill entire VRAM with 0 | macro used in S2 disassemblies
            ; load art, mappings and the palette
            lea     (Metablock_Table).l,a1          ; load dump location
            lea     (MAPS_SEGA).l,a0                ; load background mappings
    	move.w #320,d0                          ; offset the tilemap by n amount of tiles
    	bsr.w	EniDec
    	lea	(Metablock_Table).l,a1
    	move.l	#$60000002,d0
    	moveq	#39,d1
    	moveq	#30,d2
            bsr.w   ShowVDPGraphics3                ; flush mappings to VRAM
            move.l  #$68000000,(VDP_control_port).l ; set vdp loc
            lea     (ART_SEGA).l,a0                 ; load background art
            jsr     NemDec                          ; run NemDec to decompress art for display
    	lea	(Pal_SEGANEW).l,a0                 ; load this palette
    	lea	(Second_palette).l,a1           ; set as line 2
    	move.w	#$F,d0
    
    SegaScreen_PalLoop2:
    	move.l	(a0)+,(a1)+			; copy colours to buffer
    	move.l	(a0)+,(a1)+			; ''
    	dbf	d0,SegaScreen_PalLoop2		; repeat until done
    	jsr	Pal_FadeTo			; fade palette in
            move.w	#3*60,(Demo_Time_left).w	; set delay time (3 seconds on a 60hz system)
    
    Sega_MainLoop2:
            move.b	#$02,(Delay_Time).w		; set V-blank routine to run
    	jsr	(DelayProgram).w		; wait for V-blank (decreases "Demo_Time_left")
    	tst.b	($FFFFF605).w			; has player 1 pressed start button?
    	bmi.s	sega_GotoTitle2			; if so, branch
    	tst.w	(Demo_Time_left).w		; has the delay time finished?
    	bne.s	Sega_MainLoop2			; if not, branch
    
    sega_GotoTitle2:
    	move.b	#$04,(Game_Mode).w		; set the screen mode to Title Screen
    	rts					; return
    


    In my test this will allow the screen to show up correctly after the stock SEGA screen.
  2. Looking to buy a new PC

    09 July 2012 - 03:16 AM

    So, the time has finally come for me to get a new PC. The last working USB port on my PC finally died the other week.

    Normally, this shouldn't be an issue... However I bought a USB 2.0 PCI express card, in hopes that would solve my issue... only that did... nothing.

    So yeah, I believe it is time for a new PC anyway. I have been stuck on a dual core AMD for nearly 6 years now, and even with a new GPU my PC barely can handle games such as Skyrim on high settings, nor handle other games such as the newer Batman games on medium. (Not sure why, since I threw my new card into my GF's older Dell inspiron 530, and it can handle Skyrim without an issue)

    The problem is, I am not able to just pull 1.5G's out of my ass. So the only way I can get a new PC is if I pay for it in monthly payments.

    Is Dell my only option? I went to the websites for Gateway, HP, Acer, V3 Gaming PC and Origin PC as well, but when customizing a rig and "checking out", I did not see any option for monthly payments... Am I just blind?

    I have a rig saved to a cart on dell.com, just in case it is my only option.

    Here is the specs

    PC model - XPS 8500
    OS - Window's 7 Ultimate 64 bit
    CPU - Intel® Core™ i7-3770
    RAM - 12GB Dual Channel DDR3 1600MHz
    HDD - 1TB 7200 RPM SATA Hard Drive 6.0 Gb/s
    GPU - AMD Radeon™ HD 7770 2GB GDDR5
    Optical drive - Blu-ray Combo Drive (BD-R, DVD+/-RW)

    It would cost me around $42USD a month, even with the 2 GB external I added on as an extra.

    A setup like that should be able to run all my games on the highest settings, and mutitask without an issue (I'd believe). I just want to know if Dell really is my only option in my situation.
  3. Here is a guide I want to see used

    09 April 2012 - 10:16 PM

    Tl;dr
    So today I come here with a short guide to fix a "bug" that is present all 3 of the original trillogy that I am sure most people could care less about, but it bothers me.
    The "bug" is that, when jumping and landing, even without any horizontal movement, the character will display a single frame of the walking animation.

    This glich remains in all popular hacks as well.
    those I tested were:
    Pana Der HejHog
    Sonic 2 Heroes
    Sonic 2 Retro Remix
    The S Factor
    Sonic Extended Edition
    Sonic 1 Megamix

    This is rather simple to fix, and I would like to see it corrected in future hacks. So I now present you with a short guide, written to explain this "bug" and correct it. Keep in mind this guide was written as if you were to never have made changes to Sonic's animations, so this does not cover the guide that adds spindash to Sonic 1.

    Interestingly enough, the standing frame is not in an animation of it's own, but is in the waiting animation. When jumping, then landing, the Sonic_ResetOnFloor routine calls for animation 0, which is the walking animation. This is what causes this bug.

    The fix? It is as simple as making a few changes to the Sonic_ResetOnFloor routine.

    As always, anything I write a guide for will be written based off my work with Sonic 2, and as such, behaves differently when compared to Sonic 1 (in fact, this guide might not work at all for it. If that is the case let me know, and I will try to look into it, but I am lazy currently). I normally work with the 2007 version of Sonic 2, but I will also try to cover the newer HG versions of Sonic 1 and 2 (Not Sonic 3, because I am lazy). However, there is a huge difference in the Sonic_ResetOnFloor routine from Sonic 1 to Sonic 2, which I will be covering as well.

    So, let us get down to work!

    we will need to visit the routine I mentioned before:
    Sonic_ResetOnFloor:
    


    Once there we will have to do some moddification to this routine. But first, I will cover Sonic 1, and how to make this routine behave like it does in S2.

    As you can see, in Sonic 1, this routine contains far less code than it's Sonic 2 equivalent. Seeing as how this is not the original focus of this guide, I have decided to post an already finished modification of this routine. I have also gone through the effort to comment this routine as well as possible, to help explain exactly what it does
    Sonic_ResetOnFloor:			; XREF: PlatformObject; et al
    ; handles the part when sonic lands from a jump, resets his radius size and clears spinning status
    	btst	#2,status(a0)                    ; is sonic's status set to spinning?
    	beq.s	Sonic_ResetOnFloor_Part2         ; if the check comes up equal, let part2 handle the rest
    	bclr	#2,ObStatus(a0)                  ; clear spinning status
    	move.b	#$13,obHeight(a0)                ; this increases Sonic's collision height to standing
    	move.b	#9,obWidth(a0)                   ; fix Sonic's x radius to match normal
    	subq.w	#5,obY(a0)	                 ; move Sonic up 5 pixels so the increased height doesn't push him into the ground
    	move.b	#id_Walk,obAnim(a0)              ; use running/walking animation
    
    ; loc_1B0DA:
    Sonic_ResetOnFloor_Part2:
    	bclr	#1,ObStatus(a0)                  ; clear inair status
    	bclr	#5,ObStatus(a0)                  ; clear pushing status
    	bclr	#4,ObStatus(a0)                  ; clear rolljumping status
    	move.b	#0,$3C(a0)                       ; move 0 into $3C/ clear the jumping flag
    	move.w	#0,(v_itembonus).w               ; clear the chain hit counter, to avoid Sonic getting an insane score for no reason
    	move.b	#0,$27(a0)                       ; flip_angle, this clears the angle Sonic is facing
    	move.b	#0,$29(a0)                       ; flip_turned, supposedly resets the direction Sonic is flipped in, however seemingly does nothing as he will face the direction he landed in
    	move.b	#0,$2C(a0)                       ; flips remaining, this clears the number of flip revolutions remaining
    	move.w	#0,($FFFFF66C).w                 ; Sonic_Look_delay_counter, resets the look delay for the camera. Might be useless unless you ported over the lookingup/ducking delays from S2
    	move.b	#id_Walk,obAnim(a0)              ; use running/walking animation
    
    Sonic_ResetOnFloor_END:
    	rts
    
    


    As you can see, we still have work to do, as this still only calls for the walk animation.
    We will need to check for certain conditions for this however, because if left/right is being pressed, we do not want Sonic to slide around on the floor in Standing animation.

    How do we do this? first we will need to check for Sonic's inertia:
    		tst.w	inertia(a0)	; is Sonic moving? ; Sonic 2007 and HG
    

    or:
    		tst.w	obInertia(a0)	; is Sonic moving? ; S1 HG
    



    we will need to place this above the line that loads Sonic's walking animation

    then we will need to branch if it is not equal (or higher than 0, in a sense). So place this under the line

    we just added:
    		bne.w	Sonic_ResetonFloor_Part2Sub1	; if yes, branch ; S2 2007/HG version 
    
    

    Or:
    		bne.w	Sonic_ResetonFloorSub1	; if yes, branch ; S1 HG version
    
    


    Now we will add a line to load the waiting animation, which contains the standing frame, we will need to

    also add a branch and create the tiny subroutine I just told you to branch to:
    ; S2 2007 and HG version
            move.b  #$5,anim(a0)                      ; use standing/waiting animation
            bra.s   Sonic_ResetOnFloor_Part2
    
    +
            move.b  #0,anim(a0)                      ; use running/walking/standing animation 
    
    

    Or:

    ; Sonic 1 HG version
    	move.b	#id_Wait,obAnim(a0)              ; use "standing" animation
    	bra.s   Sonic_ResetOnFloor_Part2
    
    Sonic_ResetOnFloorSub1:
    	move.b	#id_Walk,obAnim(a0)              ; use running/walking animation
    



    We will then make the same moddification to Sonic_ResetOnFloor_Part2 (and for Sonic_ResetOnFloor_Part3 for

    those hacking S2), just copy the last few lines you added, and place them before the call for the walking

    animation for each following part of the code. And change the lines branched to accordingly.

    If you followed these steps, then you are ready to build and test the game.

    Seems to work well, except for one tiny issue. When you stand at the very bottom of a slope, and jump... Sonic slides backwards in his standing frame! Ok, this is a simple fix.

    Go to this routine:
    Sonic_SlopeResist:
    
    

    Before the line that reads:
    	add.w	d0,inertia(a0)	; change Sonic's $14
    
    

    add this line:
    	move.b  #0,anim(a0) ; S2 2002/HG
    
    

    Or:
    	move.b	#id_Walk,obAnim(a0)              ; use running/walking animation
    


    And that should fix that issue. Which also concludes this guide.
  4. Looking for opinions on which graphics card to get

    29 December 2011 - 02:29 AM

    Ok, this is supposed to be a gift to me from my girlfriend (I'm doing the research because she wouldn't know how, she is a console girl with hardly any PC knowledge). However, I hate when she spends money on me... Thus I am looking to get the best card for the lowest price possible. That puts me in the $75 USD range.
    Keep in mind this is to replace my ancient GeForce 8600 GT, which bit the dust just days before X-Mas... So any option is good, but I want the best I can get for my price range.

    So far I have been looking into these two cards, the GeForce GT 520 and the GeForce GT 430.

    Between those two, the better choice would be the 430, because of the fact it has double the bandwidth the 520 on it... correct? The 430 has a lower core clock speed but double the stream processors.

    So far, as you can see I have my eyes set on the GeForce GT 430.

    What do you all think? Should I go with the 430, or get something else? I am rather partial to NVIDIA brand cards, and not sure if I should stay that way.


    Halp me? :v:

    Edit: I forgot to mention my current MoBo supports PCi Express, not 2.0/2.1 However I have read that does not prevent a PCi Express 2.0 card from being used on it, correct?
  5. PC issues and questions.

    07 April 2011 - 10:09 AM

    My PC has been crashing a lot recently, so I had to open the case to take a look. It seems the fan that sits atop my (stock AMD) heatsink stops working sometimes. I have been using a temporary fix by putting a square window fan where the side of my case used to be, but that still doesn't keep my PC as cool as I want it. It has been keeping my PC at 29-32 degrees C when Idle and around 66-69 C when running games and emulators, which I hear is safe. But I would rather not risk it.

    My question is, which heatsink would you all suggest? I have a RAIDMAX Scorpio ATX mid tower. The processor is an AMD Athlon 64 X2 6400+.

    Also, since I would be replacing the heatsink and fan, I might as well replace the normal case fans as well, no? I currently have the stock 80mm case fans that came with my PC installed inside, these would be sufficient enough, right?


    Tbh, I am due for a new PC, but until I can save up around 800 bucks to make the one I want, yeahhhh...