pojr, on Fri Mar 11, 2011 12:57 AM, said:
The more sprites that line up horizontally, the more flickering since the Atari scans horizontally. If sprites line up vertically, they don't flicker?
Basically, that is correct (if we are dealing with a single sprite object of the available five). To implement the latter, sprite muliplexing would need to be used. Multiplexing is ignoring the sprite definition that existed on preceding scanlines, and repositioning/rewriting it during the display to act as a new sprite. This method robs resources...you'd normally need to create some kind of sprite list that has all of this decided before entering the display kernel to draw the screen...and pull these variables out of the "cache" and deal with them individually as the screen is being drawn.
Depending on the complexity of the display (and what resources you have available), multiplexing may not always be an option.
Quote
Sprites can make copies, but they have to be a certain length apart. The sprite copies don't contribute to flickering?
No flicker...because a copy is just a double or triple image of the sprite. However, a sprite's bitmap image may be altered
before the copy needs to be displayed. This is how games are able to create 48-pixel images (like the Activision logo) using just the 2 8-bit sprites. Another advanced method is to rewrite the copy or positioning registers AS the line is being displayed (this is how Galaxian gets 7 sprites on a line with no flicker).
Quote
Background pixels are extremely wide, but are not very tall, which is why backgrounds can make narrow horizontal lines.
Playfield pixels are 4 sprite pixels wide. Bitmap information is sent to 2 8-bit registers and 1 4-bit register (20 pixels). That creates the left side of the display. The same bitmap image is either reversed or mirrored to create the 20 pixels on the right. If you wanted the 2 sides to differ (asymmetrical...such as dot patterns in Pac-Man), the registers' bitmaps need to be altered as the scanline is being drawn.
But "tall" does not really apply to anything. The 2600's sprite and playfield registers are used to create a
single scanline. Doing nothing on the next scanline will simply cause the same information to display for the next (this is a problem if your original scanline is designed to rewrite the registers as it's being drawn, tho). An image can therefore be as "tall" as you want. Most are familiar with the random color bars that appear if the console is powered up with no cartridge present. This is simply the random values that exist in the display registers spilling out to the screen over and over - there is no program present to alter them.
Quote
I have no ideas what missiles and "the ball" are.
Just Atari's names for the sprites. These have no bitmap register that the
players do (Atari's name for the 8-pixel sprites)...they can just be enabled or disabled. These 3 additional sprites have limitations, tho.
Missile sprites take some of their characteristics from their corresponding
player sprite (such as number of copies and color), while the
ball sprite gets it's information from the playfield registers (color and whether it overlaps the other sprites...called sprite
priority). However, each one of them can use their own amount of stretching.
To save setup time, a missile sprite can also be "locked on" to it's corresponding player's position. This makes it easy for a program to initialize a missile from it's corresponding player's horizontal position on a scanline. In other words, if you "shoot a gun", just have the missile sprite lock on to wherever the player is when the "gun" is fired...and begin moving it from there.
Another handy set of registers contain
horizontal motion information. By setting the HM's to move a sprite a given number of pixels whenever HMOVE is called, the program does not need to deplete from it's resources...it just updates wherever the given sprite(s) is drawn horizontally. In this manner, a "bullet" only needs to be tracked vertically to decide when to enable the missile sprite. The HM register can handle the horizontal. A simple Pong game can be programmed using only a few
bytes of ram...2 holding the vertical location of when to draw the paddles, and one to hold the vertical location of when to enable the ball. A forth byte keeps count of the number of scanlines drawn to match either one.
Pong is such a simplistic game that the entire program can be fit
into the native ram (so you could powerup the console with a cartridge that puts the program in ram, and be able to play the game even if you remove the cartridge later).