|
Subject: Re: [stella] An exercise in minimalism... From: Eckhard Stolberg <Eckhard_Stolberg@xxxxxxxxxxxxxxxxxxxxx> Date: Thu, 02 Sep 1999 15:30:15 +0200 |
At 00:08 02.09.99 -0500, you wrote:
>Well, not really more correct. Address 0 would be clearing VSYNC. This
>doesn't need to be done during initialization b/c it is done later. I
>wouldn't do it in a normal program, because it could confuse the TV
>alittle to get 2 VSYNC's in such a short time. But as Erik points out,
>here it can be used to save a byte, which is the goal.
The TIA registers are mirrored from address $40 on. So you would
clear the VSYNC register anyway, no matter if you write to $00 or
not, as long as you write to $40.
BTW, if you only want to display a shifting rainbow and don't want
to do any game calculations, then there is no need to set up counters
for the VBLANK or overscan period. You could just keep writing values
to COLUBK throughout the whole frame except for the VSYNC time. So
with the optimizations that have already been discussed, you could do
the following. That would be only 39 or 43 bytes, depending if you
want to do the suggested 262 line per frame or not. 260 scanlines
per frame should sync fine on most TVs too.
Ciao, Eckhard Stolberg
p.s. If you did send your binary as an attachment to this list, I think
you probably need to send another wake-up-call to Glenn directely, as the
last one seems to have been too subtle for him ;-)
processor 6502
include VCS.H
ORG $f000
init:
lda #0
tay
clear: pha
dey
bne clear
newframe: ldx #$02
stx VBLANK
; sta WSYNC ; add these two lines to get 262 scanlines
; sta WSYNC ; per frame
sta WSYNC
stx VSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta VSYNC
sta VBLANK
ldx $80
inc $80
rainbow:
stx COLUBK
inx
stx WSYNC
dey
bne rainbow
beq newframe
ORG $fffc
.word init
.word init
--
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [stella] An exercise in minimal, Mark De Smet | Thread | Re: [stella] An exercise in minimal, Andrew Davie |
| Re: [stella] So I decided to progra, Eckhard Stolberg | Date | [stella] A Cordial Invitation....., yupi9 |
| Month |