Jump to content
NHL'94 Forums

NHL "95 Full Season Bug


Puck Junk

Recommended Posts

I know it happens in the Sega Genesis Version,  not sure on SNES or PC.  To get around it and you don't want to lose games you can "Start season after today"  on the cart.

Pretty Crazy after a quick google search I found people talking about the glitch in 1995

https://groups.google.com/forum/#!topic/rec.games.video.sega/0oZlyfQqiYM

 

Link to comment
Share on other sites

That's funny.

The cause is that a "signed byte" can store numbers from -128 to 127. If you try to add to a number greater than 127, it'll wrap around to -128, -127 etc. If the game displayed 0, I guess they had some code to protect against displaying negative numbers.

I don't know why they didn't use an unsigned byte (0-255)!

  • Thanks 1
  • Like 1
Link to comment
Share on other sites

53 minutes ago, smozoma said:

That's funny.

The cause is that a "signed byte" can store numbers from -128 to 127. If you try to add to a number greater than 127, it'll wrap around to -128, -127 etc. If the game displayed 0, I guess they had some code to protect against displaying negative numbers.

I don't know why they didn't use an unsigned byte (0-255)!

Awesome work.  I think you are the first person outside the EA programmer that messed up to know exactly where the glitch was!!!

Link to comment
Share on other sites

Can't say I actually found the code in the ROM, I can just see what the problem is because it's a common thing to need to deal with in old-school programming :).

Might even be a fixable bug.

  • Like 1
Link to comment
Share on other sites

Can someone do me a favour and make a .srm of a season with a team with 126 or 127 points, and then another .srm with the with the bug symptom?

I'll take a stab at fixing it. Maybe can be used as a way to recruit people for ko94-3 and then the 95 tournament if some social-media-savvy folks can get the fix some publicity.

  • Like 1
Link to comment
Share on other sites

11 hours ago, smozoma said:

Can someone do me a favour and make a .srm of a season with a team with 126 or 127 points, and then another .srm with the with the bug symptom?

I'll take a stab at fixing it. Maybe can be used as a way to recruit people for ko94-3 and then the 95 tournament if some social-media-savvy folks can get the fix some publicity.

I'll mess around with it,  What program should I use? GENS?

Link to comment
Share on other sites

22 hours ago, smozoma said:

I think all the Gens versions make compatible .srm files, but just in case, please use this one, since it's the hacking emulator I'll be using:

 

Going to have to put some work in to recreate bug,  Was hoping to autoskip to April win a few games to recreate bug, but it looks like I will have to do about 20 games at end of season to make it happen.

Fun fact the the actually attributes of player must not mean anything when doing autoskip as I traded a bunch of great players to the Flames and they went .500 and Mike Donnelly lead the league in Goals without Wayne and Luc on the Kings.

Link to comment
Share on other sites

27 minutes ago, segathon said:

 

Fun fact the the actually attributes of player must not mean anything when doing autoskip as I traded a bunch of great players to the Flames and they went .500 and Mike Donnelly lead the league in Goals without Wayne and Luc on the Kings.

NHL Series works just like TSB.  It is literally one byte that determines CPU vs CPU games.

  • Thanks 1
Link to comment
Share on other sites

  • 4 years later...

Some progress made on this bug in this other thread:

https://forum.nhl94.com/index.php?/topic/24584-nhl-23-95-rom/page/2/#comment-195794

I'll add any updates in this thread.

Still waiting on others to test (I can't win 70 games on 95!)

  • Thanks 1
Link to comment
Share on other sites

Any chance to get a RetroArch (Game Genie) code for this mod? The above mentioned patch is in a forked version of NHL 95, which is a bit different. Would love to be able to patch a cheat on the original rom. Thank you everyone for this thread!!!!!

Link to comment
Share on other sites

On 2/23/2023 at 10:16 PM, smozoma said:

Still waiting on others to test (I can't win 70 games on 95!)

Could just do what I do when I'm testing playoffs. Play 2 VS mode, your "opponent" pulls the goalie, oh and 30 second periods so you don't take all day. [although testing 16 games takes long enough, can't imagine 70]

Link to comment
Share on other sites

1 hour ago, von Ozbourne said:

Could just do what I do when I'm testing playoffs. Play 2 VS mode, your "opponent" pulls the goalie, oh and 30 second periods so you don't take all day. [although testing 16 games takes long enough, can't imagine 70]

Good idea -- but I will leave this as an exercise for the players of 95 :)

Someone please get it up to 126 or 127 points and make a new savestate or srm

  • Haha 1
Link to comment
Share on other sites

On 3/1/2023 at 5:25 PM, rezmang said:

Any chance to get a RetroArch (Game Genie) code for this mod? The above mentioned patch is in a forked version of NHL 95, which is a bit different. Would love to be able to patch a cheat on the original rom. Thank you everyone for this thread!!!!!

Here are the changes made. 

All values in hex.

@address| $oldvalue | $newvalue
@0690 | $4E9B | 6004 (added.. checksum skip)
@91844 | $6E | $62
@91848 | $6D | $65
@9185C | $6F | $63 (removed.. not needed)
@9D5AA | $6E | $62
@9D5AE | $6D | $65
@9D5C2 | $6F | $63 (removed.. not needed)

There are websites that can turn them into game genie codes. Here is one, but I don't know what the 'compare' entry means

https://games.technoplaza.net/ggencoder/js/

Link to comment
Share on other sites

1 hour ago, smozoma said:

Good idea -- but I will leave this as an exercise for the players of 95 :)

Someone please get it up to 126 or 127 points and make a new savestate or srm

Tell you what, we can make it a community effort. I played the first two months as Boston, [they were first in line] got them to 23-0-1 with an accidental scoreless tie due to picking a team with few shooters, but that's okay because I liked ties.

A third of the way there. Now if somebody else will tag in for a round, we can get this done.

NHL 95.srm

Link to comment
Share on other sites

On 3/2/2023 at 1:40 AM, von Ozbourne said:

Tell you what, we can make it a community effort. I played the first two months as Boston, [they were first in line] got them to 23-0-1 with an accidental scoreless tie due to picking a team with few shooters, but that's okay because I liked ties.

A third of the way there. Now if somebody else will tag in for a round, we can get this done.

NHL 95.srm 64 kB · 4 downloads

@smozoma @von Ozbourne

Here is the STATE and .srm file for Boston at 126 points with 2 games remaining. 

NHL95.srm 1

  • Love 1
  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
On 3/2/2023 at 1:40 AM, von Ozbourne said:

Tell you what, we can make it a community effort. I played the first two months as Boston, [they were first in line] got them to 23-0-1 with an accidental scoreless tie due to picking a team with few shooters, but that's okay because I liked ties.

A third of the way there. Now if somebody else will tag in for a round, we can get this done.

NHL 95.srm 64 kB · 7 downloads

 

On 3/4/2023 at 9:58 AM, UltraMagnus said:

@smozoma @von Ozbourne

Here is the STATE and .srm file for Boston at 126 points with 2 games remaining. 

NHL95.srm 64 kB · 4 downloads 1 137.12 kB · 4 downloads

Thanks!

I tested this out and Boston stays in 1st place when they have 128 points, and they make the playoffs. The 1st-rounding seeing is correct, they play the 8th-place team in the conference.

However, in the 2nd round they were matched up against the 2nd-place team. Is the 2nd-round re-seeding usually correct? If so, then I need to find the re-seeding code and fix that as well.

Link to comment
Share on other sites

17 minutes ago, smozoma said:

However, in the 2nd round they were matched up against the 2nd-place team. Is the 2nd-round re-seeding usually correct? If so, then I need to find the re-seeding code and fix that as well.

Nah. Unfortunately I've always noticed that, well, all of the games from '92-'98 really, will seed the first round to whatever parameters existed at the time, but then just follow the old format of escaping the Charles Adams, Lester Patrick, Conne Smythe and Chuck Norris divisions to get to the conference finals.

I'm guessing that the programmers didn't even bother with any reseeding code.

  • Thanks 1
Link to comment
Share on other sites

20 hours ago, von Ozbourne said:

Nah. Unfortunately I've always noticed that, well, all of the games from '92-'98 really, will seed the first round to whatever parameters existed at the time, but then just follow the old format of escaping the Charles Adams, Lester Patrick, Conne Smythe and Chuck Norris divisions to get to the conference finals.

I'm guessing that the programmers didn't even bother with any reseeding code.

Thanks! I tested it out juuuust in case, and yeah even if I get the Bruins into the playoffs with 126 points, they play the 2nd seed in the 2nd round.

So I guess I'll put together a ROM with the fix, and an IPS patch. And maybe figure out game genie codes...

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
On 3/2/2023 at 1:19 AM, smozoma said:

Here are the changes made. 

All values in hex.

@address| $oldvalue | $newvalue
@91844 | $6E | $62
@91848 | $6D | $65
@9185C | $6F | $63
@9D5AA | $6E | $62
@9D5AE | $6D | $65
@9D5C2 | $6F | $63
 

There are websites that can turn them into game genie codes. Here is one, but I don't know what the 'compare' entry means

https://games.technoplaza.net/ggencoder/js/

The 6F/63 edits can be omitted. Those instructions are checking games played as a tie-breaker, which has a max value of 84 (less than 128) so aren't bugs. So the corrected fix without those unnecessary edits, plus adding the checksum skip (needed if editing the base ROM that still has the checksum in it):

@address| $oldvalue | $newvalue | note
@0690 | $4E9B | 6004 | checksum skip
@91844 | $6E | $62 | standings display 1/2
@91848 | $6D | $65 | standings display 2/2
@9D5AA | $6E | $62 | playoff seeding 1/2
@9D5AE | $6D | $65 | playoff seeding 2/2

  • Like 1
Link to comment
Share on other sites

Excellent. Is the source or assembly available somewhere for the original NHL 95 rom? I do have experience with this kind of code and wanted to take a peak at what the actual bug is.

I’m about 10 games shy of hitting this bug on the original, so I hope to start testing cheat code patches soon.

Thank you!!!!

Link to comment
Share on other sites

On 3/29/2023 at 5:23 PM, rezmang said:

Excellent. Is the source or assembly available somewhere for the original NHL 95 rom? I do have experience with this kind of code and wanted to take a peak at what the actual bug is.

I’m about 10 games shy of hitting this bug on the original, so I hope to start testing cheat code patches soon.

Thank you!!!!

Hi, there isn't a source code / disassembly available as far as I know. To track down the bug I used the techniques taught in TonyH's "hacking school" post. Some emulators have a "trace" feature built into them that prints out the code line-by-line while it's being run. It also can tell you when a particular RAM or ROM value is read or modified. Together, that allows you to track down where in the code printout something happened. In this case I tracked down where/when the CPU read the number of points the team has and noticed some CPU instructions called BGT and BLT (branch greater than, branch less than). Due to my background in computer engineering, I was aware that some instructions act on numbers in a "signed" way and "unsigned" way. BGT and BLT are "signed" instructions and so consider 8-bit values as ranging from -128 to +127. So if you have over 127 points, it thinks it's a negative number and screws up the sorting. The proper instructions to use are BHI (branch higher) and BCS (branch carry set.. A.K.A. BLO branch lower). Then I used the manual for the CPU to learn the correct hex values for BHI and BCS.

I'm actually putting together a video showing how it was done, hopefully available in a couple weeks.

Here is the original bugged code:

MOVE.L  #$FFFFCB7E,A0    
MOVE.L  #$FFFFCAFA,A1
MOVE.L  #$FFFFCB16,A2    
  BCLR    #6,($BEFE)       
  CLR.W   D7               
    CLR.W   D6               
    MOVE.B  $00(A0,D7),D6    
    MOVE.B  $00(A1,D6),D0    
    MOVE.B  $01(A0,D7),D6    
    CMP.B   $00(A1,D6),D0    
    BGT     #$0030 [09:1876] 
    BLT     #$0016 [09:1860] 
    MOVE.B  $00(A0,D7),D6    
    MOVE.B  $00(A2,D6),D0    
    MOVE.B  $01(A0,D7),D6    
    CMP.B   $00(A2,D6),D0    
    BLE     #$0018 [09:1876] 
    BSET    #6,($BEFE)       
    MOVE.B  $00(A0,D7),D5    
    MOVE.B  $01(A0,D7),D4    
    MOVE.B  D5,$01(A0,D7)    
    MOVE.B  D4,$00(A0,D7)    
    ADDQ.W  #2,D7            
    CMP.W   ($CAF8),D7       
    BGE     #$0006 [09:1884] 
    SUBQ.W  #1,D7            
    BRA     #$AE [09:1832]   
  BTST    #6,($BEFE)       
  BNE     #$9E [09:182A]   
RTS   

(P.S. see next message...)

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, 70 Guests (See full list)

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