Welcome!
Final Burn Neo => FBN Development => Topic started by: vbt on September 07, 2014, 07:53:35 PM
-
i've spent some time on ym2151 on saturn (sh2 big endian) using gcc 4.9.0
the result is :
volume_calc returns many times 0x3FF or more, quiet value is 0x340 => no sound
op_calc1 give me strange behavior :
p = (env<<3) + sin_tab[ (i>>FREQ_SH) & SIN_MASK];
(env<<3) = 19f8
(i>>FREQ_SH) & SIN_MASK = 03b2
sin_tab = FFF8C400
p = FFF8DDF8
TL_TAB_LEN = 1A00
p >= TL_TAB_LEN => no sound
anybody could help ? can it be an endian problem? i've seen nothing in gp32/xb360 port that could help
-
i've found a fix for tl_tab
m = (1<<16) / powf(2, (x+1) * 0.00390625);
m = floorf(m);
floorf & powf fix m results
-
m = sinf( ((i*2)+1) * PI / SIN_LEN ); /* verified on the real chip */
few lines later, sinf instead of sin and now all values are correct
:biggrin: