Re: [stella] Thinking like a computer (harder than it sounds)

Subject: Re: [stella] Thinking like a computer (harder than it sounds)
From: Eckhard Stolberg <Eckhard_Stolberg@xxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 27 May 1999 15:54:52 +0200
At 16:59 26.05.99 -0700, you wrote:
>     When the computer powers up, I put at memory location FFFC and
>FFFD the memory address it is to start running from (since it's a 6502,
>I put the last two bits of the location in the first register and the
>first to bits in the second register, right?).  At that location, I

If your start address is F123 you would put it like

FFFC 23
FFFD F1

If that is what you meant, you are correct.

>     I'm wondering if this is too much to put in that space of time
>between when the computer starts the VBLANK and it hits the imagery
>seen on TV.

On the VCS you have 37 scanlines between the VSYNC and the drawing
of the picture and 30 scanlines between the drawing of the picture
and the VSYNC to do game calculations. If you don't need the full 192
scanlines to display your game graphics, you can blank out some more
scanlines and use them for game calculations as well. If this is
not enough time for your algorithm to finish, you have two possibilities.

You could blank the entire screen for some frames and do all your
calculations in one big chunk. The chess game and the checkers games do
this when they are calculating their moves.

If you want the display to remain on the screen all the time, you
could split up the code into several subroutines and execute them
in consecutive frames. Like reading a flag at the beginning of the
frame. If the flag is 0 you do the joystick checking and pointer
positioning. If the button gets pushed this routine puts a 1 into the
flag. In the next frame the flag reads 1, so you branch to the
card checking routine instead of the joystick routine. This routine
sets the flag to 2 when it is finished, so in the next frame you can
branch to the graphics updating routine, which ends with setting the
flag back to 0 etc.

I think the last method would work best for the games you are planning
to do.

>     That's the problem for Solitaire, and it gets more complicated
>with a game like Columns.  To make a long idea short, I am envisioning
>a series of 208 registers,  two spots for each square in the 8 by 13
>well.  One of the pair would tell if there is a jewel there, the other
>will denote it's color.  Since the idea is to match the colors in three

Isn't Columns only 6 by 13? Anyway, the problem that I see here is
that the VCS has only 128 bytes of RAM and you would need some of
that for pointers to graphics etc. So would need to change the
memory layout for both of your games or change to a format with some
extra RAM. But since nobody has yet designed a cheap and easy to make
homebrew cart with extra RAM, you probably can only use the Supercharger.
(Chris might have designed a cart with lots of extra RAM that he is
only hiding from us though. ;-) )


Ciao, Eckhard Stolberg



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

Current Thread