Page 1 of 1

Video memory map

Posted: Sat Oct 26, 2013 3:03 am
by vchristo
Hi, friends, we know the RPI has a video memory, and the HDMI or composite video, out put to screen, the content of this memory area.
My question are, can I write a pixel directly into of this memory?
What is the physical address of this memory?
please remember I am not using any framebuffer driver, my idea are put a file.raw date directly to the video memory.
I will be very grateful for some help... :roll:

Re: Video memory map

Posted: Sat Oct 26, 2013 12:19 pm
by DexOS
Yes you can write raw data direct to the video memory.
There's no set address, you need to call the mailbox to set res and it return's you the address to use.
there's many tut on calling mail box.
There's a good one here: ... oWorld/CPU

You can also using a basic like language (DexBasic), like this

Code: Select all

;* Hello World!
;* This is the Hello World! for raspberry pi .
;* It shows how to print to screen under bare metal

include 'DexBasic\'   ; set up everything and stores our macros etc                                                   ; This is need

print "Hello World!"              ; prints hello with ending line break
sync                              ; write screen buffer to screen
end                               ; end program, just loop over and over again

align 4                           ; make sure the next bit aligned on a 4 byte boundary
ProgramSize:                      ; this label is so we can work out size of this program
ScreenBuffer:                     ; this label is where our off screen buffer is     
See here:

Re: Video memory map

Posted: Sun Oct 27, 2013 2:48 am
by vchristo
Dear DexOS, thanks for your quick replay, but I am developing a little system in C to acquire data from a CCD, and write it into the sd-card, this part of project are working, and at now I am trying to show the images acquired from ccd to the framebuffer. I found some things about mail box, but I found no examples in C. If I'll change to basic, I need to exchange all code previously made in C to Basic. Has you any example in C?

Re: Video memory map

Posted: Sun Oct 27, 2013 7:32 am
by tufty

Re: Video memory map

Posted: Tue Oct 29, 2013 8:44 pm
by vchristo
thank you very much, it is a beginning.
I'm working on the code when I get it, I'll share :D