For the Raspberry Pi’s second birthday, the Raspi foundation gave us all a very cool gift. Broadcom released the full documentation for the graphics on one of their cellphone chips and offered up a $10k prize to the first person to port that code over to the graphics processor on the Pi and run Quake III. The prize has been claimed, forming the foundation for anyone wanting a completely documented video core on the Pi.
The person to claim this prize is one [Simon Hall], author of the DMA module that’s in the current Raspbian release. Even though Quake III already runs on the Pi, it does so with a closed source driver. [Simon]‘s work opens up the VideoCore in the Pi to everyone, especially useful for anyone banging their heads against the limitations of the Pi platform.
You can get your hands on the new video drivers right now, simply by downloading and compiling all the sources. Be warned, though: recompiling everything takes around 12 hours. We’re expecting a Raspbian update soon.
One of the thorns in the side of the Raspberry Pi crowd has been the closed source GPU. Today that all changes. [Eben Upton] reports that Broadcom is opening the source to the VideoCore® IV 3D graphics subsystem. In Broadcom’s own words:
The VideoCore driver stack, which includes a complete standards-compliant compiler for the OpenGL® ES Shading Language, is provided under a 3-clause BSD license; the source release is accompanied by complete register-level documentation for the graphics engine
Full documentation is available on Broadcom’s support site. To celebrate this, The Raspberry Pi Foundation is offering $10,000 to the first person to run Quake III at a playable frame rate on Raspberry Pi with open source drivers. The competition is worldwide. Full rules available here.
This release doesn’t cover everything, as there are still parts of the Pi’s BCM2835 which are hiding behind the blob files. However, it is a very big step for open source. Congrats to the Raspberry Pi Team, and good luck to all the entrants.
We’ve seen a ton of projects that interface hardware with the Raspberry Pi. But they usually depend on bit-banging. That means they toggle the pins in software to match a specific protocol. The thing is that the beefy Broadcom SoC that anchors the board has a lot of built-in peripherals that are just waiting to be used instead of bit banging. In this case, it’s the hardware SPI peripheral which can be accessed via the bcm2835 library for RPi.
One of the things that would have really complicated this process is the pin mapping between the Broadcom chip and the RPi GPIO header. Since not all pins are broken out, it was either luck or good design forethought that made all of the SPI0 pins from the chip available on the RPi breakout header. The library page (linked above) explains this well. But if you’re looking for more of a working example check out [EngineerByNight's] project with adds an accelerometer using hardware SPI.