Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > CSDb Discussions > Track Times in SID files?
2011-02-17 21:33
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....
 
2011-02-18 14:23
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?
2011-02-18 15:42
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.
2011-02-18 15:51
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...

2011-02-18 16:05
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.
2011-02-18 16:10
Mr. SID

Registered: Jan 2003
Posts: 424
Quoting Hermit
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...


Because there's often more than one song in a file.
2011-02-18 16:43
Oswald

Registered: Apr 2002
Posts: 5077
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?
2011-02-18 17:09
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.

2011-02-18 18:33
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
2011-02-18 19:16
JCB
Account closed

Registered: Jun 2002
Posts: 241
Yeah, it would only really be an issue if the SID file was loaded towards the end of the emulated RAM. Whether coders of any players do anything other than check existing versions is another matter ;)

If something like this is done then maybe any future HVSC releases with the new data in could come with a "stripper" exe to run to revert the files back to the old format.
2011-02-18 21:57
SIDWAVE
Account closed

Registered: Apr 2002
Posts: 2238
The best is to have all crucial info in 1 header, and
not being afraid to make a new format. just do it.
if people want to support new format, they should do so.

This was designed in 1990 by PHS, and all the optimizations to it since, have been limited by "oh no, i have to not break compatibility"

I dont think that goes anywhere positive with a format that is so old.

Values in header, and STIL etc. in a real database format, and the key to read a tune's info, in the header. done!

If "Commando" has db key 147 for STIL and other stuff info, this key will never change. "Commando" stays at 147 forever.

We have been over this again and again, but when it came to the deciding things, actually making the things, real life came in the way every time, so its stranded.

AFAIK e already know a long time what to do, just e are all lame asses and didnt do it.

Ian: just because im not coding this, and because i have left the team because i have no more time, dont mean i dont have ideas, and have a right to speak them.
Previous - 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
christwoballs
zzarko
Guests online: 80
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Mojo  (9.6)
6 Uncensored  (9.6)
7 Wonderland XIV  (9.6)
8 Comaland 100%  (9.6)
9 No Bounds  (9.6)
10 Unboxed  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 Party Elk 2  (9.6)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.6)
5 Rainbow Connection  (9.5)
6 It's More Fun to Com..  (9.5)
7 Morph  (9.5)
8 Dawnfall V1.1  (9.5)
9 Onscreen 5k  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Booze Design  (9.3)
2 Oxyron  (9.3)
3 Nostalgia  (9.3)
4 Censor Design  (9.3)
5 Performers  (9.3)
Top Original Suppliers
1 Derbyshire Ram  (9.7)
2 Fungus  (9.3)
3 Black Beard  (9.2)
4 Baracuda  (9.2)
5 hedning  (9.2)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.042 sec.