Jump to content
Sign in to follow this  
jstout

SNES (TSB I) Improved Grappling Code

Recommended Posts

As requested, I took a look at the SNES version and ported my NES code over. The following is the same as the NES version posted and any of the other grappling methods (mine, Buck, Bruddog, etc) could be ported using the equivalent values (let me know if you would like the other codes options listed).

I would appreciate if any of the SNES guys could try this out and let me know that everything worked as expected. I anticipate no problems as the SNES code was almost exact.

TSB I rom with no header:

At x18D83:
20 10 D0 JSR $D010 ; MAN VS CPU GRAPPLING
EA NOP
D1 03 CMP ($03),Y

At x18DC3:
20 37 D0 JSR $D037 ; MAN VS MAN GRAPPLING
EA NOP
D1 63 CMP ($63),Y

At x1D010:
MAN VS CPU GRAPPLING:
A0 1C LDY #$1C
B1 63 LDA ($63),Y ; LOAD PLAYER HP
4A LSR
4A LSR
4A LSR
C8 INY
18 CLC
71 63 ADC ($63),Y ; HP/8 + Presses
91 63 STA ($63),Y
20 0E C4 JSR $C40E ; LOAD CPU PLAYER
A0 1C LDY #$1C
B1 03 LDA ($03),Y ; LOAD CPU HP
4A LSR
4A LSR
4A LSR
C8 INY
91 03 STA ($03),Y ; HP/8
AD 02 02 LDA $0202 ; RANDOM NUMBER
29 0F AND #$0F ; Make Random x0-F
18 CLC
71 03 ADC ($03),Y ; HP/8 + RANDOM
91 03 STA ($03),Y
; RETURN TO NORMAL
B1 63 LDA ($63),Y
60 RTS
MAN VS MAN GRAPPLING:
A0 1C LDY #$1C
B1 63 LDA ($63),Y ; LOAD OFFENSE HP
4A LSR
4A LSR
4A LSR
C8 INY
18 CLC
71 63 ADC ($63),Y ; HP/8 + Presses
91 63 STA ($63),Y
AD 02 02 LDA $0202 ; RANDOM NUMBER
29 03 AND #$03 ; Make Random x0-3
18 CLC
71 63 ADC ($63),Y ; HP/8 + Presses + RANDOM
91 63 STA ($63),Y
A0 1C LDY #$1C
B1 03 LDA ($03),Y ; LOAD DEFENSE HP
4A LSR
4A LSR
4A LSR
C8 INY
18 CLC
71 03 ADC ($03),Y ; HP/8 + Presses
91 03 STA ($03),Y
AD 00 02 LDA $0200 ; RANDOM NUMBER
29 03 AND #$03 ; Make Random x0-3
18 CLC
71 03 ADC ($03),Y ; HP/8 + Presses + RANDOM
91 03 STA ($03),Y
; RETURN TO NORMAL
B1 03 LDA ($03),Y
60 RTS

At x18DAC:
4C 68 D0 JMP $D068 ; MAN VS MAN POPCORNING

At x1D068:
MAN VS MAN POPCORNING:
20 0E C4 JSR $C40E ; MAY NOT BE NEEDED
A0 1C LDY #$1C
B1 63 LDA ($63),Y ; LOAD OFFENSE HP
38 SEC
F1 03 SBC ($03),Y ; OFFENSE HP - DEFENSE HP
90 07 BCC :+
; IF OFFENSE HP > DEFENSE HP
C9 20 CMP #$20
B0 0D BCS :+++
4C 7F D0 JMP :++ ; OFFENSE HP < POPCORN so to Grapple
; IF DEFENSE HP > OFFENSE HP
: C9 E2 CMP #$E2
90 09 BCC :+++
; NORMAL GRAPPLE
: 20 B0 C3 JSR $C3B0
4C B1 8D JMP $8DB1
; OFFENSE POPCORNS
: 4C CB 8D JMP $8DCB
; DEFENSE POPCORNS
: 4C D8 8D JMP $8DD8

Share this post


Link to post
Share on other sites

I'm very much an amateur at this sort of stuff, but I plugged all those hex values into the SNES TSB1 rom and did a little preseason testing with Colts and Bucs. I could not tackle a computer controlled Reggie Cobb (88HP) with Dwayne Bickett (44HP).

Also, very rarely, but on occasion on the original SNES rom there are times where a dive tackle goes to a cut scene and the runner breaks out of it. Rare, but I've seen it happen a couple of times. Any idea how that part might be affected?

Share this post


Link to post
Share on other sites

I told jstout via IM, probably should have posted here too...was able to verify this works. Pretty sweet, if for nothing more than documenting it knowing it can be done. Now, if only someone could find the spot to turn preseason injuries on in SNES, that's a hack I'm really looking for...

Share this post


Link to post
Share on other sites

Requested by TecmoTurd and bgboud2. HP = 0-7, no random presses, and CPU is set to always 7 presses.

At x18D83:
20 10 D0 JSR $D010 ; MAN VS CPU GRAPPLING
EA NOP
D1 03 CMP ($03),Y

At x18DC3:
20 34 D0 JSR $D034 ; MAN VS MAN GRAPPLING
EA NOP
D1 63 CMP ($63),Y

At x1D010:
MAN VS CPU GRAPPLING:
A0 1C LDY #$1C
B1 63 LDA ($63),Y ; LOAD PLAYER HP
4A LSR
4A LSR
4A LSR
C8 INY
18 CLC
71 63 ADC ($63),Y ; HP/8 + Presses
91 63 STA ($63),Y
20 0E C4 JSR $C40E ; LOAD CPU PLAYER
A0 1C LDY #$1C
B1 03 LDA ($03),Y ; LOAD CPU HP
4A LSR
4A LSR
4A LSR
C8 INY
91 03 STA ($03),Y ; HP/8
A9 07 LDA #$07 ; SET CPU PRESSES
18 CLC
71 03 ADC ($03),Y ; HP/8 + Presses
91 03 STA ($03),Y
; RETURN TO NORMAL
B1 63 LDA ($63),Y
60 RTS
MAN VS MAN GRAPPLING:
A0 1C LDY #$1C
B1 63 LDA ($63),Y ; LOAD OFFENSE HP
4A LSR
4A LSR
4A LSR
C8 INY
18 CLC
71 63 ADC ($63),Y ; HP/8 + Presses
91 63 STA ($63),Y
A0 1C LDY #$1C
B1 03 LDA ($03),Y ; LOAD DEFENSE HP
4A LSR
4A LSR
4A LSR
C8 INY
18 CLC
71 03 ADC ($03),Y ; HP/8 + Presses
91 03 STA ($03),Y
; RETURN TO NORMAL
B1 03 LDA ($03),Y
60 RTS

At x18DAC:
4C 68 D0 JMP $D068 ; MAN VS MAN POPCORNING

At x1D068:
MAN VS MAN POPCORNING:
20 0E C4 JSR $C40E ; MAY NOT BE NEEDED
A0 1C LDY #$1C
B1 63 LDA ($63),Y ; LOAD OFFENSE HP
38 SEC
F1 03 SBC ($03),Y ; OFFENSE HP - DEFENSE HP
90 07 BCC :+
; IF OFFENSE HP > DEFENSE HP
C9 20 CMP #$20
B0 0D BCS :+++
4C 7F D0 JMP :++ ; OFFENSE HP < POPCORN so to Grapple
; IF DEFENSE HP > OFFENSE HP
: C9 E2 CMP #$E2
90 09 BCC :+++
; NORMAL GRAPPLE
: 20 B0 C3 JSR $C3B0
4C B1 8D JMP $8DB1
; OFFENSE POPCORNS
: 4C CB 8D JMP $8DCB
; DEFENSE POPCORNS
: 4C D8 8D JMP $8DD8

Share this post


Link to post
Share on other sites

I have a question for o-line grappling. They have to be 25 apart to popcorn, and if they are they rush in every play (unless they do the both fall down thing). I'd like to see it where there is a % chance that increases being thrown depending on the hp difference. Maybe a 10% chance for each stage of hp advantage. Like a 56 would popcorn the 50 10%, but a 75 would pop a 50 40% of the time. This would make lineman ratings mean something, instead of the all or nothing system in place now.

Share this post


Link to post
Share on other sites

jstout, is there an easy way to change the number of taps from 7 to any number we please? We're still attempting to figure out what's a good number, and I'd hate to have to bug you every time we decide to change it...

Share this post


Link to post
Share on other sites

I'll answer from what he told me. Going from 7 to 15 is as easy as removing a "divide by 2" command, but changing to something between 7 and 15 will involve more detailed changing of the scale. I haven't looked at it in a while, but I couldn't see where to do it in this code.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×