Make scramble add the flash logo when encoding for iAudio. It's only shown on M3 with the cowon loader versions I've seen, but the space is reserved in all coldfire iaudio flash files (was just zeroed before).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16697 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
265621729b
commit
3c4afa4a20
3 changed files with 17 additions and 2 deletions
|
@ -18,16 +18,19 @@ CLEANALL := scramble descramble iriver sh2d bmp2rb rdf2binary convbdf \
|
|||
all:
|
||||
@echo "Run make in your build directory!"
|
||||
|
||||
scramble: scramble.o iriver.o mi4.o gigabeat.o gigabeats.o telechips.o
|
||||
scramble: scramble.o iriver.o mi4.o gigabeat.o gigabeats.o telechips.o iaudio_bl_flash.o
|
||||
descramble: descramble.o iriver.o gigabeat.o
|
||||
|
||||
scramble.o: scramble.c iriver.h mi4.h gigabeat.h telechips.h
|
||||
scramble.o: scramble.c iriver.h mi4.h gigabeat.h telechips.h iaudio_bl_flash.h
|
||||
descramble.o: descramble.c iriver.h gigabeat.h
|
||||
iriver.o: iriver.c iriver.h
|
||||
gigabeat.o: gigabeat.c gigabeat.h
|
||||
gigabeats.o: gigabeats.c gigabeats.h
|
||||
mi4.o: mi4.c mi4.h
|
||||
telechips.o: telechips.c telechips.h
|
||||
iaudio_bl_flash.o: iaudio_bl_flash.c iaudio_bl_flash.h
|
||||
iaudio_bl_flash.c iaudio_bl_flash.h: iaudio_bl_flash.bmp bmp2rb
|
||||
$(SILENT)./bmp2rb -f 7 -h . $< >iaudio_bl_flash.c
|
||||
|
||||
sh2d: sh2d.c
|
||||
|
||||
|
|
BIN
tools/iaudio_bl_flash.bmp
Normal file
BIN
tools/iaudio_bl_flash.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.1 KiB |
|
@ -26,6 +26,7 @@
|
|||
#include "gigabeats.h"
|
||||
#include "mi4.h"
|
||||
#include "telechips.h"
|
||||
#include "iaudio_bl_flash.h"
|
||||
|
||||
int iaudio_encode(char *iname, char *oname, char *idstring);
|
||||
int ipod_encode(char *iname, char *oname, int fw_ver, bool fake_rsrc);
|
||||
|
@ -77,6 +78,12 @@ void int2be(unsigned int val, unsigned char* addr)
|
|||
addr[3] = val & 0xFF;
|
||||
}
|
||||
|
||||
void short2be(unsigned short val, unsigned char* addr)
|
||||
{
|
||||
addr[0] = (val >> 8) & 0xff;
|
||||
addr[1] = val & 0xFF;
|
||||
}
|
||||
|
||||
void usage(void)
|
||||
{
|
||||
printf("usage: scramble [options] <input file> <output file> [xor string]\n");
|
||||
|
@ -586,6 +593,11 @@ int iaudio_encode(char *iname, char *oname, char *idstring)
|
|||
|
||||
memset(outbuf, 0, 0x1030);
|
||||
strcpy((char *)outbuf, idstring);
|
||||
memcpy(outbuf+0x20, iaudio_bl_flash,
|
||||
BMPWIDTH_iaudio_bl_flash * (BMPHEIGHT_iaudio_bl_flash/8) * 2);
|
||||
short2be(BMPWIDTH_iaudio_bl_flash, &outbuf[0x10]);
|
||||
short2be((BMPHEIGHT_iaudio_bl_flash/8), &outbuf[0x12]);
|
||||
outbuf[0x19] = 2;
|
||||
|
||||
for(i = 0; i < length;i++)
|
||||
sum += outbuf[0x1030 + i];
|
||||
|
|
Loading…
Reference in a new issue