pouët.net

c64 assembler helpz neededs

category: code [glöplog]
 
hi.

i am too dumb to seamlessly align 2x7 xy stretched sprites with 2 interrupts (raster bars won´t work here, need all the time) in the same bank.

i already thought of speedcopying the contents between interrupts as a manual bankswitch equivalent, but it eats too much time, too.


ldx #$ab
ldy $d012
iny
iny
iny


sty $d001
sty $d003
sty $d005
sty $d007
sty $d009
sty $d00b
sty $d00d


stx $07f8
inx
stx $07f9
inx
stx $07fa
inx
stx $07fb
inx
stx $07fc
inx
stx $07fd
inx
stx $07fe


this just takes fucken too much time.

what am i missing here?

thanks,
best
WS
added on the 2012-01-13 20:20:40 by wertstahl wertstahl
ok got it. if one loses one line of the second set of sprites, it´s possible.

nevermind
WS
added on the 2012-01-13 20:40:27 by wertstahl wertstahl
Nice. Now go make a demo about it!
added on the 2012-01-13 21:01:10 by Emod Emod
That is actually, what i am doing :-)
added on the 2012-01-13 21:42:52 by wertstahl wertstahl
Quote:

what am i missing here?

You can change y position as soon as the sprite have started being displayed.
If you are able to switch screens you can switch all sprite pointers at once by setting $d018
If you cant switch screens for some reason and have memory to spare you can use intermediate sprites and get plenty of raster lines to switch sprite pointers.See wvl's explanation of intermediate sprites from here:
http://www.lemon64.com/forum/viewtopic.php?t=15021&postdays=0&postorder=asc&start=28
Quote:

an example.

situation : you have 2 sprites on top of eachother, say sprite 1 is at y-position 0 and sprite 2 is at position 21.

this is what you do.

-before position 0, you write the position of sprite 1 to the sprite register and the correct sprite image.

-between position 11 and 20, you write the position of sprite 2 to the sprite register, and swap the sprite-image to the extra inbetween sprite image.

-between position 21 and 31 you swap the sprite image to the complete bottom sprite image.

that's it.

now, if your 2 sprites look like

sprite 1 :

AB
CD

sprite 2 :

EF
GH

your inbetween sprite has to look like :

EF
CD

added on the 2012-01-13 22:03:08 by hollowman hollowman
yeh. i was looking for a way to AB multiplex. like

ABCDEFG and the next row
HIJKLMN. gapless.

it should be easy with bank switching. but i wanted to do it without, because i have very much stuff going on on the screen. and before i go through hell to double buffer all that stuff, i took the shortcut through a more tiny, hotter hell to find a way to get displayed what i desired.

that is now a matrix of 6,5 x 24 * (21 x 2)-1 , x and y expanded. i guess it can freely move vertically without flicker, no resync needed. i am only using interrupts, no rasters tables, and i find that really satisfying, because i only use like 9 raster lines for the sprites so i can have *alot* going on, still.

now i have a severe headache and must sleep. thanks for the feedback. maybe all i needed was some sort of virtual competition ;-)

pouet rox. scene, too!

best WS
added on the 2012-01-13 22:14:54 by wertstahl wertstahl
reading this again, hollowman: the d018 bankswitch hint is superb. thanks for that!
added on the 2012-07-06 02:43:36 by wertstahl wertstahl
my 2 cents: you may also preload 2 sprite registers into A&Y before getting to the stx inx stuff.
added on the 2012-07-06 10:54:35 by Oswald Oswald

login