Jump to content
IGNORED

Questions about the workings of games


Recommended Posts

I made a topic a while ago about how Ms.Pacman had multiple ghost on screen without flicker. Now I have more questions. Why in some games are there black lines on the side of the screen? Another question is (I'm not too sure about this, I'm not a musician) How does Pitfall II have more then 2 audio channels play at the same time? Also, how does that game scroll vertically, I know the NES has scrolling built into the PPU, but if the TIA had no RAM, I'll bet it probably didn't have scrolling.

Link to comment
Share on other sites

* Black lines.

 

The TIA has just enough memory to hold the data for one line of the screen, including its players, missiles, and one ball. (and for the players and ball there is actually a backup register that is flipped when the VDEL register is strobed, but I digress). The programmer must take care of loading these registers when he wants them to change on each line of the display. The programmer therefore takes care of the vertical part of the display, including the vertical sync timing, while the TIA handles the horizontal.

 

Basically, the TIA player and missile registers operate by the principle of a counter that is synchronized to the horizontal timing of the screen. This counter is non-linear, so you can't just say, "Place the sprite at this location" Instead, since the horizontal timing is constant, and you're keeping track of where things are vertically (you have to), you strobe a particular reset register for either player, or the enable bits for their missles or ball.

 

Since it takes a certain number of cycles to do this, and the TIA is running at three times the speed of the processor, this means that you can only strobe the reset at specific spots on the screen (which happen to be 15 pixels apart).

 

So in order to counteract this problem, the TIA designers added a set of fine horizontal motion registers for each of the two players, two missiles, and ball. These registers are designed to hold a signed number from -8 to +7, which will either scoot the player a certain number of color clocks to the left or right from the reset point.

 

But in order to set these values, the HMOVE register has to be strobed at the very beginning of the horizontal line before where you want the horizontal adjustment to occur. Strobing this register at the beginning of the line stuffs the counters of each of these players, missiles, and ball simultaneously, but while this is happening, the TIA doesn't output a final color to the display for 8 clocks into the visible scanline. This creates a visible "comb" on the left side of the screen.

 

Since the designers of the Atari VCS had thought that this register would only be used once per frame at the top of the screen to adjust all of the player positions exactly once, and since the top of the screen would most likely be in the overscan, it was not deemed to be a priority bug to fix, so it was left in.

 

It was only when Larry Kaplan used multiple HMOVE lines to trigger different horizontal motion vectors for each row of enemies in Air-Sea Battle, that the problem was noticed, but by then it was deemed not important enough to fix.

 

So for each time that the programmer wants to scoot a part of a missile or a player over by an amount less than 15 pixels, he will need to strobe HMOVE after setting the appropriate horizontal movement register, and do the strobe when he wants the adjustment to occur...

 

And this is why that happens.

 

Vertical Scrolling:

 

You're quite right that the TIA does not have scrolling registers. What it does have is of course, the aforementioned delay registers, and since you're generating the display on a line by line basis,you can of course add and remove lines from the display as needed to create a smooth vertical scroll.

 

Horizontal scrolling takes either rewriting the playfield and/or creating the illusion of horizontal scrolling with players, and missiles...and especially the ball, because the ball has the same color as the playfield.

 

Hope this makes sense.

-Thom

Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

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.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...