Announcement

Collapse
No announcement yet.

How to Find Enemies Die When You Get Close

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to Find Enemies Die When You Get Close

    Example : Super Mario All Stars & SMW : Super Mario Bros - SNES
    Emulator used : Geiger's SNES9X Debugger ep9r8

    This kind of code I have only tried on Mario games. You can also do it for items if the game has them.
    Now the way I found it for this game was to put a breakpoint on read on the star's address. That address is 0x7E07AF. Before you put the breakpoint start the game and at the beginning get close to the goomba like in the attachment. Then turn on the breakpoint and press run.



    Code:
    $03/ADEE AD AF 07    LDA $07AF  [$03:07AF] The debugger snaps here often so just press run
    $03/828A B5 88       LDA $88,x  [$00:07AF] The debugger snaps here often so just press run
    
    $03/DE83 A6 9E       LDX $9E    [$00:009E]    
    $03/DE85 B0 09       BCS $09    [$DE90]      If you are close to an enemy or powerup branch
    $03/DE87 BD 81 04    LDA $0481,x[$03:0481]
    $03/DE8A 29 FE       AND #$FE                
    $03/DE8C 9D 81 04    STA $0481,x[$03:0481]
    $03/DE8F 60          RTS                   
    $03/DE90 B4 1C       LDY $1C,x  [$00:001C]
    $03/DE92 C0 2E       CPY #$2E                
    $03/DE94 D0 03       BNE $03    [$DE99]      
    $03/DE96 4C FA DD    JMP $DDFA  [$03:DDFA]  
    [COLOR="Green"]$03/DE99 AD AF 07    LDA $07AF  [$03:07AF][/COLOR] We land here. When Mario gets hit any enemy...
    $03/DE9C F0 06       BEQ $06    [$DEA4]    it checks the value if zero mario gets hurt or killed.
    $03/DE9E 4C 81 DD    JMP $DD81  [$03:DD81]   
    $03/DEA1 0A          ASL A                   
    $03/DEA2 06 04       ASL $04    [$00:0004]   
    $03/DEA4 BD 81 04    LDA $0481,x[$03:0481]   
    $03/DEA7 29 01       AND #$01
    If we change at 03DE9C F0 to 24 the goomba gets kill instead just like having the star. The code before this address 03DE8F checks to see if you are close to an enemy or powerup. I changed
    03DE8F 60 to 24. When changing it to an nop it wasn't working right so use 0x24. This will kill enemies and get powerups from a distance. Also if you don't change F0 to 24 at 03DE9C and you change 60 to 24 at 03DE8F is Mario who dies when getting close to enemies.
    Attached Files
    Last edited by nolberto82; 03-24-2011, 07:57:37 PM.

  • #2
    Nice! is it the same way the for super metroid? or do you use different values?
    Spoiler Alert! Click to view...

    THE BAD GUY!!!!!!

    Comment


    • #3
      Cool guide, man.
      I may be lazy, but I can...zzzZZZzzzZZZzzzZZZ...

      Comment


      • #4
        Nice guide, nolberto!

        Comment


        • #5
          The Super Metroid get all items in the current room I found by accident. Although I haven't try this yet with the speed booster for Super Metroid. Remember you can do this kind of code with pickups(coins,lives,etc). Like what I did for Yoshi's Island SNES.

          Comment


          • #6
            You are a Very Good Teacher man.Guided very well.

            Comment


            • #7
              Cool code. I have a question though, you mention "break on read on on the star's address" what do you mean? The address that decides if your have star power or not? or something else?

              Comment


              • #8
                Originally posted by DarkSerge
                Cool code. I have a question though, you mention "break on read on on the star's address" what do you mean? The address that decides if your have star power or not? or something else?
                Yes is the address that holds the value that counts down when you get the star.

                Comment

                Working...
                X