Announcement

Collapse
No announcement yet.

Converting RAM codes into ROM codes?

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

  • Converting RAM codes into ROM codes?

    (EDIT: I now realize this thread should be titled "Converting PAR codes into GG codes?" but it's too late now)

    I've discovered a way to make a code that changes something in a game, and as pleased as I am with myself for creating my first game code, it only changes a RAM address and I'd like to go further. I'd like to know if there's a way I can come up with a code that does the same thing but modifies ROM addresses so I can use it on a real NES.

    Before I go on, I want to point out that I'm very new to game hacking and I have no knowledge of assembly language. I just followed this tutorial which explained things very nicely.

    Now, the game I'm using is Clash at Demonhead for the NES, and basically I created a code that makes it so that when you rescue the Hermit, you already have access to all 5 Hermit abilities instead of having to "unlock" each new ability with every 100 force points milestone reached (to get all 5 abilities, you need 500 force points). The byte I found that works with this is 0511 and changing the value to 1F (or even FF) gives you all 5 abilities already unlocked.*

    This is great and all, but I'm curious to find out if there's a ROM address I can change to do the same thing. The tutorial has some information on finding the ROM location, but I'm running into some problems. I've set the RAM address as the breakpoint as the tutorial instructs and after running the game to the point where I receive the Hermit abilities, the debugger pops up showing me this line:

    >07:CEF5:8D 11 05 STA $0511 = #$00

    If I'm reading things correctly, the ROM addresses I'm supposed to change are CEF5, CEF6 and CEF7. Here's where I think I'm making mistakes: looking at the bytes 8D, 11 and 05, I take it I'm supposed to change those values into EA, but when I do that and convert the codes into game genie codes (XVNGSVSE, XVNGVTPO and XVNGNTIE), nothing happens when I try to run through the game.

    Can anyone tell me what I could be doing wrong? Or if this is even possible? I'd greatly appreciate it. If anyone needs more explanation on the game's mechanics or any other extra details, let me know.

    * I'm aware there's a code in this game's list that says "Have Hermit's 5 Forces" but all this does is add the Hermit icon in the item menu to give you access to the Hermit Force menu; it does not give you the abilities.
    Last edited by MethidMan; 08-18-2015, 09:47:57 PM.

  • #2
    This was written by Tony Hedstrom

    http://www.videogamesource.com/genie...par_to_gg.html
    The Hackmaster

    Comment


    • #3
      I don't think that helps me... For one thing, I'm trying to figure out a code for an NES game and that page you linked me to seems to only apply to SNES codes. I also tried to download that "gg-hex.exe" program it mentions and it seems my computer can't run it. Something about x86 or 64-bit versions or something.

      I did use other programs like Game Genie Converter and Game Genie Encoder but whatever codes I got from them didn't work. Does this mean there's no way I can get a Game Genie code from the PAR code I came up with?

      Again, the code I came up with is 0511:1F (FF works too in case it matters), and when I tried using 6502 debugger in FCEUX to find the ROM location, I came up with CEF5: 8D 11 05. It's these numbers I don't know what to do with to make into a functioning Game Genie code.

      Comment


      • #4
        FCEUX has a game genie converter if that helps.

        Comment


        • #5
          What you're getting in the breakpoint is the store (STA) instruction which writes to that ram location you found. You need to scroll up and look for a load instruction (LDA) and see what instructions are between the load and store and see what can be edited to change what gets stored. Having a screenshot of the debugger with the load and store instructions will be easier for someone to help.
          Spoiler Alert! Click to view...

          THE BAD GUY!!!!!!

          Comment


          • #6
            How's this?

            Click image for larger version

Name:	Debugger - Clash at Demonhead.png
Views:	1
Size:	85.1 KB
ID:	162745

            Comment


            • #7
              That helps but not really, you will need to run the trace logger as well before you get a breakpoint to actually see where the real load is coming from. I'll take a look at this game but it helps if you can provide a save state to right before you get the first ability or wherever you used to make the breakpoint happen.

              Edit : Nevermind, it was the load 2 lines up:

              $CEF0:A9 01 LDA #$01

              so to unlock all abilities when you get one you change the Address CEF1:01 to CEF1:1F and the GG equivalent with the compare value:

              Raw
              CEF1?01:1F

              Game Genie
              YONGOTPE
              Spoiler Alert! Click to view...

              THE BAD GUY!!!!!!

              Comment


              • #8
                Oh, I have that. Here you go~

                Edit: Just move right to the bearded guy in white and there'll be a little bit of dialogue. Right when the dialogue finishes is when the change occurs.
                Attached Files
                Last edited by MethidMan; 08-20-2015, 08:37:21 PM.

                Comment


                • #9
                  Already got your code made but this is likely only going to work with the first Hermit since that seems like a static load value and more than likely there are other addresses that will load the next value when you get the next Hermit.
                  Spoiler Alert! Click to view...

                  THE BAD GUY!!!!!!

                  Comment


                  • #10
                    It works! Thank you so much!

                    Don't worry, there's only one hermit in the game so this already accomplishes everything~

                    This may be asking a lot but I'm curious to know how you found CEF1 to be the right address and how you found the right compare value. If it's long and complicated, don't worry about it. Thanks again!

                    Comment


                    • #11
                      I thought you already knew how I got that address seeing you make a 3 line code from one instruction a few posts up. Well anyways the instruction $CEF0:A9 01 LDA #$01 has 2 values which is A9 and 01, A9 is the LDA and 01 is you guessed the value to load.

                      Since there is 2 values that means that there is 2 addresses being used, 1 address per value in any instruction so this tells me that CEF0 is A9 and CEF1 is 01. I didn't need to change anything except the value that is loaded so we just change the 01 to 1F (or any other value you want).

                      If you look at your screenshot you will notice $CEF0 is followed by $CEF2, this is right after the $CEF1 so makes sense right?

                      The Compare value is simply what was there originally so 01 is the original value and that is what we compare against.
                      Spoiler Alert! Click to view...

                      THE BAD GUY!!!!!!

                      Comment

                      Working...
                      X