Jump to content

adjusting kick-off positions


konForce

Recommended Posts

This may be old news, but anyway:

TSB stores yards via two bytes, with 0x800 being midfield. Each yard is divided into 8 units. To move left 1 yard, subtract 8 pixels. To move right 1 yard, add 8 pixels.

This is stored in RAM at 0x7F (current line of scrimage) and 0x82 (original line of scrimage), with the low byte first. (0x0800 would be stored as 0x00 0x08.) During a play, the current yard line is stored in 0x93.

Yardlines do not swap automatically depending on which way you drive; instead they are hardcoded in two places, once for P1 and once for P2.

When setting the kick-off positions, TSB either loads the hardcoded bytes into the Y,X registers, loads the hardcoded bytes into the A register and then updates the RAM, or loads the bytes from the previous play into the A register and then updates the RAM.

The kick-off positions are set via Y,X registers at offsets 0x247B9 and 0x24031 for the first player and second player.

To change the position, simply modify the 2nd and 4th bytes. (They follow the a0 and a2 opcodes.)

The left 30 yard line is $760.

The right 30 yard line is $8A0.

To change player 1 to the 30:

0x247B9: a0 60

0x247BB: a2 07

To change player 2 to the 30:

0x24031: a0 A0

0x24033: a2 08

A simple formula for figuring out a yard's value:

1648 + (YL * 8) ' for LEFT side

2448 - (YL * 8) ' for RIGHT side

Then convert that decimal value into hex.

Note that if the kicker is able to boot the ball through the endzone, it counts as a safety.

Link to comment
Share on other sites

  • 3 years later...
  • 8 years later...
2 hours ago, fgqb#19nyj said:

Could anyone post an original TSB rom with the kickoff position at the 30. I'm trying to complete a 94 rom and this is one thing I need added.

 

get a hex editor and do the following at the four locations:

 

To change player 1 to the 30:

 

at 0x247B9 type in A060

at 0x247BB type in A207

 

To change player 2 to the 30:

 

at 0x24031 type in A0A0

at 0x24033 type in A208

 

 

Link to comment
Share on other sites

Hey, Buck. Thanks for the reply. I'm a newbie here and don't quite know how to look for something like that. I have the FCEUXDSP program and have opened up the rom, but for the life of me, I can't see what you mean by replacing the script that you've listed. Please, if you can, advise me how to do this. If it's too complicated, then could you instead post a rom where this already done. I would appreciate it.

Link to comment
Share on other sites

Never mind, Buck, I got it. Thanks for the code. It worked like a charm. :) 

 

(changing the kickoff location to the 30 or 40 yard line)

 

-30 yard-
To change player 1 to the 30: 0x247B9: A0 60; 0x247BB: A2 07

To change player 2 to the 30: 0x24031: A0 A0; 0x24033: A2 08

 

-40 yard-
To change player 1 to the 40: 0x247B9: A0 B0; 0x247BB: A2 07

To change player 2 to the 40: 0x24031: A0 50; 0x24033: A2 08

 

Note: must use the 20 yard line to middle of end zone option otherwise the kickoff could go out of the end zone and award the opposing team a safety.

 

(kickoff lengths)

 

#ALL KICKOFFS RANGE FROM 16YD-LINE TO BACK OF ENDZONE

SET(0x2A534, 0x4C83BF)

SET(0x2BF93, 0xA5454AA5446A186992A8A9016900AA4C2FA5)

 

#ALL KICKOFFS RANGE FROM 20YD-LINE TO MIDDLE OF ENDZONE (2nd option is needed for 40y ko)

SET(0x2A534, 0x4C83BF)

SET(0x2BF93, 0xA5454AA5446A186962A8A9016900AA4C2FA5)

 

I got all this from Buck and the Raja by the way. I just wanted them in one place is all.

Edited by fgqb#19nyj
Link to comment
Share on other sites

  • 1 year later...

(Tecmo logo relocations) copy and paste at hex locations...

 

-40 YARD KICK OFF LOCATION-

 

(x2C9B0) 01 98 01 01 01 98 01 94 94 8E 8F 01 01 98 01 A8 04 05 08 09 06 07 0A 0B 01 01 01 01 85 85 85 84 AA 01 01 01 98 01 9D B0 B1 01 01 01 98 01 01 01 98 AA 01 01 01 98 01 01 01 98 01 01 01 98 95 95 95 8C AA 01 01 E8 E9 01 01 EA EB 94 94 94 8E 01 01 01 98 AA 01 01 01 98 01 01 01 98 01 01 01 98 01 01 01 98 AA 01 9D A2 A3 01 01 01 98 87 87 87 86 01 01 01 01 AA 01 01 01 01 A6 A7 01 01 01 01 01 01 01 01 01 01 AA 01 01 01 01 01 01 01 01 01 01 01 01 8D 95 95 95 AA EC ED 01 01 EE EF

 

(x2CB49) E8 E9 01 01 EA EB 94 94 94 8E 01 01 01 98 AA 01 01 A2 A3 01 01 01 98 87 87 87 86 01 01 01 01 AA 01 01 01 01 A6 A7 9C 01 01 01 01 01 01 01 01 01 AA EC ED 01 01 EE EF 01 01 8F 94 94 94 01 01 01 01 AA B4 B5 9C 01 01 01 01 01 87 87 87 87 01 01 01 01 AA 98 01 01 01 98 01 01

 

-30 YARD KICK OFF LOCATION-

 

(x2C4DB) 42 29 3D 00 00 2B 2C 2D 2E 2C 2F 00 00 3F 40 41 47 43 44 00 00 1A 45 46 56 1B 48 00 00 1F 20 49 4A 23 24 00 03 4B 4C 4D 4E 4F 50 00 00 89 51 52 53 2C 54 00 00 8A 55 41 47 43 57 00 00 8B 58 46 56 1B 5A 00 00 8C 23 21 5B 23 5C 00 00 61 3C 27 42

 

(x2C9B0) 01 98 01 01 01 98 01 94 94 8E 8F 01 01 98 01 A8 04 05 08 09 06 07 0A 0B 01 01 01 01 85 85 85 84 AA 01 01 01 98 01 9D B0 B1 01 01 01 98 01 01 01 98 AA 01 01 01 98 01 01 01 98 01 01 01 98 95 95 95 8C AA E8 E9 EC ED EA EB EE EF 94 8E 8F 94 01 98 01 01 AA 01 01 01 98 01 01 01 98 01 01 01 98 01 01 01 98 AA 01 9D A2 A3 01 01 01 98 87 87 87 86 01 01 01 01 AA 01 01 01 01 A6 A7 01 01 01 01 01 01 01 01 01 01 AA 01 01 01 01 01 01 01 01 01 01 01 01 8D 95 95 95 AA 01 01 01 98 01 01 01 98 94 94 94 8E 01 01 01 98

 

(x2CB4A) 01 01 01 01 01 8F 94 94 94 01 01 01 01 AA 01 01 A2 A3 01 01 01 98 87 87 87 86 01 01 01 01 AA 01 01 01 01 A6 A7 9C 01 01 01 01 01 01 01 01 01 AA EC ED 01 01 EE EF 01 01 8F 94 94 94 01 01 01 01 AA B4 B5 9C 01 01 01 01 01 87 87 87 87 01 01 01 01 AA 98 01 01 01 98 01 01

Edited by fgqb#19nyj
Link to comment
Share on other sites

  • 3 years later...
  • 1 year later...
On 1/29/2017 at 6:13 PM, fgqb#19nyj said:

Never mind, Buck, I got it. Thanks for the code. It worked like a charm. :) 

 

(changing the kickoff location to the 30 or 40 yard line)

 

-30 yard-
To change player 1 to the 30: 0x247B9: A0 60; 0x247BB: A2 07

To change player 2 to the 30: 0x24031: A0 A0; 0x24033: A2 08

 

-40 yard-
To change player 1 to the 40: 0x247B9: A0 B0; 0x247BB: A2 07

To change player 2 to the 40: 0x24031: A0 50; 0x24033: A2 08

 

Note: must use the 20 yard line to middle of end zone option otherwise the kickoff could go out of the end zone and award the opposing team a safety.

 

(kickoff lengths)

 

#ALL KICKOFFS RANGE FROM 16YD-LINE TO BACK OF ENDZONE

SET(0x2A534, 0x4C83BF)

SET(0x2BF93, 0xA5454AA5446A186992A8A9016900AA4C2FA5)

 

#ALL KICKOFFS RANGE FROM 20YD-LINE TO MIDDLE OF ENDZONE (2nd option is needed for 40y ko)

SET(0x2A534, 0x4C83BF)

SET(0x2BF93, 0xA5454AA5446A186962A8A9016900AA4C2FA5)

 

I got all this from Buck and the Raja by the way. I just wanted them in one place is all.

So if you use the start at 30 or 40 and keep the 16-yard line range and change the safety pt value to 1, could you simulate rouges in the CFL 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...