Jump to content
NHL'94 Forums

[HelpMeHack] Make All Penalties into Penalty Shots


smozoma

Recommended Posts

(will clean this up later)

 

[9:53 AM] seamor: Alright so I was using your ROM Hacking school guide, and I have one quick question. Should I be playing games and creating penalty shot situations (using 1on1 I'd assume), and looking for a common RAM offset after each penalty is drawn?

[12:36 PM] smozoma: it's going to be tricky. you'll need to do various traces, and it could take several iterations before the code can be narrowed down.

[12:40 PM] smozoma: one thing that will be useful will be to look in NOSE and find the offsets related to the penalties... and you'll want to add those to the RAM hook, so that you can look through the code trace and see where the game reads the penalty info. So maybe you'd add the time for the hooking penalty, start up a game, start the RAM and code tracing, and then go around and hook everyone until a penalty is called, then turn off the traces. Then you'll have the code trace for calling a normal penalty, and when it reads the time for the penalty. So then you know that the decision it makes to call a penalty but not a penalty shot is... somewhere before that...

[12:48 PM] seamor: Thank you

[12:51 PM] smozoma: I'd start with something simple: Figure out the flag in RAM that indicates that there is currently a breakaway. To do this, you'd use the RAM Search feature of the emulator. * Use a 1v1 ROM and play a 2 player game (so the other team just sits there and does nothing). * start a game and get to the gameplay. * turn on the RAM search and click whatever the 'reset' or 'clear' button is, then select the option for looking for values that are equal, and skate around a bit and press 'search' a bunch of times to clear a lot of the incorrect RAM addresses. * then cross the blue line for a breakaway. * in the RAM Search, change to search for not-equal values. * click Search just once. Hopefully it really narrows down to very few values.

[12:52 PM] smozoma: then you'd be able to use the RAM hook log to establish a point in the code that happens before it makes the penalty decision.

  • Thanks 1
Link to comment
Share on other sites

ABBREVIATED VERSION OF HOOK LOG OF RAM ADDRESS "FFC2F6" - Presumably the RAM address where breakaway data is stored

MEMORY ACCESS LOGGING STARTED

[00:E6F8] W08 = 00 [FFC2F6] (puck in my defensive zone, moving towards opposing blue line)

---------------------------------------------------------------
[0F:6F20] W08 = 80 [FFC2F6]  (immediate switch to this pattern of segments of 3 giving off the following sequence not every other)
[00:DDC8] W08 = 84 [FFC2F6]
[00:E6F8] W08 = 80 [FFC2F6]

---------------------------------------------------------------
[00:E6F8] W08 = 80 [FFC2F6] (not sure what caused the switch to all 80s, I think it might have been after shooting, but before opposing team got possession)
[00:E6F8] W08 = 80 [FFC2F6]
[00:C278] W08 = 80 [FFC2F6] (look at these two rom addresses, unlike any other in the whole sequence)
[00:C522] W08 = 80 [FFC2F6] (all 80s with these 3 rom addresses until the last two)

---------------------------------------------------------------
[00:E6F8] W08 = 80 [FFC2F6]
[00:E6F8] W08 = 80 [FFC2F6]
[00:E6F8] W08 = 80 [FFC2F6]

---------------------------------------------------------------
[00:E6F8] W08 = 00 [FFC2F6] (after breakaway "ends")
[01:2C16] W08 = 00 [FFC2F6]

MEMORY ACCESS LOGGING STOPPED

COMPLETE VERSION: breakaway flag.txt

Edited by seamor
  • Thanks 1
  • Like 1
Link to comment
Share on other sites

[12:38 AM] smozoma: Next step is going to be finding the moment in the code when the check happens. So you'll put a guy on a breakaway then use the other guy to check him and incur a penalty. In the RAM trace you should see a Read of that memory location instead of a write (W08 is a write of 8 bits, I think you'll see R08 probably), as it verifies if there is a breakaway or not. : Make sure you do a code trace as well at the same time

Link to comment
Share on other sites

2 hours ago, Boston Boy said:

I am having so much trouble with searching RAM

Need more info

Did you do the tutorial, with the clock? http://forum.nhl94.com/index.php?/topic/3474-reference-nhl-94-rom-hacking-school/

What did you try, what did you expect, and what did you get instead?

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Who's Online   0 Members, 0 Anonymous, 79 Guests (See full list)

    • There are no registered users currently online
×
×
  • Create New...