McMarkis Posted January 29 Report Share Posted January 29 (edited) Pull CPU Goalie earlier when losing Note: Thanks to @chaos & @smozoma for assisting with some 68K assembly knowledge sharing. Pull CPU Goalie earlier in the 3rd: Want to change how early the CPU pulls its goalie when losing? ROM Offset: (hex)0000F766-0000F767 Change: 00 3C to 00 96 The above change will pull the goalie with 2:30 remaining in the 3rd period. Pull CPU Goalie when losing by 1 goal instead of 2: You can also modify how many goals the CPU is losing by when the goalie gets pulled. **There is currently a bug in GENS where it will only pull the goalie if its equal to this value. See below patch by @smozoma to fix this. ROM Offset: (hex)0000F75F Change: 02 to 01 The above change will pull the goalie when losing by 1 goal instead of 2 goals. Edited January 30 by McMarkis update 2 2 2 2 Quote Link to comment Share on other sites More sharing options...
smozoma Posted January 30 Report Share Posted January 30 (edited) Pull CPU Goalie when losing by 1 to N goals Triple-team job (McMarkis, chaos, and me) on Discord to solve the number of goals bug. I ran a trace in the emulator tonight and I think this should work: ROM Offset: 0000 F758 Change: 6B to 63 (BMI to BLS) ROM Offset: 0000 F760 Change: 66 to 62 (BNE to BHI) ROM Offset: 0000 F75F Change: 02 to 0N Note: N is the max number of goals to pull the goalie on. Example: Set to 03 for the goalie to be pulled when down 1,2, or 3 goals. For how it works, here is the code: ================================================================================ OLD - Only pulls goalie if goal differential is exactly 2. The code is run twice, swapping the teams the second time. -------------------------------------------------------------------------------- 00:F750 30 29 MOVE.W $000C(A1),D0 ; D0 = "Score of one of the teams" 00:F754 90 6A SUB.W $000C(A2),D0 ; D0 = D0 - "Score of the other team" 00:F758 6B 00 BMI #$5D0A [01:5464] ; Abort if D0 < 0 (don't pull goalie) ; Continue if D0 >=0 00:F75C B0 7C CMP.W #$0002,D0 ; Bits = D0 minus 2 00:F760 66 00 BNE #$5D02 [01:5464] ; Abort if D0 != 2 (don't pull goalie) ; Continue if D0 == 2 ================================================================================ ================================================================================ NEW - Pull goalie if goal differential is >0 and <=2. (Still runs twice with the teams swapped) -------------------------------------------------------------------------------- 00:F750 30 29 MOVE.W $000C(A1),D0 ; D0 = "Score of one of the teams" 00:F754 90 6A SUB.W $000C(A2),D0 ; D0 = D0 - "Score of the other team" 00:F758 63 00 BLS #$5D0A [01:5464] ; Abort if D0 <= 0 (don't pull goalie) ; Continue if D0 >0 00:F75C B0 7C CMP.W #$0002,D0 ; Bits = D0 minus 2 00:F760 62 00 BHI #$5D02 [01:5464] ; Abort if D0 > 2 (don't pull goalie) ; Continue if D0 <= 2 ================================================================================ How to read an instruction: 00:F750 30 29 MOVE.W $000C(A1),D0 ; D0 = "Score of one of the teams" ; stuff after a semicolon is a "comment" not code ^^:^^^^ ; address in ROM file ^^ ^^ ; instruction hex code ^^^^^^ ; instruction human-readable name ^^^^^^^^^^^^^ ; instruction parameters ; "D0" is "Data Register 0" (a place to store temporary calulation values) Edited January 30 by chaos Fixed "Old Code" D0 branch 3 1 Quote Link to comment Share on other sites More sharing options...
AdamCatalyst Posted January 30 Report Share Posted January 30 Thank-you so much for getting to this, and sharing it so clearly and concisely! I'm looking forward to playing with it as soon as I'm well enough. Quote Link to comment Share on other sites More sharing options...
von Ozbourne Posted April 1 Report Share Posted April 1 Had to test this out in the other games of course. The numbers are a little different between games so I had to limit my search for instances of "0002 6600", but found that the sequence that @smozoma laid out above held true in all of the games from '92 to '95 in some form of 6B00 xxxx B07C 0002 6600 xxxx 0C78 003C. Tested them all with a few extreme numbers and they all behave as described above [if my tests did mean chaos ensued] No luck with '96-'98 sadly. For anyone interested, here is the complete list of offsets. NHL'92 offset 7AB2 = 6B00 [change to 6300] offset 7AB8 = 0002 [goals at which CPU team pulls goalie] offset 7ABA = 6600 [change to 6200] offset 7AC0 = 003C [seconds remaining in third period at which CPU team pulls goalie - in hex] EA'92 offset 76A4 = 6B00 [change to 6300] offset 76AA = 0002 [goals at which CPU team pulls goalie] offset 76AC = 6600 [change to 6200] offset 76B2 = 003C [seconds remaining in third period at which CPU team pulls goalie - in hex] NHLPA'93 offset C308 = 6B00 [change to 6300] offset C30E = 0002 [goals at which CPU team pulls goalie] offset C310 = 6600 [change to 6200] offset C316 = 003C [seconds remaining in third period at which CPU team pulls goalie - in hex] NHL'94 offset F758 = 6B00 [change to 6300] offset F75E = 0002 [goals at which CPU team pulls goalie] offset F760 = 6600 [change to 6200] offset F766 = 003C [seconds remaining in third period at which CPU team pulls goalie - in hex] NHL'95 offset 83674 = 6B00 [change to 6300] offset 8367A = 0002 [goals at which CPU team pulls goalie] offset 8367C = 6600 [change to 6200] offset 83682 = 003C [seconds remaining in third period at which CPU team pulls goalie - in hex] Eliteserien'95 offset 80BD4 = 6B00 [change to 6300] offset 80BDA = 0002 [goals at which CPU team pulls goalie] offset 80BDC = 6600 [change to 6200] offset 80BC2 = 003C [seconds remaining in third period at which CPU team pulls goalie - in hex] 4 Quote Link to comment Share on other sites More sharing options...
Brodeur30 Posted May 1 Report Share Posted May 1 This is a very interesting mod. Thanks for finding this. I will have to give this a try when I get a chance. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.