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 12:44
iAN CooG

Registered: May 2002
Posts: 3186
"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.
2011-02-18 12:46
chatGPZ

Registered: Dec 2001
Posts: 11350
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
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: 5086
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
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
Rico/Pretzel Logic
theK/ATL
celticdesign/G★P/M..
Sulevi/Virtual Dreams
Guests online: 137
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 Christmas Megademo  (9.5)
Top onefile Demos
1 Layers  (9.6)
2 Party Elk 2  (9.6)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.6)
5 Libertongo  (9.5)
6 Rainbow Connection  (9.5)
7 Onscreen 5k  (9.5)
8 Morph  (9.5)
9 Dawnfall V1.1  (9.5)
10 It's More Fun to Com..  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Nostalgia  (9.3)
5 Censor Design  (9.3)
Top Logo Graphicians
1 t0m3000  (10)
2 Sander  (9.8)
3 Mermaid  (9.5)
4 Facet  (9.4)
5 Shine  (9.4)

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