Announcement

Collapse
No announcement yet.

"Fixing" Shadowrun on the Genesis

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

  • #31
    Originally posted by Helder View Post
    So what was causing the "glitch"?
    I'm not 100% sure, but from what I could tell after a quick look is that there is a RAM address (FFF0DD) that is constantly counting up from 00 to FF and then starting over from 00. A value from this RAM address (as well as a few other changes) are added to the amount that will be subtracted from your health. I'm guessing they do this for random amounts of damage? The values I saw in MethidMan's save state seemed very odd. I would probably understand it better if I made another trace log with a "normal" attack so I could see what it *should* look like. I had to follow the trace log WAAAYYY back to find the code I made. That RAM address (FFF0DD) is actually added twice to your health. My code just prevented it from being added the first time.
    The Code Hut: http://codehut.gshi.org/

    Comment


    • #32
      So the first add was what caused the one hit kill? That address sounds like its used as a place holder for various operations and I'm sure an extensive trace will reveal a table which holds the data loaded that causes the glitch and likely changing this static table entry will fix it also. This is just speculation from my experiences tracing such codes as well as jump codes and others that use tables.
      Spoiler Alert! Click to view...

      THE BAD GUY!!!!!!

      Comment


      • #33
        Originally posted by Tony Hedstrom View Post
        That RAM address (FFF0DD) is actually added twice to your health. My code just prevented it from being added the first time.
        I'm not sure I understand what's being discussed here, but I noticed what you said here about being "added twice to your health". In case neither of you are aware of it yet, in this game there are two healthbars, one for physical health and one for mental health. Could this fact have anything to do with what you observed with the way the health values work? If either of these healthbars go down to zero, the character dies (or 'faints' or whatever).

        Comment


        • #34
          I knew about the 2 different addresses for health (Mental and Physical) from codes I made a while back, and did traces on both of them. I think it was the mental health log that had the answer. I don't think that address was added twice because of the two different health addresses, but I could be wrong. Like I said, I had to back track a looong way to find the code in the assembly log. There was a lot of adding, subtracting, NEGing, bit testing, MOVEing, conditional branches, etc going on with that value.

          EDIT: Just looked at the log again, and I was mistaken... that address was subtracted twice, not added.
          Last edited by Tony H; 10-12-2013, 07:26:13 PM.
          The Code Hut: http://codehut.gshi.org/

          Comment


          • #35
            Sorry for the absence, I've had a busy week. Anyway, I've tested the code throughout one playthrough and I can now confirm 100% that the code works without side-effects so I'm gonna work on making a patch out of it.

            However, I've also been working on finding a way to fix another bug in the game, which is magic users switching to other spells, weapons or melee when controlled by the AI. I've tried using Tony's tutorial that he linked me to in an attempt to see if I can fix it myself but to no avail... I guess I just can't get the hang of using the search code feature in Gens Hacking Version, and I'm not sure I'm using trace logs properly.

            I'd hate to impose, but this is the only other bug that ruins the fun of the game. If it's too much trouble, I understand, I'm not sure if it's even fixable. In case anyone wants to take a look at it, I have the save state.
            Last edited by MethidMan; 10-20-2013, 07:31:47 AM.

            Comment


            • #36
              Your description of the bug is very vague.
              The Code Hut: http://codehut.gshi.org/

              Comment


              • #37
                Originally posted by MethidMan View Post
                Sorry for the absence, I've had a busy week. Anyway, I've tested the code throughout one playthrough and I can now confirm 100% that the code works without side-effects so I'm gonna work on making a patch out of it.
                Already have one made which also fixes checksum and is for the USA rom.
                Attached Files
                Spoiler Alert! Click to view...

                THE BAD GUY!!!!!!

                Comment


                • #38
                  Originally posted by Tony Hedstrom View Post
                  Your description of the bug is very vague.
                  My apologies, I'll explain in detail by creating a scenario: Say you're going around the game with a party of 2 or 3 characters and one of them is a magic user. You're currently controlling one of the other characters so your magic-user is controlled by the AI. Your magic user has an awesome fire spell that you hope will fry any enemies that come your way. Suddenly some enemies do show up and as you're trying to beat the shit out of them, you realize your magic user has switched to fighting with his hands. (And vice-versa; a computer-controlled magic-user having his hands 'equipped' suddenly switches to a weak spell or his gun when enemies appear).

                  Much to your annoyance, you switch to controlling your magic user to switch his attack back to what you want him to use. But it happens again and again, not all the time but often enough to the point where you feel the need to control your magic-user permanently, which isn't very practical especially when you have more than one magic-user since you can't control both/all of them at the same time.

                  In case it helps, I've also provided a couple of screenshots to show what I mean:

                  Click image for larger version

Name:	ShadowrunMagicBug1_zps94ff67a7.png
Views:	1
Size:	163.4 KB
ID:	162463
                  Click image for larger version

Name:	ShadowrunMagicBug2_zpsafac5315.png
Views:	1
Size:	173.4 KB
ID:	162464

                  There's also an LP video on Youtube that shows this. Fast-forward to 9:22 and you'll see that the second character switches from his fire spell to his bare hands. You also notice in 9:50 that he switches back to his spell as soon as hellhounds approach.



                  The guy playing the game even mentions that he may have to control the character and sure enough that's what he ends up doing for the rest of his playthrough.

                  To recap, the 3 conditions for this to occur are: 1) the character is controlled by the A.I. 2) the character is a magic-user and 3) an enemy approaches (the selected attack can also change again in the middle of battle).

                  If you need further explanation for anything, let me know.


                  Originally posted by Helder View Post
                  Already have one made which also fixes checksum and is for the USA rom.
                  Thanks! ^^
                  Last edited by MethidMan; 10-19-2013, 07:56:17 PM.

                  Comment


                  • #39
                    I'm not too familiar with the game. Your magic user that has the awesome fire spell... is that magic spell equipped when you go into battle, and the AI changes it to bare handed? If so, then would you want the AI to always use whatever you had equipped? If that's the case, then I'll need a save state shortly before the AI changes the spell to bare hands.
                    The Code Hut: http://codehut.gshi.org/

                    Comment


                    • #40
                      Now that the melee bug-fix code has been tested, I'll add it to the db...

                      AVRT-LA26
                      Fixes the melee instant death bug. When Wired Reflexes are equipped and you fight bare handed, you can be killed with one punch from an enemy. This code fixes that glitch. Has been tested through the entire game.
                      Last edited by Tony H; 10-20-2013, 09:15:55 AM.
                      The Code Hut: http://codehut.gshi.org/

                      Comment


                      • #41
                        Here's a save state where the AI character on the top slot automatically switches from clawed hands to a blue and white spell (I know, it's a little different from what I was describing before, but I was using that as an example). The screenshots I provided in my previous reply are actually from this save state. A few seconds in the battle, he then switches to the spell that looks like a medkit. If you can find a certain code that causes unwanted switching from the AI, that would be great.

                        In my current playthrough where I'm using this save state, it's only been happening where he switches from melee claw-hands to spells. I haven't seen it happen the other way around, at least not yet (though I have seen one situation where he switched to a gun), but it has happened in other playthroughs. The reason I was using clawed hands is because I was still testing the melee bugfix code at the time to see if it also worked for the AI and I noticed this bug kept happening every time.

                        If there's any more info you need, feel free to ask me to look into it for you.
                        Attached Files

                        Comment


                        • #42
                          Wanted to let you know I haven't forgotten about you. I've looked at your save state and I just need to figure out the RAM address for what's equipped and find out why it's changing. Shouldn't be too hard.
                          The Code Hut: http://codehut.gshi.org/

                          Comment


                          • #43
                            I've been attempting to look for the RAM address myself with the code search feature in Gens Hacking Version and I've come across a few recurring ones such as FFDF89, FFF9EF, FFF9F7 and FFFFCD but I could be barking up the wrong tree... Do any of these addresses have any connection to what we're looking for?

                            Comment


                            • #44
                              An easy way to find the right RAM address is to find the value for each item shown in the little box under the top character, and then search for that value while it's equipped. You're much more familiar with the game, so I'm sure you know what the items are. The 3 items that are shown in your save state are:

                              1) Claws?
                              2) Some type of flame?
                              3) Med kit.

                              I don't know what the first two items are actually called, but I'm sure the last item is the med kit. The value for the med kit is 10 (hex). Use this guide to find the values of the other items: http://www.gamefaqs.com/genesis/3668...run/faqs/23882

                              When the claws are equipped, search for the number from that guide, then when the second item is equipped (flame?), search for that number, and then when the med kit is equipped, search for 10. Just remember that all those numbers will be hex, so make sure Gens is set to search for hex - single byte.
                              Last edited by Tony H; 10-24-2013, 10:56:20 PM.
                              The Code Hut: http://codehut.gshi.org/

                              Comment


                              • #45
                                I think I've found it! I have a strong feeling it's FF0157. The hex value for melee (hands, whether clawed or not) is 00, Mana Zap (the blue and white spell) is 08 and Heal Wounds (which is actually a spell, not to be confused with the medkit item, therefore it's not 10 as you thought it was) is 0C.

                                If this is indeed the right address, then all we have to do is find out what to do with it to correct the problem.

                                Edit: Hmm... Looking at the hex editor, I just found something else out... Apparently the values that are used for the two spells, 08 and 0C are also values for weapons under the same RAM address: 08 is also the value for a gun called the AK-97 SMG while 0C happens to also be the value for the Roomsweeper Shotgun.

                                It looks like there are addresses that also control whether they are spells or weapons (or even melee). We might need to look for these other addresses if that's the case.
                                Last edited by MethidMan; 10-25-2013, 02:59:46 AM.

                                Comment

                                Working...
                                X