English Amiga Board    


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

Reply
 
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   Reply With Quote
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   Reply With Quote
Old 22 April 2009, 13:15   #3
Leffmann
Leffmann with two n's
 
Leffmann's Avatar
 
Join Date: Jul 2008
Location: Sweden
Posts: 1,187
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   Reply With Quote
Old 22 April 2009, 13:24   #4
Photon
Oldskool Demo Coder
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Hult / Sweden
Age: 41
Posts: 3,673
Send a message via MSN to Photon
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.
__________________
Henrik. Programs Amiga demos, iPhone apps, websites, etc.
A1000/512k - A500 2.0/040@28/4M/.5M slowmem/8M/SCSI/CF - A600 portable II 3.1/ACA630/WiFi/CF - 'A1700' 3.1/68060@80/64M/IDE-Fix Express/CF - etc."The difference between PC and Amiga is that 10yo PCs are worth $0. 20yo Amigas are worth a lot, and Amigas that are only 15yo cost a fortune!"
If you like Portal 2, try my >> single player and cooperation maps <<
Photon is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Deluxe Paint -> sprite Camionsauro Coders. Tutorials 11 20 April 2009 15:05
Sprite Archivery Website Ultron project.Sprites 17 11 December 2006 17:37
Disable Sprite Collisions DeAdLy_cOoKiE Retrogaming General Discussion 4 24 March 2006 17:56
The Plague - no sprite in WinUAE andreas support.Games 0 27 October 2001 22:38


All times are GMT +2. The time now is 15:41.

-->

Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Page generated in 0.14778 seconds with 9 queries