The television ad shows a 1970s` teenager magically stepping into his younger brother`s room in the 1980s. The younger brother is doing something the older brother used to do all the time-playing a video game.

The video game market is back, and while it is nowhere near its $3 billion peak of 1982, some analysts estimate it could top $1 billion. Personal computer maker Atari Corp. of Sunnyvale hopes to cash in on the resurgence by spending $6 million in advertising this Christmas.

Atari could use the boost. Its net income overall was $901,000 for the third quarter ended Oct. 1, down from $9.9 million a year earlier, the company reported in mid-November.

Unlike computer games that require a $1,000 personal computer, video games are played on video game machines that range from $50 to $150.

Video game machines are part of the toy industry, while Atari`s main business is personal computers.

Atari was once synonymous with the term video game. In those glory days, about 30 million households owned a video game machine.

''There were 30 million households with children,'' said Michael Katz, president of Atari`s Entertainment Electronics Division. ''We had achieved 100 percent penetration.''

But by 1983, Atari`s video game revenues had slid from a high of $2 billion to less than $200 million, and the firm lost $500 million in 1983 alone. Atari`s owner, Warner Communications Inc., sold the company to Jack Tramiel, who had turned Commodore International Ltd. into a major player in the home computer market.

(Warner retained a portion of Atari that produces video game software and coin-operated arcade machines. Now called Namco, the former Atari division licenses its software to Atari.)

Tramiel slashed Atari to 150 employees and consolidated 72 buildings into three.

Today, Atari`s video game division consists of fewer than 10 people and accounted for more than $100 million of Atari`s 1987 sales.

''The old Atari would have had 10,000 in this division,'' Katz said.

But while Atari was in transition, it stumbled in the video game market. The Japanese-owned Nintendo America of Bellevue, Wash., stepped in with a superior game machine that has captured more than 70 percent of the market.

Sega-the No. 3 machine, from Tonka Corp. of Minnetonka, Minn.-has about 10 percent of the market. Even with its three models, Atari has only 10 to 20 percent of the market.

''I`d be nervous if I were Atari,'' said Sean McGowan, a toy industry analyst at Balis Zorn Gerard Inc. of New York. ''They owned this business a few years ago.''

Some analysts say Nintendo is the reason for the resurgence in game machines. ''Nintendo brought the market back with its games,'' said Barry Rothberg, a toy analyst with Mabon, Nugent & Co. of New York. ''No one had seen games like those before.''

Others attribute the new video game market to simple demographics.

While many teenagers burned out on video games five years ago, a new crop of youngsters has become teenagers. The new teenagers have never played video games.

Atari`s newest machine is the year-old XE, which is a repackaging of its old 400 and 800 lines of personal computers. The $199 XE includes a keyboard and can be upgraded to a personal computer with the purchase of a disk drive. But the real draw to Atari systems is their price-$50 vs. $150 for a Nintendo.

''They largely sell their older systems and ride the coattails of Nintendo,'' said Trip Hawkins, president of Electronic Arts of San Mateo, Calif., which licenses software to both companies.

The $50 Atari system is a repackaged 2600, the same machine that started the video game boom years ago.

''Nintendo`s and Sega`s technology is only three years old, and it really shows,'' said Bruce Davis, president of Mediagenic of Menlo Park, Calif., which licenses games to Atari and Nintendo.

Atari keeps its price low by licensing much of its software from outside developers.

Computer game companies such as Broderbund, Accolade and Spectrum Holobyte have down-scaled computer games for Atari video game machines.

''It`s too expensive and time consuming to develop games,'' Katz said.

''We know which categories are popular. Martial arts, sports and war games are popular, and so are driving and flying games.''