Trying to get a VGA driver to work with FrameBuffer, but everything is shifted to the right #12134
Replies: 1 comment 1 reply
-
Hi, did you ever resolved this issue? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to get this VGA driver for the Pi Pico to work with
framebuf.FrameBuffer
.The original code uses 3 bits per pixel, stored in an array of 32-bit values.
FrameBuffer
does not support that format, so I modified the code to only use 1 bit per pixel. That way it should work withMONO_HMSB
. And it does, except everything is shifted to the right by 32 pixels:I only used one wire for color, and soldered it to both the green and red pins.
And here's my code:
I must be missing something obvious, probably because I don't fully understand the original code. There's a lot of memory manipulation with magic numbers.
Note: Everything works perfectly fine if I modify the pixel array directly (which is what the original code does) instead of using
FrameBuffer
.Beta Was this translation helpful? Give feedback.
All reactions