|
Subject: Re: [stella] Poker Solitaire From: Manuel Polik <cybergoth@xxxxxxxx> Date: Thu, 22 Nov 2001 20:45:55 +0100 |
Hi Brian!
>Hey!
Is it Brion? :-)
>2) I use it inside the kernel, like so:
>
> repeat 2
> (do one scanline of complex stuff)
> repend
>...which has the effect of drawing 2 identical
scanlines, one after the
>other. In a 2-line low-res kernel where you're
modifying GRP0/1 on the
>fly, you have to modify them the same way for each one
of the 2 lines...
>Sure, I could convert to a single-line kernel, but then
I'd have to have
>twice as much sprite data... or else draw squashed,
half-height cards..
>Alternatively, I could get rid of the repeat/repend,
and just paste
>an identical copy of the code... but that's less
maintainable (have to
>make all changes twice)
Well, the status line in Gunfight is in 2LK resolution,
executing 6 (),Y reads & 6 GRPX writes plus 2 color
changes per line _and_ is using only ROM space for
one(!) line :-)
Here it is:
LDX #$0D ; 7 lines to draw
LDY #$06 ; Again 7 lines :-)
NextDigitLine: STA WSYNC
STY COLUP0
STY COLUP1
LDA (tempVar1),Y ;
STA tempVar3
LDA (obstaclePtr00),Y ;
STA GRP0 ;
LDA (obstaclePtr01),Y ;
STA GRP1 ;
LDA (obstaclePtr02),Y ;
STA GRP0 ;
LDA (horPosM0),Y ;
STA GRP1 ;
LDA (movementBuffer),Y ;
STA GRP0 ;
LDA tempVar3 ;
STA GRP1 ;
DEX
TXA
LSR
TAY
TXA
BPL NextDigitLine ;Draw next line
Speaking of your kernel, you'd save both COLUBK writes
when centering your view and doing 5 PF cards only.
And I somehowassume that the TXS/TSX cycles are
currently wasted too.
>But if you really hate the repeat/repend, look again...
85% of the kernel is:
I don't hate it, I only think it pushes you easily into
coding sins that the VCS just won't forgive :-)
>Tell you what though... when I do get the game
functional, I'll go back through
>all this space-wasting inefficient crap, and clean it
up some. Right now I'm
>trying to explain to my 2600 that 3 clubs and 2
diamonds is *not* a flush, and
>that if you have 3 of a kind, it doesn't also count as
a pair! :)
Good Luck on your quest,
Manuel
----------------------------------------------------------------------------------------------
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] Poker Solitaire, B. Watson | Thread | [stella] interrupts.., Yvo Zoer |
| Re: Re: [stella] Copy Protection, John Saeger | Date | [stella] interrupts.., Yvo Zoer |
| Month |