Uzebox

The Uzebox is a cool ATMega644 based game console. The video signals are generated by the software using an 8 Bit IO port and some resistors. The audio Signal is generated by writing one sample per horizontal sync to a PWM output.

Emulated components

Emulator bugs / Missing features

Usage Instructions

Here the important parts of the configuration file:
[global]
board: Uzebox
imagedir: /home/user/emulator/uzebox
...

[display0]
backend: rfbserver
host: 127.0.0.1
port: 5901
....
start: vncviewer -encodings zrle -bgr233 localhost:5901

Debugging with gdb

Compile a gdb for AVR:
user@katze:~/Software/gdb/gdb-avr-6.8 > ./configure --target=avr-elf && make
Configure softgun for gdb support by adding the following section to your uzebox.sg configuration file:
[gdebug]
host: 127.0.0.1
port: 4711
Start softgun. Then start gdb in the directory with the uzebox sourcecode, start gdb and connect to softgun.
user@katze:~/uzebox/mygame/ > gdb default/mygame.elf
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu --target=avr-elf"...
(gdb) target remote :4711           
Remote debugging using :4711
^C
0x00001378 in I2C_PollOneStep () at ../i2cmaster.c:814
814                     switch (instr) {
(gdb) break ADC_EnqueueRequest
Breakpoint 1 at 0x2fb0: file ../adc.c, line 119.
(gdb) c
Continuing.

Breakpoint 1, ADC_EnqueueRequest (req=) at ../adc.c:119
119     {

SD Card usage

Format the SD-Card image generated by softgun (sdcard0.img) with mkfs.vfat -F 16, then mount it as loopback device and fill it. Alternatively you can use a diskimage of a real SD-Card. Choose the type "auto_sd" in the configuration file if you want to use this. The usage of the SD card emulation increases the CPU time requirements because the SPI bus is simulated on CPU Pin level. This means that every bit transfered over the SPI bus adds two timers to a tree, changes the clock pin twice and probably also the data pin. The option "zerodelay" in the configfile makes this a little better by avoiding the timers, but then timing is no longer accurate.

Keys

The following keys are used by the SNES emulation: