don't click here

Basic Questions & Answers thread

Discussion in 'Engineering & Reverse Engineering' started by Tweaker, May 29, 2008.

  1. FraGag

    FraGag

    Tech Member
    The order is wrong: it's SACBRLDU.
     
  2. GenesisFan64

    GenesisFan64

    The bright side of the dark side. Member
    108
    0
    16
    (Orignal post)

    OK, I almost fixed the bug by replacing:
    $FFFFFE00 -> $FFFFFE40 (Level X-Pos)
    $FFFFFE04 -> $FFFFFE44 (Level Y-Pos)

    But now I'm getting this:
    [​IMG]
    (A wrong chunk line while moving to the left)
     
  3. theocas

    theocas

    Tech Member
    346
    0
    16
    I think it might have something to do with the deformation/background scrolling/whatever. When I made the deformation routines a simple rts, that kind of stuff started happening.
     
  4. Azu

    Azu

    I must be stupid. Member
    Hey, I'm wondering. Has anyone messed with the E02 Engine? I've thinking about learning it. Pretty sure it said on the site you can use the Matrix engine for your project, even with examples file. Yet, I don't see any examples script or what not. Anyway, I'm wondering if messed with it.
     
  5. E-122-Psi

    E-122-Psi

    Member
    2,470
    612
    93
    Not sure if it worked, maybe I haven't properly refined the code to work with the rest of the routine. To give you an idea what I'm working for here is the ASM. Basically I dash move that pushes you diagonally:

    Code (ASM):
    1. ; ---------------------------------------------------------------------------
    2. ; Subroutine for forward dash
    3. ; ---------------------------------------------------------------------------
    4.  
    5. ; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
    6.  
    7.  
    8. Sonic_DiagDash:
    9.     move.b  ($FFFFF602).w,d0    ; move the current button press to d0
    10.     andi.b  #%00001010,d0                   ; get only right and down button presses
    11.     cmp.b   #%00001010,d0                   ; are right and down both pressed? 
    12.     bne.b   JumpToDiagD_End         ; if not, return       
    13.     move.b  ($FFFFF603).w,d0    ; is ABC pressed? (part 1)     
    14.     andi.b  #$70,d0         ; is ABC pressed? (part 2)
    15. JumpToDiagD_End:
    16.     jmp DiagD_End
    17. Cont_DiagD:    
    18.     tst.b   ($FFFFFFEB).w       ; was jumpdash flag set?       
    19.     bne.w   DiagD_End           ; if yes, branch       
    20.     move.b  #1,($FFFFFFEB).w    ; if not, set jumpdash flag
    21.     move.b  #$23,$1C(a0)    ; use "leaping" animation      
    22.     move.w  #$BC,d0         ; set jumpdash sound       
    23.     jsr (PlaySound).l       ; play jumpdash sound      
    24.     bclr    #4,$22(a0)      ; clear double jump flag
    25.     move.w  #$600,$12(a0)       ; move sonic forward (y-velocity)      
    26.     move.w  #$600,d0        ; set normal jumpdash speed    
    27.     tst.b   ($FFFFFE2E).w       ; do you have speed shoes?     
    28.     beq.s   DiagD_ChkUW     ; if not, branch       
    29.     move.w  #$A00,d0        ; set speed shoes jumpdash speed
    30.  
    31. DiagD_ChkUW:       
    32.     btst    #6,$22(a0)      ; is Sonic underwater?     
    33.     beq.s   DiagD_ChkDirection      ; if not, branch       
    34.     move.w  #$600,d0        ; set underwater jumpdash speed
    35.     move.w  #$600,$12(a0)       ; move sonic forward (y-velocity)
    36.  
    37. DiagD_ChkDirection:    
    38.     btst    #0,$22(a0)      ; is sonic facing left?    
    39.     beq.s   DiagD_Move          ; if yes, branch       
    40.     neg.w   d0          ; if not, negate d0 (for jumping to the right)
    41.  
    42. DiagD_Move:    
    43.     move.w  d0,$10(a0)      ; move sonic forward (X-velocity)      
    44.     move.w  d0,$12(a0)
    45.  
    46. DiagD_End:     
    47.     rts             ; return
    48. ; End of function Sonic_DiagDash
     
  6. FraGag

    FraGag

    Tech Member
    You never branch to Cont_DiagD. You're missing a check after these lines:
    Code (ASM):
    1.     move.b    ($FFFFF603).w,d0    ; is ABC pressed? (part 1)        
    2.     andi.b    #$70,d0            ; is ABC pressed? (part 2)
    3.     ; add this:
    4.     bne.s    Cont_DiagD
    5.  
     
  7. Mr.Kaosu

    Mr.Kaosu

    Member
    52
    0
    0
    Sonic Zero: Remastered
    Hello. If it's alright to ask here, Could anyone do a bit of ripping for me? You see, the genesis game, Animaniacs does have some DAC samples and drum sounds I could really use for my music, in my opinion. I would love it if someone could rip from that, because I don't know how to do it myself.
     
  8. E-122-Psi

    E-122-Psi

    Member
    2,470
    612
    93
    Well I have it working with mixed results since:

    1. It works by just pressing the diag button.

    2. Since it won't work with left button I tried making another separate routine for that button, yet the directions always screw up, either going right instead of left or up instead of down.

    Oh an unrelated question I am trying to work with the Super Sonic pallette in Sonic 2 (Super Sonic Transformation right?). I'm trying to edit a different color from yellow however you're not allowed to use the same color twice in the same line. Anyway to get around this?
     
  9. nineko

    nineko

    I am the Holy Cat Tech Member
    6,309
    486
    63
    italy
    Hm I'm not sure what you mean here. There is nothing that prevents you from using the same color multiple times on a palette line (other than that it's kinda stupid as you're wasting palette indexes).
     
  10. E-122-Psi

    E-122-Psi

    Member
    2,470
    612
    93
    Well the super pallette consists of three rotations on each line (at least I think this is the super pallette) so in places the same color would be used. Maybe it's just because I'm editing it on SonMapEd, if you try to use the same color in two blocks of the same line it merely switches the colors from one to the other (eg. if you have a green and try to edit a blue into the same green it will instead switch blocks so the green is blue and the blue is green).
     
  11. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,742
    338
    63
    SonLVL
    The Super Sonic palette rotation has four colors for each frame, like Sonic has four blue colors in his normal palette.
     
  12. Super Egg

    Super Egg

    Master of MS Paint. Member
    313
    0
    16
    Tomball, TEXAS
    Sonic 2 beta 3 hoax
    Ok, this is my second legit hack, and I need a little help. Well I've decided to follow some tutorials and add in spindash, jumpdash, a secret new move I am currently working on, and adding characters. Anyway, I decided to make each character have their own separate palette but I have found it somewhat difficult. I'm pretty new to this stuff, and this is my first true asm experiment. Here is what I have so far. BTW, this is in the Markey Jester 128 disassembly.

    ; ---------------------------------------------------------------------------
    ; Pallet data
    ; ---------------------------------------------------------------------------
    (skip everything to changes)
    Pal_Sonic: incbin pallet\sonic.bin
    Pal_Classic: incbin pallet\classicsonic.bin

    then I went and edited the Level Subordinare,

    loc_3946:
    cmpi.b #$01,($FFFFFFFE) ; is the multiple character flag set to $01 (Metal Sonic)?
    beq.w ClassicLoad ; If not, branch
    moveq #3,d0
    bsr.w PalLoad1 ; load Sonic's pallet line
    bsr.w LevelSizeLoad
    beq.w loc_3950

    ClassicLoad:
    moveq #4,d0
    bsr.w PalLoad2 ; load Sonic's pallet line
    bsr.w LevelSizeLoad
    beq.w loc_3950

    loc_3950: bsr.w DeformBgLayer
    bset #2,($FFFFF754).w
    bsr.w MainLoadBlockLoad ; load block mappings and pallets
    bsr.w LoadTilesFromStart
    jsr FloorLog_Unk
    bsr.w ColIndexLoad
    bsr.w LZWaterEffects
    move.b #1,($FFFFD000).w ; load Sonic object
    tst.w ($FFFFFFF0).w
    bmi.s Level_ChkDebug
    move.b #$21,($FFFFD040).w ; load HUD object

    So can someone help me here? Every time I try to load Character 2(classic Sonic), it still loads Sonic's palette as opposed to the one I have set it to.
    Basically ClassicLoad is suppose to load palette 4, which is Sonic 1's normal Sonic palette. I've checked the actual palette files themselves, and they are made differently to tailor each character. This is the only thing that baffles me. I've got the extra lives and invincibility to play the different sound files, each characters moves sets setup, this is the only thing that won't work. Some input would be nice. Thanks.
     
  13. Ravenfreak

    Ravenfreak

    2 Edgy 4 U Tech Member
    3,091
    187
    43
    O'Fallon Mo
    Sonic 1 Game Gear Disassembly
    Change the beq (Branch if EQual) opcode to bne (Branch if Not Equal) after the code that checks to see what character has been selected and see if that works. Also it's a Subroutine, not a Subordinare, but I know what you mean. xP
     
  14. Aerosol

    Aerosol

    Not here. Moderator
    11,163
    573
    93
    Not where I want to be.
    Sonic (?): Coming summer of 2055...?
    Does anyone know of a way to view entire Sonic 3&K levels using a Gens snapshot or something?

    EDIT: Nevermind there are snapshots on the wiki. Derp.

    EDIT2: What the hell? 8th special stages in Sonic 3 and Sonic and Knuckles? Anyone want to explain those?
     
  15. nineko

    nineko

    I am the Holy Cat Tech Member
    6,309
    486
    63
    italy
    In before EDIT 4: nevermind, this is on the wiki as well.

    One
    Two
    Three
     
  16. Aerosol

    Aerosol

    Not here. Moderator
    11,163
    573
    93
    Not where I want to be.
    Sonic (?): Coming summer of 2055...?
    A rephrase is in order:

    Anyone want to explain why it's there? Are these some of the Blue Spheres stages?
     
  17. Ravenfreak

    Ravenfreak

    2 Edgy 4 U Tech Member
    3,091
    187
    43
    O'Fallon Mo
    Sonic 1 Game Gear Disassembly
    Originally each game was going to have 8 emeralds, but decided against it. But as you see, they were already programmed into the game, just hidden. They aren't any of the Blue Sphere stages btw, from what I know. :\
     
  18. Ok, I happen to have an inquiry about Sonic 1 Special Stage spawn points. I built something in the Sonic 1 Special Stage Editor that I plan to use in Hivebrain's ASM68k Dissassembly, but I'm afraid that Sonic will spawn outside of my Special Stage, should I try to play it. I need to find the parameters in the code that I must change to define Sonic's spawn point on the first Special Stage, because I'm replacing it for my own. The file in question is "sloc_ss.bin".
     
  19. theocas

    theocas

    Tech Member
    346
    0
    16
    What's the question? Two bytes X, Two bytes Y. After 4 bytes that repeats for special stage 2, and so on.
     
  20. Mr. Mash

    Mr. Mash

    All fanbases are awful Member
    1,440
    0
    0
    drawing
    fun question; Say I wanted to make a sonic game using 2D drawn animation, rather than 3D or pixel sprites, is there an engine that I can use to do that? granted I know pretty much nothing about programming or engines or any of that stuff, and I find it hard to learn.