Announcement

Collapse
No announcement yet.

ASM related questions

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

  • ASM related questions

    Hi all,

    I'd like to ask you guys on some advice on how to create ASM codes for NES and SNES games. Well, I've already made codes like infinite health, infinite ammo etc. in the Game Genie format so that I could patch the ROM directly without even having to use a cheating device (I'm using an Everdrive on my NES, so I can't even use a PAR if I wanted to). What I would like to do now though is to add my own routine into the ROM. I'd basically like to replicate the effects of a fairy in the Zelda games, meaning that if my health reaches zero, instead of dying, my character will have his health completely restored. I know, it may seem kind of weird but I like the idea of seeing how your health drops but still not having to bother with doing things again because I died. Using infinite health cheats often make me care less about how good I am because my health doesn't drop anyway.

    How would I go about doing this? I guess the idea is that you add a breakpoint on the RAM address of your characters health and take damage, then you'd have to find an operation where the game checks if the health is zero, from this point on, I'd have to jump to my routine I guess. But how do I find a space in the ROM where I'd be able to put my code? Can I even find that comparison with zero easily? I know, these might be some pretty "noobish" questions but I'd like to learn more about doing things like this.

    Thanks in advance,

    Michael

  • #2
    https://en.wikibooks.org/wiki/Super_...ation_Tutorial
    The Hackmaster

    Comment


    • #3
      uhm...okay?

      Comment


      • #4
        I can give you a bunch of tutorials on ASM, one minute...
        The Hackmaster

        Comment


        • #6
          Did you want to create something like this?



          If so, you should not need a custom routine for this. You just need to find the check that determines whether or not you have a fairy in a bottle when your health reaches zero and make sure it returns true every time.

          Edit: If you're still interested in creating a subroutine, this might be useful: https://wiki.superfamicom.org/snes/s...on_5_jumping_8
          I only bother with things that interest me.

          Comment


          • #7
            Originally posted by Demonic722 View Post
            Did you want to create something like this?



            If so, you should not need a custom routine for this. You just need to find the check that determines whether or not you have a fairy in a bottle when your health reaches zero and make sure it returns true every time.

            Edit: If you're still interested in creating a subroutine, this might be useful: https://wiki.superfamicom.org/snes/s...on_5_jumping_8

            That's exactly what I'd like to do However, there are games like the very first Legend of Zelda, where there aren't any fairies so I'd pretty much have to programm a routine that would replicate fairies.
            Last edited by MichiS97; 02-05-2017, 09:49:46 AM.

            Comment


            • #8
              What you're asking about is decidedly un-noobish. The issue with it on older consoles is that you'd have to find a section of unused ROM, and depending on the type of bank switching and branching limitations, you might find that your only options are infeasible.

              The most likely way you're going to get this done is to find the code you described, and actually try to replace the series of death events with one that restores your health and bypasses all the other code involved. That's much easier than trying to find a block of unused ROM available for instructions, and reachable by the code you need to jump out of. If you don't ever want to allow death, then any code related to game over screens and so forth is essentially dead.

              How you locate that will vary from game to game, but you can probably start by finding infinite health codes or codes like the one Demonic722 posted.

              Comment


              • #9
                As Pyriel said, find the death comparitor (there is always one) and mark it down then find the one that kicks in when you get a fairy to restore health then make the comparitor jump to the refill health routine but be sure it jumps back into the regular ASM loop or the game might crash.
                Spoiler Alert! Click to view...

                THE BAD GUY!!!!!!

                Comment

                Working...
                X