English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 12 March 2016, 18:25   #1
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,500
Changing sprite images in long display lists

To change the image of a sprite (channel) you will just point its SPRxPT to a different display list with the new image.

But let's assume we have a sprite display list which contains multiple images at different locations of the screen. Then this method becomes annoyingly uncomfortable. Or am I missing something?

Having to copy the current bitmap image for every section in this sprite display list seems stupid. So I wonder if it is possible to set SPRxPT to a new display list in the middle of the display? But my feeling is that you can only write SPRxPT during Vertical Blank...
phx is offline  
Old 12 March 2016, 19:20   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,517
You can modify SPRxPT but because Agnus loads next sprite control words after previous sprite has ended (not when new sprite starts), first new fetch from new SPRxPT would be first line of sprite data, not control worlds which most likely is not what you wanted.

It will work if you update SPRxPOS/SPRxCTL with new coordinates and SPRxPT with pointer to new sprite data.

There is also another option: if you don't want to copy coordinates, you can force control wold reload by setting sprite's vertical _stop_ to current (or later) vertical position. Agnus will think previous sprite ends when stop matches (even if it was already ended or is still active!) and reloads next control worlds and continues normally.

Check also http://eab.abime.net/showthread.php?t=81866
Toni Wilen is online now  
Old 12 March 2016, 20:13   #3
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,500
Thanks!
Sorry, completely missed that thread. What a coincidence!
phx 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
MUI and Lists tygre Coders. System 1 05 September 2015 21:17
Using hardware sprite images more than once per lin jimmy2x2x Coders. General 5 20 November 2014 11:30
Towers (Warning, long shot and long post) Drake1009 Looking for a game name ? 2 13 May 2005 00:11
Why does winFellow display full screen and winUAE does not? (images included) AmigaK2 New to Emulation or Amiga scene 1 11 July 2004 17:11
A very long, LONG shot... staticgerbil Coders. General 0 13 April 2003 11:18

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 13:12.

Top

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