Uzebox
From Libregamewiki
| Uzebox Game Console | |
|---|---|
|
Megatris in two players mode | |
| Developer | Belogic Software |
| Code license | GNU GPL 3.0 |
| Media license | Creative Commons Attribution-ShareAlike 3.0 |
| Latest release | 1.0 |
| Release date | August 24th, 2008 (Released) |
The Uzebox is a homebrew 8-bit game console created by Belogic Software. It is based on an Atmel 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++.
Contents |
[edit] Design
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
- 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.
- NES controllers interface: The joypad inputs uses standard NES controllers.
- 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: A lot of 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
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.
As the chip has only 4K of RAM, the video memory is very limited and the current rendering driver is strictly tile based (although, a sprite engine is near completion). The power available allows to produce a resolution of 240x224 pixels or 40x28 tiles of 6x8 (horizontal x vertical) pixels.
[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 NES controller interface. Note that the connectors can not be bought anywhere, the best source is buying a broken NES from eBay. An optional MIDI In interface and driver allows to compose music from any sequencer. Note that some sort of MIDI out interface is required on the computer (i.e.: older SoundBlaster soundcard).
[edit] Implementation
The current 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
All developement is done in AVR Studio, an IDE developed by Atmel. Besides beign 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 PCB is currently developed. If there is enough interest, a small batch could be produced.
A set of custom tools developed in Java helps 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.
[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.


