FileEntry
Contains the information for a file stored in the MP3 player.
Record structure
Field descriptions
SongNumber
This is the zero-based number of the song. The first song has number 0, the
second 1, and so on.
Little endian. When a
song is deleted, the song numbers are moved as to maintain a list from 0 to
n-1, where n is the number of songs. A value of 0x00FF indicates that
that entry in the table is empty.
Filename
Truncated,
zero-padded copy of the filename.
There must be at least one zero following the name (ie: 0-terminated string).
SongTitle
Truncated, zero-padded copy of the song name
from the ID3 tag.
There must be at least one zero
following the name (ie: 0-terminated string).
SongArtist
Truncated, zero-padded copy of the song name
from the ID3 tag.
There must be at least one zero
following the name (ie: 0-terminated string).
Day, Month, YearLow, YearHigh, Hour, Minute
These fields make up the timestamp of the file. All numbers are 1-based. For
example, the encoding of "2-Jan-1999 13:43" would be 02 01 13 63 0D 2B.
02 => 2nd of the month
01 => Janurary
13 => 19
63 => 99, so (with above) year = 1999
0D => 13
2B => 43, so (with above) time = 13:43 (1:43 PM)
Filesize
Size of the MP3 file in bytes.
MP3FrameHdr
The second word (bits 16 to 31) of the MP3 frame
header. (treating it as a big endian field)
Duration
The length of the song in seconds.
BlockStart
Starting block number of the file data.
Little endian and 1-based.
Unknown2
Seems to be fixed at 0xFFFF
Record declaration
C
typedef struct FILEENTRYTAG {
uint16 SongNumber
char Filename[16];
char SongTitle[46];
char SongArtist[46];
uint8 Day;
uint8 Month;
uint8 YearHigh;
uint8 YearLow;
uint8 Hour;
uint8 Minute;
uint32 Filesize;
uint16 MP3FrameHdr;
uint16 Duration;
uint16 BlockStart;
uint16 Unknown2;
} FILEENTRY;
Pascal
TFileEntry = packed record
SongNumber : uint16;
FileName : array[0..15] of char;
SongTitle : array[0..45] of char;
SongArtist : array[0..45] of char;
Day : uint8;
Month : uint8;
YearHigh : uint8;
YearLow : uint8;
Hour : uint8;
Minute : uint8;
Filesize : uint32;
MP3FrameHdr : uint16;
Duration : uint16;
BlockStart : uint16;
Unknown2 : uint16;
end;