21 April 2009, 20:27 | #1 |
Registered User
Join Date: Apr 2009
Location: Bologna, Italy
Posts: 21
|
DIWSTART and sprite
Hi to all!!
In all the tutorials that I've read in these days the value for DIWSTART $2c81. If I want to put a sprite in my visible display at (0,0) (the topmost left corner) I must add 40 to the x component of the sprite... Why not 81? This isn't clear... Thanks for the hints!! |
21 April 2009, 20:39 | #2 |
Registered User
Join Date: Apr 2009
Location: Bologna, Italy
Posts: 21
|
Wait! Maybe I understand! I forgot the 9th (the LSB) bit for the HSTART of the sprite!
|
22 April 2009, 13:15 | #3 |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
Yeah the LSB is in another register and so the other register allows you to position the sprite horizontally across the entire screen in steps of 2 lowres pixels.
This is bit of an annoyance when moving individual sprites, but it facilitates building an entire background out of sprites by redrawing them several times on the same scanline using the copper. If you had to write two registers to reposition it properly it wouldn't be doable on the OCS machines. Personally I think this is by design for that very purpose and it's impressive that the hardware design team were so foreseeing. |
22 April 2009, 13:24 | #4 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,602
|
Leffmann, you just wait...! There are many more beautiful designs in the Amiga chipset, just waiting for a coder to want that special effect, and to realize that "oh, so that's why the design/register address/blitter function was made this way. Good. Otherwise my effect would have been impossible. It's like all possible operations and rendering have been foreseen. Scary sometimes.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Settlers sprite | zdechlak | project.Sprites | 1 | 02 March 2019 10:55 |
diwhigh/diwstart problems | Jherek Carnelia | Coders. General | 4 | 07 April 2011 19:08 |
sprite overscan | jamiejamie | Coders. General | 11 | 02 February 2011 16:59 |
The Plague - no sprite in WinUAE | andreas | support.Games | 0 | 27 October 2001 22:38 |
|
|