🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #13293

re: Amiga Sprites question

#13293
From: Jeff Petkau
Date: Wed, 03 Jan 1990 07:06
30 lines
1953 bytes
> I've been fiddling around with the Amiga's sprites recently and it
> doesn't seem possible to control the depth of a sprite.  When I had
 
In the custom structure (hardware/custom.h) you will find the BPLCON2 register.  The bits in here are defined as follows (from p.200 of the hardware manual):
 
Bit No.   Name    Function
15-7              Not used (keep at 0)
6         PF2PRI  Playfield 2 priority relative to playfield 1
5-3       PF2Px   Playfield 2 priority with respect to sprites
2-0       PF1Px   Playfield 1 priority with respect to sprites
 
Priority of playfields based on values in bits PF1P2-PF1P0:
 
Value              Placement (from most important to least)
000           PF1    SP01    SP23   SP45   SP67
001           SP01   PF1     SP23   SP45   SP67
010           SP01   SP23    PF1    SP45   SP67
011           SP01   SP23    SP45   PF1    SP67
100           SP01   SP23    SP45   SP67   PF1
 
Where PF1 stands for playfield 1, SP01 stands for sprites 0 and 1, 
SP23 stands for sprites 2 and 3, etc.  The other bits (6-3) are only important in dual-playfield mode.
 
Now that I've described the register in struct Custom, DON'T USE IT.  There is a ubyte in the ViewPort structure (vport->SpritePriorities) which has exactly the same meaning.  So to fool with sprite priorities,change this byte, then do a MakeScreen() and RethinkDisplay() and life will become wonderful.

--  
Jeff Petkau - via FidoNet node 1:140/22
UUCP: alberta!dvinci!weyr!Jeff.Petkau
Internet: Jeff.Petkau@weyr.FIDONET.ORG
Standard Disclaimers Apply...
Technical Details
Message-ID: <128.25A1B88D@weyr.FIDONET.ORG>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!ubc-cs!alberta!dvinci!weyr!Jeff.Petkau

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!ubc-cs!alberta!dvinci!weyr!Jeff.Petkau
From: Jeff.Petkau@weyr.FIDONET.ORG (Jeff Petkau)
Newsgroups: comp.sys.amiga.tech
Subject: re: Amiga Sprites question
Message-ID: <128.25A1B88D@weyr.FIDONET.ORG>
Date: 3 Jan 90 07:06:01 GMT
Organization: Benden Weyr, Saskatoon Sk. (306)-382-5746
Lines: 30