| |
pmprog Account closed
Registered: Nov 2005 Posts: 54 |
Track Times in SID files?
I've always wondered this, but why doesn't any of the SID file formats support a track time.
A couple of extra bytes per subtune per SID wouldn't be a huge loss, and it would mean any individual player doesn't need access to the 3MB file from HVSC to correctly know when to move on to the next track.
Given the database exists, it would also be pretty easy to write a program to go through all the files in HVSC, check if they match whichever SID file format supports the tracks times, and updates them with the tune lengths from the text file.
Does that not seem a good idea? |
|
... 68 posts hidden. Click here to view all posts.... |
| |
iAN CooG
Registered: May 2002 Posts: 3194 |
"why not fix the SIDs anyway"
yeah sure, pick one from the buglist and fix it. Send anytime!
hint: if it's in the buglist means that no one so far was able to fix it, or it's even impossible due to missing/broken data. Good luck. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
Quote:From what I've heard implementing support for Songlengths.txt is really tedious and requires lots of trial and error,
my favourite WTF is, that it contains the pointless md5 (wth should one do with this?) as regular data.... and the filename, which is what you really want, is only there as a comment, so everyone who uses the db ignores the md5, and then adds whacky code to seek backwards to last comment and extract the filename. awesome =) the times beeing in min:sec format and not seconds only as you most likely need in your app then is only a small annoyance. somehow looks as whoever invented this format didnt code a thing before =P |
| |
pmprog Account closed
Registered: Nov 2005 Posts: 54 |
Quote: "why not fix the SIDs anyway"
yeah sure, pick one from the buglist and fix it. Send anytime!
hint: if it's in the buglist means that no one so far was able to fix it, or it's even impossible due to missing/broken data. Good luck.
Okay, hands up, I'll admit, I only glanced at buglist and didn't read it properly. :-)
But that goes back to my point, tune times have a positive effect on being in the file format. STIL and BUGLIST don't because the player can do nothing with that information. Sure, maybe make them optional in the same way MP3s can have a jpg of the album cover, but not required.
Could you not use
Quote:+7A WORD reserved
in the SID v2 header (according to the file format document in HVSC) to point to a "Optional Data Header", which can then be located anywhere in the file (so not to throw off any players that assume a fixed header size, or just don't want to use it). Point this to a "floating" header record would mean that it wouldn't *break* any of your tools
What languages are the tools written in? |
| |
Steppe
Registered: Jan 2002 Posts: 1510 |
There has been a discussion about this in the HVSC team numerous times. I'd favor putting the playtime into the sid header, but the number of reserved/unused bytes in the header always prevented this (without breaking anything). The idea with the floating header record hasn't been brought up before and to me as a non coder sounds interesting. |
| |
Hermit
Registered: May 2008 Posts: 208 |
A primitive and dirty solution, but if there's no room and there are compatibility issues, why not storing song-length values in the filename's last characters....that could be checked and read easily by a simple text-routine...
|
| |
Mr. SID
Registered: Jan 2003 Posts: 424 |
Quoting Groepaz Quote:
my favourite WTF is, that it contains the pointless md5 (wth should one do with this?) as regular data.... and the filename, which is what you really want, is only there as a comment, so everyone who uses the db ignores the md5, and then adds whacky code to seek backwards to last comment and extract the filename. awesome =) the times beeing in min:sec format and not seconds only as you most likely need in your app then is only a small annoyance. somehow looks as whoever invented this format didnt code a thing before =P
The idea is that the path name often changes. So the MD5 is a more robust way of identifying the file in question. So it's possible to extract the song length even if the file was not loaded from within the HVSC, as long as the MD5 is in the DB.
Btw, the whole system was designed and implemented by Michael Schwendt. |
| |
Mr. SID
Registered: Jan 2003 Posts: 424 |
Quoting HermitA primitive and dirty solution, but if there's no room and there are compatibility issues, why not storing song-length values in the filename's last characters....that could be checked and read easily by a simple text-routine...
Because there's often more than one song in a file. |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
simply use the bytes left to point to the end of the sid file and stick the extra data there ? anyways I dont think switching to a new format would be the end of the world, why not? |
| |
JCB Account closed
Registered: Jun 2002 Posts: 241 |
The problem with having a "footer" (putting the extra data at the end of the file) is backwards compatibility. If older players that don't know about it read the header, then read the rest of the file into the emulated RAM till eof, it could be nasty.
|
| |
pmprog Account closed
Registered: Nov 2005 Posts: 54 |
Quote: The problem with having a "footer" (putting the extra data at the end of the file) is backwards compatibility. If older players that don't know about it read the header, then read the rest of the file into the emulated RAM till eof, it could be nasty.
I don't think this will actually be an issue for the following reasons
1) The SID file formats do not contain any references to file size, so in order to read the file, it is highly likely that the allocated buffer will be the actual filesize.
2) Say all the data (including the optional footer/header) gets loaded into the C64 memory, the SID code won't access them, so it won't cause any playback issues
I guess the only downside to this is if the LoadAddress field in the header is close to the upper portion of the 64KB limit, and the data including the extra header information could overrun the buffer, but that leads me to...
3) "+04 WORD version" - Each PSID has a version. As this file would be a new version, older players would (should) validate it's a version they support.
2 |
Previous - 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 - Next |