English Amiga Board


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

 
 
Thread Tools
Old 08 July 2018, 00:36   #1
Yragael
Registered User

 
Join Date: Jun 2017
Location: Paris
Posts: 43
New tutorial on sprites

Hi


For those who need some basic code to start with sprites in assembly language, I just published this article :


http://www.stashofcode.fr/afficher-s...s-sur-amiga-1/


Written in french, but if you don't read french and are looking for code, just download the archive that contains those basic samples :



spriteCPU.s for displaying a 4 colors sprite using the CPU only (ie: no DMA)

sprites.s for displaying a 4 colors sprite and moving it around

sprites16.s for displaying a 16 colors sprite and moving it around

spritesField.s for "repeating" a sprite (ie : display it at different horizontal positions at different vertical positions)

spritesCollision.s for detecting collision between two sprites, and between a sprite and one bitplane

spritesPlane.s for displaying a "bitplane" made of sprites (ie : display the same sprites several time at the same vertical position so that they cover the screen)

spritesAGA.s for displaying four 16 colors sprites that are 64 pixels wide on AGA systems (contains infos about how to enable sprite scan doubling and other AGA sprites features)


Have fun!
Yragael is offline  
Old 08 July 2018, 01:14   #2
ross
Sum, ergo Cogito

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 48
Posts: 1,363
Very interesting and complete tutorial (like usual )
Commendable that both horizontal and vertical multiplexes have been dealt.

ross is offline  
Old 08 July 2018, 10:28   #3
Yragael
Registered User

 
Join Date: Jun 2017
Location: Paris
Posts: 43
@ross: Thanks


A little bug corrected this morning in triplePlayfield.s : for an unknown reason, PF2P2 and PF1P2 must not be set in BPLCON0 for the triple playfield to work on A500 (would work wether those bits are set or not on A1200...).
Yragael is offline  
Old 08 July 2018, 11:13   #4
ross
Sum, ergo Cogito

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 48
Posts: 1,363
Quote:
Originally Posted by Yragael View Post
A little bug corrected this morning in triplePlayfield.s : for an unknown reason, PF2P2 and PF1P2 must not be set in BPLCON0 for the triple playfield to work on A500 (would work wether those bits are set or not on A1200...).
Are you referring to PFxPx in BPLCON2?
There are some combinations that produce strange effects on OCS, see "Undocumented Amiga hardware stuff" thread.

Last edited by ross; 08 July 2018 at 11:29. Reason: plurals...
ross is offline  
Old 08 July 2018, 12:07   #5
redblade
Zone Friend

redblade's Avatar
 
Join Date: Mar 2004
Location: Middle Earth
Age: 34
Posts: 1,187
Seems to translate nicely with google translate. Great tutorial
redblade is offline  
Old 08 July 2018, 12:30   #6
Yragael
Registered User

 
Join Date: Jun 2017
Location: Paris
Posts: 43
Quote:
Originally Posted by ross View Post
Are you referring to PFxPx in BPLCON2?
There are some combinations that produce strange effects on OCS, see "Undocumented Amiga hardware stuff" thread.

Ok. I will check the thread and update the article accordingly.
Yragael is offline  
Old 08 July 2018, 12:41   #7
Yragael
Registered User

 
Join Date: Jun 2017
Location: Paris
Posts: 43
Quote:
Originally Posted by ross View Post
Are you referring to PFxPx in BPLCON2?
There are some combinations that produce strange effects on OCS, see "Undocumented Amiga hardware stuff" thread.

I checked and this is what Tony Willen reported in the thread. I quote and underline. Thanks for noticing it :


Dual playfield:

Any number of planes. No 5+ requirement here.


If playfield's matching BPLCON2 PFx value is >=5 and if playfield is not transparent, it is always drawn using COLOR0. PF2PRI still work normally, only color selection becomes strange. (Used in Running man / Scoopex intro's logo). If both PF1 and PF2 is >=5: both playfields disappear, only background color (and sprites) are visible.
Yragael is offline  
Old 10 July 2018, 13:11   #8
roondar
Registered User

 
Join Date: Jul 2015
Location: The Netherlands
Posts: 640
Nice work, clear examples and I like the screenshots
roondar 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
Filesystem tutorial? NorthWay Coders. System 5 10 March 2015 14:38
Datatype tutorial rams Coders. System 2 30 August 2013 01:10
OS X eUAE Tutorial ElB support.OtherUAE 3 27 November 2008 23:50
Protracker Tutorial Paradise Decay Amiga scene 2 16 January 2005 14:15

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 02:19.


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