Re: [stella] What I've got so far

Subject: Re: [stella] What I've got so far
From: gentlben@xxxxxxxxxxxx
Date: Thu, 08 Jul 1999 17:26:52 -0700
> Tender and chewy, yeah, but probably way above your cholestarol count.
> :-)

maybe so, but some of us have a tremendous cholesterol count...:)

> So by even taking a number from, say, $FCCC and copying it to the X
> register, that will set the zero flag?

only if $FCCC is zero will that set the zero flag.

> Is it possible to compare, say, $FCCC and $F281 directly without
> transfering numbers to the X and Y registers?

you would have to send at least one of those numbers to
either the accumulator or the X or Y registers in order
to compare the other number.  you cannot compare two
numbers without putting at least one in the accumulator
or X or Y.

> Does BEQ branch just one command ahead, or is there a way to set it to
> branch about three commands ahead?

it can branch to any location within the range of -128 bytes
to 127 bytes...the reason for that is because branch instructions
are only two bytes long, and you can branch in either direction.
usually this isnt much of a problem to work with as long as the code
isnt too messy. to jump anywhere in your program without that limit,
you would have to use either JMP or JSR as they are much less
limited...however, JMP and JSR do not evaluate any conditions.

> Got it.  By the way, the programming manual says that writing to the
> VSYNC register initiates the action.  Is just the act of writing to it
> what triggers the VSYNC, or does it have to be a different byte than
> what is in VSYNC at that time so it can tell the difference?  And if it
> has to be a different number, can I just INC or DEC that register to
> produce the results?

it sounds like you're asking if VSYNC is a strobe register
(which WOULD initiate the action described), in this case,
no.  VSYNC uses bit 1 (value 2) to determine whether vertical
sync is performed.  the best way to start vertical sync is
to simply do this:

LDA #$02
STA $00 (VSYNC)

for three scanlines VSYNC must be left at the value of $02,
then to turn off vertical sync, just LDA #$00.  it couldn't
be simpler! :)

> Great.  But what color is produced by VBLANK?  Is it black since the TV
> doesn't show it anyway, or is it whatever the background color is set
> to at that moment?  I guess I'm trying to figure out what color to make
> the background if I make a Columns game and use the extra VBLANKs to
> check for more matches.

VBLANK doesn't produce any colors...you can set the
background to black or green or pink and it wont make any
difference in VBLANK, and wont show any color until
the picture scan lines begin to be drawn, in which case
whatever color is set there is displayed for the background.
a real atari 2600 has randomized values set in the registers
at power-up, so nearly every game puts $00 in the values stored
in the write only registers, which would produce black :)

> Does VBLANK work like VSYNC?  E.G. STA VSYNC and STA VBLANK?

im not sure, but i think the three lines of VSYNC are also part
of vertical blank, its just that the VSYNC signal is there for
3 lines to synchronize the vertical output with the top of the
frame...and vertical blank is there for at least 37 lines to
physically turn off the electron beam.  its my understanding
that some games turn on VBLANK at the same time VSYNC is turned on
but again, i dont know the specifics. so please, dont quote me
on this.

> Grasshopper?  Do I have to shave my head AGAIN? ;-)

no, not this time <gets the tranquilizer darts and the
razor blade and the cream> <evil grin>

dee (p.s. im also sort of a novice can u tell?)


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

Current Thread