#250953 - 03/03/2005 16:33
Patching the Player for more dynamic FIDs
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
Quote: With player-2.01, one should find 0000 7000 at offset 0x00f4dde
Correction on that. I also see the 0000 7000 at 0x00f4de0 in v2.01:
000f4db0 00 02 00 00 00 02 00 00 00 02 00 00 00 04 00 00 |................|
000f4dc0 00 02 00 00 00 06 00 00 00 02 00 00 00 08 00 00 |................|
000f4dd0 10 00 00 00 10 08 00 00 10 00 00 00 00 10 00 00 |................|
000f4de0 00 70 00 00 00 00 00 00 00 00 00 00 2f 64 65 76 |.p........../dev|
000f4df0 2f 68 64 61 33 00 00 00 2f 64 65 76 2f 64 73 70 |/hda3.../dev/dsp|
000f4e00 00 00 00 00 65 6d 70 65 67 5f 63 6f 64 65 63 5f |....empeg_codec_|
000f4e10 73 6f 75 72 63 65 2e 63 70 70 00 00 54 68 65 72 |source.cpp..Ther|
Quote:
Quote:
3 3 24097 hda3
Bingo, your dynamic partition is 48,194 sectors long. A patched binary, and then 0xAC420 of FID goodness are all yours.
Peter
So, modified with 0xAC42 it should appear like this:
000f4db0 00 02 00 00 00 02 00 00 00 02 00 00 00 04 00 00 |................|
000f4dc0 00 02 00 00 00 06 00 00 00 02 00 00 00 08 00 00 |................|
000f4dd0 10 00 00 00 10 08 00 00 10 00 00 00 00 10 00 00 |................|
000f4de0 42 ac 00 00 00 00 00 00 00 00 00 00 2f 64 65 76 |.p........../dev|
000f4df0 2f 68 64 61 33 00 00 00 2f 64 65 76 2f 64 73 70 |/hda3.../dev/dsp|
000f4e00 00 00 00 00 65 6d 70 65 67 5f 63 6f 64 65 63 5f |....empeg_codec_|
000f4e10 73 6f 75 72 63 65 2e 63 70 70 00 00 54 68 65 72 |source.cpp..Ther|
Edited by mlord (03/03/2005 16:41)
|
Top
|
|
|
|
#250954 - 03/03/2005 16:41
Re: Patching the Player for more dynamic FIDs
[Re: mlord]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
Updated my post above with more complete info.
|
Top
|
|
|
|
#250955 - 03/03/2005 18:08
Program to patch max_fid within player binary (attached) *DELETED*
[Re: mlord]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
|
Top
|
|
|
|
#250956 - 03/03/2005 18:12
Re: Program to patch max_fid within player binary (attached)
[Re: mlord]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
Mm.. darn.. bug: date on top comments has 2004 instead of 2005.
Cheers
|
Top
|
|
|
|
#250957 - 03/03/2005 18:12
Re: Program to patch max_fid within player binary (attached)
[Re: mlord]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
|
Or Hijack could just patch the memory footprint of that file "in-place" without even altering the disk. It is the kernel, after all, it can do that, right?
|
Top
|
|
|
|
#250958 - 03/03/2005 18:15
Re: Program to patch max_fid within player binary (attached)
[Re: tfabris]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
That is suprisingly difficult, actually. The player is paged in/out of memory (well, probably never *out* since they likely lock the pages down), but it is probably using a read-only shared mapping, which makes it really, REALLY, hard to do.
Cheers
Edited by mlord (03/03/2005 18:16)
|
Top
|
|
|
|
#250959 - 03/03/2005 18:17
Re: Program to patch max_fid within player binary (attached)
[Re: mlord]
|
carpal tunnel
Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
|
In addition, it seems awfully CPU-intensive compared to a one-time, four-byte change in the executable.
Maybe hijack could contain the modify-the-binary code itself, triggered by a menu somewhere.
_________________________
Bitt Faulk
|
Top
|
|
|
|
#250960 - 03/03/2005 18:21
Re: Program to patch max_fid within player binary (attached) *DELETED*
[Re: mlord]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
Post deleted by mlord
Edited by mlord (03/03/2005 18:31)
|
Top
|
|
|
|
#250961 - 03/03/2005 18:36
Re: Program to patch max_fid within player binary (attached)
[Re: wfaulk]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
Quote: Maybe hijack could contain the modify-the-binary code itself, triggered by a menu somewhere.
I think I'll leave that to userspace, as a simple shell script, which invokes the program I've provided, remounting the root drive rw and then ro again afterwards. The Hijack ;@MENUEXEC could be used to invoke it.
Or even better, a remote shell script that uses FTP to mount the root drive rw, installs the program, chmods it, runs it (SITE EXEC), and then deletes it and remounts the root drive rw again.
cheers
|
Top
|
|
|
|
#250962 - 03/03/2005 18:38
Re: Program to patch max_fid within player binary (attached)
[Re: wfaulk]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
If we ever added a similar automatic function within Hijack, I'd just hardcode the binary offsets to eliminate the searches.
Cheers
|
Top
|
|
|
|
#250963 - 03/03/2005 19:08
Re: Program to patch max_fid within player binary (attached)
[Re: mlord]
|
carpal tunnel
Registered: 05/01/2001
Posts: 4903
Loc: Detroit, MI USA
|
If anyone is going to do that, one for fidsift would be cool too!
_________________________
Brad B.
|
Top
|
|
|
|
#250964 - 03/03/2005 20:06
Re: Program to patch max_fid within player binary (attached)
[Re: mlord]
|
member
Registered: 06/06/2001
Posts: 183
|
Could you (or someone with the ability/resources) provide a compiled version of this that will run on the Empeg?
Thanks, -Chuck
|
Top
|
|
|
|
#250965 - 03/03/2005 22:11
set_empeg_max_fid (again) *DELETED*
[Re: mlord]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
|
Top
|
|
|
|
#250966 - 03/03/2005 22:28
set_empeg_max_fid (version 4)
[Re: mlord]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
UPDATED VERSION!! This one has the right year on the comments, and is also 4x more efficient in how it searches. Also includes a minor bugfix to prevent possible (unlikely) segfault in the event that the search for the patch-point fails. Slightly safer overall, but either version works. Original post now deleted.
ANOTHER UPDATE: this one actually uses the correct new max_fid value from the partition size; the earlier versions forgot to multiply by 2, which normally results in a lower max_fid than that started with!
YET ANOTHER UPDATE: I finally figured out why Peter's number was "off" by 0x1000 in his messages: fixed overhead area for dynamic playlists etc.. in the dynamic data partition. This version of the utility now subtracts this from the new max_fid value (no harm with the previous version, though). As of this version (VERSION 4), it also now prints a version number banner at startup.
Okay, here's some C-code. Works for me on all v2/v3 player versions, and should also work fine on pretty much any other player version. Lots of error-checking included, so I believe it to be very safe.
If compiled for the player, one could just FTP the binary over to an empeg, remount the root drive RW, and then run it with no args. It will figure out how big the /dev/hda3 dynamic data partition is, and hack that value into /empeg/bin/player, all automatically.
Alternatively, one can compile/run it on any Linux/POSIX machine, and supply two command-line parameters: the absolute path to the player binary (must begin with a slash), and the new max_fid value (as otherwise it will use the computer's /dev/hda3 size, which probably won't be correct..).
Cheers
Attachments
250489-set_empeg_max_fid.c (366 downloads)
|
Top
|
|
|
|
#250967 - 03/03/2005 22:29
Re: set_empeg_max_fid (version 4) *DELETED*
[Re: mlord]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
|
Top
|
|
|
|
#250968 - 03/03/2005 22:32
Re: set_empeg_max_fid (version 4)
[Re: mlord]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
Sample output from running it on my player: Code:
empeg:/# ./set_empeg_max_fid.v4 ./set_empeg_max_fid.v4: version 4 by Mark Lord (March 2005) /dev/hda3: 16632 sectors New max_fid value will be 29168 (71f0 0000) before: 0017b95c: 00 10 00 00 00 70 00 00 00 00 00 00 00 00 00 00 after: 0017b95c: 00 10 00 00 f0 71 00 00 00 00 00 00 00 00 00 00 empeg:/#
|
Top
|
|
|
|
#250969 - 03/03/2005 22:38
Re: set_empeg_max_fid (version 4)
[Re: mlord]
|
pooh-bah
Registered: 31/08/1999
Posts: 1649
Loc: San Carlos, CA
|
Quote: (release early, release often.. the open-source creedo!)
Uh, oh. Isn't that how you got started with hijack? Your not going to start rewriting the player one byte at a time now are you?
-Mike
|
Top
|
|
|
|
#250970 - 04/03/2005 02:14
Re: set_empeg_max_fid (version 4)
[Re: mlord]
|
member
Registered: 06/06/2001
Posts: 183
|
|
Top
|
|
|
|
#250971 - 04/03/2005 07:55
Re: set_empeg_max_fid (version 4)
[Re: mlord]
|
journeyman
Registered: 29/08/2000
Posts: 96
Loc: Hamburg, Germany
|
well...this is so cool !? just a few days after this was brought up, everything works again without having to remount, rebuild... thanks !!!
empeg:/# ./set_empeg_max_fid.v4 ./set_empeg_max_fid.v4: version 4 by Mark Lord (March 2005) /dev/hda3: 24097 sectors New max_fid value will be 44098 (ac42 0000) before: 00112698: 00 10 00 00 00 70 00 00 00 00 00 00 00 00 00 00 after: 00112698: 00 10 00 00 42 ac 00 00 00 00 00 00 00 00 00 00
|
Top
|
|
|
|
#250972 - 04/03/2005 08:57
Re: set_empeg_max_fid (version 4)
[Re: mlord]
|
carpal tunnel
Registered: 13/07/2000
Posts: 4180
Loc: Cambridge, England
|
Quote: fixed overhead area for dynamic playlists etc.. in the dynamic data partition.
The clue's in the question... "offset... size..."
This is well cool BTW. Shame it got you so few extra FIDs on your own player!
Peter
|
Top
|
|
|
|
#250973 - 04/03/2005 12:32
Re: set_empeg_max_fid (version 4)
[Re: pupvogel]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
Quote: /dev/hda3: 24097 sectors New max_fid value will be 44098 (ac42 0000)
Ooops.. cosmetic issue: the first line above is actually reporting "blocks" rather than sectors. Each block consists of two sectors.
But the program is doing the right thing with it, so no worries. I'll release a v5 shortly that displays the message correctly, just to be nicer about it all.
Cheers
|
Top
|
|
|
|
#250974 - 04/03/2005 12:48
set_empeg_max_fid (version 5)
[Re: mlord]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
Here's the updated source code for v5 of set_empeg_max_fid.c (attached).
Just cosmetic changes this time. No need to re-run it if you've already used v4.
-- improved parsing of /proc/partitions
-- fixed display of "sectors" value
-- tidied up display of program name
-- modified license terms to permit embedding within player app in case Peter or others decide to do so. (hint hint..)
Cheers
Attachments
250529-set_empeg_max_fid.c (369 downloads)
|
Top
|
|
|
|
#250975 - 04/03/2005 12:48
Re: set_empeg_max_fid (version 5 binary)
[Re: mlord]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
Here's the precompiled empeg executable for v5.
Cheers
Attachments
250530-set_empeg_max_fid.v5 (416 downloads)
|
Top
|
|
|
|
#250976 - 04/03/2005 12:56
Re: Program to patch max_fid within player binary (attached)
[Re: mlord]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
Quote: That is suprisingly difficult, actually. The player is paged in/out of memory (well, probably never *out* since they likely lock the pages down), but it is probably using a read-only shared mapping, which makes it really, REALLY, hard to do.
Actually, I suppose it's an anonymous mapping, not shared, as the loader needs to perform relocation on the loaded image before running it. The place to have it automatically patch things would be in the loader program (userspace): /lib/ld-linux.so.2
Much more difficult within the kernel, though not impossible (obviously). We'd have to detect that ld-linux is mmapping the player, and the player has not been replaced with a shell script for whatever reason, and then we'd have to prefault the page in question (probably a no-op, but gotta check). Not huge I suppose, but more than I'm up for right now.
Cheers
|
Top
|
|
|
|
#250977 - 04/03/2005 14:37
Re: set_empeg_max_fid (version 5 binary)
[Re: mlord]
|
carpal tunnel
Registered: 05/01/2001
Posts: 4903
Loc: Detroit, MI USA
|
Dumb Question: Will the benefit anyone who has a large number of FIDS or only those who have no used a standard builder image?
_________________________
Brad B.
|
Top
|
|
|
|
#250978 - 04/03/2005 14:38
Re: Program to patch max_fid within player binary (attached)
[Re: mlord]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
|
Quote: Much more difficult within the kernel, though not impossible (obviously).
I just think it's nifty that you're even thinking about how it could be done.
Imagine the empeg kernel having a universal "patch" feature that allowed you to make those kinds of tiny changes to the binaries, on-the-fly, without needing to write a special program to do it each time. It could just be a config.ini setting or something...
|
Top
|
|
|
|
#250979 - 04/03/2005 14:43
Re: set_empeg_max_fid (version 5 binary)
[Re: SE_Sport_Driver]
|
carpal tunnel
Registered: 24/12/2001
Posts: 5528
|
Everybody. The partition size is rounded up to the nearest cylinder which means it's bigger than 16MB on larger disks.
|
Top
|
|
|
|
#250980 - 04/03/2005 14:46
Re: set_empeg_max_fid (version 5 binary)
[Re: SE_Sport_Driver]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
Anyone with more than 0x6fff (28671) fids can benefit. How much it helps depends on how much space there is in /dev/hda3, but even on stock installs (like my own 30GB unit) it may enable more than the default limit for fids.
Cheers
|
Top
|
|
|
|
#250981 - 04/03/2005 14:57
Re: set_empeg_max_fid (version 5 binary)
[Re: mlord]
|
carpal tunnel
Registered: 05/01/2001
Posts: 4903
Loc: Detroit, MI USA
|
Thanks guys! This is great! I can't remember if my primary drive is the 80gb or 100gb, but this should help!
Here is what I got: Quote: empeg:/# ./set_empeg_max_fid.v5
set_empeg_max_fid.v5: version 5 by Mark Lord (March 2005)
/dev/hda3: 48194 sectors
New max_fid value will be 44098 (0000ac42)
before: 00112698: 00 10 00 00 00 70 00 00 00 00 00 00 00 00 00 00
after: 00112698: 00 10 00 00 42 ac 00 00 00 00 00 00 00 00 00 00
Now, if only I could get my "down, down, down" playlist to be saved between boots!
Edited by SE_Sport_Driver (04/03/2005 15:00)
_________________________
Brad B.
|
Top
|
|
|
|
#250982 - 04/03/2005 16:05
Re: set_empeg_max_fid (version 5 binary)
[Re: SE_Sport_Driver]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
Quote:
Now, if only I could get my "down, down, down" playlist to be saved between boots!
Mmm.. I wonder what might happen if we also patched the 0000 0010 (0x1000) value to a larger number, and adjusted max_fid to compensate.. Peter?
|
Top
|
|
|
|
#250983 - 04/03/2005 16:21
Re: set_empeg_max_fid (version 5 binary)
[Re: mlord]
|
carpal tunnel
Registered: 13/07/2000
Posts: 4180
Loc: Cambridge, England
|
Quote: Mmm.. I wonder what might happen if we also patched the 0000 0010 (0x1000) value to a larger number, and adjusted max_fid to compensate.. Peter?
Crikey. OK. What you'd have to do is observe that (0x00001000, 0x00007000) is the ninth and last in an array of (offset,size) pairs. The first four pairs correspond to bookmarks 0-3. "Bookmark Zero" is the saved playlist, and bookmarks 1-3 are the user-visible bookmarks.
As shipped, the four bookmarks are 512 sectors long each (256K bytes). If you were being devious, you could sacrifice one or two bookmarks to the greater good, and increase the size of Bookmark Zero. So the table starts like this: (0x00000000, 0x00000200) (0x00000200, 0x00000200) (0x00000400, 0x00000200) (0x00000600, 0x00000200) and if you changed it to be, say (0x00000000, 0x000003C0) (0x000003C0, 0x000003C0) (0x00000780, 0x00000040) (0x000007C0, 0x00000040) then both the saved playlist and Bookmark 1 would have much more space, but Bookmarks 2 and 3 could be used only for shortish running orders. Blah blah no guarantee that doesn't shag it royally etc. but it should work.
If you were being proper devious, and you had lots of room (say 0xBC42 sectors, like Paul), you could remap some at the end of the paritition, on the basis no-one has more than say A000 fids: (0x00000000, 0x00000400) (0x00000400, 0x00000400) (0x0000B000, 0x00000400) (0x0000B400, 0x00000400) ... (0x00001000, 0x0000A000) (not AC42)
You shouldn't fiddle with or move the small, 16-sector allocations in the middle of the list: (0x00000800, 0x00000010) and its friends.
Peter
|
Top
|
|
|
|
#250984 - 04/03/2005 19:08
Re: set_empeg_max_fid (version 5 binary)
[Re: peter]
|
carpal tunnel
Registered: 19/01/2002
Posts: 3584
Loc: Columbus, OH
|
<coy>Ooh I love it when you get proper devious</coy>
_________________________
~ John
|
Top
|
|
|
|
#250985 - 04/03/2005 20:29
Re: set_empeg_max_fid (version 5 binary)
[Re: peter]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
Mmm.. great(!) info, Peter!
Now, as I seem to recall.. the current running order has a fixed 512-byte overhead, plus something like 12-bytes per FID, so the default of 256KB can handle up to 21802 FIDs, I suppose.
I think the simplest thing to do, for players with lots of "slack" on /dev/hda3, would be to have set_empeg_max_fid move the running order to the end of the partition, sized to match the new max_fid value. The space vacated at the beginning of the partition could then be redistributed among the bookmarks.
Nice, simple, safe, and probably a Good Thing(tm) to have it do.
Right?
EDIT: or maybe just swallow the bookmarks into an expanded running order (up to new max_fid), and relocate the affected bookmarks to the end of the partition.. mm.. I might like this option even more.. mmm..
Edited by mlord (04/03/2005 20:38)
|
Top
|
|
|
|
#250986 - 04/03/2005 20:46
Re: set_empeg_max_fid (version 5 binary)
[Re: mlord]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
Mmm... yes.. I like Peter's second option.. cannibalize the 3rd & 4th bookmarks to expand the first two, and then reallocate the 3rd/4th from the slack space at the end of the partition.
-ml
|
Top
|
|
|
|
#250987 - 04/03/2005 21:15
Re: set_empeg_max_fid (version 5 binary)
[Re: mlord]
|
carpal tunnel
Registered: 05/01/2001
Posts: 4903
Loc: Detroit, MI USA
|
If this works (and I'm sure it will) it will be SO appreciated! This has been the number one nusance with my player for a long time. It's just a great way to rediscover music on your player.
_________________________
Brad B.
|
Top
|
|
|
|
#250988 - 05/03/2005 02:25
Re: set_empeg_max_fid (version 5 binary)
[Re: peter]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
Quote: You shouldn't fiddle with or move the small, 16-sector allocations in the middle of the list:
(0x00000800, 0x00000010) and its friends.
What about the gap between 0x0820 and 0x1000?
That's a nice 0x7e0 sectors worth of space.. is it really available? I'd like to put bookmark #4 there.
Cheers
Edited by mlord (05/03/2005 03:06)
|
Top
|
|
|
|
#250989 - 05/03/2005 03:13
Re: set_empeg_max_fid (version 5 binary)
[Re: mlord]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
Quote: >You shouldn't fiddle with or move the small,
>16-sector allocations in the middle of the list:
>(0x00000800, 0x00000010) and its friends.
What about the gap between 0x0820 and 0x1000?
That's a nice 0x7e0 sectors worth of space.. is it really available?
I'd like to put bookmarks 3 and 4 there.
Doing so, the offsets table would then look like this:
before:
00112668: 00000000 00000200 00000200 00000200
00112678: 00000400 00000200 00000600 00000200
00112688: 00000800 00000010 00000810 00000010
00112698: 00001000 00007000 00000000 00000000
after:
00112668: 00000000 00000400 00000400 00000400
00112678: 00000820 000003f0 00000c10 000003f0
00112688: 00000800 00000010 00000810 00000010
00112698: 00001000 00007000 00000000 00000000
EDIT: Oh, wait.. v3alpha8 appears to have a different layout.. but everything from 0x840 to 0x1000 still appears vacant.
I now have an unreleased v7 of the utility now that fiddles the bookmarks to larger sizes using this space.
???
Edited by mlord (05/03/2005 03:43)
|
Top
|
|
|
|
#250990 - 05/03/2005 18:42
Re: set_empeg_max_fid (version 5 binary)
[Re: mlord]
|
carpal tunnel
Registered: 13/07/2000
Posts: 4180
Loc: Cambridge, England
|
Quote: What about the gap between 0x0820 and 0x1000?
It's currently unused, but just in case we need some more (this isn't very likely), try just using 0x880...0x1000.
Peter
|
Top
|
|
|
|
#250991 - 05/03/2005 18:48
Re: set_empeg_max_fid (version 5 binary)
[Re: peter]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
Quote:
Quote: What about the gap between 0x0820 and 0x1000?
It's currently unused, but just in case we need some more (this isn't very likely), try just using 0x880...0x1000.
Peter
Ha! That's what I already chose, and for exactly that reason.
Okay v7 now does all of this nicely. I'll release it sometime this week.
Cheers!
|
Top
|
|
|
|
#250992 - 05/03/2005 22:18
set_empeg_max_fid (version 7 source)
[Re: mlord]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
Here is version 7 of set_empeg_max_fid.c
This one does the same max_fid fixes as prior versions, but now also expands the stored running order and bookmarks sizes to handle larger numbers of fids.
Run this on *any* player version to gain support for:
-- running orders (Eg. down-down-down shuffles) of up to 43648 fids, which should now survive reboots with this fix.
-- larger bookmark capacities (a bookmark is merely a saved running order): 43648 fids for bookmark #1, and 40917 fids for bookmarks #2 and #3.
Those features will work regardless of disk size.
In addtion, v7 will automatically reconfigure any slack space at the end of the dynamic data partition on the player (/dev/hda3) for use with fids > 0x6fff, according to available space. The larger the drive, the larger the (free!) gain one typically sees from this.
Cheers
Attachments
250633-set_empeg_max_fid.c (369 downloads)
|
Top
|
|
|
|
#250993 - 05/03/2005 22:20
Re: set_empeg_max_fid (version 7 source)
[Re: mlord]
|
carpal tunnel
Registered: 05/01/2001
Posts: 4903
Loc: Detroit, MI USA
|
Thank you, thank you, thank you! You rock Mark. It's like Christmas here! I'll test it once there is a version ready for the empeg.
_________________________
Brad B.
|
Top
|
|
|
|
#250994 - 05/03/2005 22:20
Re: set_empeg_max_fid (version 7 binary)
[Re: mlord]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
Here is the empeg (executable) binary for set_empeg_max_fid.v7 (attached).
Sample output from one of my players running v2.01:
# /set_empeg_max_fid.v7
set_empeg_max_fid.v7: version 7 by Mark Lord (March 2005)
/dev/hda3: 33264 sectors
New max_fid value will be 29168 (000071f0)
before:
00112888: 00000000 00000200 00000200 00000200
00112898: 00000400 00000200 00000600 00000200
001128a8: 00000800 00000010 00000810 00000010
001128b8: 00001000 00007000 00000000 00000000
after:
00112888: 00000000 00000400 00000400 00000400
00112898: 00000880 000003c0 00000c40 000003c0
001128a8: 00000800 00000010 00000810 00000010
001128b8: 00001000 000071f0 00000000 00000000
Cheers
Attachments
250635-set_empeg_max_fid.v7 (568 downloads)
|
Top
|
|
|
|
#250995 - 05/03/2005 22:30
Re: set_empeg_max_fid (version 7 binary)
[Re: mlord]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
And here is similar sample output from a v3a8 player. Note the extra line of output in both the before and after portions:
# /set_empeg_max_fid.v7 set_empeg_max_fid.v7: version 7 by Mark Lord (March 2005) /dev/hda3: 33264 sectors New max_fid value will be 29168 (000071f0) before: 0017a950: 00000000 00000200 00000200 00000200 0017a960: 00000400 00000200 00000600 00000200 0017a970: 00000800 00000010 00000810 00000010 0017a980: 00000820 00000010 00000830 00000010 0017a990: 00001000 00007000 00000000 00000000 after: 0017a950: 00000000 00000400 00000400 00000400 0017a960: 00000880 000003c0 00000c40 000003c0 0017a970: 00000800 00000010 00000810 00000010 0017a980: 00000820 00000010 00000830 00000010 0017a990: 00001000 000071f0 00000000 00000000
Cheers
|
Top
|
|
|
|
#250996 - 05/03/2005 22:32
Re: set_empeg_max_fid (version 7 binary)
[Re: mlord]
|
carpal tunnel
Registered: 05/01/2001
Posts: 4903
Loc: Detroit, MI USA
|
Worked perfectly! It's been SOO long since I've been able to save my root playlist! Thank you!
Now I just need the balls to run Alpha8 on this thing so I can crossfade.. hehe.
Edited by SE_Sport_Driver (05/03/2005 22:34)
_________________________
Brad B.
|
Top
|
|
|
|
#250997 - 06/03/2005 09:21
Re: set_empeg_max_fid (version 7 source)
[Re: mlord]
|
pooh-bah
Registered: 13/09/1999
Posts: 2401
Loc: Croatia
|
Sigh, the last excuse for not upgrading disks and memory gone....
_________________________
Dragi "Bonzi" Raos
Q#5196
MkII #080000376, 18GB green
MkIIa #040103247, 60GB blue
|
Top
|
|
|
|
#250998 - 06/03/2005 10:27
Re: set_empeg_max_fid (version 7 source)
[Re: mlord]
|
carpal tunnel
Registered: 13/07/2000
Posts: 4180
Loc: Cambridge, England
|
Quote: -- running orders (Eg. down-down-down shuffles) of up to 43648 fids, which should now survive reboots with this fix.
It's actually not quite as simple a calculation as that. Each bookmark, including the saved running order, saves both the shuffled and unshuffled order. So the space taken up is 512 bytes, plus 8 bytes per distinct fid (i.e. 8 times the length of the shuffled running order), plus 4 bytes per appearance of each fid (i.e. 4 times the length of the unshuffled running order). Calculations based on "12 bytes per fid" are only accurate if each fid appears in only one playlist. If each fid appears in an average of two playlists, it's 16 bytes per fid -- three playlists, 20 bytes per fid, and so on.
Peter
|
Top
|
|
|
|
#250999 - 06/03/2005 11:53
Re: set_empeg_max_fid (version 7 source)
[Re: peter]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
Right. I figured something like that, thus the up to wording.
In practice, on one of my own players with around 7000 tracks, this can now make a difference on down-down-down shuffles. So one doesn't even need to be in Paul's league to benefit.
Cheers
|
Top
|
|
|
|
#251000 - 06/03/2005 13:16
Re: set_empeg_max_fid (version 7 source)
[Re: mlord]
|
carpal tunnel
Registered: 15/08/2000
Posts: 4859
Loc: New Jersey, USA
|
Although, it certainly helps. Thanks again!!!
_________________________
Paul Grzelak 200GB with 48MB RAM, Illuminated Buttons and Digital Outputs
|
Top
|
|
|
|
#251001 - 06/03/2005 16:57
Re: set_empeg_max_fid (version 7 source)
[Re: pgrzelak]
|
carpal tunnel
Registered: 13/07/2000
Posts: 4180
Loc: Cambridge, England
|
Quote: Although, it certainly helps. Thanks again!!!
You know, even though many of the usual suspects seem to be reading this thread already, it's probably worth a new thread somewhere titled as a cure for forgotten down-down-down running-orders -- it seems a shame to have such useful hackery hidden in a thread apparently about memory boards.
Peter
|
Top
|
|
|
|
#251002 - 06/03/2005 18:14
Re: set_empeg_max_fid (version 7 source)
[Re: peter]
|
carpal tunnel
Registered: 08/06/1999
Posts: 7868
|
Quote: it's probably worth a new thread
Done. tearing this subthread out where I did seemed to be the cleanest way to do it without duplicating posts. Forgot the new board lets me do that easially.
|
Top
|
|
|
|
#251003 - 06/03/2005 18:17
Re: Patching the Player for more dynamic FIDs
[Re: mlord]
|
carpal tunnel
Registered: 05/01/2001
Posts: 4903
Loc: Detroit, MI USA
|
Forgive my "gushing", but I am just LOVING the fact that I can start shuffleing the root playlist again!
_________________________
Brad B.
|
Top
|
|
|
|
#251004 - 06/03/2005 23:18
Re: set_empeg_max_fid (version 7 source)
[Re: drakino]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
|
Top
|
|
|
|
#251005 - 15/03/2005 17:46
Re: set_empeg_max_fid (version 7 binary)
[Re: mlord]
|
pooh-bah
Registered: 09/08/2000
Posts: 2091
Loc: Edinburgh, Scotland
|
Not getting this to work at all. When I run it I get:
empeg:/# ./max_fid.v7 max_fid.v7: version 7 by Mark Lord (March 2005) /empeg/bin/player: Text file busy empeg:/#
What would this mean?
_________________________
Rory MkIIa, blue lit buttons, memory upgrade, 1Tb in Subaru Forester STi MkII, 240Gb in Mark Lord dock MkII, 80Gb SSD in dock
|
Top
|
|
|
|
#251006 - 15/03/2005 18:44
Re: set_empeg_max_fid (version 7 binary)
[Re: frog51]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
That would mean you should first kill off the player app (serial port: control^C) before trying to modify it.
|
Top
|
|
|
|
#251007 - 15/03/2005 18:58
Re: set_empeg_max_fid (version 7 binary)
[Re: mlord]
|
pooh-bah
Registered: 09/08/2000
Posts: 2091
Loc: Edinburgh, Scotland
|
Darn - I was afraid of that. Now I need to go and find that serial cable Cheers Mark
_________________________
Rory MkIIa, blue lit buttons, memory upgrade, 1Tb in Subaru Forester STi MkII, 240Gb in Mark Lord dock MkII, 80Gb SSD in dock
|
Top
|
|
|
|
#251008 - 15/03/2005 19:04
Re: set_empeg_max_fid (version 7 binary)
[Re: frog51]
|
carpal tunnel
Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
|
Just kill -2 <pid>
_________________________
Bitt Faulk
|
Top
|
|
|
|
#251009 - 15/03/2005 19:07
Re: set_empeg_max_fid (version 7 binary)
[Re: frog51]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
It can be done entirely over FTP if really necessary, just requires a few more hoops to jump through:
-- remount rw: site rw -- rename the existing /empeg/bin/player to something else -- make a new copy of it under the original name -- chmod 755 on the new copy (original name) -- delete the original (now renamed) file (yes, you can do that even while it is still running) -- patch the new one (original name) -- remount ro: site ro -- reboot: site reboot
Cheers
|
Top
|
|
|
|
#251010 - 15/03/2005 21:31
Re: set_empeg_max_fid (version 7 binary)
[Re: mlord]
|
pooh-bah
Registered: 09/08/2000
Posts: 2091
Loc: Edinburgh, Scotland
|
Sounds reasonable, but I bet I could have messed up something trying those steps (can you tell I used to be a programmer, so instead I spent 15 minutes looking for the cable and now all is well.
I only have 14000 tracks so hadn't had a fail on down, down, down - but it seems to cope with it faster now. There used to be a significant pause before.
So, many thanks!
_________________________
Rory MkIIa, blue lit buttons, memory upgrade, 1Tb in Subaru Forester STi MkII, 240Gb in Mark Lord dock MkII, 80Gb SSD in dock
|
Top
|
|
|
|
#251011 - 15/03/2005 21:32
Re: set_empeg_max_fid (version 7 binary)
[Re: wfaulk]
|
pooh-bah
Registered: 09/08/2000
Posts: 2091
Loc: Edinburgh, Scotland
|
ahhh - never thought of trying -2, and obviously -9 just kept respawning
_________________________
Rory MkIIa, blue lit buttons, memory upgrade, 1Tb in Subaru Forester STi MkII, 240Gb in Mark Lord dock MkII, 80Gb SSD in dock
|
Top
|
|
|
|
#251012 - 15/03/2005 22:54
Re: set_empeg_max_fid (version 7 binary)
[Re: frog51]
|
carpal tunnel
Registered: 24/12/2001
Posts: 5528
|
Faster? There shouldn't be any speed difference.
|
Top
|
|
|
|
#251013 - 15/03/2005 23:27
Re: set_empeg_max_fid (version 7 binary)
[Re: frog51]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
I dunno where any speed difference would come from.
But "only 14000" tracks is plenty enough to benefit. If each track appears in two playlists, that's a shuffle of 28000 on down-down-down.. well past the previous player limitations here.
Cheers
|
Top
|
|
|
|
#251014 - 16/03/2005 07:50
Re: set_empeg_max_fid (version 7 binary)
[Re: mlord]
|
pooh-bah
Registered: 09/08/2000
Posts: 2091
Loc: Edinburgh, Scotland
|
It always seemed to pause and wait - when I had only a few tracks on and pressed down/down/down, I'd get the hourglass then it would go straight into the new playlist. With many tracks there would be a pause in the music, after a long period of time with the hourglass. Now the pause is gone again
_________________________
Rory MkIIa, blue lit buttons, memory upgrade, 1Tb in Subaru Forester STi MkII, 240Gb in Mark Lord dock MkII, 80Gb SSD in dock
|
Top
|
|
|
|
#251015 - 16/03/2005 12:28
Re: set_empeg_max_fid (version 7 binary)
[Re: frog51]
|
carpal tunnel
Registered: 24/12/2001
Posts: 5528
|
If anything, it should be a tiny fraction slower if you've got a huge playlist. Before it'd truncate your playlist when it ran out of room but now the playlist area has grown so it will write more.
|
Top
|
|
|
|
#251016 - 16/03/2005 12:58
Re: set_empeg_max_fid (version 7 binary)
[Re: tman]
|
pooh-bah
Registered: 09/08/2000
Posts: 2091
Loc: Edinburgh, Scotland
|
wonder if it was truncating and getting upset about it before? I know sometimes after uploading new tracks the rebuild database would fail, and I'd need to pull power, wait for the empeg to do its long rebuild, then resync with emplode - that no longer happens (or has not yet, even though I added 200 tracks last night)
_________________________
Rory MkIIa, blue lit buttons, memory upgrade, 1Tb in Subaru Forester STi MkII, 240Gb in Mark Lord dock MkII, 80Gb SSD in dock
|
Top
|
|
|
|
#251018 - 17/03/2005 22:26
Re: set_empeg_max_fid (version 7 binary)
[Re: Taym]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
Quote:
Mark, how can I do this? I am afraid I'm missing the proper command. I could do all up to that step. I have the set_empeg_max_fix.v7 in /empeg/bin/player , but then?
Just run the set_empeg_max_fix.v7 program (no args required).
But your original text worries me.. /empeg/bin/player is a file, not a directory. It's not possible to have set_empeg_max_fix.v7 "in /empeg/bin/player", unless the instructions messed you up somewhere..
Cheers
|
Top
|
|
|
|
#251019 - 17/03/2005 22:39
Re: set_empeg_max_fid (version 7 binary)
[Re: mlord]
|
carpal tunnel
Registered: 18/06/2001
Posts: 2504
Loc: Roma, Italy
|
Sorry, I meant set_empeg_max_fix.v7 is in /empeg/bin/ But now I have my ftp client open on /empeg/bin . What should I type at the command prompt?
_________________________
= Taym = MK2a #040103216 * 100Gb *All/Colors* Radio * 3.0a11 * Hijack = taympeg
|
Top
|
|
|
|
#251020 - 17/03/2005 23:10
Re: set_empeg_max_fid (version 7 binary)
[Re: Taym]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
site rw
cd /empeg/bin
chmod 755 set_empeg_max_fix.v7
site exec /empeg/bin/set_empeg_max_fix.v7
site ro
site reboot
Edited by mlord (17/03/2005 23:10)
|
Top
|
|
|
|
#251021 - 18/03/2005 00:11
Re: set_empeg_max_fid (version 7 binary)
[Re: mlord]
|
carpal tunnel
Registered: 18/06/2001
Posts: 2504
Loc: Roma, Italy
|
Thank you thank you. I worked perfectly! Sorry, I also realized you had mentioned the SITE EXEC command before. Now that I think about it, is this also fixing the random-marked fids bug? Were those two issue related?
_________________________
= Taym = MK2a #040103216 * 100Gb *All/Colors* Radio * 3.0a11 * Hijack = taympeg
|
Top
|
|
|
|
#251022 - 18/03/2005 00:51
Re: set_empeg_max_fid (version 7 binary)
[Re: Taym]
|
carpal tunnel
Registered: 24/12/2001
Posts: 5528
|
Quote: Now that I think about it, is this also fixing the random-marked fids bug? Were those two issue related?
Nope and nope.
|
Top
|
|
|
|
#251023 - 17/04/2005 12:55
Re: set_empeg_max_fid (version 7 binary)
[Re: tman]
|
new poster
Registered: 17/04/2005
Posts: 16
|
Hi Guys - I am new to this scene and have just bought an empeg and I have today managed to upgrade to 2 x 80Gb drives, I have read this thread numerous times and I dont seem to be able to get it into my thick skull, can someone please give me a basic step by step explanation on how to complete this. Also I have aquired an illumination Kit and I wondered if there was anyone in the UK who could do the fitting?
|
Top
|
|
|
|
#251024 - 30/09/2006 17:01
Re: set_empeg_max_fid (version 7 binary)
[Re: MRB]
|
pooh-bah
Registered: 06/04/2005
Posts: 2026
Loc: Seattle transplant
|
Quote: Hi Guys - I am new to this scene and have just bought an empeg and I have today managed to upgrade to 2 x 80Gb drives, I have read this thread numerous times and I dont seem to be able to get it into my thick skull, can someone please give me a basic step by step explanation on how to complete this.
Curious- MRB's post shows a time of 06:55 17/04/2005 in the thread, but 19:30 29/09/2006 in the main index.
Meanwhile, I, too, would greatly appreciate a "layman's" version of the maxfid fix! I'm nearing 20k tracks and still have 40GB free on my dual 60GB empeg. I'm truly impressed with the programming effort shown in this thread (ok- all over this BBS, too!) and wish I could follow along to enjoy the benefits.
_________________________
10101311 (20GB- backup empeg) 10101466 (2x60GB, Eutronix/GreenLights Blue) (Stolen!)
|
Top
|
|
|
|
#251025 - 30/09/2006 17:18
Re: set_empeg_max_fid (version 7 binary)
[Re: Robotic]
|
carpal tunnel
Registered: 15/08/2000
Posts: 4859
Loc: New Jersey, USA
|
Greetings! I am not quite sure what you mean by a "layman's" version, but will this help?
_________________________
Paul Grzelak 200GB with 48MB RAM, Illuminated Buttons and Digital Outputs
|
Top
|
|
|
|
#251026 - 30/09/2006 17:49
Re: set_empeg_max_fid (version 7 binary)
[Re: pgrzelak]
|
pooh-bah
Registered: 06/04/2005
Posts: 2026
Loc: Seattle transplant
|
Quote: Greetings!
I am not quite sure what you mean by a "layman's" version, but will this help?
Yes, Paul! Thanks! I was just reading that one, too!
_________________________
10101311 (20GB- backup empeg) 10101466 (2x60GB, Eutronix/GreenLights Blue) (Stolen!)
|
Top
|
|
|
|
|
|