Installing Boot Animations w/o Jemplode

Posted by: SE_Sport_Driver

Installing Boot Animations w/o Jemplode - 14/12/2003 17:17

Is there a simple program to do this? Due to a conflict with my ATi video card, I can not get Jemplode to run at a decent speed, but I'd still like to be able to load some logos.

There is no need for an editing feature, just sending the logo to the player. Tony, now that you're done with empegface 1.7, how about throwing this into LogoEdit? hehe
Posted by: tman

Re: Installing Boot Animations w/o Jemplode - 14/12/2003 17:24

Umm. Probably not what you want but I do my boot animations by replacing the built in one in the kernel and recompiling it... I use a slightly different kernel anyway because of some stuff I've written so it's not extra work for me.

On a more realistic point, can't you just use the upload tool? You just have to enter the correct address and give it the animation data file.
Posted by: SE_Sport_Driver

Re: Installing Boot Animations w/o Jemplode - 14/12/2003 17:25

I just found that Mark Lord wrote a little program for doing this on the empeg... looks like it was writen for doing over serial but that ftp might also work... anyone have any experience with this?

EDIT: Trevor, we posted at the same time.. is the link I posted what you're talking about?
Posted by: tman

Re: Installing Boot Animations w/o Jemplode - 14/12/2003 17:52

Yeah. I wasn't thinking of that specific utility. More the generic flash upload utility source on the empeg site but they do exactly the same thing. You just need to upload your logo to 0xA000.
Posted by: tfabris

Re: Installing Boot Animations w/o Jemplode - 15/12/2003 12:15

You just need to upload your logo to 0xA000.
That's the address of the static logo. He's looking for a way to upload the Hijack animations.

If I recall correctly, the animation file's memory address changes depending on the size of the Hijack kernel. It's a certain number of bytes after the kernel in memory. (I think.)

The reason it's not in LogoEdit is because I wasn't ready to write a full animation editor into logoedit. Being able to upload a file into the right memory address isn't particularly useful if you don't also have the ability to create/edit the file in question.

(Note: the animation file is not an animated GIF. If you have an animated GIF that you want to upload, you need the animation editor in Jemplode because it converts to the raw format for you.)

I guess you could grab a pre-made file from riocar.org (as long as it's the raw file format and not an animated GIF) and upload that, if you knew the right address. I don't know how to calculate it though.

SE_Sport_Driver:
Looking at the root of the problem, I don't understand why Jemplode is having trouble with your ATI video card. Are you sure? Perhaps you just need to download a more recent version of the Sun Java Runtime Engine. Did you try that? (I'm sure that if you did, it's discussed in another thread, so forgive me if I'm rehashing old territory.)
Posted by: tman

Re: Installing Boot Animations w/o Jemplode - 15/12/2003 12:23

Oops. Yeah. You're right. The animation is at 0xA0000.

// look for custom animation at tail end of kernel flash partition:

const unsigned int kernel_start = EMPEG_FLASHBASE + 0x10000;
unsigned int *p = (unsigned int *)(kernel_start + (0xa0000 - 4));
if (*p == ('A'|('N'<<8)|('I'<<16)|('M'<<24))) {
Posted by: tfabris

Re: Installing Boot Animations w/o Jemplode - 15/12/2003 12:40

So you're saying the animation location is fixed and not variable?
Posted by: tman

Re: Installing Boot Animations w/o Jemplode - 15/12/2003 12:44

Yeah. It should be always at the same place at the end of the flash chunk reserved for the kernel.
{

// look for custom animation at tail end of kernel flash partition:
const unsigned int kernel_start = EMPEG_FLASHBASE + 0x10000;
unsigned int *p = (unsigned int *)(kernel_start + (0xa0000 - 4));
if (*p == ('A'|('N'<<8)|('I'<<16)|('M'<<24))) {
unsigned int offset = *(p - 1);
if (offset >= 0x90000 && offset < (0xa0000 - (1024 + 8 + 8)) && !(offset & 3)) {
printk("Found custom animation at offset 0x%x\n", offset);
ani_ptr = (unsigned long *)(kernel_start + offset);
}
}
}
You could just use Mark Lord's Aniwrite utility on the empeg. It'll write it to the correct place for you. Just run it from the serial port or from telnet.
Posted by: mschrag

Re: Installing Boot Animations w/o Jemplode - 15/12/2003 13:09

Well, the "ANIM" "header" (footer?) is always fixed, but the starting offset of the animation itself is variable ... it's semantically "right justified" to the end of the kernel, so the starting byte moves around depending on the length of the animation.

Here's a slightly modified (edited for readability) example from jemplode:

ByteArrayOutputStream baos = new ByteArrayOutputStream();
LittleEndianOutputStream eos = new LittleEndianOutputStream(baos);
// ... write the raw animation data to stream here ...
eos.flush();
int size = baos.size();
eos.writeUnsigned32(0xA0000 - (size + 8));
eos.write(new byte[] { 'A', 'N', 'I', 'M' });
eos.close();
byte[] animBytes = baos.toByteArray();
HijackUtils.upload(inetAddress, "/proc/empeg_kernel", new ByteArrayInputStream(animBytes), 0xA0000 - _animBytes.length, _animBytes.length, null);

Posted by: tfabris

Re: Installing Boot Animations w/o Jemplode - 15/12/2003 13:21

Ah, so the variable part is the length of the animation, not the length of the kernel. Gotcha.