[comp.sys.amiga.tech] Amiga Sprites - why do they do this?

gbbrooks@sybil.cs.Buffalo.EDU (G. Brandon Brooks) (02/05/90)

	I ran across this strange occurance about a month ago, and I was
wondering if anyone here could explain the cause of this.
	I'm developing a game where I use a clock in the upper right corner of
the screen with 4 sprites. The numbers that the clock uses are of a special
graphics font that I designed and saved as an IFF brush. I loaded the brush in
and proceeded to put a time up like; 2:00. The following appeared; 2: 0
(the FIRST '0' is missing). Others below:
        Time    What the Amiga shows
        ----    --------------------
	2:00       2: 0
        1:59       1:59
        1:58       1:58
        1:57       1:57
        1:56       1:56
        1:55       1: 5
        1:54       1:54
        1:53       1:53
        1:52       1:52
        1:51        :51
        1:50       1:50
	
	Okay, what apparently happens is that if the SAME TWO numbers appear
on the same line, the first of the doubled digit will not appear.
	I took the pictures from the SAME memory location, in that:
	Sprite[1].posctldata := (example) 1234567;
        Sprite[2].posctldata := 1234567;

	But, if I copy the data in 1234567 to another location, say 11111,
        Sprite[1].posctldata := 1234567;
        Sprite[1].posctldata := 11111;
	The NUMBERS DO NOT DISAPPEAR!!!!!!! 1:55 will appear as 1:55.
	
	Why when the data for TWO sprites come from the SAME memory location
will the Amiga only show ONE of them?????

			-Bewildered Brandon in Buffalo

ckp@grebyn.com (Checkpoint Technologies) (02/06/90)

In article <16943@eerie.acsu.Buffalo.EDU> gbbrooks@sybil.cs.buffalo.edu (G. Brandon Brooks) writes:
>
>	I ran across this strange occurance about a month ago, and I was
>wondering if anyone here could explain the cause of this.
>	
> [ description of problem deleted, but the question boils down to: ]
>
>	Why when the data for TWO sprites come from the SAME memory location
>will the Amiga only show ONE of them?????

	The way sprites work is that the first two words of Sprite data
contain the sprite position. This is simply the way the sprite engine
works.  If you want to display the same image using two sprites, you'll
have to make copies of the images for each sprite.

mapjilg@bath.ac.uk (J I L Gold) (02/06/90)

In article <16943@eerie.acsu.Buffalo.EDU> gbbrooks@sybil.cs.buffalo.edu (G. Brandon Brooks) writes:
>
>	I ran across this strange occurance about a month ago, and I was
>wondering if anyone here could explain the cause of this.

>	Okay, what apparently happens is that if the SAME TWO numbers appear
>on the same line, the first of the doubled digit will not appear.
>	I took the pictures from the SAME memory location, in that:
>	Sprite[1].posctldata := (example) 1234567;
>        Sprite[2].posctldata := 1234567;
>
>	But, if I copy the data in 1234567 to another location, say 11111,
>        Sprite[1].posctldata := 1234567;
>        Sprite[1].posctldata := 11111;
>	The NUMBERS DO NOT DISAPPEAR!!!!!!! 1:55 will appear as 1:55.
>	
>	Why when the data for TWO sprites come from the SAME memory location
>will the Amiga only show ONE of them?????
>

I think this is because you need SEPARATE areas of chip RAM even for identical
sprites in order for the hardware not to lose track of the DMA channels it
needs.


-- 
#  J.Gold                            |    mapjilg@uk.ac.bath.gdr               #
#  University of Bath , UK           |    jilg@uk.ac.bath.maths                #

farren@well.UUCP (Mike Farren) (02/06/90)

gbbrooks@sybil.cs.Buffalo.EDU (G. Brandon Brooks) writes:

>	Okay, what apparently happens is that if the SAME TWO numbers appear
>on the same line, the first of the doubled digit will not appear.
>	I took the pictures from the SAME memory location, in that:
>	Sprite[1].posctldata := (example) 1234567;
>        Sprite[2].posctldata := 1234567;

Your problem is that posctldata is NOT simply image data - it also
contains (as the name should suggest) position control data.  Each
instance of a sprite must have a separate posctldata structure.

-- 
Mike Farren 				     farren@well.sf.ca.usa