R: R: [stella] Virtual Pet (demo 1)

Subject: R: R: [stella] Virtual Pet (demo 1)
From: "Piero Cavina" <p.cavina@xxxxxxxxxxxxx>
Date: Sun, 28 Sep 1997 15:07:39 +0200
> sunset
>	lda  rbow,x	;6	draw the sunset
> 	sta  COLUBK	;3
> 	lda  mount,x	;6	draw the mountains
> 	sta  PF0	;3
> 	sta  PF1	;3
> 	sta  PF2	;3
> 	sta  WSYNC	;3
> 	dex		;2
> 	bne  sunset	;3

I think that it is a good habit to put the graphic registers-loading
instructions immediately after the STA WSYNC.
When I'm working on the kernel, I usually think in the following way...:

  (..drawing n-th scanline..)
- near the end of the scanline, prepare something for the next... (LDA,
- STA WSYNC (start of (n+1)th scanline)
- finish preparing things if you couldn't do everything before
- load the registers (STA, STY, STX...) hopefully BEFORE they're read by
the TIA for display
This isn't really necessary for a simple program as above, but when yor
will be more complex thinking in this way could become important (IMO).

> As you can see, the background colour values are different for each line
> but the mountains repeat every two lines. This is what makes them look 
> blocky. I tried it every one line, but then the mountains don't
> look as "majestic".

Ok, if you're happy, we are happy... :)
What about some slowly moving clouds?

> Incidently, the first time I ran this I forgot the WYSNC. The effect was
> quite interesting. It was changing the background colours and playfield
> graphics in mid scanline. Very interesting effect. One of those things I
> stuck away in my "to be exploited later" file. ;)

Boys, how many interesting things I've done _by chance_.
Here's the background music in Oystron:

       LDA    #6
       STA    AUDC1
       LDA    FRAMEC
       ADC    CURRNMY
       STA    AUDF1
       LDA    #2
       STA    AUDV1

FRAMEC is a counter with a step of 5... 0,5,10,15.. CURRNMY is the id of
the current enemy (0-13). Do you think that I was really looking for music
when I wrote this code? ;)


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