| |
Six
Registered: Apr 2002 Posts: 293 |
Release id #121282 : Cyber Dream
Two things I noticed in this demo I was curious about - first is the parallax scrolling. It looks to me like a x/y expanded hires sprite layer on top of the screen in the part with the stars in front of the and multicolor sprites in the part where the two square-fields float behind the atlantis logo.
Has anyone ever done an effect like this with also a character layer in front for the appearance of 4 moving planes?
Second is the way they service interrupts (at least in the part I looked at) - they keep one location all the interrupts go through, then jump out through a vector, setting d012, and the vector with x/y/a on their way back out. Is there some technical advantage to handling it this way? (Regardless, I thought it was clever and something I'd recycle in my own code)
irq
pha
txa
pha
tya
pha
jmp ($vector)
irqexit
sta $d012
lda #$01
sta $d019
stx $vector
sty $vector+1
pla
tay
pla
tax
pla
rti |
|
| |
Six
Registered: Apr 2002 Posts: 293 |
Tried to edit the url to redirect this to forum 11, but it didn't work :| |
| |
Fungus
Registered: Sep 2002 Posts: 689 |
Six: this type of IRQ handler is pretty common in lots of games. Saves space I guess? =] |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
it saves 4 bytes per additional handler - but adds confusion instead :) i rather wont do this, except its really needed for something in particular :) |
| |
iopop
Registered: Dec 2001 Posts: 317 |
Who stole my irq code?! :)
I've been using something similar to that for the past 10 years. And I probably found it elsewhere. Of course. |