English Amiga Board Amiga Lore



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  
AdSense AdSense  
Advertisement:
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
Leffmann with two n's

Leffmann's Avatar
 
Join Date: Jul 2008
Location: Sweden
Posts: 1,394
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
Oldskool Demo Coder
Photon's Avatar
 
Join Date: Nov 2004
Location: Hult / Sweden
Age: 42
Posts: 3,898
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  
AdSense AdSense  
Advertisement:
 


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 0 19 November 2012 14:46
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 05:44.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Page generated in 0.08912 seconds with 11 queries