Re: [stella] the B. Watson's problem...

Subject: Re: [stella] the B. Watson's problem...
From: cybergoth@xxxxxxxx
Date: Mon, 20 Aug 2001 11:12:37 +0200 (CEST)
Hi B. Watson!

Your source looks like this:

> scan_loop:
> sta WSYNC
> sta HMOVE
> ;XXX
> lda pfdata0,y
> sta PF0
> lda pfdata1,y
> sta PF1
> lda pfdata2,y
> sta PF2
> lda (spriteptr),y ; YYY
> sta GRP0 ; YYY
> lda (sprite0ptr),y ; YYY
> sta GRP1 ; YYY
> cpy evpos
> bne skipenemy
> lda #2
> bne drawenemy
> skipenemy:
> lda #0
> drawenemy:
> sta ENAM1
> sta HMCLR
> sta WSYNC
> dey
> bne scan_loop

Some comments:

- This isn't really a 2-line kernel, it's just a *forced* one.
You're doing only one line and expand it via the second STA WSYNC.

- To avoid your problem, you can do the playfield on the first line and the sprites on the second for example.

- Having both sta HMOVE & sta HMCLR inside the kernel is senseless 
(in your case). Do that once outside the kernel.

- Learn how to enable the missile via PHP, find the trick in the combat
source for example. All your branching would be reduced to 

cpy evpos
php

if the stack is set/reset properly before and after the kernel

- Learn how to display sprites properly via subtractions, there's
no need to have tons of bytes zeroed out in the ROM. Find
examples of this technique in the Stella archive under the
'Gunfight' topic. Thomas posted some detailed hints *how* it's done
there. Find it utilised in (some :-)) Gunfight sources as well.

HTH

Greetings,
     Manuel



-----------------------------------------------------------------------
Neu: Die Lern-, Spaß- und Erlebniswelt von Nexgo für Kinder
von 4 bis 12 Jahren können Sie jetzt kostenlos testen:
Klicken Sie einfach hier und ermöglichen Sie Ihrem Nachwuchs
den Vorsprung in der Informationswelt von morgen.
http://www.nexgo.de/family/kinder.php
-----------------------------------------------------------------------


-
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/

Current Thread