As discussed in a recent thread here, I've proven that weighted shuffles using manual song ratings are possible with a little bit of hacking the dynamic data structure. The problem is, writing a song's numerical rating to disk conflicts with the player's efforts to write dynamic data to disk. In order to work around this, I'm asking for the following two features in Hijack:

To write the song's rating to the skips_count field...
1. A kernel call takes the FID and the numerical song rating.
2. It writes the song rating to the "skips_count" field at offset 0x14 within the dyndata structure.
3. It calculates the CRC-16 of the new dyndata structure with the modified skips_count, and stores the new CRC-16 at offset 0x2.

It would look something like this. Here's the data for FID 0x14 on my player before writing the song rating:



And here is what it would look like afterwards, with the new skips count and new CRC-16:



When the player writes dynamic data to hda3...
1. See if the offset is in the "per-FID dynamic data" range (which begins at 0x200000)
2. For example, let's say player is writing per-FID dynamic data for FID 0x14
FID data is at (0x200000 + 14*0x200) = 0x202800
3. Read the existing skips_count (the 4 bytes starting at 0x202814) from the disk
4. Merge this plays count into the buffer the player is writing, replacing the skips count
5. Calculate CRC-16 of the new buffer (length is an unsigned short in the first two bytes of the buffer)
6. Store the CRC-16 in the proper position in the buffer (offset 0x2)
7. Write the modified buffer to disk.

It would look something like this:

Before:

After:


So, Mark, you think this is doable? Any interest in giving this a go? I have the userland portion finished, FWIW.
_________________________
- Tony C
my empeg stuff