Shop OBEX P1 Docs P2 Docs Learn Events
New tile/sprite driver! — Parallax Forums

New tile/sprite driver!

Ahle2Ahle2 Posts: 1,179
edited 2011-10-11 21:56 in Propeller 1
I have too many projects going on at the same time!:blank:
At the moment none of them seems to ever get finished. :(
So I thought that if I showcase them half-finished, and if enough people shows some interest, it might get me motivated to finish them.

First out, a full color sprite/tile driver running in two cogs.

Features:
- 8bpp
- Horizontal/vertical pixel perfect scrolling
- Horizontal/vertical mirroring
- Registers can be updated per scanline to achieve parallax scrolling and other effects (like in this demo)
- 8 sprites per scanline (8 pixel wide) - Like a NES

Lacks:
- Sprites are only 20% implemented at the moment

Notes:
- Sprites per scanline can be drastically increased with more cogs!!
- This demo doesn't use any sprites!!
- This demo doesn't use more than 4 colors per 8x8 tile (gfx ripped from a limited system)

Instructions:
Upload the binary to your "demo board compatible" propeller board and enjoy.

/Ahle2

Comments

  • avsa242avsa242 Posts: 452
    edited 2011-05-30 10:39
    Very cool! Works out of the box on a YBox2 for others that own one (wasn't sure if it was going to be VGA or composite)! I'm always amazed at what people are able to squeeze out of this little chip.
    Would love to see some of the other features demoed if you have the time, specifically more colors.

    Cheers,
    Jesse
  • ColeyColey Posts: 1,110
    edited 2011-05-30 11:56
    Nice!

    NTSC 60Hz but the picture was decidedly 'shaky', it's usually rock steady on my TV.
    I tried this on two demoboards just to make sure.

    All the same it looks pretty cool!

    Regards,

    Coley
  • AntoineDoinelAntoineDoinel Posts: 312
    edited 2011-05-30 14:36
    Alhe2

    here the rightmost column of chars is flickering wildly (dunno if it's supposed to be overscan area, out of screen).
    But other than that the picture is stable and looking good!

    Keep on the good work
    Alessandro
  • trodosstrodoss Posts: 577
    edited 2011-05-30 20:07
    Alhe2

    here the rightmost column of chars is flickering wildly (dunno if it's supposed to be overscan area, out of screen).
    I saw the same result--it works well overall though.

    Keep up the great work!
    --trodoss
  • Ahle2Ahle2 Posts: 1,179
    edited 2011-05-31 10:01
    Thanks everyone! :)

    The flickery char column at the right is a known issue and should be possible to fix without too much effort.
    It will however be hard to get the sprites working correctly due to some special trickery in this driver.

    I just wanted to see if there was any interest in this and to get some motivation.
    It will take some time before I can continue working on it though.

    @Coley
    What exactly do yo mean by 'shaky'?

    /Ahle2
  • ColeyColey Posts: 1,110
    edited 2011-05-31 11:47
    @Ahle2

    I sent you a PM with some video.

    Regards,

    Coley
  • Alexis64Alexis64 Posts: 42
    edited 2011-05-31 20:09
    Are you kidding? This is one of the best, practical use of a tile driver -- nice colors !!!

    Than again ... Great job as usual :) ...

    Now, let's see some more!... I want to play Mario on the prop !!!

    Everything aside, good work. Really smart ;) ...

    Alex

    I may even consider building a tiny *cheap* board with i2c/serial ram on it for the demo board so that everyone gets a chance to experience some coolness (pm me if you need any hardware designed/manufactured).
  • Ahle2Ahle2 Posts: 1,179
    edited 2011-06-01 11:18
    @Coley
    Okey, it's hard to debug that when my TV doesn't produce the same results as shown in your video.

    @Alexis64
    Thanks!

    What do you mean by "building a tiny *cheap* board with i2c/serial ram on it for the demo board so that everyone gets a chance to experience some coolness" ??

    /Ahle2
  • BaggersBaggers Posts: 3,019
    edited 2011-06-02 04:54
    Hi Ahle2, nice demo :)
    As for the right edge, are you using 32 chars, with the scroll, you can either only display one less char ( like the NES and Game Gear and Master System used to do ) is 31 instead of 32 chars, and have border earlier, or you can increase your scan line buffer, and draw 33 chars,
    What's the problem with sprites? do you want a hand with them? if so let me know!
  • Ahle2Ahle2 Posts: 1,179
    edited 2011-06-03 02:17
    @Baggers
    Yes, I'm using 32 chars, but it's kind of tricky to fix the flicker (for the same reason as why sprites are hard to implement).

    List of reason why it's hard to do sprites:
    - Because of a lot of trickery and optimizations
    - I'm using front porch/back porch "tricks" for the horizontal sub 4 pixel scrolling
    - The video output cog buffers each scanline, and then performs sprite blitting on it outside of the active scanline
    - The rendering cog has to prepare sprite data (mask and pixel) which the video output cog blits to the buffered scanline

    /Ahle2
  • BaggersBaggers Posts: 3,019
    edited 2011-06-03 02:47
    Ahle2 wrote: »
    @Baggers
    Yes, I'm using 32 chars, but it's kind of tricky to fix the flicker (for the same reason as why sprites are hard to implement).

    List of reason why it's hard to do sprites:
    - Because of a lot of trickery and optimizations
    - I'm using front porch/back porch "tricks" for the horizontal sub 4 pixel scrolling
    - The video output cog buffers each scanline, and then performs sprite blitting on it outside of the active scanline
    - The rendering cog has to prepare sprite data (mask and pixel) which the video output cog blits to the buffered scanline

    /Ahle2

    For the flicker, can't you do the same trick at the end of the scanline? for getting the last few pixels of the display?
    For the sprites, you just add the offset for the specific line your on :D
    if you want a hand let me know
  • Ahle2Ahle2 Posts: 1,179
    edited 2011-10-09 09:29
    I recently bought a dedicated video capture device, so now I'm capturing videos of all my projects for others to enjoy.

    YouTube REALLY doesn't make justice to how smooth this really is. This demo is best viewed with a Propeller directly connected to a crt TV.
  • jazzedjazzed Posts: 11,803
    edited 2011-10-09 10:05
    Looks good :)
  • AntoineDoinelAntoineDoinel Posts: 312
    edited 2011-10-09 15:32
    Ahle2 wrote: »
    YouTube REALLY doesn't make justice to how smooth this really is. This demo is best viewed with a Propeller directly connected to a crt TV.

    I see the flickering on the right edge is gone. Are you going to post a new binary to try out?
  • Ahle2Ahle2 Posts: 1,179
    edited 2011-10-10 09:55
    @AntoineDoinel
    Next release will hopefully be a fully fledged version in source format.

    (It may even be a combined release with Retronitus and some applications for doing music, maps, tiles and sprites)
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2011-10-10 10:23
    Nice Ahle2!

    Glad to see this project still moving forward. Looking forward to your release.

    OBC
  • TubularTubular Posts: 4,702
    edited 2011-10-10 12:35
    Incredible, Ahle2. Really well done.

    I wonder whether Parallax could sell a cheap video capture device, to help promote the getting of videos like this onto the web.
  • Ahle2Ahle2 Posts: 1,179
    edited 2011-10-10 15:47
    @Tubular
    If anyone wants to make captures of their "propeller video stuff", I can help.
  • potatoheadpotatohead Posts: 10,261
    edited 2011-10-10 20:32
    As can I.

    Just FYI, there are SD captures, and they look fairly good. HD capture devices are significantly better. Both offer S-video. I've got both.

    If you don't care about the finer screen details, the SD ones are as little as $10. That's exactly what I paid for mine. "EZ-CAPTURE". ADS Tech sells HD devices that run $50 - $80. The image capture and included software are much better.

    ***Nice scroll!
  • dr hydradr hydra Posts: 212
    edited 2011-10-11 08:55
    @Ahle2 Looks great...Looking forward to the release...
  • JT CookJT Cook Posts: 487
    edited 2011-10-11 21:56
    Saw the video a few days ago, looks good! You should use tiles with a higher color count to reflect the abilities of the driver, maybe something from the 16-bit era like Mario World.
  • Sorry to dig up an old thread but I'm looking around for some nice screen/tile/sprite drivers and found this.

    Has the code been released?
Sign In or Register to comment.