Convert .uze to .hex

Topics on software tools like TileStudio, comments on documentation and tutorials (or the lack of) should go here.
Post Reply
User avatar
danboid
Posts: 1884
Joined: Sun Jun 14, 2020 12:14 am

Convert .uze to .hex

Post by danboid »

I can use packrom to convert a .hex into a .uze, but is there a tool to convert a .uze into a .hex? I'm awaiting my SD socket and I have a game that I'd like to flash to my UB but I only have a .uze for it, hence how do I convert it to a .hex?
User avatar
Artcfox
Posts: 1382
Joined: Thu Jun 04, 2015 5:35 pm
Contact:

Re: Convert .uze to .hex

Post by Artcfox »

I'm pretty sure avrdude can autodetect the input format, so it should be able to flash .bin files using your AVR programmer. Now you just need to generate a .bin file from a .uze file.

My first thought was to do this the lazy way.

This assumes your uzebox directory is in ~/ and that your cuzebox directory is also in ~/. If not, then change appropriately.

Code: Select all

mkdir /tmp/test
cp ~/uzebox/demos/Bootloader5/default/Bootloader5.hex /tmp/test/.
cp your_game_file.uze /tmp/test/.
cd /tmp/test
~/cuzebox/cuzebox Bootloader5.hex
Since your_game_file.uze is the only file in the directory, it should automatically "flash" it in the emulator. Once it is flashed, you can quit the emulator, and you should see a file called coderom.bin in the same directory that is exactly 65536 bytes long. I haven't tried it, but looking at the man page for avrdude, it should be possible to flash this to your AVR, since .bin is the default format that avrdude uses when dumping the coderom or eeprom out of an AVR chip, and it even says that it should autodetect the file format.

Let me know if this works!
User avatar
danboid
Posts: 1884
Joined: Sun Jun 14, 2020 12:14 am

Re: Convert .uze to .hex

Post by danboid »

Sadly not. If I do that then flash the coderom.bin to my UB, on my UB without an SD socket attached I get the UB bootloader screen with an "Insert SD Card" error.
User avatar
Artcfox
Posts: 1382
Joined: Thu Jun 04, 2015 5:35 pm
Contact:

Re: Convert .uze to .hex

Post by Artcfox »

It should work if you set the bootloader to boot directly to the game, and not the menu. It is a key you press while in the bootloader. Either B or Select, I forget which. Then reset or power cycle the Uzebox, and it should boot directly to the game as long as you aren't pressing any buttons during power on.
User avatar
Artcfox
Posts: 1382
Joined: Thu Jun 04, 2015 5:35 pm
Contact:

Re: Convert .uze to .hex

Post by Artcfox »

You might have to set the menu to boot directly to the game in the emulator first and then flash the coderom.bin AND the eeprom.bin to your hardware, so it gets that setting.
Post Reply