VGM Driver Update

Announce (tech) demos or games releases

Moderator: Mask of Destiny

sigflup
Very interested
Posts: 111
Joined: Mon Sep 06, 2010 12:05 pm
Contact:

Post by sigflup » Sat Feb 01, 2014 4:57 pm

YESSSSSSSSSSSSSS!!!!!!!!!!!!!!!!! Getting rid of that 67 66 00 00 00 00 totally worked

kubilus1
Very interested
Posts: 237
Joined: Thu Aug 16, 2012 2:25 am
Contact:

Post by kubilus1 » Sat Feb 01, 2014 5:42 pm

Sigflup, I committed an update to the VGM driver code that should solve the empty PCM data block problem. You should be able to pull this and sync it with your changes.

Yeah, the problem is normally when specifying the length of a PCM data block, the you add the length to vgm address *before* the data length portion. Essentially this requires reading in this length and then subtracting 4 bytes.

In the case of a PCM data block of length 0, subtracting 4 bytes is incorrect, since that is essentially trying to get the system to process opcode 0, which doesn't exist.

kubilus1
Very interested
Posts: 237
Joined: Thu Aug 16, 2012 2:25 am
Contact:

Post by kubilus1 » Sat Feb 01, 2014 6:01 pm

Bastien, the Dr_optimized file is using 16khz samples, that's why it is playing too slow. Resample these to 8khz, if possible.

kubilus1
Very interested
Posts: 237
Joined: Thu Aug 16, 2012 2:25 am
Contact:

Post by kubilus1 » Sat Feb 01, 2014 6:35 pm

Forget what I said abut subtracting 4 bytes, I misunderstood something. I've updated the source to fix this.

kubilus1
Very interested
Posts: 237
Joined: Thu Aug 16, 2012 2:25 am
Contact:

Post by kubilus1 » Sat Feb 01, 2014 6:41 pm

Updated vgm_drv: https://dl.dropboxusercontent.com/u/101302896/vgm_drv.h

This should fix certain VGM files that have empty PCM blocks and probably some other problems as well.

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Mon Feb 03, 2014 12:09 am

Cool, i just updated SGDK and included your ast version of the VGM driver :)

kubilus1
Very interested
Posts: 237
Joined: Thu Aug 16, 2012 2:25 am
Contact:

Post by kubilus1 » Mon Feb 03, 2014 12:40 am

Sounds great! I appreciate the feedback on the driver. Let me know if there are any more files that have problems playing.

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Mon Feb 03, 2014 9:39 am

For now the last version seems to work quite nicely ! I will report any problems if i meet some with =)

sigflup
Very interested
Posts: 111
Joined: Mon Sep 06, 2010 12:05 pm
Contact:

Post by sigflup » Thu Feb 06, 2014 7:07 am

The average 68k memory access for my musicdisk is about 8.8Kb/s. That equates to at most 1.6K cycles lost on the 68k's clock every NTSC frame. Which isn't that bad, I guess. About how many instructions would you as assume 1.6k cycles is?

personal stuff....

I'm noticing skipping on my program and I think it's because my main loop gets extended beyond a frame by the z80. I could be wrong on this.

Post Reply