Jump to content
NHL'94 Forums

smozoma

Admin
  • Posts

    8,335
  • Joined

  • Last visited

  • Days Won

    176

Posts posted by smozoma

  1. On 3/31/2023 at 8:41 AM, rezmang said:

    Nah, I’m not that cool :]

    Using RetroArch via https://github.com/eduardofilo/RG350_adam_image/blob/master/README.md

    But I can provide you before and after screenshots if that helps.

    I did want to investigate if it’s possible to simplify the patch to a single code, but not sure if that’s realistic. Signed integer overflow is a pretty common bug, especially in the 8/16 bit world. My hope was there might be an earlier summing function we could tweak or this was the result of a bad masked 16bit conversion. I still need to sit down and stare at the assembly for a while, but it does seem like you have a pretty good handle on this. So thank you for your hard work and diligence on this. Making a video on this is a great idea!!!

    I took a look at switching to 16-bit comparison, but it won't work because the data structure where it stores each teams points is adjacent 8-bit values. So using the 16-bit comparison would mix together the points of 2 teams. So the 5 codes from this message is the best that can be done. But the thing is, you don't need to enter the codes every time you play, so it's not a huge inconvenience to have 5 codes. You only really need to enter the codes before starting the playoffs so that it sets the matchups correctly.

    • Thanks 1
  2. [reserving a post for details of how the fix works]

    See the video for an explanation.

    Here are the changes to make in a hex editor (make the same changes in two different places)

    ROM Offset:  0009 1844
           and:  0009 D5AA
    Old values:  6E 
    New values:  62
    Explanation: Change BGT (Branch Signed Greater-Than ) to BHI (Branch Unsigned Higher)
      
    ROM Offset:  0009 1848
           and:  0009 D5AE
    Old values:  6D
    New values:  65
    Explanation: Change BLT (Branch Signed Less-Than) to BCS (Branch Unsigned Carry Set (AKA BLO, Lower))
      

     

  3. I have fixed the playoffs bug in NHL95. You can get a fixed version of the game here.

    If you don't know what this is about: There was a game-breaking bug in NHL95 that made it so you missed the playoffs if you got 128 or more points in the regular season. (See some discussion about that in this other thread)

    I made a short video covering the fix

    nhl95fixstandings.png

    The short story of the bug is that the programmer accidentally used some CPU instructions that only work for numbers up to 127. I switched them to use the instructions that work for numbers up to 255. 

    If you have a season you've already started (but haven't started the playoffs yet), the fix will work for it (you don't need to start a new season)

    There are 3 different ways to get the fix here. You just need 1. I recommend getting the fixed ROM.

    Option 1 - Download Fixed ROM

    Here is the fixed ROM (complete game file). You can play this file in any emulator software, or on original hardware with an EverDrive cartridge:

    NHL95-PlayoffsFix.bin

    Option 2 - IPS Patch

    Here is an IPS patch for if you want to update the ROM yourself:

    NHL95-PlayoffsFix.ips

    Option 3 - Game Genie Codes

    And if you want to use the fix on an original cartridge on an original Sega Genesis, here are the Game Genie codes to use:

    MUST DO before beginning playoffs:

    • ATDA-AA6T - Disable Checksum (if you don't do this one, other codes will cause game to refuse to load)
    • ADLT-WE7L - Playoffs Fix 1/2
    • ADLT-WL7R - Playoffs Fix 2/2

    OPTIONAL:

    • AANA-WE4E - Standings Fix 1/2
    • AANA-WL4J - Standings Fix 2/2

    I verified these in an emulator, so I am just assuming they work on real hardware. You only really need to enter the first 3 codes once you finish the regular season, but before selecting the "Move on to playoffs" option. The last 2 codes just fix the standings display, so you would use those ones during the regular season to see yourself at the top of the standings -- but they aren't needed for the playoff seeding.

    If I made a mistake in the game genie codes and it doesn't work, I'm sorry. I will test it out when I can. Game Genie is in the mail.

    • Thanks 9
  4. 4 hours ago, rezmang said:

    Nah, I’m not that cool :]

    Using RetroArch via https://github.com/eduardofilo/RG350_adam_image/blob/master/README.md

    But I can provide you before and after screenshots if that helps.

    I did want to investigate if it’s possible to simplify the patch to a single code, but not sure if that’s realistic. Signed integer overflow is a pretty common bug, especially in the 8/16 bit world. My hope was there might be an earlier summing function we could tweak or this was the result of a bad masked 16bit conversion. I still need to sit down and stare at the assembly for a while, but it does seem like you have a pretty good handle on this. So thank you for your hard work and diligence on this. Making a video on this is a great idea!!!

     

    Ah that's good thinking. I'll see what happens if I change the CMP.B to CMP.W (16-bit comparison instead of 8-bit). The extra bits in the D7 register are all 1s so are negative, but I think it might work anyway. That'll bring it down to 3 game genie codes (or just 2 if you can enter them after the game starts, bypassing the need for the checksum skip code).

    Problem is... the part of the CMP that uses the address and register ($A1,D6), the extra bits accessed in that address might have something else in them, which won't sort properly. So I'll have to test it out to see what happens, because I don't know what else is in that memory. If it's something like Ties, then it won't work.

  5. 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!!!!

    Are you doing this on original hardware with a game genie? It would be cool if you took a video of it working, and you making the playoffs with 128+points on a real system! You'll be the first person in history to get around the bug! I'm putting together a video for this, and being able to include someone showing it working would be cool to have in it.

  6. 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...)

  7. 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
  8. On 2/25/2023 at 5:05 PM, Drezz said:

    So further to @Asher413 original findings and @smozoma handiwork with the python script and video, I did some additional sleuthing and came up with a few things on my own by poking around.

    In the image below, you see the start block of the NHL94 Theme (4507A) and in the highlighted area seems to be the initial "control" for the song output.

    00 C0 0B 01: where,

    C0 = channel
    0B = "instrument"

    image.png

    [clipped...]

     

    It turns out you can put these control bytes into the organ songs to change the instruments. Grab the first ~1000 bytes of the main NHL'94 theme song and overwrite a team's main organ song, and it'll play the main theme with the right instruments.

    However once in a while some notes get dropped, probably because the channel is being used for certain in-game sounds like bodychecks or the crowd cheering...

    • Wow 1
  9. One quick tip for trading players is to open 2 instances of NOSE. You can copy players in instance 2 and paste into instance 1. When you're done, close instance 2 without saving, then close instance 1 and save it.

    Lines can be done in a hex editor , pasting data from a spreadsheet. Check out my NHL93 64-team hack and excel sheet. You'd still have to do each team individually (if changed), but it's easier than doing it in NOSE (https://forum.nhl94.com/index.php?/topic/11734-nhlpa-hockey-93-64-team-rom-snes/)

     

    • Love 1
    • Like 2
  10. 6 minutes ago, AdamCatalyst said:

    I'm constantly trying to figure out how to make this work more maintainable for myself, as it so quickly gets out of hand. I've made some minor progress on this, but not nearly enough. I might start a thread to see if folks wanted to share their tips and tricks as to how they keep efficient. I hear your pain, and can only imagine the time and energy you have sunk into this.

    What are some of the worst pain points in keeping ROMs up to date?

  11. 4 minutes ago, Jeff201 said:

    Hi, thanks for getting back to me... no.  since was useing  openemu on my. Macbook pro. ... ime having a hard time getting set up and trying to understand  Retroarch.. JEFF

    Is there a particular bit you're stuck on that we can help with?

    Although, if you're happy with openemu, it's fine to keep using that instead! We distribute RetroArch because it's what we use to play against each other online, but if you don't intend to play online then there's no reason to switch.

    As for your original problem, the blackhawks being missing... Can you tell me which version of the game you downloaded? Not all versions on here have the Hawks (for example, if there is a draft league that doesn't have the hawks but has other teams like the Colorado Rockies instead...)

  12. 37 minutes ago, njwac said:

    Thanks for the replies.

    I have the original EA Hockey (MegaDrive version) in pristine condition and the updated 94 version would have sat nicely next to this on my display cabinet. I have seen a title Tanglewood that got a physical release. Could you not approach EA for the rights? I am sure it would sell loads! It is an awesome what you have done and created with the game.

    I am still seeking a mint copy of the original 94 version but to no avail.

    Cheers, Nick.

    The idea of making physical copies has come up many times over the years, but no one has ever shown that they went ahead with it, or reported that they found a good supplier for making customs. We have seen the occasional hardcopy pop up on ebay or in retro game stores, but we don't know who made them.

    Having hardcopy updates to display with our collections would be cool, but once money gets involved, things get complicated :). Also EA is still selling NHL'94-based works, such as the "NHL'94 Rewind" update that's available on the XBox and Playstation stores, so we would be in competition with them, which their lawyers would love I'm sure, hehe. So personally I'm a lot more comfortable sticking to sharing the updates for free on this website. Getting money involved might also create tension between the different ROM creators on here who might become hesitant to share their techniques and discoveries.

     

    • Like 1
  13. On 3/10/2023 at 2:24 PM, Jeff201 said:

    Hi, thanks for responding ... I downloaded from the websight the Retroarch but it so frustrating to try and get started... Ime so use to.   openemu were you just take the rom and drop it in openemu and your all set..   JEFF

    Hi Jeff, were you able to sort this out? Is there a particular problem you're running into?

  14. 1 hour ago, Drezz said:

    I'm confused. It doesn't really disable it though, right? Yours just skips it, where the other version physically nops it out.

    Does it still cause problems if you try to modify anything? 

     

    It disables it from being run. The reason I came up with it is for game genie codes, because (as far as I know anyway) if you were to add a game genie code to NHL95 before starting the game, it would trigger a failed checksum. With this change, you can disable the checksum with a single game genie code.

    Added the game genie code now in my previous comment... I didn't expect this to get any attention before I could test it out :)

    It shouldn't cause any problems. It basically does the same thing as the NOP version, gets the CPU to the instruction immediately after the original "JSR $001A72C0" instruction without executing the code at $001A72C0. 6004 is BRA #$04, it just moves the CPU ahead 4 bytes (rather than NOPping those 4 bytes)

    • Like 1
  15. Just want to add a new way to disable the checksum using only 2 bytes (so it's easier to turn into a game genie code...)

    at offset 0690, change the value 4E9B to 6004

    This tells the CPU to skip to the next instruction 4 bytes away, which continues loading the game.

    Or as a game genie code:

    ATDA-AA6T

    • Thanks 1
×
×
  • Create New...