|
Subject: RE: [stella] Playfield using "inx" vs "using SLEEP" From: "Fernando Romo" <fromobal@xxxxxxxxxxx> Date: Tue, 23 Aug 2005 14:45:24 -0400 |
Thanks a lot for your comments Lee, I appreciate a lot your answer, I know
that with more time and patience I will achive more interesting things.
Someone told me that Stella BigList was the place in order to receive
amazing feedback (I have received), so taking advantage of that comment, I
would like to share with you this code that draw a square box.
I know that SLEEP is used to waste time (2 machine cycles),,,,,but applied
it to this code is where I did not understand, I mean, how to assume what
beam light is going to do, etc., etc.,
; TOP LINE
lda #%11111111
sta PF0
sta PF1
sta PF2
lda #15
sta WSYNC ; I undestand very well this part
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
lda #%00000000
sta PF1
sta PF2
Picture
lda #15
sta COLUPF
lda #%00010000
sta PF0
SLEEP 2 ; what?
lda #0
sta COLUPF
SLEEP 25 ; for what?
lda #15
sta COLUPF
lda #%10000000
sta PF2
sta WSYNC
inx
cpx #176
bne Picture
; BOTTOM LINE
lda #15 ; I understand very well this
sta COLUPF
lda #%11111111
sta PF0
sta PF1
sta PF2
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
lda #0
sta COLUPF
My best regards
Fernando Romo
>From: "Lee Fastenau" <stella@xxxxxxxxxxxxxxx>
>Reply-To: stella@xxxxxxxxxxxxxxxxxx
>To: <stella@xxxxxxxxxxxxxxxxxx>
>Subject: RE: [stella] Playfield using "inx" vs "using SLEEP"
>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
>surprising.
>
>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.
>
>-Lee
>
> > -----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
> > http://search.t1msn.com.mx/
> >
> > Archives (includes files) at
>http://www.biglist.com/lists/stella/archives/
> > Unsub & more at http://stella.biglist.com
>
>
>
>Archives (includes files) at http://www.biglist.com/lists/stella/archives/
>Unsub & more at http://stella.biglist.com
>
_________________________________________________________________
T1msn. Mas Ztil Cada Dma http://www.t1msn.com.mx/
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://stella.biglist.com
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [stella] Playfield using "inx" , Lee Fastenau | Thread | Re: [stella] Playfield using "inx" , Andrew Davie |
| [stella] Status of Stellalist, Glenn Saunders | Date | Re: [stella] Status of Stellalist, Russ Perry Jr |
| Month |