Shop OBEX P1 Docs P2 Docs Learn Events
[FYI] VGA 400x300 scanline driver (SVGA timing, single cog) — Parallax Forums

[FYI] VGA 400x300 scanline driver (SVGA timing, single cog)

kuronekokuroneko Posts: 3,623
edited 2012-12-24 17:17 in Propeller 1
Disclaimer: This driver is a cleanup exercise to get the cog count of a [thread=135844]previous attempt[/thread] down from three to one.

A scanline is emitted twice. The initial run reads, buffers and emits the data. Then the line indicator in hub RAM is increased to indicate that the line buffer can be reused. The second run simply emits data from the internal copy which leaves an update window of about 164 hub windowsA for the renderer(s). The video h/w does not control the sync lines during the visible part of the scanline(s) which removes the need for clean-up code (no time). IOW colour values can be anything.

Data rate requirements are rather high (10MB/s) but managable.


A it's slightly larger as the reader needs to catch up with the writer

Comments

  • kuronekokuroneko Posts: 3,623
    edited 2012-12-24 00:01
    Jeff asked for this originally but there is no reason not to share it with the rest of you. It's the Gameduino ball demo without the Gameduino. Colours look a bit limited due to the 6bit setup but otherwise it's the same. I will update the demo once Jeff's new 256 colour boards come out.

    Source is included but I didn't get out of my way to make it bst-proof. The VGA driver (pin group 2) is of the WHOP type so it's only guaranteed to work at 80MHz. It uses 5 cogs (video, background, foreground, animation and SPIN bouncer). The ball image is used as is (with permission) and uncompressed at runtime (which explains the odd look at the beginning).

    Merry Christmas!
  • roglohrogloh Posts: 5,808
    edited 2012-12-24 17:17
    Nice one kuroneko. I have the Gameduino myself and always wondered if a prop could be coaxed to work in a similar way using pure software instead of needing the FPGA. Seems you've already started on something. :smile: It would be fun to try to emulate such a device in a propeller to see how far you can get. It could make a useful sprite engine for a some gaming applications....just add audio and some I/O for control and you'd have something very interesting indeed, especially if it all works on a single prop 1 device. And Prop II should make it way easier someday.

    Currently I am working on something slightly related but using a different bitmap based approach with 5 or 10MB/s streaming with lower resolution but using 12 bit color. Arcade game resolutions were never particulary high but having more colors is always nice.

    Cheers,
    Roger.
Sign In or Register to comment.