Re: [stella] a thing that doesn't let me sleep...

Subject: Re: [stella] a thing that doesn't let me sleep...
From: emooney1@xxxxxxxx (Erik K Mooney)
Date: Sat, 23 Aug 1997 11:35:47 -0400
>...how could they put seven aliens per row in Atari Galaxian?

Short answer: lots and lots of code :)  It's an 8k game... disassembling
the code
shows about half of the second bank to be mostly the same section of code
repeated over and over, except with small differences.  May even be as
much
as a different routine for each possible combination of aliens present on
any
particular row.... either that or a different routine for each possible
number of
pixels for the leftmost alien to be offset from the left edge of the
screen.

All the aliens are done with player 0, leaving player 1 to draw the
aliens that have
left the formation and are attacking the player, and to draw the
explosions when the
player hits an alien.  Looks like the ball is used for the player's
missile within the alien
formation, and the invaders cannot drop missiles until they are below the
lowest line
of the formation.  Here's a snippet from Distella:

LF2DB: LDX    #$FC    ;2
       STA    WSYNC   ;3
       LDA    ($80),Y ;5
       STA    GRP0    ;3
       LDA    ($82),Y ;5
       STA    GRP1    ;3
       LDA    $86     ;3
       STA    $0110   ;4      this is just STA RESP0 but adds an extra
1-cycle delay
       STA    NUSIZ0  ;3    Player 0 first gets positioned at pixel 74
from WSYNC
       LDA    $87     ;3
       NOP            ;2
       STA    RESP0   ;3    pixel 107
       STA    NUSIZ0  ;3
       LDA    $88     ;3
       INY            ;2
       STA    RESP0   ;3    pixel 140
       STA    NUSIZ0  ;3
       LDA    $89     ;3
       NOP            ;2
       STA    RESP0   ;3   pixel 177
       STA    NUSIZ0  ;3

After playing the game for about 20 seconds and exiting into PC Atari's
debugger, the
values at $86, $87, $88, and $89 were 2, 3, 3, and 0 respectively.  So,
apparently,
hitting RESP0 every 11 cycles and writing different values to NUSIZ
allows multiple
copies of objects (?)  The vertical delay is also set, if that matters.

--
Archives updated once/day at http://www.biglist.com/lists/stella/archives/
Unsubscribing and other info at http://www.biglist.com/lists/stella/stella.html

Current Thread