Page 3 of 4

Re: SID dump file format

Posted: Sat Feb 14, 2015 10:32 am
by SteveMoody
It's playing the files ok now is it? I look forward to trying it out.

Re: SID dump file format

Posted: Sat Feb 14, 2015 11:06 am
by marvin
Hi,

the included "Fireflies" and "Still Alive" are playing perfectly,
this is really great :) !

"Last Ninja 2" and "Makumba" seem not to play correctly,
or I did something wrong while compiling them in.

Re: SID dump file format

Posted: Sat Feb 14, 2015 1:59 pm
by mike
hi,

i guess that the problem with last ninja 2 are the multiple gate-register-writes within a *single* frame. (see one of my earlier posts)

meanwhile i rewrote the dumper. it's not using the register states after each frame anymore, but records the register-writes within each frame
and then stores multiple sets of DELTA+DATA bytes per frame.
now last ninja 2 sounds as it should :)

mike

Re: SID dump file format

Posted: Sat Feb 14, 2015 3:09 pm
by simon
Great Mike,

do I have to modify the player to use the new dump-format? And is the new dumper available via the link you posted earlier?

What I found is that there are some tunes which are not timed synchronous to the VBI (50Hz/60Hz) but the CIA timer. They still sound odd but that is fine with me as you need another player which uses Kiwi's timers.

Simon

Re: SID dump file format

Posted: Sat Feb 14, 2015 3:37 pm
by simon
Makumba did sound terrible because the .h still was Steve's version. :angel: Attached you find a new version of the player which also shows how to use the DUART timers...

Re: SID dump file format

Posted: Sat Feb 14, 2015 5:10 pm
by mike
the player just needs a minor change:
if bit 7 of channel-delta-flags (bit 4 of filter-delta-flags) is set, then it processes another set of delta-flags plus register values for the current channel or filter.

in the dumper, i implemented some basic end-of-tune-detection...

dumper+player:
https://www.dropbox.com/s/dmf0kguue7rxh7z/SIDDumpAndPlayer2.zip?dl=0

Re: SID dump file format

Posted: Sun Feb 15, 2015 5:21 pm
by simon
Hi Mike,

thank you for the updated code. Could you explain the "end of tune" code? The background is, that we don't have filelength() and chsize() in linux. Thus we have to find alternatives.

Simon

Re: SID dump file format

Posted: Tue Feb 17, 2015 9:53 pm
by simon
Hi,

I have modified SIDDump that it compiles with linux (modfied filelength() to use fstat() und chsize() to use ftruncate()). Some tunes still have problems. I don't know if this is an issue with my modification, the version at all or just the original SID format.
In addition I modified my last SIDDump player to use the new dumps. You find both archives attached.

At the moment I use "xxd -c 16 -i siddump.bin siddump.h" to convert the dump to an includable header file and modify the first lines thus they meet Steves format. Maybe we add the .h dump format to SIDDump again. In addition we may could use some form of the flags as end-mark. Then we would not need to know the number of frames to play...

Simon

Re: SID dump file format

Posted: Tue Feb 17, 2015 10:42 pm
by SteveMoody
simon wrote:At the moment I use "xxd -c 16 -i siddump.bin siddump.h" to convert the dump to an includable header file and modify the first lines thus they meet Steves format. Maybe we add the .h dump format to SIDDump again. In addition we may could use some form of the flags as end-mark. Then we would not need to know the number of frames to play..


Don't worry about keeping things to the format i specified too much. That was experimental and not really tested well. I'm sure there are better ways of doing things :)

Re: SID dump file format

Posted: Wed Feb 18, 2015 10:05 am
by simon
No problem, Steve. Your dump format has been dumped already. ;) The delta-flags without writing every reg-number again and again work pretty well and save more memory. :) I liked your idea of a header though. What I have in mind is the following:
  • Use a spare delta-flag bit (the filter deltas have three) as tune end marker
  • Add a header with information:
  • It is a SIDDump file
  • All meta information of the original SID like name, composer, year, ...
  • Information about the timing: 50Hz/VBI or any other frequency timed by the CIA or rather the PI/T on Kiwi
  • Maybe information about 6581 or 8580. If we like to define a mixed SID Kiwi we can play a tune with the correct SID automatically