"Time Soldiers, known in Japan as Battle Field (バトル フィールド), is a 1987 top-viewed run and gun video arcade game developed by Alpha Denshi, and published by SNK, while later distributed outside Japan by Romstar.
Time Soldiers can be played by either a single player, or by two players simultaneously. Players move their characters with an eight-way rotary joystick, shooting enemies along a scrolling backdrop. The rotary joystick allows players to walk in one direction while shooting in another (like in the SNK-developed Ikari Warriors series).
The plot involves the protagonists traveling through time to rescue their comrades from the villainous Gylend. Each of the five levels is set in a different time period: The Primitive Age, The Age of Rome, The World Wars, The Age of War and Future World. Players travel between the periods with the aid of a device called the 'D-Scanner.' Before each level, the player is shown the name of one of their comrades and the period in which that comrade is held captive. The player is then placed into one of the time periods. If that period is not the one in which the captive soldier is located, the player must defeat a midboss of the level and re-enter the time portal, repeating the process until the correct time period is reached. When the player reaches the correct time period, the player must then fight through the end of the level and defeat the level boss to rescue the captured soldier. Unlimited continues are available on all levels except the last one."
Source: Wikipedia, "[en.wikipedia.org/wiki/Time_Soldiers Time Soldiers]", available under the CC-BY-SA License.