RE: [stella] Playfield using "inx" vs "using SLEEP"

Subject: RE: [stella] Playfield using "inx" vs "using SLEEP"
From: "Lee Fastenau" <stella@xxxxxxxxxxxxxxx>
Date: Thu, 18 Aug 2005 23:51:57 -0400
SLEEP is a handy macro by Thomas Jentzsch that's part of the DASM
distribution.  You've probably read that many graphics kernels require
extremely precise timing for positioning graphics, changing playfield
values, and changing colors or other registers.  SLEEP lets programmers
easily waste a specific number of CPU cycles for those purposes.

But SLEEP isn't the only way to burn cycles, and depending on the type of
graphics kernel being built, those cycles might be needed to perform other
operations, like incrementing a counter X ("INX", which burns 2 cycles just
like "SLEEP 2").

Also, there are nearly as many different graphics kernels as there are games
for the Atari 2600 and there are typically many ways to achieve a given
effect... so that difference in code to achieve the same effect isn't too

Before I tackled my first game, I thought there might be "one really good
kernel" that I could write and reuse over and over, because that seemed to
be the most difficult part to code.  But after doing some more research and
a lot of experimentation, I discovered that _because_ the kernel is such a
critical and challenging piece of code to write, that it was the _first_
part that everyone wrote... typically from scratch or "inspired" by another
kernel, but almost never a reused kernel from another game.

After all, it's really the graphics that makes programming the 2600 such a
unique and rewarding experience.

Don't get discouraged.  If you keep reading and practicing, then one-by-one
the light bulbs will turn on.


> -----Original Message-----
> From: Fernando Romo [mailto:fromobal@xxxxxxxxxxx]
> Sent: Thursday, August 18, 2005 5:28 PM
> To: stella@xxxxxxxxxxxxxxxxxx
> Subject: [stella] Playfield using "inx" vs "using SLEEP"
> Hi!
>   I appreciate if someone of this group could help me a little bit
> regarding
> the way we use playfield. When I was reading PlayField section from
> Andrew's
> tutorial in AtariAge Web page, I understood very well the example when he
> showed that using the X counter, I mean "inx", we can see what and where
> scanline we are going to draw,,,,,,,,,,,,,,,,BUT,,,,when I printed the
> Andrew tutorial from another web page, in that tutorial there is the same
> example (draw square box), but using SLEEP instruction.
>   And also when I came across with that instruction, I have not fisnished
> to
> understand how this works?,,,,so,,,,could someone could explain me please?
>   I don't wnat to advance readong more things if I do not understand that
> (SLEEP).
> My best regards
> Fernando Romo
> _________________________________________________________________
> T1msn Search. Todo lo que buscas ahora mas rapido
> Archives (includes files) at
> Unsub & more at

Archives (includes files) at
Unsub & more at

Current Thread