don't click here

Random Hack/Mini Project Thread

Discussion in 'Engineering & Reverse Engineering' started by Malevolence, Jul 4, 2009.

  1. E-122-Psi

    E-122-Psi

    Member
    2,470
    612
    93
    If you figure out walljump that would be helpful to me too. I think her only big problem right now is that she lacks an accurate jump attack, it's hard to position a jumping spin or jump dash with great accuracy making hitting some enemies and monitors a problem, perhaps implement a jumping tailspin will fix this (don't worry it would be much more simpler to make than a ground tailspin).

    Editing her jump height and speed isn't too hard via ASM editing.

    I can help you switch some pallettes around, I've been getting help on switching pallette files for sprites in the recent days (you can at least get some of the HUD and fire/explosion sprites in more accurate colors in this method).
     
  2. FeliciaVal

    FeliciaVal

    Member
    693
    11
    18
    Spain
    yes I know :( I kinda got used to the palettes now, but I think they need some work, I just not sure how to change them and still I don't know how to use SonEd so it might take a while untill I get into level editing.

    Uh lava palette? I thought the pink flames are there because they share some colours of the Sonic palette...if I replace the pink with red, then the character will have red hair instead of pink

    Psi: It would be wonderful if you can help me doing that. I'll have to make new sprites for the aerial tailspin then.
     
  3. E-122-Psi

    E-122-Psi

    Member
    2,470
    612
    93
    You can edit the flame objects property to use a different pallette without affecting the characters. In fact you can edit certain tiles to use different pallettes. If you can find out which obj numbers you need I can try and figure out how to change certain parts to read that pallette.

    EDIT: Sure thing. I'll get the coding for you later on if you can make and program the animation.
     
  4. FeliciaVal

    FeliciaVal

    Member
    693
    11
    18
    Spain
    Uh ok, will take me a couple of days making the animation I guess, since Im not sure how to make that animation yet without ripping your Sally kick one...And about the flame thing would be awesome if you do, since as you know, my ASM skills are super really bad right now...*sigh* I feel kinda sad about it :(
     
  5. steveswede

    steveswede

    Member
    5,032
    1
    16
    Ask my hand
    Fighting against the Unitary State of Europe
    [​IMG]

    You have got blue and pink flames. But the lava palette is the same as the original. Can't you use the palette from the lava on the flames?
     
  6. FeliciaVal

    FeliciaVal

    Member
    693
    11
    18
    Spain
    mmm...I'm not sure if I can. As I said im still limited as on how to fix these stuff :( I didn't edit the lava in the Marble pallete, so I'm not sure how that pink and blue lava got in. My only guess is that the pink lava is sharing the colours on Sonic's pallete, so I have no idea how to fix it. I'm really sorry :(
     
  7. steveswede

    steveswede

    Member
    5,032
    1
    16
    Ask my hand
    Fighting against the Unitary State of Europe
    Oh don't apologize. It could be a worthy challenge to do if you wish to do it. At least you know it's possible to fix.
     
  8. FeliciaVal

    FeliciaVal

    Member
    693
    11
    18
    Spain
    umm...yes, I've seen a Rouge hack not so long ago that got all colours fixed but still I don't know how to make it like that. Hopefull I will be able one day. Meanwhile I just can have either pink, blue, or brown lava...I just can swap Sonic's colours since my character lacks the colour red
     
  9. theocas

    theocas

    Tech Member
    346
    0
    16
    Wait, isn't the lava pallet only available in MZ? There's still the fire in SBZ, and the fireballs in SLZ.
     
  10. FeliciaVal

    FeliciaVal

    Member
    693
    11
    18
    Spain
    they are, and all of them share the same colours in Sonic's pallete. Is an issue that I can't resolve because my character doesn't have red. So we will have to stick with the pink flames untill I find a solution for that or someone else does.
     
  11. E-122-Psi

    E-122-Psi

    Member
    2,470
    612
    93
    You can use it for reference and such if you want, since it's no longer being used for newer revisions and is based on Rouge's Battle animations anyway.

    Oh and to program your animation to switch to landing animation after it's finished add this code at the end of it's anim branch; animation coding....., $FD, $** (** is the number of your landing animation).

    Here is the JumpAttack routine I use. Just place it in after Sonic_Roll and then add the needed bsr at the beginning of Sonic's data and TouchResponse coding (my guess is you know how to do that since you have programmed in the other attacks just fine). Add a reset on floor branch for it's flag like you did for your jump dash as well:

    Code (ASM):
    1. ; ---------------------------------------------------------------------------
    2. ; Subroutine to activate Sonic's Jump Attack
    3. ; ---------------------------------------------------------------------------
    4.  
    5. ; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
    6.  
    7. Sonic_JumpAttack:
    8.         btst    #1,($FFFFF602).w   ; is Down button pressed?  
    9.         bne.s   Sonic_JumpAttack_return ; if yes, return   
    10.         btst    #6,($FFFFF603).w   ; is A button pressed? 
    11.         beq.b   Sonic_JumpAttack_return ; if not, return
    12.         tst.b   ($FFFFFF8D).w      ; was jumpdash flag set?       
    13.         bne.w   Sonic_JumpAttack_Return     ; if yes, branch       
    14.         move.b  #1,($FFFFFF8D).w   : set jumpattack flag
    15.         move.b  #$22,$1C(a0)      ; change animation to X
    16.         move.w  #$C0,d0
    17.         jsr (PlaySound_Special).l
    18.  
    19.  
    20. Sonic_JumpAttack_Return:   
    21.         rts
    22. ; End of function Sonic_JumpAttack
    Now to edit the pallettes, you have to edit the objects ASM file in the _maps folder (check the listings on the wiki). Now we'll try the HUD first because it works differently from the others. Here it is normally:

    Code (ASM):
    1. ; ---------------------------------------------------------------------------
    2. ; Sprite mappings - SCORE, TIME, RINGS
    3. ; ---------------------------------------------------------------------------
    4.         dc.w byte_1C5BC-Map_obj21, byte_1C5F0-Map_obj21
    5.         dc.w byte_1C624-Map_obj21, byte_1C658-Map_obj21
    6. byte_1C5BC: dc.b $A
    7.         dc.b $80, $D, $80, 0, 0
    8.         dc.b $80, $D, $80, $18, $20
    9.         dc.b $80, $D, $80, $20, $40
    10.         dc.b $90, $D, $80, $10, 0
    11.         dc.b $90, $D, $80, $28, $28
    12.         dc.b $A0, $D, $80, 8, 0
    13.         dc.b $A0, 1, $80, 0, $20
    14.         dc.b $A0, 9, $80, $30, $30
    15.         dc.b $40, 5, $81, $A, 0
    16.         dc.b $40, $D, $81, $E, $10
    17.         dc.b 0....
    Now the third section for each row is what you want to edit (the second $80/$A0 on each one). Reverse the number around, ie. if it is $80 make it $A0, if it is $A0 make it $80, this will reverse the pallette it uses ($8 being Sonic's pallette and $A being the level's pallette that it occasionally switches to for the red)

    Code (ASM):
    1. ; ---------------------------------------------------------------------------
    2. ; Sprite mappings - SCORE, TIME, RINGS
    3. ; ---------------------------------------------------------------------------
    4.         dc.w byte_1C5BC-Map_obj21, byte_1C5F0-Map_obj21
    5.         dc.w byte_1C624-Map_obj21, byte_1C658-Map_obj21
    6. byte_1C5BC: dc.b $A
    7.         dc.b $80, $D, $A0, 0, 0
    8.         dc.b $80, $D, $A0, $18, $20
    9.         dc.b $80, $D, $A0, $20, $40
    10.         dc.b $90, $D, $A0, $10, 0
    11.         dc.b $90, $D, $A0, $28, $28
    12.         dc.b $A0, $D, $A0, 8, 0
    13.         dc.b $A0, 1, $A0, 0, $20
    14.         dc.b $A0, 9, $A0, $30, $30
    15.         dc.b $40, 5, $81, $A, 0
    16.         dc.b $40, $D, $A1, $E, $10
    17.         dc.b 0...
    Do the same for the other lines afterward.

    Now, the lines all represent a different part of your HUD, the ninth line represents the picture in your life icon, so you likely want to keep that tile unchanged as shown here.

    Afterwards go the SonMapEd and load the HUD tiles with a level pallette (eg. ghz, mz) it likely isn't yellow yet since it is placed differently in the level pallette. Simply export and repaint the tiles and try it out. Note that the flashing color likely will still be different but you should at least have the normal HUD color correct.

    Now other objects work diffently, since it is connected with the HUD we'll try obj3A, the end of level score font. There isn't a separate ASM font for this one instead look for this in the main ASM:

    Code (ASM):
    1. byte_CC32:  dc.b 6          ; SCORE
    2.         dc.b $F8, $D, 1, $4A, $B0
    3.         dc.b $F8, 1, 1, $62, $D0
    4.         dc.b $F8, 9, 1, $64, $18
    5.         dc.b $F8, $D, 1, $6A, $30
    6.         dc.b $F7, 4, 0, $6E, $CD
    7.         dc.b $FF, 4, $18, $6E, $CD
    8. byte_CC51:  dc.b 7          ; TIME BONUS
    9.         dc.b $F8, $D, 1, $5A, $B0
    10.         dc.b $F8, $D, 0, $66, $D9
    11.         dc.b $F8, 1, 1, $4A, $F9
    12.         dc.b $F7, 4, 0, $6E, $F6
    13.         dc.b $FF, 4, $18, $6E, $F6
    14.         dc.b $F8, $D, $FF, $F0, $28
    15.         dc.b $F8, 1, 1, $70, $48
    16. byte_CC75:  dc.b 7          ; RING BONUS
    17.         dc.b $F8, $D, 1, $52, $B0
    18.         dc.b $F8, $D, 0, $66, $D9
    19.         dc.b $F8, 1, 1, $4A, $F9
    20.         dc.b $F7, 4, 0, $6E, $F6
    21.         dc.b $FF, 4, $18, $6E, $F6
    22.         dc.b $F8, $D, $FF, $F8, $28
    23.         dc.b $F8, 1, 1, $70, $48
    24.         even
    Now instead of changing the number we will add to it, 1 or 0 will become $21 or $20, likewise there are likely parts you want to keep with the same pallette, so here's how I edited it for consistant colors.

    Code (ASM):
    1. byte_CC32:  dc.b 6          ; SCORE
    2.         dc.b $F8, $D, $21, $4A, $B0
    3.         dc.b $F8, 1, $21, $62, $D0
    4.         dc.b $F8, 9, $21, $64, $18
    5.         dc.b $F8, $D, $21, $6A, $30
    6.         dc.b $F7, 4, 0, $6E, $CD
    7.         dc.b $FF, 4, $18, $6E, $CD
    8. byte_CC51:  dc.b 7          ; TIME BONUS
    9.         dc.b $F8, $D, $21, $5A, $B0
    10.         dc.b $F8, $D, $20, $66, $D9
    11.         dc.b $F8, 1, $21, $4A, $F9
    12.         dc.b $F7, 4, 0, $6E, $F6
    13.         dc.b $FF, 4, $18, $6E, $F6
    14.         dc.b $F8, $D, $FF, $F0, $28
    15.         dc.b $F8, 1, 1, $70, $48
    16. byte_CC75:  dc.b 7          ; RING BONUS
    17.         dc.b $F8, $D, $21, $52, $B0
    18.         dc.b $F8, $D, $20, $66, $D9
    19.         dc.b $F8, 1, $21, $4A, $F9
    20.         dc.b $F7, 4, 0, $6E, $F6
    21.         dc.b $FF, 4, $18, $6E, $F6
    22.         dc.b $F8, $D, $FF, $F8, $28
    23.         dc.b $F8, 1, 1, $70, $48
    24.         even
    Again load MapEd and convert to the color you want.

    You will likely use the same method as this one to edit the lava and flames.
     
  12. FeliciaVal

    FeliciaVal

    Member
    693
    11
    18
    Spain
    Oh thank you very much Psi, even though I didn't understand half of what you wrote XD I think I'll have to take a look at it other day that I'm less tired.
     
  13. E-122-Psi

    E-122-Psi

    Member
    2,470
    612
    93
    Correct.

    I know it's gibberish when laid out like that, hopefully it will be clearer as you try it out.
     
  14. FeliciaVal

    FeliciaVal

    Member
    693
    11
    18
    Spain
    uh ok...sucks to be me anyways :( im completely lost *sigh* thanks for the help anyways
     
  15. E-122-Psi

    E-122-Psi

    Member
    2,470
    612
    93
    Don't worry, it happens to me a lot too. You'll get the hang of things eventually, you've been doing pretty well for your first project you uploaded here, mine was a simple sprite hack with no programming changes.
     
  16. FeliciaVal

    FeliciaVal

    Member
    693
    11
    18
    Spain
    uh yes but basically you have been doing all the coding for me, all what I was doing was copy pasting...
     
  17. theocas

    theocas

    Tech Member
    346
    0
    16
    Then, No offence, learn ASM. It can be easily done in a week or so. There's more than a sufficient amount of guides on just the forum, and the wiki to learn it.
     
  18. FeliciaVal

    FeliciaVal

    Member
    693
    11
    18
    Spain
    ...I've been trying to learn ASM since march. Is not that easy to say "learn ASM" and voilĂ , you know it instantly. These things takes time and god knows I've been doing my research on learning it but it seems programming is not my thing and I have a hard time understanding it but I do my best...
     
  19. theocas

    theocas

    Tech Member
    346
    0
    16
    Well, it was for me, maybe just because I spent 10 hours a day on it =P
    Anywho, to actually add to this topic, I present speciality stoof here, my new Sega Screen with first of all, a TM being hidden depending on console region, and a Regional Lockout so the game will only be playable on USA and EUR consoles , but I'll remove that for the release (basically, I did it to see if I could, and if I knew my Z80 registers and locations of data):
    [​IMG]
    TM Removed.
    [​IMG]
    Upon pressing start at the screen with the TM removed, you are shown this screen. The Text simply shows up and the pallet keeps cycling.
    [​IMG]
    And of course, the normal one with the TM. Watch this one as a video here.
     
  20. FeliciaVal

    FeliciaVal

    Member
    693
    11
    18
    Spain
    10 hours a day? uh...I wish I had your skills then :/ im kinda slow...