The help DHZ with asm topic.

Discussion in 'Engineering & Reverse Engineering' started by .hack//zero, Sep 1, 2006.

Thread Status:
Not open for further replies.
  1. .hack//zero

    .hack//zero

    Member
    2,998
    0
    16
    Learning NES ASM, Finding a girlfriend.
    A couple years ago I figured out how to add HP to normal enemies. The only problem was that I couldn't make add the sound effect for every time the enemy gets hit. I can do that now. Now, I can't remember how to it right. I have spent hours tring to recreate that effect. So, I'm coming to you guys for help again. Here's some proof that I've really tried to get it work. Before that I do know where about I should add the data in.

    ori.b #4,1(a0)
    move.b #4,$18(a0)
    move.b #$10,$19(a0)
    move.b #$10,$16(a0)
    move.b #$18,$17(a0)
    move.b #4,$18(a0)
    move.b #$F,$20(a0)
    move.b #8,$21(a0)
    addq.b #2,$24(a0)

    <dothackzero> any ASM people here?
    <SMTP> I'm asm nub.. =P
    <dothackzero> From what I remember
    <dothackzero> It should have been a combo 1-4 of these commands.
    <dothackzero> move.b #4,$18(a0)
    <dothackzero> move.b #$F,$20(a0)
    <dothackzero> move.b #8,$21(a0)
    <dothackzero> addq.b #2,$24(a0)
    <dothackzero> The 3rd I know has to be there.
    <dothackzero> Just tring to add hp normal enemies.
    <SMTP> Hmm sounds like a good idea..
    <dothackzero> I've sorta done it before, but it didn't work perfectly.
    <dothackzero> Mainly the sound didn't work.
    <dothackzero> But where would it be added.
    <dothackzero> The main body of the sprite?
    <SMTP> hm.. They would have to flash after each hit or if you spin into them they would lose all their hits..
    <dothackzero> Near the delete object sub?
    <SMTP> probley that one...
    <SMTP> I don't really know..
    <dothackzero> near the delete object sub/
    <SMTP> yea maybe..
    <dothackzero> thanks
    <dothackzero> Don't really want to make another help with how everyone is treating me right now.
    <dothackzero> AHHH
    <dothackzero> I've got it.
    <dothackzero> I think
    <SMTP> The bastards..
    <SMTP> =P
    <dothackzero> loc_2D368: ; CODE XREF: h+16122j
    <dothackzero> move.b #$A,$20(a0)
    <dothackzero> move.b #4,$18(a0)
    <dothackzero> move.b #$10,$19(a0)
    <dothackzero> move.b #$10,$16(a0)
    <dothackzero> move.b #$18,$17(a0)
    <dothackzero> move.b #3,$18(a0)
    <dothackzero> addq.b #2,$24(a0)
    <dothackzero> jmp loc_164E6
    <dothackzero> the last is the thing that jumps to the delete object sub.
    <dothackzero> last one
    <dothackzero> hmmm, didn't work
    <SMTP> if you remove that line it still deletes them?
    <dothackzero> I didn't delete it.
    <dothackzero> I put everything above it.
    <SMTP> oh, well after that other stuff its still going to jump to the Sub
    <dothackzero> Or should I put it before the thing
    that leads to loc..
    <dothackzero> so what should I do?
    <SMTP> I'm guessing here (since im a num at asm) but..
    <SMTP> nub
    <SMTP> =P
    <dothackzero> I am a turd to asm too, probably even newer than you.
    <SMTP> Maybe it should Branch if equal (to a certain number)
    <SMTP> no.. I just learned yesturday
    <SMTP> lol
    <dothackzero> lol
    <dothackzero> I haven't been learning the normal way.
    <SMTP> How are you learning?
    <dothackzero> I've been learning by playing with the dissasembly.
    <dothackzero> It does work.
    <dothackzero> sorta
    <dothackzero> I'm just not the type of person that can just sit down and learn it the normal way.
    <SMTP> ah..
    <SMTP> lol
    <dothackzero> ahh shit
    <dothackzero> I think Iknow what went wrong.
    <SMTP> Ok, well I think it should only branch if a certain number is reached..
    <SMTP> =P
    <dothackzero> ok, I've found something.
    <dothackzero> EHZ boss:ori.b #4,1(a0)
    <dothackzero> move.b #-$7F,$28(a0)
    <dothackzero> move.w #$29D0,8(a0)
    <dothackzero> move.w #$426,$C(a0)
    <dothackzero> move.b #$20,$19(a0) ; ' '
    <dothackzero> move.b #$14,$16(a0)
    <dothackzero> move.b #4,$18(a0)
    <dothackzero> move.b #$F,$20(a0)
    <dothackzero> move.b #8,$21(a0)
    <dothackzero> addq.b #2,$24(a0)
    <dothackzero> buzzer: ori.b #4,1(a0)
    <dothackzero> move.b #$A,$20(a0)
    <dothackzero> move.b #4,$18(a0)
    <dothackzero> move.b #$10,$19(a0)
    <dothackzero> move.b #$10,$16(a0)
    <dothackzero> move.b #$18,$17(a0)
    <dothackzero> move.b #3,$18(a0)
    <dothackzero> addq.b #2,$24(a0)
    <dothackzero> notice somethign?
    <dothackzero> It has to be somewhere in here.
    <SMTP> yea..
    <dothackzero> It's things like patterns, similarities that's been helping me learn.
    <SMTP> The reason I wanted to switch over Soned 2 is for createing more placeable objects..
    <SMTP> =P
    <dothackzero> =P
    <dothackzero> Does it matter what order they a placed in?
    <dothackzero> they are
    <dothackzero> move.w #$3D2,2(a0)
    <dothackzero> bsr.w loc_2D386
    <dothackzero> ori.b #4,1(a0)
    <dothackzero> move.b #$F,$20(a0)
    <dothackzero> move.b #4,$18(a0)
    <dothackzero> move.b #$20,$19(a0)
    <dothackzero> move.b #$14,$16(a0)
    <dothackzero> move.b #$18,$17(a0)
    <dothackzero> move.b #4,$18(a0)
    <dothackzero> move.b #8,$21(a0)
    <dothackzero> addq.b #2,$24(a0)
    <SMTP> In soned 2? no.. Soned automaticly sorts them in the file..
    <SMTP> err n/m
    <SMTP> lol
    <dothackzero> I'm talking about asm here =P
    <SMTP> I know
    <SMTP> lol
    <SMTP> hmm
    <dothackzero> dammit, I'm gonna need to make a another help topic.
    <SMTP> NOOO
    <SMTP> =P
    <dothackzero> I know
    <dothackzero> lol
    <SMTP> Well learn ASM the right first and then see if you can get it.. =P
    <dothackzero> Any good sites that can help me?
    <SMTP> http://www.hacking-cult.org as a guide made by DRX
    <SMTP> =P
    <dothackzero> any other ones?
    <SMTP> None that I know of
    <SMTP> Why? its the one I used to learn.
    <dothackzero> I'll try it again
    <SMTP> You've used it before?
    <dothackzero> yeah
    <SMTP> Its one of the best
    <SMTP> =P
     
  2. voice

    voice

    Make any joke you want, you know I look good. Misfit
    3,725
    0
    0
    45mins west of Chicago
    RSN2.0, PHP:IRC (A attempt at CGI:IRC in PHP)
    Trial and error is all I can say. that's now 90% of my php crap gets done.
     
  3. stormislandgal

    stormislandgal

    It's not a phase! Tech Member
    4,528
    8
    18
    Married life <3
    From what I know, $20(a0) is the collision mask size, so that probably wouldn't be of any help here.
     
  4. StephenUK

    StephenUK

    Liquor in the front, poker in the rear Tech Member
    1,675
    0
    16
    Manchester, UK
    Quackshot Disassembly
    $20(a0) is the collision type. For example, a typical monitor sets $20 to $46, which allows Sonic to break it from the top or side if he's rolling. Changing this value to $41 allows Sonic to simply walk into the monitor to make it break.
     
Thread Status:
Not open for further replies.