| |
Oswald
Registered: Apr 2002 Posts: 5094 |
AGSP - how to use sprite pointers for both sprites and char gfx
just wondering, would it be possible to change screen after sprite pointers have been loaded and before badline operation ? that would solve the problem of visible sprite pointers :)
badline + 8 sprites that is. there is maybe 1-2 free cycle with RMW but where in the line? cant find vic article with google.
or maybe one could write a multiplexer which only allows 7 sprites where critical. |
|
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: just wondering, would it be possible to change screen after sprite pointers have been loaded and before badline operation ? that would solve the problem of visible sprite pointers :)
badline + 8 sprites that is. there is maybe 1-2 free cycle with RMW but where in the line? cant find vic article with google.
or maybe one could write a multiplexer which only allows 7 sprites where critical.
Maybe. You have definitely some time between SPR0-3 fetches and before the bad line to change screen. But then you must switch it back immediately after the bad line otherwise the next line of the sprites will be wrong. So if it's possible at all it would be some inc $d018/dec $d018 and then maybe only some of the middle sprites. From the top of my head so read this with causion. :P |
| |
Fresh
Registered: Jan 2005 Posts: 101 |
I'd been thinking about this problem some months ago for my own agsp routine. IIRC you need at least 5 cycles: last write from a preceeding ST(A/X/Y) $D018 (or RMW) and 4 for the second ST(X/Y/A) $D018.
The first write must happen before bad line *but* after sprite fetch, the second write must happen after badline *but* before next sprite fetch. You definitely lose at least 2 sprites and you have to cope with messy timings if you have - which is normally the case - a dynamic number of sprites in those lines.
IMHO Character & (partial) sprite redefinition is probably the way to go (even though it's clearly heavier). |
| |
HCL
Registered: Feb 2003 Posts: 728 |
It is not possible, i have tried (in another context but..). If you flip d018/dd00 just before the badline, and switch it back at once you loose some 3-4 chars on either side of the screen. Perhaps if you don't need the whole screen width, then you could live with that..
On non-badlines it is possible though. |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
hcl, what if we loose 1 sprite ? that gives back that 3-4 chars on the sides. |
| |
HCL
Registered: Feb 2003 Posts: 728 |
Sounds likely.. :). i guess you just have to try it out in your context and requirements.. |
| |
Cruzer
Registered: Dec 2001 Posts: 1048 |
Would be a cool trick. Graphics Over Sprite Pointers - GOSP. |
| |
Burglar
Registered: Dec 2004 Posts: 1101 |
oswald, google is not your friend, csdb is ;)
VIC Article [english] |
| |
Fresh
Registered: Jan 2005 Posts: 101 |
@HCL
Sorry for bothering you but I think I didn't quite get it.
If I make room (clearly losing 2 sprites) for one STA $d018 before bl and one, say, STX $d018 after it (possibly starting before bl but having its write-cycle after it), how should I get 3-4 garbage characters on either side? Does VIC update char bank some cycles after changing $d018? |
| |
HCL
Registered: Feb 2003 Posts: 728 |
Hmm, on a second thought, i didn't answer your question.. it was the answer to some other question perhaps :P.
So what you want to do is first some AGSP or whatever you call it..well, then you find out where the badline is that will display the sprite pointers as colors, Wait until all sprite pointers have been read, change $d018 just before the badline is triggered, and if possible change $d018 back before sprite pointers are read again. Ok, now even i am with out :).
Not sure if the first part is possible even, but i'm sure that doing both d018-stores are not possible as i think i recall there is only one cycle left when you have both badline and 8 sprites. If reducing number of sprites, maybe..
So.. the answer became sort of the same :P. The issue with loosing some 3-4 chars on the screen was related to something else i made, though similar problem.. It's so cool your heads would probably explode if i told you, but at the same time it didn't work with less than loosing 3-4 chars on either side of the screen :(. |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: Hmm, on a second thought, i didn't answer your question.. it was the answer to some other question perhaps :P.
So what you want to do is first some AGSP or whatever you call it..well, then you find out where the badline is that will display the sprite pointers as colors, Wait until all sprite pointers have been read, change $d018 just before the badline is triggered, and if possible change $d018 back before sprite pointers are read again. Ok, now even i am with out :).
Not sure if the first part is possible even, but i'm sure that doing both d018-stores are not possible as i think i recall there is only one cycle left when you have both badline and 8 sprites. If reducing number of sprites, maybe..
So.. the answer became sort of the same :P. The issue with loosing some 3-4 chars on the screen was related to something else i made, though similar problem.. It's so cool your heads would probably explode if i told you, but at the same time it didn't work with less than loosing 3-4 chars on either side of the screen :(.
Spoke to my bro and according to him Exilon/HZ did some research with this for a game and came to the conclusion that 6 sprites are possible. Trust the old lords! |
... 17 posts hidden. Click here to view all posts.... |
Previous - 1 | 2 | 3 - Next |