Jump to content
Sign in to follow this  
Bodom

Game Clock - Start/Stop Logic

Recommended Posts

Anyone know if there's different locations in the game that trigger the game clock to start and stop?


For example, I know there's a separate location that controls the clock at the play selection menu...so I'm wondering if there's different locations for offensive plays vs. kickoffs.


 


Some random thoughts...


  - Can the clock start upon KR receiving the ball vs. actual kickoff


  - Can the clock start 'x' number of seconds after kicked off


  - Can the clock run slower or not at all during kickoffs


 


Share this post


Link to post
Share on other sites

I'll try and look into it when i get a chance.

Thanks, bruddog.  Nothing urgent, though.  I know you have more elaborate hacks in the works.  I'm just tossing around ideas.

Share this post


Link to post
Share on other sites

i'd love for that to be the case.  You lose (trying to recall from memory) like 5-7 seconds of the ball in the air.   If you had that and the fair catch hack, that gives you a hail marry that you wouldn't have had.


Share this post


Link to post
Share on other sites

i'd love for that to be the case.  You lose (trying to recall from memory) like 5-7 seconds of the ball in the air.   If you had that and the fair catch hack, that gives you a hail marry that you wouldn't have had.

 

Exactly.

Also - to mimic the NFL as closely as possible, I use a ROM that allows kickoffs to go out of the endzone for a touchback.  If you score to take the lead with less than 10 seconds left, game over.

Share this post


Link to post
Share on other sites

As usual the main problem here is space limitations not figuring out how to do this.  As the bank that is in is a quite full one.  I'd have to do some painful bank switching to get this working for both sides. Here is code that will have the clock not starting until the player 2 Kick returner has received the ball. This also won't work on onsides....requiring more bank switching. 


 


 


@240B8


00                               // replace 80 with 00. This prevents the clock from starting on P2 kickoff 


 


@24840


00                              // replace 80 with 00. This prevents the clock from starting on P1 kickoff  


 


@24865


 


JMP  $9FF0                // jump to hack


EA                              // NOP


 


Hex to paste in: 4CFO9FEA


 


 


/////////////////////////////////////////////////////////////////


@ 26000


 


LDA *$72                        // load ball status value from ram location ($72)

AND #$20                      //  and with #20 (ball received code)

BEQ RET                       // if not received go back to main loop it came from 

LDA #$80                      // if received load count down clock value 

STA *$69                      // store count down clock code into clock status location ($69) 

JMP $886B                   //  return to next instruction in sequence. 

 

RET

JMP $8850                       // jump back to beginning of loop we came from

 


 


Hex to paste in: A5722920F007A98085694C6B884C5088


Share this post


Link to post
Share on other sites

@ 26000

 

Hex to paste in: A5722920F007A98085694C6B884C5088

 

Just found out this space is already taken by the 'Conditions Change Every Play" hack.  (I'm probably the only one on this site that actually likes that one!).

No worries.  I'm going to try a few games with the clock not running on kickoffs and go from there.  Thanks again.

Share this post


Link to post
Share on other sites
On ‎1‎/‎11‎/‎2014 at 11:15 AM, jesseguild5 said:

I always felt that the punts ate up way too much time also, if you could stop the clock during any special teams play i would be happy.

 

I ran the code logger during a punt and the only code I could find that seemed like it would keep the clock from running -- the "a980" at x255dc -- is used during all plays.  Unfortunately, I don't think the game has separate clock logic for anything other than kickoffs.

Share this post


Link to post
Share on other sites

There is definitely separate clock logic for punts. It gets set to a slower than normal countdown speed while the punter has the ball and then back to normal speed once he's punted it. 

Share this post


Link to post
Share on other sites
1 hour ago, bruddog said:

There is definitely separate clock logic for punts. It gets set to a slower than normal countdown speed while the punter has the ball and then back to normal speed once he's punted it. 

That's good to know, but i wish i knew more about this stuff.  I'd like to stop the clock on punts.  I just learned about the code logger yesterday and started messing with it. 

 

I just searched for "a980" since changing the 80s to 00 stop the clock from running on kickoffs.  There was a lot more a980's in yellow than i was expecting after just a few seconds of gameplay.  I changed a bunch of them to 00 with no visible effect or the game would glitch. Then again,  i really don't know what I'm doing so I'm not surprised if it's something totally different i should be looking for. 

Edited by adscl84

Share this post


Link to post
Share on other sites

I appreciate that.  I kinda like trying to figure it out for myself, but I definitely need help.  I felt a great sense of accomplishment when I figured out how to make an 8 team playoff correctly, even though I have no idea how to fix the problem with the bracket.  I'd like to start reading some of the stuff on programming but it's a lot of information to take in. 

 

I have no idea what $69 means (I'm familiar only with hex), but I'll take a look at some of the programming docs and see if I can figure it out.  I'll report back in a day or so.

Share this post


Link to post
Share on other sites

The NES has memory like any other computer. $69 refers to a memory location. In this case $69 is the memory location where the clock status is stored. When you are searching for a9 80 you have been searching for

 

LDA #$80

 

This value then gets save to the clock status memory location changing the clock status to normal running clock. 

 

in FCEUX

 

Click on debug->debugger

 

Under Breakpoints

Click add

Type 0069  in both of the address boxes

click on the write check box

Share this post


Link to post
Share on other sites

Is it normal for FCEUX to freeze?  I first tried it on a kickoff since I knew where that hex code was.  Then, when I snapped the ball on my punt, it went to 255dd so I think I understand how it works (except how someone would figure out $69 is the proper memory location).  But I end up having to close and reopen the emulator and reload the rom.

Share this post


Link to post
Share on other sites

This is hard, trying to not freeze the game while trying to get the punt off without getting sacked while manipulating the debugger so I can see where it points me.  I got a punt off and it went to 243e7.  I see that a980 on the kickoff codes is followed by the 8569 I got there.  I see 29df at 243e5, so I'm assuming that does the clock.  Setting df to 00 caused the clock not to run after the punt (hooray!).  So, what exactly is the significance of "a9" and "29"?

 

Thanks a million!  Now I just got force the com to punt so I can change the code for player 2 (if there is one).  There is:  x24b6e.

Edited by adscl84

Share this post


Link to post
Share on other sites

Like I said, I have no idea what I'm doing...

 

Thanks for all the help.  Now, I just have to figure out how to determine memory locations for things.  I guess it's time to start reading about 6502.

Share this post


Link to post
Share on other sites
On 1/8/2014 at 3:30 PM, bruddog said:

As usual the main problem here is space limitations not figuring out how to do this.  As the bank that is in is a quite full one.  I'd have to do some painful bank switching to get this working for both sides. Here is code that will have the clock not starting until the player 2 Kick returner has received the ball. This also won't work on onsides....requiring more bank switching. 

 

 

 

 

 

 

 

@240B8

 

 

00                               // replace 80 with 00. This prevents the clock from starting on P2 kickoff 

 

 

 

 

 

@24840

 

 

00                              // replace 80 with 00. This prevents the clock from starting on P1 kickoff  

 

 

I found some codes on this site and from what I interpreted it would mean this SET command would do the trick, am I missing anything?

 

#No Clock on Kickoffs
SET(0x240B8, 0x00)
SET(0x24840, 0x00)

Share this post


Link to post
Share on other sites

Ok cool. However, I do see that implementing that code completely freezes the clock. Is there a way to edit it so the clock starts once the kick return man handles the kickoff?

Share this post


Link to post
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.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...