Log In  
Follow
flygfarkost

I got an idea the other day to write a display driver in pico8 using the GPIO pins and here it is. The cart replaces the flip() function with a custom one that writes the pico8 frame buffer to a connected display (with a ssd1351 controller) over SPI using the GPIO pins on a Raspberry Pi. Turns out that it actually works :)

I use this display/controller board from Adafruit

Emulating SPI over the GPIO pins seems to be quite slow however and it takes about 5 seconds to render a single frame. I believe that if zep exposes the hardware SPI functionality of wiringPi in addition to the GPIO pins it would run in real time. You can try commenting out the first line in spi_write_n() to "emulate" hardware SPI (with DD_ENABLE=TRUE).

Instructions are included in the cart if you would like to try it at home. Remember to enable GPIO pins on the RPi first and running pico8 as super user ("sudo ./pico8")

Wishlist:

* hardware spi (example: spi8(byte), spi32(four_bytes), spi(0x6000,8192) -- from memory)
* delay functionality (like Arduino's delayMicros())

[ Continue Reading.. ]

2
2 comments



Cart #13105 | 2015-08-25 | Code ▽ | Embed ▽ | No License
12

Here is my LUDUMDARE33 jam entry. Everything was made from scratch and in less than 48 hours but I couldn't schedule my weekend well enough so I had to submit it to the jam.

You are the mail monster, pick up the mail without ruining the whole town! (You get a time penalty if you happen to destroy anything)

ARROWS TO MOVE+C TO JUMP

Here is the LD page: http://ludumdare.com/compo/ludum-dare-33/?action=preview&uid=290

12
8 comments