VGM - Gens PCM playing speed pb

SGDK only sub forum

Moderator: Stef

Post Reply
Nainain
Interested
Posts: 14
Joined: Sat Oct 11, 2014 3:34 pm

VGM - Gens PCM playing speed pb

Post by Nainain » Sat Apr 23, 2016 9:02 am

Hi,

I ve a problem with my rom in Gens …
The PCM loop inside the VGM is playing too fast in Gens.
(its ok on real HW and Fusion)

I tried to export in VGM1.5 & VGM1.6 format but same result.

I use VGM Music Maker, but I tried DefleMask too

In the zip, my sample program and the vge project and wav sample (in work directory)

Do you know this issue ?
Maybe, have you a trix or something to fix that ?

Thank for your help
https://www.dropbox.com/s/doml91dl8xbj5 ... t.zip?dl=0

Nainain
Interested
Posts: 14
Joined: Sat Oct 11, 2014 3:34 pm

Re: VGM - Gens PCM playing speed pb

Post by Nainain » Sat Apr 23, 2016 9:20 am

i forget to say ...
Testing in pal\ntsc and if i make a FM synth sequence on another channel, this FM seq is playing at good speed

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

Re: VGM - Gens PCM playing speed pb

Post by Stef » Sat Apr 23, 2016 9:25 am

Indeed the timing is too fast in Gens.
Are you using a VGM just containing sample ? I guess you plan to add FM composition over it afterward otherwise you could simply use PCM sound driver.
Also to obtain the best PCM quality, you have to know that internally XGM will resample any PCM at 14 Khz, so you better doing the 14 Khz conversion before using your own sound software as the rescomp resampler (or the one inside Deflemask) is really bad and quality loss is important.

About the problem in Gens, it comes from an issue with Z80 BUS access timing, you have penalty accessing the 68K bus from Z80 which the XGM driver takes care of but Gens ignores it, resulting in too fast PCM play. It's not a big issue usually (high pitched PCM) but is more a problem when you have long looped sample as here. Unfortunately i don't maintain Gens anymore so it won't be fixed, in that typical case you should test on Fusion which has better Z80 timing emulation generally :)

Post Reply