Hi, long time no see.
Someone pushed me a bit and I nearly completed my Würgertime game (only sound effects are missing) in the last months. It runs fine in Uzem but no luck on the real machine. Right after flashing it from the SD card into the µC, there's more or less video and audio garbage instead of the gameplay.
Through some experimenting, I found out the problem is the size of the game. A running test version packrom says is 53040 bytes in size (53552 bytes uze file size). But one with just 53056 bytes (53568 uze file size) fails. What puzzles me there are other games on the SD card, for example Donkey Kong with an uze file size of 61790 bytes, which run just fine.
What's the trick?
(After flashing the .hex via ISP, the game runs fine of course, but I'd prefer to have a bigger audience than those people who own an ISP programmer.)
Game size problem with bootloader.
-
- Posts: 1445
- Joined: Mon Feb 11, 2013 8:08 am
- Location: Brisbane, Australia
Re: Game size problem with bootloader.
2^16 - 2^12 = 61440 is the hard limit on game size I think.
Do you have any "Sections" that maybe colliding with the bootloader?
Do you have any "Sections" that maybe colliding with the bootloader?
Re: Game size problem with bootloader.
So, as I thought the limit is 60K.
This is from the current version:
This is from the current version:
Code: Select all
packrom Wuergertime.hex Wuergertime.uze ../gameinfo.properties
Packing file: Wuergertime.hex
Game Name: Wuergertime
Author: Jan Kandziora
Year: 2012
CRC32: 0xc263e2f7
Program size: 55928
Wuergertime.elf :
section size addr
.data 154 8388864
.text 55774 0
.bss 3780 8389018
.comment 17 0
.note.gnu.avr.deviceinfo 60 0
.debug_aranges 2736 0
.debug_info 47308 0
.debug_abbrev 10774 0
.debug_line 29509 0
.debug_frame 7796 0
.debug_str 9726 0
.debug_loc 43228 0
.debug_ranges 2648 0
Total 213510
Re: Game size problem with bootloader.
Hi Janka,
Yes, the hard limit is 61440 bytes (or 61952 for .uze files), I don't know why you are experiencing that problem uploading the game. Which version of the bootloader do you have by the way? There might be some bug lurking somewhere in there.
Yes, the hard limit is 61440 bytes (or 61952 for .uze files), I don't know why you are experiencing that problem uploading the game. Which version of the bootloader do you have by the way? There might be some bug lurking somewhere in there.
Re: Game size problem with bootloader.
Yes, you may be right. I've tried more games and found Zooming Secretary has the same problem on this Uzebox.
It's Uzebox game loader 0.4.2.
Where do I get a working boot loader and how do I flash it with avrdude on Linux?
It's Uzebox game loader 0.4.2.
Where do I get a working boot loader and how do I flash it with avrdude on Linux?
Re: Game size problem with bootloader.
That boot loader is outdated yes. The latest bootloader (v5) is linked at the bottom of the first post of this topic: http://uzebox.org/forums/viewtopic.php? ... 405#p27659
Executing the following command should load the boot loader for you. Just replace the '-c' flag value with whatever programmer you are using:
Code: Select all
avrdude -c usbasp -p m644 -P usb -v -U flash:w:Bootloader5.hex
Re: Game size problem with bootloader.
Ok, it works. Thanks all!
What is a bit sad is MMC compatibility is lost. It just says "INSERT SD CARD".
I say this because I have a pile of old 16MB and 32MB MMC cards which had no other use than Uzebox and SD2IEC.
What is a bit sad is MMC compatibility is lost. It just says "INSERT SD CARD".
I say this because I have a pile of old 16MB and 32MB MMC cards which had no other use than Uzebox and SD2IEC.
Re: Game size problem with bootloader.
I remember Uze saying that MMC was never officially supported, since all Uzebox kits shipped with SDSC cards.
Re: Game size problem with bootloader.
It's not a problem, I will figure it out how to get MMC running myself, or I ask Snowcat for help. SD2IEC does both. Though, no code size restraints over there.