Jump to content

Tecmo mystery of int chance on overthrows solved...


bruddog

Recommended Posts

Even after documenting the code I had missed this bug. Previously after documenting the game code for pass completions it appeared that game was doing the following: 

 

Taking the QB's pass completion value (based on his pass control skill) subtracting the players interception value (based on his skill) doing some random number manipulations and then comparing the result to a threshold value 0x0E. 

 

Working correctly this would result in high int players picking off more errant balls and high passing control QB's being much better at avoiding said interceptions.

 

However as most who have played the game extensively know...by far the most common result is for the pass to maddeningly bounce of the player harmlessly regardless of the player being used. 

 

The reason for this is about to be explained. In all of the other passing calculation situations the QB's passing control completion value is loaded to the memory location $DC. (unless I've missed any other bugs).

 

However for the case where the WR isn't close enough to the ball to catch it, the game does not load the QB's passing control completion value into $DC. The problem and bug is the game is still using the value at $DC in its calculation. 

The game however uses the $DC location as temporary variable location for processing the player scripts. The game is constantly processing the player scripts so the $DC value is constantly changing.

 

However by far the most common value in $DC after a play has been going for awhile are the values 0xFE, 0xFD. These two commands are the player "script" commands to loop back to a previous command and set to block

respectively

 

A value of 0xFD or 0XFE makes it impossible to intercept the ball. However there is a player script command that is very favorable D7 00 C0 which basically tells the DB to move backwards towards the endzone rather than play man to man. In this case 00 gets loaded into $DC which makes  its impossible not to intercept the ball. 

 

Many of the player scripts for "picked plays" have players dropping back rather than playing man to man which might make things more favore-able for interceptions in the case of overthrows on picked plays

 

 

 

 

 

 

 

 

Link to comment
Share on other sites

@buck yes it would be easy enough to use the routine that already exists that loads PC into DC. Most of the other pass calculations use this routine. 

 

@segathonsov

You are correct although its not so much that PC is randomized as that its using a bogus value for PC. Most of the values wouldnt even fall in the normal PC range.

 

 

Link to comment
Share on other sites

3 hours ago, bruddog said:

@buck yes it would be easy enough to use the routine that already exists that loads PC into DC. Most of the other pass calculations use this routine. 

 

 

 

can't you make it happen, cap'n?

Link to comment
Share on other sites

13 hours ago, buck said:

so, I tried to make a patch from this but it didn't work right.  is it too much to post the fix locations and bytes?

Probably because the rom you are patching it to has something in that location. 

 

at 0x29DBC (assuming you have space the the 2BF40-2C00F) section

 

SET(0x29DBC, 0x4CFOBF)      

JMP $BFF0             ; jump to 0x2C000 in rom

 

  

SET(0x2C000, 0x20319E203D9E4CAF9D)  

JSR $9E31             ; checks for pass result already we wrote over this above so need to run the routine

JSR $9E3D            ; loads PC into $DC and PC + REC into $DD

JMP $9DAF            ; return to the location after the jump instruction

 

The location to jump to will have to be changed if there is something there. That section is used for a lot of the grapple hacks and some other jstout hacks so for other roms I'd probably have to post a bank switch routine. 

Link to comment
Share on other sites

5 hours ago, bruddog said:

Probably because the rom you are patching it to has something in that location. 

 

at 0x29DBC (assuming you have space the the 2BF40-2C00F) section

 

SET(0x29DBC, 0x4CFOBF)      

JMP $BFF0             ; jump to 0x2C000 in rom

 

  

SET(0x2C000, 0x20319E203D9E4CAF9D)  

JSR $9E31             ; checks for pass result already we wrote over this above so need to run the routine

JSR $9E3D            ; loads PC into $DC and PC + REC into $DD

JMP $9DAF            ; return to the location after the jump instruction

 

The location to jump to will have to be changed if there is something there. That section is used for a lot of the grapple hacks and some other jstout hacks so for other roms I'd probably have to post a bank switch routine. 

Great stuff here, bruddog.

 

I didn't check every known hack ever made, but I didn't see a conflict at x29dbc.  There is, however, a conflict at x2c000 with the "Quickness = Coverage" hack. 

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