[stella] "plane" bi-sprited

Subject: [stella] "plane" bi-sprited
From: Gonzalo Fernández <horcas@xxxxxxxxxxxxxxxxxx>
Date: Sun, 5 Aug 2001 19:57:02 -0300
Hi everyone!

Manuel escribió:
> Can't wait too see that! Your demos so far look damn promising! I'm
> really looking forward to every new version you send.

I really appreciate your words. And here is the .bin!!

well, the new kernel allows me to use the player 1 and get two sprites on
screen in different horizontal lines.

I think that you can predict the algorithm watching the black line on the
left side of the screen (caused by HMOVE). It's something like this:

3 sections of kernel: k1, k2 and k3

register Y is the line counter.

    draw island
    if (VerPosSprite1 > Y) {go to k2, there's no need to draw this sprite}
    draw sprite 1    (when it's time)
    bne k1
    jmp exitKernel

    HorPosSprite2 is the new hor. pos. of player 1 (custom HorPos routine,
it needs to be adjusted)

    draw the rest of the island
    draw sprite 2    (when it's time)
    bne k3
    jmp exitKernel


This is a 2LK. In every section, there's a line that draws the plane and the
background and it's the same in the three sections... I think it can be
reused without sacrify many cycles. I tried to do it using ind abs jmp:
jmp(address) in the reused line and updating the address in every section
insted of make a jmp k2, or k3 when I ask for (VerPosSprite1 > Y). (the
address is a pointer to k2 or k3). But it didn't work. I did something like

lda #>k2    or k3
sta address

when it's time to change the section, and before I had a

lda #<k1
sta address+1

If the all kernel doesn't cross a page boundary I wouldn't need to change
the address+1, right? but maybe this was the problem.

Thanks, sorry if it was hard to read this mail.


Ps: I know the shadow of the palm tree sucks, but there's nothing to do.

Attachment: Plane.bin
Description: Binary data

Attachment: Plane.vcs
Description: Binary data

Current Thread