Keen 1 Frame Rate Anomaly

Request patches for Keens 1-3.
Post Reply
Benvolio
Posts: 228
Joined: Sun Aug 29, 2004 4:44 pm
Location: Ireland
Contact:

Keen 1 Frame Rate Anomaly

Post by Benvolio »

I'm not sure if this is well known or not. This relates to the change animation frame-rate patch (%patch $7CDE $05) for Keen1.

I've observed that if I have, for example, a lower in-level frame rate, then when I game-over and go to the high-scores, the animation on the ship parts in the high scores runs at the in-level frame rate.

However at all other times, including after I've gone back to the main menu after finishing a game, the ship parts will animate at the normal frame-rate.

Is this frame rate something that can be patched? As far as I can tell, animations in the title screen similarly run at the default rate and not at the patched in-level rate.

It's not a hugely important detail so I wouldn't ask anyone to expend energy on it, but if there is a well-established patch for this already then I'd be interested in it!
nwe74
Posts: 11
Joined: Mon Jul 18, 2022 7:46 pm

Re: Keen 1 Frame Rate Anomaly

Post by nwe74 »

The patch you have posted modifies an instruction in the code which assigns a value to a variable at offset $6C62 in the data segment.
The value of this variable affects the animation speed of tiles and as you have mentioned, animations in the high scores menu, title screen animation, etc. It does not seem, however, to affect the animation rate of sprites.

The value of the "animation frame rate" variable is modified at three different locations in the code:

1. At $15CE (%patch $15CE $0007w) (Note: $0007w is the default value)
This is executed when the game shows the "One moment" screen. The value is only set temporarily, it will be overwritten soon after the "One moment" screen is faded out.

2. At $7CDE (%patch $7CDE $0003w)
The "original" patch, the code is executed when the player starts a new game or loads a saved game.

3. At $9080 (%patch $9080 $0003w)
The code containing this value runs before the "tile screen" (This may or may not be the name used by the Keen community. I refer to the following screen: https://keenwiki.shikadi.net/wiki/File:Keen_1_title.png) animation is started and after the "One moment" screen.

The value of the variable is not changed when the game returns to the main menu without showing the title screen animation first or before displaying the high scores screen.

If the rate value at #3 is not patched, the subroutine containing it will restore the default value of the variable when executed.
The variable should always have a consistent value after the "One moment" animation if you use both patches #2 and #3 (with the same rate value, of course).
User avatar
Quillax
Posts: 23
Joined: Sun Mar 27, 2016 5:48 pm
Contact:

Re: Keen 1 Frame Rate Anomaly

Post by Quillax »

In KeenWiki, there's a few patches for tile animation speeds, including the speed used in the title screen:

Code: Select all

%patch $9080 $03 #Main Menu level (Intro, title, story screen, etc.)
Post Reply