| |
Sabbi
Registered: Jan 2002 Posts: 8 |
NUFLI Sprite Layer
Hi everybody,
I'm trying to understand what's going on with the sprite layer on NUFLI-Pictures or more precise the NUFLI-Viewer, and something I just don't get.
It's about Y-Position and Y-Expand:
Acording to the Vice-Monitor, Sprite Y-Positions are only written at Raster 43, 45 and 248, while $d017 (Y-Expand) is written at Raster 45 and 46.
So, with no new Y-Positions between 45 and 248, and no $d017-stretcher, how can there be sprites upto 248?
I know I (obviously) oversee something, but I cannot find the missing piece.
Thank a lot for any directions :)
Sabbi
(btw: Observed on 25 Years of Yie Ar Kung-Fu) |
|
... 10 posts hidden. Click here to view all posts.... |
| |
Sabbi
Registered: Jan 2002 Posts: 8 |
Thanks :) Now it's all clear about the magic!
But while we're at the VIC-II Text....
3. In the first phases of cycle 55 and 56, the VIC checks for every sprite if the corresponding MxE bit in register $d015 is set and the Y coordinate of the sprite match the lower 8 bits of RASTER. If this is the case and the DMA for the sprite is still off, the DMA is switched on.
4. In the first phase of cycle 58, it is checked if the DMA for the sprite is turned on and the Y coordinate of the sprite matches the lower 8 bits of RASTER. If this is the case, the display of the sprite is turned on.
The Vic checks TWICE if the Y-Coordinate is same as the raster? So if you change SpriteY on cycle 57, the DMA is on, but the sprite will not be visible? |
| |
tlr
Registered: Sep 2003 Posts: 1790 |
Yes.
See here: http://vice-emu.svn.sourceforge.net/viewvc/vice-emu/testprogs/V..
(spriteenable[1-5].prg)
The source is in core[1-5].asm.
|
| |
Sabbi
Registered: Jan 2002 Posts: 8 |
Intresting... Inactive Sprites eating Cycles :) |
| |
Digger
Registered: Mar 2005 Posts: 437 |
OK, so 1 extended layer of sprites (42px high) + 3 times wrapped extended sprites (3 *42 = 126px) gives 168 pixels. The NUFLI pic is 200 px high. What about the remaining 32 lines? If the "sprite crunch" trick is only performed once (@ lines 45 and 46) how can this work?
Anyone wants to play with the source, here's what I've got so far...
https://gist.github.com/956683 |
| |
Sabbi
Registered: Jan 2002 Posts: 8 |
Digger: Not checked, but afaik the sprites are multiplexed once.
At raster 43 is the first Y-Position for the 168 stretched-sprites is set, at raster 45 already the next position (Y + 168) is set to have 42 extra-lines of normal expanded sprites.
|
Previous - 1 | 2 - Next |