Aw: Re: Aw: Re: [stella] Player data loading...semi newbie

Subject: Aw: Re: Aw: Re: [stella] Player data loading...semi newbie
From: cybergoth@xxxxxxxx
Date: Fri, 19 Oct 2001 10:42:46 +0200 (CEST)
Hi Glenn!

> >since the skipdraw branch
> >is way faster than the drawing branch. In fact you'll
> >probably even have to add NOPs or .Ws in there, to match the
> >running times of both branches.
> A problem I see is if you clear out GRPx within Skipdraw that you can't have
> the successful branch that stores graphics to GRP0 just naturally run 
> through Skipdraw as it does in Thomas' example because the data that gets 
> written to it will then get wiped out.  So you have to add a JMP right after
> the data gets written to GRPx that skips over SkipDraw.  This adds cycles to
> the LONG branch of the routine.
> Depending on the timing of the kernel that may be make or break.

Here's an example straight out of gunfight:

The famous skipdraw branch:

SEC             ; Same carry state after both branches
NOP             ; Wasting...
LDA #$00        ; load for GRP0
STA.w COLUP0    ; Special trick, blacks the bullets
BEQ Continue    ; Return...

The kernel:

TXA                    ; A-> Current scannline
SBC verPosP0           ;
ADC #$0B               ; calc if sprite is drawn
BCC SkipDraw           ; To skip or not to skip?
TAY                    ; not necessary when Y holds scannline
LDA (colorShapePtr00),Y;
STA COLUP0             ; Select cowboy color
LDA playerShape00,Y    ; Select Cowboy shape

CPX verPosM1           ; Do missiles
PHP                    ;
CPX verPosM0           ;
PHP                    ;
STA GRP0               ; Execute Write here!

So, you see that no matter which branch is taken,
I'm exactly on the same cycle when hitting
'Continue' - and I'm executing STA GRP0 only once,
with either the cowboy shape or '00'.

Hope all of this makes sense now...


Bei unserem Shoppingpartner waltherliving erhalten Sie einen Gutschein im
Wert von DM 10,00 für Ihren nächsten Onlineeinkauf! Einfach hier abrufen

Archives (includes files) at
Unsub & more at

Current Thread