Posts: 7
Joined: Wed Aug 28, 2013 12:23 am

Video memory map

Sat Oct 26, 2013 3:03 am

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:

User avatar
Posts: 876
Joined: Wed May 16, 2012 6:32 pm
Contact: Website

Re: Video memory map

Sat Oct 26, 2013 12:19 pm

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:
Batteries not included, Some assembly required.

Posts: 7
Joined: Wed Aug 28, 2013 12:23 am

Re: Video memory map

Sun Oct 27, 2013 2:48 am

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?

Posts: 7
Joined: Wed Aug 28, 2013 12:23 am

Re: Video memory map

Tue Oct 29, 2013 8:44 pm

thank you very much, it is a beginning.
I'm working on the code when I get it, I'll share :D

Return to “Bare metal, Assembly language”