Jump to content
NHL'94 Forums

How to have defense ctrl on by default?


Stefan

Recommended Posts

Would that affect that ability to add it to Gens? I know it probably wouldn't, but...

No, for SNES, you'd just be changing the default selection for the defense control (on vs off), exactly like in NOSE when you change the default home or away team or penalties on/off, etc.

Link to comment
Share on other sites

If you can find a game genie code that does this, it should be possible to discover the effect of the code and use that to manually modify the ROM the same way.

How would I go about discovering the effect of the code?

There's the game genie code in this thread: http://forum.nhl94.com/index.php?/topic/13150-snes-nhl94-rom-mapping-project/

There's no hex data recorded to edit... :-(

Link to comment
Share on other sites

Jesus! I was looking at the first one, and there's so much information to learn!

I didn't really understand it. I guess it's not necessary...

It looked like the first one had a program you could download that would say the effects of the code (memory/ROM location and value)

Link to comment
Share on other sites

if y'all figure this out, that would be SWEET!

Link to comment
Share on other sites

Alright, well, those programs don't really work.

So this is the code:

Address 7E1C94 Value 00 = Defense Ctrl Off (Game Genie code = DDFB-F278)

Address 7E1C94 Value 01 = Defense Ctrl On (Game Genie code = DFFB-F278)...

The address is wrong.

The game genie code works...

Someone know how to reverse game genie code to hex?

Link to comment
Share on other sites

Ah, the SNES uses a weird system of memory "banks" that make addresses strange.

http://en.wikibooks.org/wiki/Super_NES_Programming/SNES_memory_map

Unfortunately, the 7E bank is RAM bank, not a ROM bank (those start at 80), so this hack is not applicable to the ROM :(

Sorry, looks like this was a dead-end..

Link to comment
Share on other sites

what follows is an answer from romhacking.net that works quite well.

defense control on whenever L or R is pressed in the game:

at $FCF2F (or $FCD2F), change:

A0 00 00 E0 0C 00 90 03 A0 02 00 B9 94 1C D0 01

to:

A9 00 00 E0 0C 00 B0 01 6B 1A 8D 96 1C 1A 80 04

the asm for this is:

LDA #$0000
CPX #$000C
BCS $01
RTL
INC
STA 1C96
INC
BRA 04

Edited by trudatman
Link to comment
Share on other sites

what follows is an answer from romhacking.net that works quite well.

defense control on whenever L or R is pressed in the game:

at $FCF2F (or $FCD2F), change:

A0 00 00 E0 0C 00 90 03 A0 02 00 B9 94 1C D0 01

to:

A9 00 00 E0 0C 00 B0 01 6B 1A 8D 96 1C 1A 80 04

the asm for this is:

LDA #$0000
CPX #$000C
BCS $01
RTL
INC
STA 1C96
INC
BRA 04

So with that change def control is default on? Or will L and R have function despite defense control being off?

What's the functionality of the edit, and what are its limitations (If any)

Link to comment
Share on other sites

you still see it as off initially, but, as soon as it is attempted in-game, it will work and from then out show as on when paused (and it is then unchangeable). I changed the text from "defense cntrl. /off /on" to "officials are f/air /it" until I can come up with something better.

Link to comment
Share on other sites

you still see it as off initially, but, as soon as it is attempted in-game, it will work and from then out show as on when paused (and it is then unchangeable). I changed the text from "defense cntrl. /off /on" to "officials are f/air /it" until I can come up with something better.

Yeah, this is a funny hack. Instead of doing the obvious thing of just changing the default in the menu so it defaults to being ON, they actually change the code so the L/R buttons always work no matter what setting is used.

Link to comment
Share on other sites

this doesn't seem to work in the playoffs (which makes my new text even more lame). I'd post about this at romhacking.net, but I keep getting an error message.

Table 'smf_sessions' is marked as crashed and should be repaired
Link to comment
Share on other sites

this hack doesn't apply to the playoff modes and it seems to have killed the lower right defenseman, too, as he can no longer be selected with [R].

close to something, but not yet something, as far as I can tell.

Link to comment
Share on other sites

I've yet to test this:

Try this. It's in the same place.

At $fcd2f

A9 01 00 8d 94 1c 8d 96 1c 1a 80 08

to replace

A0 00 00 E0 0C 00 90 03 A0 02 00 B9 

LDA #0001
STA 1C94
STA 1C96
INC
BRA 08

$1c94 is team 2's defense control and $1c96 is team 1's, or maybe vice versa sometimes, not really sure. This way removes the check against #0c and just sets both teams' defense control on.

Edited by trudatman
Link to comment
Share on other sites

Yeah, this is a funny hack. Instead of doing the obvious thing of just changing the default in the menu so it defaults to being ON, they actually change the code so the L/R buttons always work no matter what setting is used.

I just took a look at this, and there is no value in the ROM to set it to ON by default, like with the main game menu (default home team = team number x..). They just set everything to 0000 initially, and to enable defence control you have to actually change the variable to 0001 by changing it in the menu. Boo. And because the defence control is not visible in the menu initially, it doesn't need to read the value when you start the game, so there isn't really a clean hack for this. I think the one above that trudatman just posted should work and will make it so if you go back to the menu, it'll say the defence control is ON. However, you can't turn it off anymore :)

The best way to do this hack would be to use my code injection technique from the weight bug fix, where you cut out some of the original code from when the game is loading (after Ron Barr), replacing it with a jump to some free space at the end of the code section. Then put that code that was cut out at the jump-to location, and also add code to change the values of 7e:1C94 and 7e:1C96

Link to comment
Share on other sites

Viva las forums NHL94! Our hackings is strongest!

This will set the DefCon ON before the game starts, so you can actually turn it off in the menu if you want.

These addresses are for a headerless ROM. If your ROM has a header (which it probably does), add 200 to the addresses, so you get f857c and ffd30.

@F837c (a bit after where the game wipes a bunch of values to 0000 which is what forced defence control to be OFF)

old:

22 B2 C6 9F

JSL 9F:6CB2  # Long Jump to Subroutine

new:

20 30 FB EA

JSR :FB30  # Jump to SubRoutine of our custome code
NOP        # No OPeration (space filler operation)

somewhat funny that in SNES assembly, "EA" means "Do nothing"

@FFB30

old:

FF FF FF ..

(unused section)

new:

22 B2 C6 9F A9 01 00 8D 94 1C 8D 96 1C 60

JSL 9F:6CB2 # do the code we cut out
LDA #0001   # LoaD A=0001
STA 1C94    # STore A (0001) into :1C94
STA 1C96    # STore A (0001) into :1C96
RTS         # ReTurn from this Subroutine

Gotta wait for someone to approve my account on ROMhacking.net before I can post this...

I was sure I already had an account there :/

  • Thanks 1
Link to comment
Share on other sites

Viva las forums NHL94! Our hackings is strongest!

This will set the DefCon ON before the game starts, so you can actually turn it off in the menu if you want.

@F837c (a bit after where the game wipes a bunch of values to 0000 which is what forced defence control to be OFF)

old:

22 B2 C6 9F

JSL 9F:6CB2  # Long Jump to Subroutine

new:

20 30 FB EA

JSR :FB30  # Jump to SubRoutine of our custome code
NOP        # No OPeration (space filler operation)

somewhat funny that in SNES assembly, "EA" means "Do nothing"

@FFB30

old:

FF FF FF ..

(unused section)

new:

22 B2 C6 9F A9 01 00 8D 94 1C 8D 96 1C 60

JSL 9F:6CB2 # do the code we cut out
LDA #0001   # LoaD A=0001
STA 1C94    # STore A (0001) into :1C94
STA 1C96    # STore A (0001) into :1C96
RTS         # ReTurn from this Subroutine

Gotta wait for someone to approve my account on ROMhacking.net before I can post this...

I was sure I already had an account there :/

So what exactly do I do

Link to comment
Share on other sites

So what exactly do I do

same as before, replace the 'old' code with the 'new' code at(@) the locations listed (F837c and FFB30)

so open up the ROM in a hex editor,

go to F837c and replace "22 B2 C6 9F" with "20 30 FB EA"

go to FFB30 and replace "FF FF FF ......" with "22 B2 C6 9F A9 01 00 8D 94 1C 8D 96 1C 60"

Link to comment
Share on other sites

22 B2 C6 9F can't be found at that location. Are you giving me the wrong offset, or are you telling me the wrong text?

F857C is where it's located. Should I edit it there??

Hope so.

Do we have the same rom?

FFB30 isn't "FF FF FF"

thats FFD30

Edited by Stefan
  • Like 1
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.

×
×
  • Create New...