SID dump file format

Assembler, C/C++ related topics

Re: SID dump file format

Postby SteveMoody » Sat Feb 14, 2015 10:32 am

It's playing the files ok now is it? I look forward to trying it out.
SteveMoody
Developer
 
Posts: 273
Joined: Sat Mar 08, 2014 1:23 pm
Location: South Wales, UK

Re: SID dump file format

Postby marvin » Sat Feb 14, 2015 11:06 am

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.
marvin
Developer
 
Posts: 30
Joined: Tue Jul 08, 2014 2:17 pm

Re: SID dump file format

Postby mike » Sat Feb 14, 2015 1:59 pm

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
mike
 
Posts: 9
Joined: Mon Feb 09, 2015 10:54 am

Re: SID dump file format

Postby simon » Sat Feb 14, 2015 3:09 pm

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
simon
Site Admin
 
Posts: 742
Joined: Thu Sep 13, 2012 9:35 am
Location: Luedenscheid, Germany

Re: SID dump file format

Postby simon » Sat Feb 14, 2015 3:37 pm

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...
Attachments
sidplay2.tgz
(725.55 KiB) Downloaded 249 times
simon
Site Admin
 
Posts: 742
Joined: Thu Sep 13, 2012 9:35 am
Location: Luedenscheid, Germany

Re: SID dump file format

Postby mike » Sat Feb 14, 2015 5:10 pm

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
mike
 
Posts: 9
Joined: Mon Feb 09, 2015 10:54 am

Re: SID dump file format

Postby simon » Sun Feb 15, 2015 5:21 pm

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
simon
Site Admin
 
Posts: 742
Joined: Thu Sep 13, 2012 9:35 am
Location: Luedenscheid, Germany

Re: SID dump file format

Postby simon » Tue Feb 17, 2015 9:53 pm

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
Attachments
SIDDump_linux.tgz
(610.2 KiB) Downloaded 263 times
sidplay3.tgz
(1.22 MiB) Downloaded 282 times
simon
Site Admin
 
Posts: 742
Joined: Thu Sep 13, 2012 9:35 am
Location: Luedenscheid, Germany

Re: SID dump file format

Postby SteveMoody » Tue Feb 17, 2015 10:42 pm

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 :)
SteveMoody
Developer
 
Posts: 273
Joined: Sat Mar 08, 2014 1:23 pm
Location: South Wales, UK

Re: SID dump file format

Postby simon » Wed Feb 18, 2015 10:05 am

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
simon
Site Admin
 
Posts: 742
Joined: Thu Sep 13, 2012 9:35 am
Location: Luedenscheid, Germany

PreviousNext

Return to Programming

Who is online

Users browsing this forum: No registered users and 1 guest

cron