[stella] What I've got so far

Subject: [stella] What I've got so far
From: Pete Holland <petehollandjr@xxxxxxxxx>
Date: Wed, 7 Jul 1999 17:15:49 -0700 (PDT)
Okay, gang.  Here's what I've got.
     First up, supposing I use a BEQ, writing it as:
     BEQ  #0
     (I believe #0 means numeric value zero, right?)  Does the computer
check the last value to be changed against the value or location I list
after the BEQ command, like if I Decrement X (DCX?), or does it compare
the X, Y, and A registers all against the value after the BEQ?
     I don't have the commands handy, but I recall commands that
allowed me to INCrement or DECrement things held in actual memory
locations.  With this in mind, how close is this to what I need to do
for the solitaire game?
     WSYNC
     VBLANK
     During this VBLANK, I put a couple of commands--nothing heavy.  I
then VBLANK again, start the next command, etc.  I do this thirty-seven
times, breaking up the commands to fit within the VBLANK times.
     Next, I start drawing the screen.  Assuming I can DEC a value in
memory location and compare that instead of constantly shifting the
values into and out of the X or Y registers, I do this:
     LDX  #192
     STX  LINECNT
     Draw screen commands here.
     DEC  LINECNT
     BEQ  #0
     JMP  Two commands down
     Clear all carry flags (just to make sure)
     JMP  Back to the draw screen commands.
     Clear all carry flags
     LDX  #30
     STX  LINECNT
     VBLANK
     Do any extra game calculations I can here.
     DEC  LINECNT
     BEQ  #0
     JMP  Two commands down
     Clear all carry flags
     JMP back to VBLANK command
     JMP back to top of all this, start the cycle over
     Am I getting closer, or no?
     Also, some other questions.
     Erik Mooney wrote that during the first set of VBLANK commands, I
have time for 800-1000 commands.  A FAQ I boosted off the 'Net says I
have time for 80-100.  Did someone misplace a zero, or are both answers
correct and I'll discover how to do both with practice?
     What color is produced by VBLANK?  If I need extra time to
complete game calculations, like in the Columns example about a month
ago, can I start VBLANKing as soon as I draw the last part of the
screen needed, buying myself a little more time to work on things?
     To save time, I'm envisioning in the mental flowchart I came up
with then starting the VBLANK after VSYNC with checking for a joystick
input.  If none, it just bounces through to the screen drawing part. 
If there is, if first checks what kind it is.  If I put the "check what
it is" subroutines here, I should be able to just have the computer do
a subroutine when needed, and that won't tie up the processor during
the VBLANK because, if done right, only a couple of commands will be
needed and I can send the program right back to the VBLANK cycle before
the beam reaches the edge, right?
     Am I getting closer, or am I getting all this royally wrong?

"We don't need no new set of standards,
"We don't need no new set of rules."
     Operation Ivy
     -"Take Warning"
     (With apologies, I know I took that completely out of context.)

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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

Current Thread