john101 wrote:It is said there is a internal bootloader in atmega644 chip(ISP works depend on), here the bootloader is the uzebox special bootloader,not the original one?
The ISP doesn't need a bootloader. It even works on chips without bootloader support (like the ATtiny series). The ISP is some special unit inside the chip which interfaces the chips's SPI interface to the parallel programming logic inside the chip. Think of it as a parallel<->serial shift register..
The ATmega644 comes with erased flash out of the factory. It has "bootloader support", meaning you can set the reset vector either to 0x0000 or another location (0xf000 is common) by programming a fuse. This, in addition to the "self programming" feature allows to have an
unaltered application binary at 0x0000, which may be used either with or without having the additional bootloader binary at 0xf000 in the chip. That "bootloader" binary at 0xf000 is meant to be completely custom made. It may even be bigger than 4k, only the entry point has to be at 0xf000.
here the bootloader is uzebox special bootloader, in fact it is a program that search in sd card to find if there are any games, if so print the game name on screen, then waiting for user input?
Any booloader is application specific and "special". It may take the software to flash into the other parts of the flash ROM from an RS232 interface, USB or SD card, like the Uzebox does, or something completely different.
what is .UZE files? Is it some special format include lots of game?
An uze file is a single game binary along with name and author information. The lines displayed in the bootloader screen menu.
From the tutorial , a game is compiled into hex files ( c codes and other image \ sound files after converting), (a)if .UZE composed of lots of such files?(b) or .UZE files include game logic and related material, the game kernal load it and run it?
A hex file is a hex dump of a binary file. Hex files describe which addresses should contain which data bytes. Look into it yourself.
Each game hex file, binary file, uze file contains *one game* including the kernel. Each game compiles and links it's own special kernel, mostly depending on the video mode it uses. It doesn't make much sense to have an universal kernel binary as the ROM size is very limited.
as I know (a) means the kernal and game is in one project, (b) the kernal acts like some "interpreter" as basic?
The kernel is a collection of library routines which do the most common tasks in the uzebox, like updating the screen and playing music, in an efficient way. You don't have to use these routines. In fact, you don't even need the kernel. You can implement all routines in your game project and in fact, many uzeboxers do and offer their changes as new modes to the original kernel.
if (a), what is the relation between the bootloader and game? does the bootloader loads another game program after itself?
It programs the selected game binary into the lower part of the flash ROM, then starts the game's built-in kernel by jumping to 0x0000. After that, you can remove the SD card and the power and the game is still there. The bootloader, too, it's still accessible by pressing the START button on reset.