English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General > Coders. Tutorials

 
 
Thread Tools
Old 21 April 2009, 20:27   #1
Camionsauro
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!!
Camionsauro is offline  
Old 21 April 2009, 20:39   #2
Camionsauro
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!
Camionsauro is offline  
Old 22 April 2009, 13:15   #3
Leffmann
 
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.
Leffmann is offline  
Old 22 April 2009, 13:24   #4
Photon
Moderator
 
Photon's Avatar
 
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.
Photon is offline  
 


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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 17:27.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.25104 seconds with 13 queries