Index: firmware/config-fmrecorder.h =================================================================== RCS file: /cvsroot/rockbox/firmware/config-fmrecorder.h,v retrieving revision 1.3 diff -u -r1.3 config-fmrecorder.h --- firmware/config-fmrecorder.h 21 Jan 2003 19:37:27 -0000 1.3 +++ firmware/config-fmrecorder.h 22 Jan 2003 16:26:58 -0000 @@ -30,3 +30,12 @@ /* Define this if you control power on PBDR (instead of PADR) */ #define HAVE_POWEROFF_ON_PBDR + +/* Offset ( in the firmware file's header ) to the file length */ +#define FIRMWARE_OFFSET_FILE_LENGTH 20 + +/* Offset ( in the firmware file's header ) to the file CRC */ +#define FIRMWARE_OFFSET_FILE_CRC 6 + +/* Offset ( in the firmware file's header ) to the real data */ +#define FIRMWARE_OFFSET_FILE_DATA 24 Index: firmware/config-player.h =================================================================== RCS file: /cvsroot/rockbox/firmware/config-player.h,v retrieving revision 1.8 diff -u -r1.8 config-player.h --- firmware/config-player.h 21 Jan 2003 19:37:27 -0000 1.8 +++ firmware/config-player.h 22 Jan 2003 16:26:58 -0000 @@ -22,3 +22,12 @@ /* Define this if you control power on PADR (instead of PBDR) */ #define HAVE_POWEROFF_ON_PADR + +/* Offset ( in the firmware file's header ) to the file length */ +#define FIRMWARE_OFFSET_FILE_LENGTH 0 + +/* Offset ( in the firmware file's header ) to the file CRC */ +#define FIRMWARE_OFFSET_FILE_CRC 4 + +/* Offset ( in the firmware file's header ) to the real data */ +#define FIRMWARE_OFFSET_FILE_DATA 6 Index: firmware/config-recorder.h =================================================================== RCS file: /cvsroot/rockbox/firmware/config-recorder.h,v retrieving revision 1.8 diff -u -r1.8 config-recorder.h --- firmware/config-recorder.h 21 Jan 2003 19:37:28 -0000 1.8 +++ firmware/config-recorder.h 22 Jan 2003 16:26:58 -0000 @@ -27,3 +27,12 @@ /* Define this if you control power on PBDR (instead of PADR) */ #define HAVE_POWEROFF_ON_PBDR + +/* Offset ( in the firmware file's header ) to the file length */ +#define FIRMWARE_OFFSET_FILE_LENGTH 0 + +/* Offset ( in the firmware file's header ) to the file CRC */ +#define FIRMWARE_OFFSET_FILE_CRC 4 + +/* Offset ( in the firmware file's header ) to the real data */ +#define FIRMWARE_OFFSET_FILE_DATA 6 Index: firmware/rolo.c =================================================================== RCS file: /cvsroot/rockbox/firmware/rolo.c,v retrieving revision 1.2 diff -u -r1.2 rolo.c --- firmware/rolo.c 9 Sep 2002 12:59:06 -0000 1.2 +++ firmware/rolo.c 22 Jan 2003 16:26:58 -0000 @@ -68,8 +68,8 @@ } /* Read file length from header and compare to real file length */ - length=lseek(fd,0,SEEK_END)-6; - lseek(fd, 0, SEEK_SET); + length=lseek(fd,0,SEEK_END)-FIRMWARE_OFFSET_FILE_DATA; + lseek(fd, FIRMWARE_OFFSET_FILE_LENGTH, SEEK_SET); if(read(fd, &file_length, 4) != 4) { rolo_error("Error Reading File Length"); return -1; @@ -80,12 +80,12 @@ } /* Read and save checksum */ - lseek(fd, 4, SEEK_SET); + lseek(fd, FIRMWARE_OFFSET_FILE_CRC, SEEK_SET); if (read(fd, &file_checksum, 2) != 2) { rolo_error("Error Reading checksum"); return -1; } - lseek(fd, 6, SEEK_SET); + lseek(fd, FIRMWARE_OFFSET_FILE_DATA, SEEK_SET); /* verify that file can be read and descrambled */ if ((&mp3buf[0] + (2*length)+4) >= &mp3end) {