don't click here

Amy In Sonic 1

Discussion in 'Engineering & Reverse Engineering' started by E-122-Psi, Feb 28, 2010.

  1. Chilly Willy

    Chilly Willy

    Tech Member
    751
    11
    18
    Doom 32X
    Yeah, spin dash... super peel out like Sonic CD would work. Not really necessary, but something to consider if you want to add something later.
     
  2. DigitalDuck

    DigitalDuck

    Arriving four years late. Member
    5,353
    438
    63
    Lincs, UK
    TurBoa, S1RL
    Hey, if you record your keystrokes somehow, I'll do my best at converting them to a demo. No promises, though.
     
  3. Lanzer

    Lanzer

    The saber calls for its master... Member
    6,845
    3
    18
    Glendale, AZ
    Living life.
    http://splicd.com/v674s87qvY8/47/55

    Amy's peel-out in SADV2 is sort of like the super peel-out.
     
  4. Heh, I'll try to give you as many details as I can, but I'm not familiar with the movie/demo formats myself. =)

    From a quick search it seems that Gens movies are pretty simple (fixed number of bytes per frame, each bit corresponds to a button). I can't seem to find any documentation about the format used by the game, but from looking at the data in the disassembly (the files in the "demodata" folder) it appears to be a series of pairs of bytes, the first representing the pressed keys and the second indicating for how long those same keys are pressed (basic RLE compression).

    Assuming I'm correct about the formats, it would be trivial to use your programming language of choice to make a simple converter. Open the Gens file and start reading frame data from it. You'll only use data from the first controller, so just make sure the bits are in the correct places (I'm not sure if Gens and Sonic use the same bits for the same buttons, so you might have to swap the bits around) and output that key combination to the new demo file. Then keep reading the Gens movie to count how many frames that same combination remains, and once it changes output the count to the new demo file.

    I've seen some durations as $00, so the game might interpret that as 1 and $FF as 256, which means you have to subtract one from the count before writing it to the file. It also means that if the same combination of keys remains for more than 256 frames you have to break it down into multiple keys-duration pairs until the whole duration is covered.

    You might also have to do some trimming at the start, because it's very unlikely that the Gens movie will start at the exact same time as the demo should, so it's better to start the Gens movie earlier and programming your converter so that it skips "N" frames at the start of the movie, then you play with the value of "N" a bit until you find the exact point.

    EDIT: If you want my honest opinion, if you know some 68000 it would be easier to have the game itself record the demos (there even seems to be a routine to do it in the ROM already), you wouldn't even have to worry about trimming the start of the movie.
     
  5. E-122-Psi

    E-122-Psi

    Member
    2,470
    612
    93
    I think I'll work on refining the gameplay and graphics before I start on stuff like the demos, Gens Movie looks interesting though, might be useful for presenting my projects later on as well.

    Anyway, I've been trying to work on making the high jump code, however no effect so far. This is the ASM routine I currently have (put in the Md_Normal section):

    Code (Text):
    1. ; ---------------------------------------------------------------------------
    2. ; Subroutine allowing Sonic to high jump
    3. ; ---------------------------------------------------------------------------
    4.  
    5. ; ||||||||||||||| S U B    R O U T    I N E |||||||||||||||||||||||||||||||||||||||
    6.  
    7. Sonic_HighJump:
    8.         move.b    ($FFFFF603).w,d0; move the current button press to d0
    9.         btst    #1,($FFFFF602).w; is Down button pressed?    
    10.         beq.b    HJ_End; if not, return
    11.         and.b    #$40,d0; get only button A
    12.         cmp.b    #$40,d0; were A pressed?
    13.         bne.s    HJ_End; if not, branch        
    14.         tst.b    ($FFFFFFA8).w; was jumpdash flag set?        
    15.         bne.w    HJ_End; if yes, branch        
    16.         move.b    #$24,($FFFFFFA8).w; if not, set jumpdash flag
    17.         move.b    #$23,$1C(a0); show hammer animation        
    18.         move.w    #$A0,d0; set jumpdash sound        
    19.         jsr    (PlaySound).l; play jumpdash sound        
    20.         bclr    #4,$24(a0); clear double jump flag            
    21.         move.w    #-$600,$12(a0); set normal jumpdash speed        
    22.         tst.b    ($FFFFFE2E).w; do you have speed shoes?        
    23.         beq.s    HJ_ChkUW; if not, branch        
    24.         move.w    #-$600,$12(a0); set speed shoes jumpdash speed
    25.  
    26. HJ_ChkUW:        
    27.         btst    #6,$24(a0); is Sonic underwater?        
    28.         beq.s    HJ_ChkDirection; if not, branch        
    29.         move.w    #-$400,d0; set underwater jumpdash speed
    30.  
    31. HJ_ChkDirection:        
    32.         btst    #0,$24(a0); is sonic facing left?        
    33.         beq.s    HJ_Move; if yes, branch        
    34.         neg.w    d0; if not, negate d0 (for jumping to the right)
    35.  
    36. HJ_Move:        
    37.         move.w    #-$600,$12(a0); move sonic forward (y-velocity)        
    38.  
    39.  
    40. HJ_End:        
    41.         rts    ; return
    42. ; End of function Sonic_HighJump
    It's modified from the jump dash code, however I used a different flag since the spinhammer uses it too.

    All I get is a jump noise when pressing Down and A, suggesting it recognises the code at least (however it only does once on ground, I have to go off and on ground again for it to activate). Anyone got any ideas?

    Since the leap code works in a similar manner (likely just a bit of a toggle with the vertical and horizontal directions) it would likely be a two-for-one-bonus if I get it to work.
     
  6. Dr. Kylstein

    Dr. Kylstein

    Member
    86
    0
    6
    I think "bset #1,$22(a0)" is what you're looking for. The X and Y velocities only work when the character is considered to be off the ground. Otherwise, only the "inertia" variable counts and the character moves according to the angle of the ground. Bit #1 in $22(a0) toggles this behavior. If that isn't enough to fix it, I suggest you examine the standard jumping code, which deals with the transition between ground and air.
     
  7. E-122-Psi

    E-122-Psi

    Member
    2,470
    612
    93
    It still isn't working but it does have some sort of effect than before, the move activates no matter how many times on ground, and makes the SPLIT second animation change and bump upward (if I move on a certain surface or reach a slope or curve, I can actually see the full animation but no movement upwards), so yeah, something in the Jump coding perhaps. Just wondering, am I supposed to use this piece of code as is or am I supposed to toggle it somehow, also is there a certain part of the code it has to go in (I put it before the jumpdash flag branch).
     
  8. Ok, I can't hold back...

    DUDE-- AWESOME JOB WITH THE HACK!!! I'm going crazy with the game so bad right now-- I SWEAR I'm GEEKING OUT OVER IT!!!

    Now for my Opinions:

    Amy's custom sprites were done very well and you didn't waste any time in making a move set for her. Everything adds up to everything I was expecting to see in the hack, and well... I don't see any flaws in the game itself ((Aside from the Bugs of course: Score stuff, TM glitch, and of course my favorite: SHEER AWESOMENESS!!!)).

    So, With that, I give you my score of your incredible hack in the ways of the X-play:

    I give Amy in Sonic 1 Hack a Perfect 5 out of 5. ^^

    Great Job Man.
     
  9. E-122-Psi

    E-122-Psi

    Member
    2,470
    612
    93
    Bugs? I assure you the pressence of any Looney Tunes is completely void in this game. :v:

    Anyway, I appreciate the comments (especially since you used one of your limited usage of posts on it). I'm busy fine-tuning some of the flaws, I'm actually still a bit stumped on the graphics ones you mentioned, out of interest has anyone had that TM glitch before, is it perhaps caused by lack of memory from either too many tiles or pieces (which usually takes up more memory)?
     
  10. I have to agree with you on this one here... I am also playing the game on real hardware Via Flash-Card DS and for some reason, I had no error thing... Same with my Wii... Neither Emulators seem to really pick up on any errors... I wonder if it could be the card he's using maybe?

    Chilly Willy, If you're reading this, please let me know what type of card you're using and I'll do the research needed on it and get you the know-how on how to correct the Error you're getting.

    Other than that, I'm surprised my card is still in good shape after going through so much hell...

    Well, Aside from my Limited posting, I'm using them mostly for giving my opinions on the Games, as well as Advice on the Game itself, and also for listing for bugs I may find in the games. ^^ As for YOUR Game, When I said "bugs"? I was being Dumb. XD

    Of course there are no bugs in the game. It's very good. As for the TM Gltich, I have yet to figure out how to use ANY of the Editing programs I have to hack Games. yah... still clueless on how to use SonED(2) you know?
     
  11. E-122-Psi

    E-122-Psi

    Member
    2,470
    612
    93
    I recently tried the hack on a console emulator, a PS2 one that comes with the Action Replay. It freezes every time Amy hits something with her hammer attacks. That said since it's a little third party emulator and a bit dated now, it's not brilliant emulator anyway and freezes with a lot of games and hacks.

    There ARE bugs in the game, my friend, there is no denying that. I hope to fix them, but it require some figuring out (a couple are fixed for the next Rev though, which I may release when I make a more valid showing of progress).

    As for SonED, I have limited knowledge of it, since I barely edit the levels. There should be some guides on the site around here though:

    http://info.sonicretro.org/Category:SCHG_How-tos

    http://info.sonicretro.org/Category:Sonic_...y_Hacking_Guide
     
  12. Aha... The PS2 Emulator Homebrew Program isn't the best to play hacks considering it is indeed third party... However, I could recommend you try to re-write a version that is compatible specifically with certain emulators, you know?

    And thanks for the How-To Lists. I'm still trying to figure it out.
     
  13. Chilly Willy

    Chilly Willy

    Tech Member
    751
    11
    18
    Doom 32X
    Emulators usually ignore odd addresses for speed. Real hardware doesn't.


    It's not the flash card, it's real hardware versus emulation. Most clones out right now are single-chip ARM systems running an emulator. Try it on a Genesis Model 1/2/3 or CDX or Nomad for real hardware. It's the same whether I use a Neo Myth or the MD-Pro.
     
  14. Aha... I see... So you're using actual GENESIS Hardware... Hmm... I'll do my research and see if it's possible to fix it.
     
  15. Bibin

    Bibin

    DON'T LET THE SUN LAUGH AT YOU. Member
    881
    0
    0
    New York City
    Ghost in the Machine
    Hey, uh, I hope you don't mind, I started making a private sprite hack that puts the new amy's outfit in this - if it bothers you I'll keep it private :P
     
  16. E-122-Psi

    E-122-Psi

    Member
    2,470
    612
    93
    Fine by me. There have already been a few Amy hacks before this anyway. I don't own the character.
     
  17. Bibin

    Bibin

    DON'T LET THE SUN LAUGH AT YOU. Member
    881
    0
    0
    New York City
    Ghost in the Machine
    Well... it's more of a sprite hack of your hack; your excellent Amy sprite provides a great base. That's why I talked about keeping it private.
     
  18. E-122-Psi

    E-122-Psi

    Member
    2,470
    612
    93
    Well given the Sonic CD basis I suppose they're technically not mine either. lol

    If you want I can give you the sprite sheet to edit from which will probably be an easier way to access the sprites.

    Progress report:

    Fixed certain animation glitches, as well as spinhammer mechanics. The jump hammer attack also has a higher radius, making hitting boxes much easier (special thanx to Aquaslash). I've began implementing leap and high jump coding, as said high jump is still non responsive due to being imputed to a non-jump control, leap on the other hand, is, errr, weird, it should be easier to imput due to being activated with a jump button, however I'm getting different reactions from pressing it left or right:

    Code (Text):
    1. Sonic_Leap:
    2.         move.b    ($FFFFF603).w,d0; move the current button press to d0
    3.         btst    #1,($FFFFF602).w; is Down button pressed?    
    4.         beq.b    SL_End; if not, return
    5.         and.b    #$10,d0; get only button B
    6.         cmp.b    #$10,d0; were B pressed?
    7.         bne.s    SL_End; if not, branch
    8.         tst.b    ($FFFFFFAA).w; was jumpdash flag set?        
    9.         bne.w    SL_End; if yes, branch        
    10.         move.b    #1,($FFFFFFAA).w; if not, set jumpdash flag
    11.         move.b    #$24,$1C(a0); show leap animation        
    12.         move.w    #$A0,d0; set jumpdash sound        
    13.         jsr    (PlaySound).l; play jumpdash sound        
    14.         bclr    #4,$22(a0); clear double jump flag            
    15.         move.w    #$600,d0; set normal jumpdash speed
    16.         move.w    #-$100,$12(a0); set normal jumpdash speed        
    17.         tst.b    ($FFFFFE2E).w; do you have speed shoes?        
    18.         beq.s    SL_ChkUW; if not, branch        
    19.         move.w    #$900,d0; set speed shoes jumpdash speed
    20.         move.w    #-$100,$12(a0); set normal jumpdash speed
    21.  
    22. SL_ChkUW:        
    23.         btst    #6,$24(a0); is Sonic underwater?        
    24.         beq.s    SL_ChkDirection; if not, branch        
    25.         move.w    #$400,d0; set underwater jumpdash speed
    26.         move.w    #-$100,$12(a0); set normal jumpdash speed
    27.  
    28. SL_ChkDirection:        
    29.         btst    #0,$22(a0); is sonic facing left?        
    30.         beq.s    SL_Move; if yes, branch        
    31.         neg.w    d0; if not, negate d0 (for jumping to the right)
    32.  
    33. SL_Move:        
    34.         move.w    d0,$10(a0); move sonic forward (x-velocity)        
    35.         move.w    d0,$12(a0); move sonic forward (y-velocity)
    36.  
    37. SL_End:        
    38.         rts; return
    39. ; End of function Sonic_Leap
    Basically the move is supposed to thrust her forward with slight bounce up, however when activated right, it budges her forward but won't bring her upward, while pressing it left springs her upward with a slight accelleration forward (nearly the opposite of what I want). My guess is something is wrong with the ChkDirection coding. Anyone got any solutions?
     
  19. Eric Wright

    Eric Wright

    Born into this. Oldbie
    I think it's already been said, but you can't break monitors with the hammer in mid-air; kinda kills a bit of the flow of the game.

    Really cool work, otherwise... and I don't even like Amy :P
     
  20. E-122-Psi

    E-122-Psi

    Member
    2,470
    612
    93
    Thanx. :)

    Her jump-hammer attack radius is fixed for the next revision.