Shop OBEX P1 Docs P2 Docs Learn Events
Shadebobs demo 320x200x8bpp - question regarding vsync? — Parallax Forums

Shadebobs demo 320x200x8bpp - question regarding vsync?

avsa242avsa242 Posts: 452
edited 2020-04-10 00:11 in Propeller 2
Hi guys,

Attached is a demo of a work-in-progress genericized version of @Rayman or @"Dave Hein" 's smartpin VGA driver (I've seen the same or similar VGA code in programs from both...please set me straight - would like to know who to properly attribute in the source - or is there someone else even?). I've mated with it a bitmap graphics library that I originated for use on the various OLED and LCD displays out there. One routine I've been wanting to draw using the Prop (1 or 2) for a looong time on any display type is Shadebobs - this has always been my favorite routine in the demo scene. Sorry to PNuters...this is written in FastSpin. There is however a binary in the archive that is set for vga base pin of 0 if for some reason you can't get ahold of FastSpin. It runs the P2 at 250MHz.

Now for my question: I also added a rudimentary WaitVSync() method in the driver, intended to be used to reduce flicker in methods that clear the display between every frame. This basically works, but has a downside that at my skill level, I can't quite figure out: a top portion of the display is invisible when using this method, and it tapers downwards the farther to the right on the screen. My first thought was maybe by the time the code that follows my checking of the vsync pin state has executed, too much time has gone by, but I'm not sure exactly. Anyone have any ideas?

Thanks!

Comments

  • RaymanRayman Posts: 14,646
    I took a peek and it looks like it should work to me... But, maybe your drawing is too slow?
    at 320x200x8bpp you can double buffer. Have you tried that?

    Check out my 90's 3D demo for an example of that.

    Right after VSync it just copies the back buffer to the fore buffer. Or, maybe I was clever enough to just swap buffers, don't remember...
  • RaymanRayman Posts: 14,646
    As for attribution... I think Chip gave us the original VGA code...
    Some of the clock stuff looks like ozpropdev. I see my initials, so I hope I helped...
    Who knows, I hope I have attribution where I should have... I try to, but maybe come up short sometimes...
  • RaymanRayman Posts: 14,646
    Of course, ersmith does the thankless job of creating Fastspin that makes it all work...
Sign In or Register to comment.