Uzebox

From Libregamewiki

Jump to: navigation, search
This page does not source its references. Please help Libregamewiki by adding in references where required. Click here to edit this page.
Uzebox Game Console

Megatris in two players mode
DeveloperBelogic Software
Code licenseGNU GPL 3.0
Media licenseCreative Commons Attribution-ShareAlike 3.0
Latest release1.0
Release dateAugust 24th, 2008 (Released)

The Uzebox is an open source 8-bit game console design created by Belogic Software. It is based on the Atmel ATmega644 AVR general purpose microcontroller. The particularity of the system is that it has an interrupt driven kernel and no frame buffer. All functions such as video sync generation, tile rendering and music mixing are done by a background task so games can be developed easily in C/C++.

Two companies introduced commercial implementations: The Fuzebox[1] and the Uzebox AVCore[2]. Since then, about 50[3] games and demos ranging from classic arcade ports to original games were released by various developers. The Uzebox was listed in Make Magazine's definitive open source hardware projects of 2009 [4].

Contents

[edit] Design

Screenshot of the Uzebox AVCore module and gamecard

The design goal was to be as simple as possible yet have good enough sound and graphics and leave enough CPU to implement interesting games. Emphasis was put on making it easy and fun to assemble and program for any hobbyists. The final design contains only two chips: an ATmega644 and an AD725 RGB-to-NTSC converter.

[edit] Features

Screenshot of the Fuzebox Do-it-yourself kit
  • Low parts count and cost: The system is made of only two chips and discrete components.
  • Interrupt driven kernel: No more cycle counting, sound mixing and video generation are all made in the background.
  • 256 simultaneous colors is accomplished by using a R-2R resistor ladder DAC on one of the 8-bits port.
  • 4 channels sound engine: The sound subsystem is composed of 3 wavetable channels and 1 LFSR-based noise channel.
  • SNES controllers interface: The joypad input uses standard SNES controllers.
  • SD/MicroSD card interface
  • MIDI In: With any music sequencer(Cubase, Cakewalk, etc), the MIDI IN input allows the creation of music and sound fx straight on the console.
  • Expandable: Many I/O lines and peripherals are still available, like the UARTs for one to experiment.

[edit] Specifications

  • CPU: ATmega644 microcontroller
  • Total RAM: 4K
  • Program Memory: 64K
  • Speed: 28.61818Mhz (Overclocked)
  • Colors: 256 simultaneous colors arranged in a 3:3:2 color space (Red:3 bits, Green:3 bits, Blue: 2 bits)
  • Resolution: 240x224 pixels in tiles-only mode
  • Video output: NTSC Composite
  • Sound: 4 channels wavetable, 8-bit mono, mixed at ~15Khz and output via PWM
  • Inputs: Two NES compatible joypad inputs
  • Options: MIDI-in interface and s-video output

[edit] Details

[edit] Video

A classic game port using video mode 3 which supports sprites

The video is output on one of the 8-bit I/O port as RGB, 3 bits are allocated for the red component, 3 bits for the green and 2 bits for the blue. Those are fed to a DAC composed of three R-2R resistor ladders which in turn feeds an AD725 RGB-to-NTSC converter from Analog Devices. This gives 256 fixed but simultaneous colors on screen.

The latest video engine boasts 9 video modes that supports bitmapped and sprites-based modes as well a SD card streaming mode that allows the playback of movies[5]. The highest usable resolution attainable on the console is 360x224.

[edit] Sound

The sound subsystem is composed of 3 wavetable oscillators channels and 1 LFSR-based noise channel. Each have independent timbre, frequency and volume. Resolution is 8-bit and is mixed at NTSC line rate (~15Khz) and is output on a single pin via pulse width modulation (PWM). A hi-level engine can play specially formatted MIDI files. The engine also support the concept of "patch streams" for music instruments and sound fx. Similar to a MIDI stream of notes, but instead the stream is composed of sound changing parameters.

[edit] Input

The joypad input uses a standard SNES controller interface. An optional MIDI In interface and driver allows to compose music from any sequencer.

[edit] Implementation

The initial prototype was built using wire-wrap. Since the AD725 is only available in a surface mount package, a SOIC-to-DIP socket adapter is required. For this, some soldering skills are required, but the packages's pin pitch is not too small, so it is relatively easy to solder (even with no experience). Look in YouTube for hundreds of tutorials.

[edit] Tools

Screenshot of the Uzebox emulator

All developement is done in AVR Studio, an IDE developed by Atmel. Besides being free and easy to use, it includes a cycle-perfect software simulator for all AVR devices. By adding the free WinAVR GCC package, C development is possible on the AVR platform.

A set of tools developed in C and Java help generate content for the game. There is a converter to transform raw images to tiles and maps, a MIDI file converter and a patch/fx editor. Uzem, a fully functional emulator was created to ease development. It supports sound, all graphics modes, integrates a GDB (GNU debugger) server and support the SD card interface and PC joysticks.

[edit] Notes

  • The system (and source code) is designed for NTSC. Ajusting it for PAL shouldn't be too hard since the AD725 also supports this format.
  • The more recent ATmega644P, seems to have problems with overclocking. The UARTS suffers from severe glitches during operation. So MIDI IN or any serial based extensions does not work correctly.
  • The AD725 is only available in a surface mount package, so a SOIC-to-DIP socket adapter is required for vector board prototypes. Some soldering skills are required, but the pitch of the pins is not too small, so it is relatively easy to solder (even with no experience). Look in YouTube for hundreds of tutorials.
  • A set of custom tools developed in Java is provided in the download package. They helps generate content for the game. There is a converter to transform raw images to tiles and maps, a MIDI file converter and a music patch/fx editor.

[edit] References

  1. Adafruit Industries Fuzebox homepage
  2. Sparkfun Electronics Uzebox AVCore page
  3. Uzebox games and Demos
  4. Fun, games and entertainment: Open source hardware 2009 Make:Online: The definitive guide to open source hardware projects in 2009
  5. Full screen movie player on an ATmega644

[edit] External links

Personal tools
community