Jump to content
Sign in to follow this  
jstout

Recording Tackles

Recommended Posts

Here is some code for recording the number of tackles for each defensive player during a played game (NOT a simmed game). I've been using this for testing play design coding but it has a few bugs. I thought someone might find it useful or be able to expand upon it. I haven't checked the erase code location for 100% correctness thoroughly though I expect no problems. *Added code for the Pro Bowl game, changed entry point to start of stats not cleanup to fix a bug, changed back fumble code, and added code to fix previous bugs*

Note: Do not use this on cxrom's 32-team rom as locations listed are being used and you'll ruin the rom. Also I'm not aware of the exact SRAM locations he used.

The Bugs are:

[Previous Bugs are fixed using this code.]

1. Fumble tackles are not recorded (defender fumbles back to the offense caused problems with checking for lost fumbles)

2. Not a Bug but no Special Team tackles are recorded

x25AE9
Jump to New Code:
4C 90 FF JMP $FF90
EA NOP
EA NOP
EA NOP
EA NOP

x3FFA0
Change Banks for Tackle Code:
A9 06 LDA #$06
8D 00 80 STA $8000
A9 01 LDA #$01
8D 01 80 STA $8001
20 E0 9C JSR $9CE0 ; Go to Tackle code
A9 06 LDA #$06
8D 00 80 STA $8000
A9 12 LDA #$12
8D 01 80 STA $8001
; RE-ENTER NORMAL CODE
A5 70 LDA $70
10 03 BPL :+
4C 3E 9C JMP $9C3E ; Go back to Player 2
4C E0 9A : JMP $9AE0 ; Go back to Player 1

x3CF0
Record Tackles:
; ENABLE SRAM
A9 80 LDA #$80
8D 01 A0 STA $A001
; CHECK FOR OUT OF BOUNDS
A5 73 LDA $73
C9 80 CMP #$80 ; Out of Bounds
F0 39 BEQ :+++++
; CHECK FOR A FUMBLE
29 20 AND #$20 ; Fumbled
D0 35 BNE :+++++
; CHECK FOR A RUN OR PASS PLAY
A5 71 LDA $71
C9 8C CMP #$8C ; Run Play
F0 11 BEQ :++
C9 AC CMP #$AC ; Pass Play
F0 07 BEQ :+
C9 CD CMP #$CD ; Sacked QB
F0 09 BEQ :++
4C 24 9D JMP :+++++
; CHECK FOR A COMPLETED PASS
A5 72 : LDA $72
C9 20 CMP #$20 ; Completion
D0 1E BNE :++++
; TACKLED
A5 B5 : LDA $B5
C9 40 CMP #$40 ; Player 1
90 18 BCC :+++
C9 C0 CMP #$C0 ; Player 2
B0 05 BCS :+
; PLAYER 1
29 0F AND #$0F
4C 1A 9D JMP :++
; PLAYER 2
29 0F : AND #$0F
18 CLC
69 0B ADC #$0B
; RECORD TACKLE
A8 : TAY
B9 80 7F LDA $7F80,Y
18 CLC
69 01 ADC #$01
99 80 7F STA $7F80,Y
; DISABLE SRAM
A9 C0 : LDA #$C0
8D 01 A0 STA $A001
; EXIT
60 RTS

x21D7E
Jump to Erase Code:
4C E0 BF JMP $BFE0
EA NOP

x23FF0:
Erase Tackles:
A9 00 LDA #$00
A0 16 LDY #$16
99 7F 7F : STA $7F7F,Y
88 DEY
D0 FA BNE :-
A0 0E LDY #$0E
4C 72 9D JMP $9D72

x21419
Jump to Pro Bowl Erase Code:
A2 01 LDX #$01
A0 06 LDY #$06
84 44 STY $44
4C EF BF JMP $BFEF
EA NOP

x23FFF
Pro Bowl Erase Tackles:
A9 00 LDA #$00
A0 16 LDY #$16
99 7F 7F : STA $7F7F,Y
88 DEY
D0 FA BNE :-
A9 05 LDA #$05
A0 64 LDY #$64
4C 13 94 JMP $9413

If a league ever uses this then the tackles are for player 1 at $7F80 to $7F8A (x1F80 to x1F8A) and player 2 at $7F8B to $7F95 (x1F8B to x1F95) in SRAM.

Share this post


Link to post
Share on other sites

Man, this could seriously cause me to play some seasons vs. the computer again.

Hey I know very little about this kind of thing, but when trying to get rid of the bugs (particularly #3) maybe someone can find a way to stop the touchdown fumbles from erasing stats. Or eliminate those fumbles altogether.

Share this post


Link to post
Share on other sites
wow, this would be awesome if we could figure out to handle those bugs. too bad i know zero about nes programming or anything this low-level...

I'm looking into this now and I found that some of the bytes being zeroed out in the same area are telling what happened on the play. I should be able to pinpoint it out more and use these to whack many of the bugs off.

Share this post


Link to post
Share on other sites

With all this incredible info you have found I have one for you. As we or most know their were suppose to be penalties in the game. Can this be looked into or is it a dead end road?

Share this post


Link to post
Share on other sites
With all this incredible info you have found I have one for you. As we or most know their were suppose to be penalties in the game. Can this be looked into or is it a dead end road?

Why would you want penalties in the game??

Share this post


Link to post
Share on other sites
Wny not!!!????

If we're emulating the Nfl last I heard they DID have penalties.

You don't have to get all mad. I didn't know that the NFL had penalties? Anyways what would you put in it, its impossible, you would have to rewrite the whole game engine.

Tecmo wouldn't be the same with penalties. Your entitled to your opinion and I'm entitled to mine. My opinion, I think it would be stupid to have penalties.

I wasn't trying to start an argument about penalties. You want em, you could have em in your game.

Share this post


Link to post
Share on other sites

So if the tackle stat thing works, will it work as: it will be able to keep track of each individual defensive players tackles per game or will it be total tackles per game. If it is each player, that would be amazing and if you guys figured out how to do 2pt conversions it would be the best tecmo rom ever. Much thanks to everyone who is coding this game and trying to bring it up to date, it is truly awesome to play this game and watch the progression it has made since 91'

Share this post


Link to post
Share on other sites
So if the tackle stat thing works, will it work as: it will be able to keep track of each individual defensive players tackles per game or will it be total tackles per game. If it is each player, that would be amazing and if you guys figured out how to do 2pt conversions it would be the best tecmo rom ever. Much thanks to everyone who is coding this game and trying to bring it up to date, it is truly awesome to play this game and watch the progression it has made since 91'

It is currently keeping track of individual players tackles in the game. Each of the 11 defensive players for both teams get recorded at the SRAM locations I specified. Everything is working as expected now but I'm still checking all of it just in case.

Share this post


Link to post
Share on other sites

That is awesome. Can't wait to try that rom out when it's available. So if it works, then the info will be on the leaders page or would it also be on the defensive players page next to his sacks and int's?

Share this post


Link to post
Share on other sites
That is awesome. Can't wait to try that rom out when it's available. So if it works, then the info will be on the leaders page or would it also be on the defensive players page next to his sacks and int's?

It currently isn't listed on a page as it only totals for a single game so you can only pull the numbers from the an STA or SAV file. If I can find the space to store them and figure out how to pull the numbers than that might change.

Share this post


Link to post
Share on other sites
It currently isn't listed on a page as it only totals for a single game so you can only pull the numbers from the an STA or SAV file. If I can find the space to store them and figure out how to pull the numbers than that might change.

All I care is if you get it on the save state file. Seems like the rom update threads are equally divided between people who play league seasons online and seasons on the actual rom. I'm happily part of the former 8).

Share this post


Link to post
Share on other sites

for season kept stats i'd rather see tackles

for single game sta, like league game or tpc i'd love to see fumbles in box score

penalties, blah... boo....

punt stats screen - i second that notion

Share this post


Link to post
Share on other sites
for season kept stats i'd rather see tackles

for single game sta, like league game or tpc i'd love to see fumbles in box score

penalties, blah... boo....

punt stats screen - i second that notion

me too, I rarely look at the punt leaders.

Share this post


Link to post
Share on other sites
for season kept stats i'd rather see tackles

for single game sta, like league game or tpc i'd love to see fumbles in box score

penalties, blah... boo....

punt stats screen - i second that notion

100%

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.

×