From Uzebox Wiki
Jump to navigation Jump to search

Packrom.exe is the tool used to convert .HEX files to .UZE files, the only format supported by the SD Card Gameloader.

HEX files are the final product of compilation and a ASCII file format required by tools like AVRStudio and avrdude to flash AVR devices. The format of these files are relatively complex to decode with the limited program space of the bootloader. Moreover, additional meta-data can not be included (like the game name, author, etc).

UZE files on the other hand is an easy to process, pure binary form of HEX files content with a 512 bytes header. This header contains the aforementioned meta data. The Uzebox bootloader (aka Gameloader) only understands these .UZE files.

Note that Uzebox emulators support both HEX and UZE files.


  • Build the tool from the sources or get the Windows pre-compiled binaries:
  • Create a simple text file containing these fields and save it in the same folder as the HEX you want to convert and name it "":
  • Insure the packrom.exe tool is on your system's PATH
  • From the command line interface, change directory to where your HEX file is located and Execute the following command (assuming the HEX file to convert is named arkanoid.hex):
packrom arkanoid.hex arkanoid.uze

Adding to the Build Process

UZE files are normally generated as part of the build process.

Edit your makefile with the following:

First Declare a variable name INFO at the beginning:

## General Flags
PROJECT = Arkanoid
GAME= Arkanoid
MCU = atmega644
TARGET = $(GAME).elf
CC = avr-gcc

Then add this target to your makefile:

%.uze: $(TARGET)
       -$(UZEBIN_DIR)packrom $(GAME).hex $@ $(INFO)

See Arkanoid's Makefile for a detailed example on how to configure this.

Batch converter

You can convert a bunch of hex files in one shot with this script. Just extract the zip and put your hex files inside and it will automagically convert them to .uze setting the name to the filename, the author to unknown, the year to 0000, and the genre to 0. It should be noted that on Linux, you'll need wine to use this.

Script & Windows Version executable

GUI Version

You can also use a GUI version of packrom: PackromGUI.


Binary version for Windows

PackromGUI Sources