Page 1 of 1

Lesson P33 - Hardware Sprites on the PC Engine (TurboGrafx-16)

Posted: Tue Oct 22, 2019 9:11 pm
by akuyou
The PC Engine is capable of 64 hardware sprites, each of which is 16 color, and is 16x16 in size.

This gives the PCE some pretty impressive graphical capablilities - lets learn how to make some sprites!



https://www.chibiakumas.com/6502/platfo ... #LessonP33

Re: Lesson P33 - Hardware Sprites on the PC Engine (TurboGrafx-16)

Posted: Thu Dec 16, 2021 8:33 pm
by PierreGTT
Hi,

In my PCE program, some text is displayed as background. There is also a cursor made from hardware sprites. I would like the text to be video inverted when the cursor moves over.

Is there any hardware XOR operation that could be done between background and sprite's pixels or is it to be done through software?

Re: Lesson P33 - Hardware Sprites on the PC Engine (TurboGrafx-16)

Posted: Sat Dec 18, 2021 9:32 am
by akuyou
I don 't think you have any choice but to do it with software.

I'm not aware that the PC Engine can do any kind of transparency or other 'calculated' effects like Xor

Re: Lesson P33 - Hardware Sprites on the PC Engine (TurboGrafx-16)

Posted: Sun Jan 16, 2022 10:47 am
by PierreGTT
OK thanks for your confirm.

Re: Lesson P33 - Hardware Sprites on the PC Engine (TurboGrafx-16)

Posted: Thu Feb 17, 2022 11:54 am
by PierreGTT
Other question:

Let's suppose I need 4 sprites, I will set up first 4 SATB entries so that they point the sprites defined in VRAM. Shall I also setup remaining 60 entries so that they point a neutral (invisible) sprite to avoid displaying unexpected patterns?
This question is worth as unless I'm wrong, there isn't any per sprite ON/OFF flag which tells a given sprite is activated or not.

Re: Lesson P33 - Hardware Sprites on the PC Engine (TurboGrafx-16)

Posted: Fri Feb 18, 2022 11:16 am
by PierreGTT
Or maybe simply setting sprite's coordinates to 0,0 so that the sprite doesn't display in the visible area of the screen would be enough...

Re: Lesson P33 - Hardware Sprites on the PC Engine (TurboGrafx-16)

Posted: Sun Feb 20, 2022 3:33 am
by akuyou
Yes, You should do either of those things!
To my knowledge, most systems don't have an 'off function' for hardware sprites.

I think setting the sprite to an offscreen Y position will be best, as most systems have a smallish horizontal sprite limit of 8 or so sprites (even if the hardware is capable of 64+ onscreen sprites), and even if the sprite was 'blank' I guess it will count towards that limit, but putting it on an offscren horizontal line will keep the visible line limits free.