English Amiga Board


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

 
 
Thread Tools
Old 07 July 2018, 23:36   #1
Yragael
Registered User
 
Join Date: Jun 2017
Location: Paris
Posts: 51
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, 00:14   #2
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
Very interesting and complete tutorial (like usual )
Commendable that both horizontal and vertical multiplexes have been dealt.

ross is offline  
Old 08 July 2018, 09:28   #3
Yragael
Registered User
 
Join Date: Jun 2017
Location: Paris
Posts: 51
@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, 10:13   #4
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
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 10:29. Reason: plurals...
ross is offline  
Old 08 July 2018, 11:07   #5
redblade
Zone Friend
 
redblade's Avatar
 
Join Date: Mar 2004
Location: Middle Earth
Age: 40
Posts: 2,127
Seems to translate nicely with google translate. Great tutorial
redblade is offline  
Old 08 July 2018, 11:30   #6
Yragael
Registered User
 
Join Date: Jun 2017
Location: Paris
Posts: 51
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, 11:41   #7
Yragael
Registered User
 
Join Date: Jun 2017
Location: Paris
Posts: 51
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, 12:11   #8
roondar
Registered User
 
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,408
Nice work, clear examples and I like the screenshots
roondar is offline  
Old 04 September 2023, 21:00   #9
Rock'n Roll
German Translator
 
Rock'n Roll's Avatar
 
Join Date: Aug 2018
Location: Drübeck / Germany
Age: 49
Posts: 183
Hi

the assemblercourse or assembler series 'stash of code' is now translated into german (sorry not english)
and can be found on aminet: http://aminet.net/package/dev/asm/asm-kurs_stashofcode
I started 2018, but the most is done in the last year. It's a lot.

the old threads:
New tutorial on BOBs ; https://eab.abime.net/printthread.php?t=93360
New tutorial on sprites ; https://eab.abime.net/showthread.php?t=93298
Tutorial about zooming with BPLCON1 (102) : Looking for examples ; https://eab.abime.net/showthread.php?t=94080
Code / data / tools of Scoopex "TWO" (rotozoom cracktro for Starquake) ; https://eab.abime.net/showthread.php?t=95163
Sinusscroll ; https://eab.abime.net/showthread.php?t=28937&page=5

NB: Cet articles se lit mieux en écoutant l'excellent module
Decoded Feedback - Dark Passenger, mais c'est affaire de goût personnel...

Thanks to Yragael!
Rock'n Roll 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 13:38
Datatype tutorial rams Coders. System 2 30 August 2013 00:10
OS X eUAE Tutorial ElB support.OtherUAE 3 27 November 2008 22:50
Protracker Tutorial Paradise Decay Amiga scene 2 16 January 2005 13: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 20:13.

Top

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