smozoma Posted May 28, 2018 Report Share Posted May 28, 2018 (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. 1 Quote Link to comment Share on other sites More sharing options...
Sean Posted May 29, 2018 Report Share Posted May 29, 2018 (edited) 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 May 29, 2018 by seamor 1 1 Quote Link to comment Share on other sites More sharing options...
smozoma Posted May 29, 2018 Author Report Share Posted May 29, 2018 [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 Quote Link to comment Share on other sites More sharing options...
Boston Boy Posted June 2, 2018 Report Share Posted June 2, 2018 lol I just asked this same thing like 10 min ago. Quote Link to comment Share on other sites More sharing options...
Sean Posted June 3, 2018 Report Share Posted June 3, 2018 I'll try to make some more progress on this in the coming days. Some stuff came up for I didn't do much over the past week. Quote Link to comment Share on other sites More sharing options...
Boston Boy Posted June 4, 2018 Report Share Posted June 4, 2018 I am having so much trouble with searching RAM Quote Link to comment Share on other sites More sharing options...
smozoma Posted June 5, 2018 Author Report Share Posted June 5, 2018 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? 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.