Monday, October 6, 2014

New kernel modes (including 800x600@56Hz !)

Since a recent commit, developers now have a better way to set modes.

The kconf.h kernel configuration file allows now several modes, selectable through your project Makefile config options.

Current defined timings include  :

- 640x480, 60Hz @ 168MHz clock (default one), 7 clocks per pixel
- 320x480, 60Hz @ 168MHz clock (repeat each line twice to use as 320x240 display)
- 640x480, 60Hz, overclocked at 192 MHZ,  7 clocks per pixel (longer vsync time)
- 800x600, 56Hz ! overclocked a bit at 180MHz. Yes the bitbox can do 800x600, 56fps.
You only have 5 clocks per pixels here however, so you'd better optimize that blit loop.

other modes can be created by adding config lines to the kconf.h file, all timing computation is based on number of pixels for Porch begin/end/sync and display sizes in pixels ; however be sure to get the right clock ratios to run USB/SDIO clocks at 48MHz !

yes, testkernel can work at 800x600 (sorry bad pic)

Friday, October 3, 2014

Beat Blocks beats hit Bitbox !

New program ! A Beat Box project on the Bitbox. Used to make rhythms with drums samples, you know.

It sports 8 tracks with two possible instruments on each of them (16 different instruments max), looped on a 16 beats track.

It is controlled by a USB gamepad or a keyboard, and can be used live (ie changing patterns or editing them)

It works by playing and modifying patterns on a mod file on the SD card (samples can be bigger than the bitbox memory), so you can create drumkits quite easily with a Tracker and play/modify it on the bitbox.

Of course, it's free and open sourced ! See sources and graphics on GitHub

Saturday, September 13, 2014

"I love playing. The keyboard is my journal."

Well, now we can join Pharrell Williams and play the Bitbox with an USB Keyboard since commit 3a983ff

The USB code can now read USB keyboard and produce events, and a small function has been added to emulate the gamepad with a keyboard, so to get basic keyboard support you need to add one line in games. Or just check for the events yourself.

Keyboard can be read from an application by using the event_get() function , which returns a (possibly empty) event, check for e.type = evt_keyboard_press or evt_keyboard_release events, and then get the modifiers (Control, Shift...) state in e.kbd.mod and the keyboard code e.kbd.key bytes.

The code themselves are position-dependent, not letter-dependant (by example on a QWERTY keyboard the Q letter has the same code than the AZERTY 'A' letter, thanks to the USB norm for that), so if you want to type some text, use the appropriate translating tables. (there are two key maps available on the kernel for now, QWERTY and AZERTY).

All key codes ("Usages") can be found on the HID Usage Tables, Usage Page 7.

All of it is defined in the bitbox.h file.

The bootloader 2 has been upgraded with it, by additionally displaying the last key pressed or released on screen. Also, the examples now include keyboard usage.

Sunday, August 17, 2014

developing for bitbox under windows

Even if I'm personally working under linux, it is quite possible to develop for bitbox under windows.

The following article / page is a reference for it, and will be updated accordingly. Also, if there is any part missing, please tell it !

A very thorough reference can be found by example there :

Most of the current guide is taken from there.

It targets development on a cortex-m4 chip so it's quite similar and adds a ton of optional software which can be very useful. The proposed method is quite barebones (or light), because, well I tend to prefer lighter solutions, but integration with eclipse could be done I'm sure.

Alternatively, DIYDSP has an page with instructions to setup a linux virtual machine suitable for stm32 development, as well as various other tips.

Wednesday, July 30, 2014

Bitboy gameboy emulator ported on rev2 hw

Hi, just to tell you that the Bitboy gameboy emulator - based on gnuboy - has been ported on the rev2 bitbox ! Download available through the bitboy github page

Works with USB gamepads and can be loaded by the bootloader of course, sound works OK with the emulator and the real thing.

Monday, July 21, 2014

Bitbox Mod player !

A MOD file (tracker files for those remembering them) player is available and can be used for streaming mods from the SD card (with minimal impact on RAM & Flash)

Of course it is integrated to the bitbox kernel (latest one), so that games will be able to make use of it ; it can be loaded with the bootloader - and the bootloader is available when you press reset+userbutton.

See the video for the demo hereafter (sound has been taken by my phone from the speakers so it's better in reality)

Thursday, July 17, 2014

Demo of the bootloader

Just a simple demo of the current bitbox bootloader, selecting a flash image with VGA and the game controller, and running the simple engine demo available on github.