Jump to content
NHL'94 Forums

Add "Leave Game" option MID-GAME


Recommended Posts

Only after a game is over can you find "Leave Game" or "Exit Game" in the Pause Menu.

I want that button to be available mid-game too...

I play NHL 94 on my megadrive and I hate when some setting is accidentally wrong and I have to leave the sofa and reboot the megadrive :)

So I thought, maybe the Auto Goalie/Manual Goalie, located at the bottom of the pause menu mid-game, could be change so that instead of it setting Auto from Manual or vice versa, it would just jump to the code right after the game's title screen.

Edited by perkabrod
Link to comment
Share on other sites

Currently trying to find the code for the triggering of Auto Goalie/Manual Goalie

When I've found that, what's the proper way to "link back" to an earlier address?

I read that you can make a link to the end of file where it's just empty space, if you want some additional long code...

I have no experienced what so ever in hex, well except from colors... I occasionally write some bash script for my mac and wrap those scripts into an interface.

But this hex stuff is completely new so I have no idea if there's any tricks, variables and functions or if it's just raw data so to speak...

I'm checking up on the tutorial about how to sniff up the code. Resources are really good on this site, happy to have found it :)

Link to comment
Share on other sites

Yes, you can add extra code at the end of the ROM where it is all empty (all FF FF FF....).

To jump to the location of your new code, you use a JSR (jump to subroutine) instruction. your added code needs to end with an RTS instruction (return from subroutine).

Check the weight bug fix thread for an example, including the hex codes corresponding to JSR and RTS.

Link to comment
Share on other sites

Yes, you can add extra code at the end of the ROM where it is all empty (all FF FF FF....).

To jump to the location of your new code, you use a JSR (jump to subroutine) instruction. your added code needs to end with an RTS instruction (return from subroutine).

Check the weight bug fix thread for an example, including the hex codes corresponding to JSR and RTS.

Thanks!

# 1

Is it easier to have the entire ROM being reset/reboot instead of trying to start from the title screen?

# 2

Didn't get that gg:gggg thing.

If I find the code that applies when you press button while hovering Auto Goalie, do I change that to 4EB9 followed by reboot code (at gg:gggg which I cannot jump to in my hex software) and then 4E75 at the end?

I'm on Mac and I use Hex Fiend. For example 01:3D72 I have to search for 0x13D72 to go to that offset.. so maybe the gg:gggg is a format my software doesn't understand...

Is there some kind of hex reference for routines and stuff?

4E75 is the same number used for the checksum fix. And also in NHL 95, I was able to find the checksum thing and tried subbing that with 4E75 and it started up in emulators even after modding random other numbers... Note, I'm trying to do this to NHL 94 rom, so the NHL 95 I just mentioned was just to say that the 4E75 obviously means something, like "false" or whatever :)

UPDATE:

I don't know how to search for gg:gggg in my software but I found the same line thanks to your explanation of the offset...

However, I suspect I have a different NHL 94.bin rom because the FFFF doesn't start at the same offset. I'm using a ROM from GoodGen V.3 and it works on actual hardware with my Everdrive MD (SD-adapter)

http://djoman.dyndns.org/rom-edit/gggggg.gif

Maybe I should start off with using the correct ROM. However, it has (!) in the filename and I've always thought that is as "official/unmodded" as it gets...

Edited by perkabrod
Link to comment
Share on other sites

It's probably better to return to the main menu. I don't know if resetting the game will work well when playing online.

gg:gggg is just a placeholder name i came up with ... it can mean any address.

the format with the colon is the format the gens debugger uses. yes, just use the numbers in your hex editor, don't write the colon. 01:3D72 is 13d72.

When a fix adds code at the end of the ROM, let "gggggggg" or "gg:gggg" be the

location of the unused code section of the ROM (the "FF" bytes,

so gggggggg is where those FFs start. For example, 00fffac2 for a

28-team ROM and 01E2af2 for a 30-team ROM). The last number should always be

even (0,2,4,6,8,A,C,E).

so, if you go go the end of the ROM and work back through all the FF FF FF....., then gg:gggg is the place where the first FF is. In the original ROM, this is at fffac2 (or maybe ffac2, i might have put an extra f in that address)

I'll look at this a bit more later tonight and answer the other parts of your question.

Link to comment
Share on other sites

Is there some kind of hex reference for routines and stuff?

Not sure what you mean. If you mean.. do we have a list of routine locations.. then we don't :(

4e75 is a "RET". it means, leave this subroutine and go back to where you were, right after the JSR call. So for the checksum fix... normally, the game calculates the checksum, then if it's wrong, it enters an infinite loop, and the game appears to freeze. So when you add a RET in there at the start of the checksum routine, it simply causes it to not do the calculation at all or check the result of the calculation. it just returns thinking everything is ok.

I added an "Assembly Manuals" section to the thread guide.

If I find the code that applies when you press button while hovering Auto Goalie, do I change that to 4EB9 followed by reboot code (at gg:gggg which I cannot jump to in my hex software) and then 4E75 at the end?

Yeah, you've got the idea. You need to find the code that sends the game back to the main menu after a game. That might be accessed with a JSR (4eb9), but now that I think about it... it probably isn't a JSR. It might be a JMP. But if you can find the code, you'll know how it's called, anyway.

However, I suspect I have a different NHL 94.bin rom because the FFFF doesn't start at the same offset. I'm using a ROM from GoodGen V.3 and it works on actual hardware with my Everdrive MD (SD-adapter)

http://djoman.dyndns...edit/gggggg.gif

Sorry, i got it wrong. my ROM was processed by NOSE, which actually removes the checksum routine, causing the 'end' of the ROM to be at ffac2. If you are using the actual original ROM, i guess it's at FFB14, like in your picture. (1047316 in decimal)

(can't believe the mac hex editor shows addresses in decimal.. who's idea was that............can that be changed in the options?)

Link to comment
Share on other sites

Thanks, I'll have a closer look. For some reason my XP won't boot up just tonight... have no idea why, computer just reboots. I have Linux on the same drive and it boots just fine...so it can't be hard drive failure (phew)

Btw, I found a way to change from decimal to hex... with a single click on the column :)

Should I be in little or big endian mode btw?

Link to comment
Share on other sites

Thanks, I'll have a closer look. For some reason my XP won't boot up just tonight... have no idea why, computer just reboots. I have Linux on the same drive and it boots just fine...so it can't be hard drive failure (phew)

Btw, I found a way to change from decimal to hex... with a single click on the column :)

Should I be in little or big endian mode btw?

Ah, that's a pretty good way to switch it : )

The CPU in the genesis is a big-endian CPU.

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, 1 Anonymous, 61 Guests (See full list)

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