Author Topic: CPCTelera : CPC+ Sprite Hardware  (Read 616 times)

0 Members and 1 Guest are viewing this topic.

Offline Arnaud

  • Supporter
  • 6128 Plus
  • *
  • Posts: 506
  • Country: fr
  • Liked: 418
  • Likes Given: 796
CPCTelera : CPC+ Sprite Hardware
« on: 13:32, 28 July 19 »
Hello,
here a little demo of the implementation of the CPC+ Sprite Hardware in CPCTelera.

I'm now working to make the code as comprehensible as possible (asm and example) before release it (here and on a Github CPCTelera branch).


On the screnshot 22 colors are used in mode 1  :D
Hardware Sprites are really easy to use and can be mixed on screen with "classical" software Sprites in the same time.

Arnaud

For more detailled informations on HW Sprites : http://www.chibiakumas.com/z80/platform4.php#LessonP32
« Last Edit: 14:08, 28 July 19 by Arnaud »

Offline XeNoMoRPH

  • 464 Plus
  • *****
  • Posts: 419
  • Country: es
  • " ... in space no one , can hear you scream ... "
  • Liked: 811
  • Likes Given: 728
Re: CPCTelera : CPC+ Sprite Hardware
« Reply #1 on: 16:45, 28 July 19 »

https://vimeo.com/350579592
Awesome Smooth sprites !!!  :o :o :o ,
I have captured it on video

Offline Arnaud

  • Supporter
  • 6128 Plus
  • *
  • Posts: 506
  • Country: fr
  • Liked: 418
  • Likes Given: 796
Re: CPCTelera : CPC+ Sprite Hardware
« Reply #2 on: 17:02, 28 July 19 »
Great to make this video  ;D

Honestly, the CPC+ makes all the work.


Offline asertus

  • CPC664
  • ***
  • Posts: 62
  • Country: es
  • Liked: 55
  • Likes Given: 184
Re: CPCTelera : CPC+ Sprite Hardware
« Reply #3 on: 22:08, 28 July 19 »
It's a pity this sprite support was not in the original 464, or at least in the 6128, the MSX2 were done those things quite well..
« Last Edit: 10:08, 29 July 19 by asertus »

Offline TotO

  • 6128 Plus
  • ******
  • Posts: 3.339
  • Country: fr
    • ?area=showdonations;u=4
  • Liked: 2553
  • Likes Given: 1497
Re: CPCTelera : CPC+ Sprite Hardware
« Reply #4 on: 23:07, 28 July 19 »
The shame is that PLUS sprites requires to copy data (byte) instead of updating address pointers.
The MSX had poor sprites (1 bit, 4 per raster line) and not descent screen scrolling at all.

By the way, the CPC was more close to a PC than a MSX/Coleco into its design and had been better to have blitting functions to do what we want with our imaginations, instead to be limited by a fixed sprite system that conditions the types of games, demo, ... you can program with them.
« Last Edit: 23:12, 28 July 19 by TotO »
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Offline zhulien

  • 464 Plus
  • *****
  • Posts: 412
  • Country: au
    • 8bitology
  • Liked: 192
  • Likes Given: 111
Re: CPCTelera : CPC+ Sprite Hardware
« Reply #5 on: 12:28, 29 July 19 »
I wonder if then, if a small genlock circuit can be made with hardware sprites external to the CPC RAM, but genlocked into the display before output to the screen?  Maybe not just sprints, but copper functions and perhaps even display lists.

Offline TotO

  • 6128 Plus
  • ******
  • Posts: 3.339
  • Country: fr
    • ?area=showdonations;u=4
  • Liked: 2553
  • Likes Given: 1497
Re: CPCTelera : CPC+ Sprite Hardware
« Reply #6 on: 13:38, 29 July 19 »
I wonder if then, if a small genlock circuit can be made with hardware sprites external to the CPC RAM, but genlocked into the display before output to the screen?  Maybe not just sprints, but copper functions and perhaps even display lists.
Sure. Or best, a Graffiti like display system.
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Offline zhulien

  • 464 Plus
  • *****
  • Posts: 412
  • Country: au
    • 8bitology
  • Liked: 192
  • Likes Given: 111
Re: CPCTelera : CPC+ Sprite Hardware
« Reply #7 on: 18:45, 29 July 19 »
Sure. Or best, a Graffiti like display system.


That is actually a good idea for a future CPC generation, but in a way so that existing CPC owners can buy a CPC-Graffiti as an option

Offline norecess

  • CPC664
  • ***
  • Posts: 55
  • Country: ca
  • Liked: 123
  • Likes Given: 43
Re: CPCTelera : CPC+ Sprite Hardware
« Reply #8 on: 23:07, 04 August 19 »
The shame is that PLUS sprites requires to copy data (byte) instead of updating address pointers.

Actually, it's not that bad! Updating a sprite the lame way (cf. without using advanced techniques) using 256 LDIs takes 256*5 NOPs = 1280 NOPs, which represents 6.4% of available CPU time for 1 frame (19968 NOPs).

Tip: If you have let's say 4 sprites to update, and if your game design allows it, then use 4 frames to update 1 sprite (instead of 1 frame updating 4 sprites).

Offline TotO

  • 6128 Plus
  • ******
  • Posts: 3.339
  • Country: fr
    • ?area=showdonations;u=4
  • Liked: 2553
  • Likes Given: 1497
Re: CPCTelera : CPC+ Sprite Hardware
« Reply #9 on: 01:49, 05 August 19 »
Sure, the limitations are always the best challenges to produce some clever codes. We love "CPC" for that.
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Offline andycadley

  • Supporter
  • 6128 Plus
  • *
  • Posts: 837
  • Liked: 395
  • Likes Given: 69
Re: CPCTelera : CPC+ Sprite Hardware
« Reply #10 on: 11:14, 05 August 19 »
Yeah, it's really only awkward from a multiplexing point of view, because you can't easily re-use a sprite unless the image is the same as a previous one. Or unless they are far enough apart and your timing pretty good.

Offline Arnaud

  • Supporter
  • 6128 Plus
  • *
  • Posts: 506
  • Country: fr
  • Liked: 418
  • Likes Given: 796
Re: CPCTelera : CPC+ Sprite Hardware
« Reply #11 on: 21:08, 16 August 19 »
Update :
- All my functions are nearly finished and commented and i have added "Raster lines interrupt" feature, now there are 34 colors for Mode 1  :D
- Finally my demo became a little game, we have to escape from the Asteroid Field (my five years old son really like it ;))

Arnaud

Offline Ast

  • 6128 Plus
  • ******
  • Posts: 964
  • Country: fr
    • Amstrad cpc Website of Ast/iMPACT
  • Liked: 713
  • Likes Given: 666
Re: CPCTelera : CPC+ Sprite Hardware
« Reply #12 on: 22:35, 16 August 19 »
@Arnaud : you'll have to find a tittle now   :P
_____________________

Ast/iMP4CT. "By the power of Grayskull, i've the power"


Amstrad Plus French Forum

All friends are welcomed !

Offline Arnaud

  • Supporter
  • 6128 Plus
  • *
  • Posts: 506
  • Country: fr
  • Liked: 418
  • Likes Given: 796
Re: CPCTelera : CPC+ Sprite Hardware
« Reply #13 on: Yesterday at 17:12 »
Hi,
here the CPCtelera project (v1.5) for CPC+ Sprite Hardware :
- Game demo in cpcplus/src
- Asic functions in cpcplus/src/asic

And tested on real CPC Plus.

All remarks are welcome  :)

Next step is to send to a branch in Github/cpctelera

* cpcplus_src.zip
(84.96 kB - downloaded 1 times)
« Last Edit: Today at 11:43 by Arnaud »