Convert .uze to .hex
Convert .uze to .hex
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?
Re: Convert .uze to .hex
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.
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!
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
Let me know if this works!
Re: Convert .uze to .hex
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.
Re: Convert .uze to .hex
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.
Re: Convert .uze to .hex
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.