Genesis Plus offset & Changing the Human Controlled Team


Recommended Posts

Hey All!  Long time listener, first time caller, so-to-speak.

First of all, thank for this amazing site/forum/community.  The sheer amount of resources and information that's been discovered, shared, and organized is incredible.

With so much already being done, it's almost like there's no opportunity to give back.  I've recently got back into retro gaming and have been playing NHL '94 on RetroArch (luckily before they got hacked, though it seems they're back up now).  Since they don't have a Gens core, I've been playing with Genesis Plus GX.  I couldn't find reference on here, but the offset difference in the save files is 9,321 earlier hexes.  That is, Genesis Plus = Gens - 9321.  Also, every other hex is flipped - the endian thing.  Forgive me, I'm new to rom hacking/hex editors.  I tried to flip them with Hex Workshop but couldn't get it to change.

Therefore, I've been using (learning) python to parse through the hexes and take the save state files to save the stats in a MySQL database for my own personal replay of a season (yes, that's just over 1,000 regular season games...but hey, it's quarantine).

All has been going great (again, thanks to the incredible resources on here).  I'm happy to share any of my work, but I think most people here use Gens and already have extractor options.  However, while there have been a few threads that I could find about difficulty, it would seem that there's no great solution.  I've been playing as the visiting team to perhaps give them more victories, but now the home team barely wins.  Not that I'm amazing at the game, but the AI isn't a great scorer.

Anyway, I've been considering options to counter this - maybe play as the team with the worse record or switching sides during the game.  For the latter, you can edit hex 0000C338 (offset 49976) in Genesis Plus (probably 0000E7A1, 59297 in Gens, but with Endian it might be one off) to change the human-controlled team.  I didn't see mention of this anywhere I could find, so please forgive me if this is already known.  The hex is 01 for home and 02 for the visiting team.  Note that when you change it and reload the save, the game needs a sec to "catch-up."  That is, when I first tried it mid-game, the player I was controlling stayed the same until the new team takes control of the puck.

Of course, the first time I tried this was after a 2nd period lead of 3 and then the cpu outscored me 2-0 in the 3rd lol.

Again, this isn't a difficulty solution, but more of playing against yourself.  For my league replay, it'll probably be a decent solution for me since I'll only be vested in one team's success...^_^

I hope this is somewhat helpful (and posted in the right place).  I'm very grateful for all the assistance this forum has given to me!

  • Thanks 1
Link to post
Share on other sites
3 hours ago, Cackenballz said:

Hey All!  Long time listener, first time caller, so-to-speak.

First of all, thank for this amazing site/forum/community.  The sheer amount of resources and information that's been discovered, shared, and organized is incredible.

With so much already being done, it's almost like there's no opportunity to give back.  I've recently got back into retro gaming and have been playing NHL '94 on RetroArch (luckily before they got hacked, though it seems they're back up now).  Since they don't have a Gens core, I've been playing with Genesis Plus GX.  I couldn't find reference on here, but the offset difference in the save files is 9,321 earlier hexes.  That is, Genesis Plus = Gens - 9321.  Also, every other hex is flipped - the endian thing.  Forgive me, I'm new to rom hacking/hex editors.  I tried to flip them with Hex Workshop but couldn't get it to change.

Therefore, I've been using (learning) python to parse through the hexes and take the save state files to save the stats in a MySQL database for my own personal replay of a season (yes, that's just over 1,000 regular season games...but hey, it's quarantine).

All has been going great (again, thanks to the incredible resources on here).  I'm happy to share any of my work, but I think most people here use Gens and already have extractor options.  However, while there have been a few threads that I could find about difficulty, it would seem that there's no great solution.  I've been playing as the visiting team to perhaps give them more victories, but now the home team barely wins.  Not that I'm amazing at the game, but the AI isn't a great scorer.

Anyway, I've been considering options to counter this - maybe play as the team with the worse record or switching sides during the game.  For the latter, you can edit hex 0000C338 (offset 49976) in Genesis Plus (probably 0000E7A1, 59297 in Gens, but with Endian it might be one off) to change the human-controlled team.  I didn't see mention of this anywhere I could find, so please forgive me if this is already known.  The hex is 01 for home and 02 for the visiting team.  Note that when you change it and reload the save, the game needs a sec to "catch-up."  That is, when I first tried it mid-game, the player I was controlling stayed the same until the new team takes control of the puck.

Of course, the first time I tried this was after a 2nd period lead of 3 and then the cpu outscored me 2-0 in the 3rd lol.

Again, this isn't a difficulty solution, but more of playing against yourself.  For my league replay, it'll probably be a decent solution for me since I'll only be vested in one team's success...^_^

I hope this is somewhat helpful (and posted in the right place).  I'm very grateful for all the assistance this forum has given to me!

This has my attention.

Can you please describe exactly how you accomplish this.

I do not follow what you wrote but would love to be able to switch teams.

Are you altering the rom or the emulator?

Link to post
Share on other sites
10 hours ago, Cackenballz said:

Hey All!  Long time listener, first time caller, so-to-speak.

First of all, thank for this amazing site/forum/community.  The sheer amount of resources and information that's been discovered, shared, and organized is incredible.

With so much already being done, it's almost like there's no opportunity to give back.  I've recently got back into retro gaming and have been playing NHL '94 on RetroArch (luckily before they got hacked, though it seems they're back up now).  Since they don't have a Gens core, I've been playing with Genesis Plus GX.  I couldn't find reference on here, but the offset difference in the save files is 9,321 earlier hexes.  That is, Genesis Plus = Gens - 9321.  Also, every other hex is flipped - the endian thing.  Forgive me, I'm new to rom hacking/hex editors.  I tried to flip them with Hex Workshop but couldn't get it to change.

Therefore, I've been using (learning) python to parse through the hexes and take the save state files to save the stats in a MySQL database for my own personal replay of a season (yes, that's just over 1,000 regular season games...but hey, it's quarantine).

All has been going great (again, thanks to the incredible resources on here).  I'm happy to share any of my work, but I think most people here use Gens and already have extractor options.  However, while there have been a few threads that I could find about difficulty, it would seem that there's no great solution.  I've been playing as the visiting team to perhaps give them more victories, but now the home team barely wins.  Not that I'm amazing at the game, but the AI isn't a great scorer.

Anyway, I've been considering options to counter this - maybe play as the team with the worse record or switching sides during the game.  For the latter, you can edit hex 0000C338 (offset 49976) in Genesis Plus (probably 0000E7A1, 59297 in Gens, but with Endian it might be one off) to change the human-controlled team.  I didn't see mention of this anywhere I could find, so please forgive me if this is already known.  The hex is 01 for home and 02 for the visiting team.  Note that when you change it and reload the save, the game needs a sec to "catch-up."  That is, when I first tried it mid-game, the player I was controlling stayed the same until the new team takes control of the puck.

Of course, the first time I tried this was after a 2nd period lead of 3 and then the cpu outscored me 2-0 in the 3rd lol.

Again, this isn't a difficulty solution, but more of playing against yourself.  For my league replay, it'll probably be a decent solution for me since I'll only be vested in one team's success...^_^

I hope this is somewhat helpful (and posted in the right place).  I'm very grateful for all the assistance this forum has given to me!

FYI :

GPGX OFFSET: 9320. But, every 2 bytes are swapped. So, subtract 9320, then subtract 1. Not in cases where the data is 2 bytes, the first is LSB (Least Significant Bit), second is MSB (Most Significant Bit), and in that case, no need to subtract 1.

Player Data is listed as player offset: 01 00 03 02 05 04 ...

 

I also have written a stat extractor in Python. You can look at that if you'd like to write your own code. Below is the link. It's an old version though. I also attached here the source code for the version that works with RA save states. I haven't added it to that post yet because I wanted to add batch save states functionality to it. Also, I don't think the SNES side works yet either. If you have any questions, let me know.

Code - Stat Extractor v05.zip

 

  • Thanks 1
Link to post
Share on other sites
6 hours ago, CoachMac said:

This has my attention.

Can you please describe exactly how you accomplish this.

I do not follow what you wrote but would love to be able to switch teams.

Are you altering the rom or the emulator?

@CoachMac I think he edits the save state, then loads it again.

Link to post
Share on other sites

Thanks @chaos!!  Thanks for the reference - now I can double-check to see if I did it right!  I ultimately am importing the data into a MySQL database that I have tried to keep efficient and normalized.  I also added in the +/- from smozoma's hack which takes a little parsing to add back to the rest of the player stats.  The batch version sounds cool, too!

13 hours ago, chaos said:

@CoachMac I think he edits the save state, then loads it again.

Yes, sorry I wasn't clear, @CoachMac.  Basically, I have a local web interface where there's a button that allows me to switch sides by editing the save state.  So the full process is:

  1. save the state (F2 in RetroArch)
  2. click the button that runs the python to edit the state file
  3. load the state (F4 in RetroArch)

So it's super-quick.  After loading your binary in python, just need to run

playeroffset = 49976
hex[playeroffset] = hex(2 - (int(hex[playeroffset],16) - 1))

and save it.

Edited by Cackenballz
Link to post
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, 15 Guests (See full list)

    There are no registered users currently online