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-22 16:48
MagerValp

Registered: Dec 2001
Posts: 1074
Well a standard precision float would do the trick as well, but that might be troublesome for embedded players (or the C64 for that matter). Milliseconds is a little too coarse, but how about 16.16 fixed point? Trivial to read out the seconds if that's all you need, 15 µs resolution, and max 18 hours of playing time. Or 9 hours and a loop flag.
2011-02-23 08:47
Sasq

Registered: Apr 2004
Posts: 156
16.16 is a good idea I think.

So then perhaps we have these basic chunks;

HEAD - mandatory, with addresses and flags
DATA - At least one is mandatory, loaded into C64 mem
INFO - Optional
SLEN - Song lengths, 32 bits per song, optional

The STIL chunks may take a bit more thought...

One question is how the INFO chunk should look; simply the same 48 bytes as PSID, or sub chunks ("TITL", 0x00000010) or more compact (ID byte + length byte) ?

2011-02-23 16:38
Mr. SID

Registered: Jan 2003
Posts: 424
Since HEAD would always be the first chunk, and it's useful to have a simple quick way of identifying the format, I would propose to call that chunk XSID.
2011-02-23 17:25
chatGPZ

Registered: Dec 2001
Posts: 11350
if you actually want a IFF based format, then using one tag for more than one kind of info is pretty much a nono though. why not have PSID as first tag then, put the entire old file into it, and then put new info into other tags? =)
2011-02-23 19:21
Mr. SID

Registered: Jan 2003
Posts: 424
Because lots of existing code checks for PSID, and then assumes that the data starts at offset 0x7c (i.e. ignoring the data offset stored in the header).
2011-02-28 00:14
MagerValp

Registered: Dec 2001
Posts: 1074
Which is why you'd keep the old header and data to be compatible, and only add chunks of new information at the end.
2011-02-28 08:36
pmprog
Account closed

Registered: Nov 2005
Posts: 54
MagerValp: Your first header wouldn't actually support the IFF format (ie, there's no length of the segment). Also you run the risk like I mentioned ages ago that if the PSID player just loads *all* data after the header (which I would guess was default behaviour), you have the possibility of overrunning the "C64" memory space in the player.

Might as well just wait to see what the HVSC team come up with for the new format now
2011-02-28 10:58
MagerValp

Registered: Dec 2001
Posts: 1074
Quoting pmprog
MagerValp: Your first header wouldn't actually support the IFF format (ie, there's no length of the segment).


I'm not saying it would. I'm advocating that we keep the old header, and the old payload, and only add IFF-style chunks to the end, not that the new file format should be IFF.

Quote:
Also you run the risk like I mentioned ages ago that if the PSID player just loads *all* data after the header (which I would guess was default behaviour), you have the possibility of overrunning the "C64" memory space in the player.


Yep, it's something to watch out for, and it'd be interesting to batch convert HVSC to this new format and see how big they get. I suspect that everything in HVSC would fit though.
2011-02-28 14:56
Sasq

Registered: Apr 2004
Posts: 156
I'm betting there are some tunes that end at FFFF which wont work. And if you play with a relocating player on the C64, many tunes with extra info may not work since they can extend into the area marked as free by the reloc-page.

Why not just create a clean, new format instead of another hack. With tools to convert back and forth it should cause problems for very few people.
2011-02-28 19:41
Steppe

Registered: Jan 2002
Posts: 1510
For the time being we decided to take a compromise. In the new PSIDv3 format stereo sid support was added, zero termination of header fields was removed (increasing header string size by 1) and the old 28+3 filename limitation was removed. This change should be trivial to implement for sidplayer authors and it shouldn't break backward compatibility. Discussion about a version 4 hasn't really gone anywhere so far, please be patient. So far, thanks a lot for the input everyone!
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
Apollyon/ALD
Picrard/Mayday
psych
serato/Finnish Gold
zscs
celticdesign/G★P/M..
Sande/Hokuto Force
Guests online: 129
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 Original Suppliers
1 Derbyshire Ram  (9.7)
2 Fungus  (9.3)
3 Black Beard  (9.2)
4 Baracuda  (9.2)
5 hedning  (9.1)

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