[stella] Some Background Questions That Occur To Me (addendum)

Subject: [stella] Some Background Questions That Occur To Me (addendum)
From: "Eric Ball" <ericball@xxxxxxxxxxxx>
Date: Fri, 1 Aug 2003 19:56:18 -0400
From: "Pete Holland"
> 1)  How did they come up with the color clocks/machine
> cycles?  I don't mean how did they measure them, but
> rather, what reasoning did they use to come up with
> having the TIA count color clocks and that three of
> them equaled one machine cycle?  Was that simply the
> limits of what was available at the time?

As mentioned, the TIA was designed to use a standard NTSC 3.58MHz colorburst
clock as a pixel clock.  I suspect that you are right and 1.19MHz was the
maximum speed within the limitations of the NMOS 6502 (or one of the other
2600 chips) of that period.  It should also be noted that the 7800 used a
customized 6502 at 1.79MHz (half colorburst) in 7800 mode, but dropped back
to 1.19MHz to access the TIA and RIOT registers.

> 2)  I'm paraphrasing:  to start drawing the player,
> you activate the graphics at the color clock position
> it's supposed to appear at.  One of the big hang ups
> is the screen.  Does the math about the color clocks
> and screen display only apply to the area covered by
> the playfield et al, or is it possible to draw a
> little outside the playfield?  I wonder because games
> like Space Invaders, the invaders are limited to how
> far they move, but the bottom of the screen, the
> "land" goes off the screen.  Is that simply a
> background color, and it gets drawn no matter what, or
> is that part of the playfield?

The TIA is unable to draw any graphics (other than the background color)
outside of the 160 active pixels per line.  (Note: the infamous HMOVE blank
will reduce this even further.)

As to positioning the player/missile/ball graphics, the program strobes
RES?? at the correct CPU cycle to position the graphics within +-7 pixels of
the desired position, then sets the HM?? register with the desired offset,
then strobes HMOVE immediately after a WSYNC.  Once the player graphics are
positioned, the GRPn register is set with the desired 8 bit pattern.

The best way to understand this is to build a demo program and learn what
all those columns of numbers in Z26.log mean.  Then search the Stellalist
archives for some 48 pixel sprite routines and figure out how they work.  (I
posted one in January 2003.)

Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/

Current Thread