Monday, April 8, 2013

the bitbox prototype



Here ya go !

Based on my prototype work, the first bitbox "console" is (almost) born !



The idea is to have a small (5x5 cm), cheap console bitbanging VGA from a stm32f4.

This is rev 0.1 of the board, which means that it's the first board and there ARE a few hardware bugs, bad component layouts, missed opportunities ... some of them fixed manually with sharp eyes and small wires !

Anyway I got a card fabbed and hand soldered (with a simple , non temperature-controlled 10€ soldering iron). BOM is quite cheap with the most expensive (and quite only active component) part, the STM32F405 costing ~10€


It ... blinks !




Available hardware on the board (SMT based) :


- STM32F405RGT6 64pins, 1MB Flash, 192kRAM
- VGA out + 12bits DAC (resistor-based) = 4096 colors
- output resolution is not set (depend on driving software, current driver is 640x480 pixels!)
- card reader (microSD, topleft on board, no code for it, not soldered on my test board),
- top is a mini-din (aka ps2) connector to connect either a keyboard (not tested) or a SNES controller (tested) ! (snes connectors are big, difficult to find, incompatible with anything. Easier to rip the male connector and replace it with mini din!)
- mini usb on the right (used for power as well as possible connexion / DFU firmware loading from USB (to be tested))
- mini jack out with lowpass filtering from stm32 DAC (mono, to be tested)
- SWD connector (debug ! / ISP programming)
- power LED+  extra LED on a GPIO pin (debug, tests)
- serial ports output just in case.

On the software side, I currently have a test program for the game engine+driver (see video) and an ongoing game (shoot'em up !)?. The difficulty being that to cram a whole, pretty game, you need to be clever and decompressing and compositing video lines on the fly, racing the beam is tricky even on that kind of beefy MCU : you can't just store data in flash or decompress PNG to RAM !

The VGA part is shamelessly based on waha first demo, with some extras : no frame buffer (not enough mem!), using FIFO DMA, instead 2 alternating line buffers generated on the fly by blitting routines (so a minimal memory allowing bigger resolutions), plus a sprite/tiles generator (exporting tiles from png, midi, wav and tmx files from Qt tiled editor). Sound part is barely started.

Currently blitting routines are tile8 and 16 based, RLE sprites, opaque or transparent (more on this later) but it's a library, you'll be able to use whatever you want, of course.

I plan on getting a micro sampler + midi file converter also.

Many things don't work for now or are not tested as I can't devote as much time on it as I would like but things are progressing anyway !

more posts later



2 comments:

  1. FĂ©licitation pour ton travail, please keep me posted on this project I would buy a board if you ever make them available.. I have started to code for the UzeBox this would have much more potential.

    Phil

    ReplyDelete
  2. just a reminder - since you asked for it- that there are some news on the blog !

    ReplyDelete