I was recently wondering something about older console systems with no real-time clock. Some still were able to have a kind of game time clock, and as far as I know all of them used a frame counting method to do it, incrementing the counter in memory each time a frame was finished and dividing that by the appropriate number to get the time in seconds at the end.

What I'm wondering is, what would be the longest integer that each system was capable of storing this way, leading to what as the maximum time? Also, what happens if you play so long that the counter maxes out?

There's a few possibilities I can think of for the answer to the second.

1. The counter is incremented in such a way that when it rolls over, it passes a bit bit upwards, into the next section of memory, now changing the value of another piece of data . . . and resulting in all kinds of weirdness. I refer you to the level counter bug for the original Pac-Man

2. The counter is properly trapped, and resets to zero without causing other problems, resulting in now having just started the game as far as the timer is concerned. Would make this a neat, but possibly long term solution, to tricking Metroid into thinking you've defeated Motherbrain in 2 minutes.

3. Causes an overflow error that locks out the CPU and crashes the game.

4. Had even just realized that the counter could stay maxed out, not able to increment but having no other effect.

Has anyone found any documentation on how it would work? Perhaps what happens is game dependent, determined partly on how the CPU normally handles overflows, but also on additional code to accommodate people actually letting the clock run to maximum?