Previous Thread
Next Thread
Print Thread
Page 55 of 55 1 2 53 54 55
#98466 - 02/28/15 06:48 PM Re: AO SDK release 1.1.1 available [Re: R. Belmont]  
Joined: Mar 2001
Posts: 15,587
R. Belmont Online content
R. Belmont  Online Content

Very Senior Member

Joined: Mar 2001
Posts: 15,587
USA
I used to, but that was several HDDs ago and search doesn't show it now. And unfortunately his robots.txt kept the Wayback Machine out.

#98492 - 03/01/15 12:06 PM Re: AO SDK release 1.1.1 available [Re: R. Belmont]  
Joined: Jul 2010
Posts: 20
MetalliC Offline
Member
MetalliC  Offline
Member

Joined: Jul 2010
Posts: 20
no need to, thanks to D.K.
if someone else may need it - http://pastebin.com/9TbKLGPs

#99136 - 04/11/15 08:03 AM Re: AO SDK release 1.0 available [Re: R. Belmont]  
Joined: Jul 2010
Posts: 20
MetalliC Offline
Member
MetalliC  Offline
Member

Joined: Jul 2010
Posts: 20
Hi.
is someone still interested in researching AICA filter EG ?

have some progress with this:
at first I've taken this filter formula http://www.musicdsp.org/showone.php?id=185 , because using Neil's I can't get any resonance.

as for coefficients: I think FEG values (both filtering coeff and Q) uses the same dB logarithmic volumes as AEG but with 3 more LSB added. So in short - Neill was one bit wrong, it have 9 fractional bits and 4 exponential (not 8 and 5).
In the case of Q it must be <<=6 so it become in same dB range as FEG level.
this assumptions also kind of approved by old AICA implementation http://sabia.tic.udc.es/gc/Contenidos%20...CA_E.HTM#no6_17 , when at some stage of development Q register was full 13 bits, not just 5bits as in final version.

so currently I have this (messy) code:
Code:
#define F_FRAC_BITS 6
#define F_ALL_BITS 10
		// FEG_Level (13 bits -> 10 bits)
		u32 c_db = (chan->feglevel) >> (13 - F_ALL_BITS);
		// FEG_Level - (Q - 3dB), add/sub of dB values equal to mult/div of linear R and C coefficients
		s32 rc_db = (chan->feglevel - ((chan->q << 6) - 0x100)) >> (13 - F_ALL_BITS);
		LIMIT(rc_db, 0, ((1 << F_ALL_BITS) - 1));
		s32 c_lin = (((c_db & ((1 << F_FRAC_BITS) - 1)) | (1 << F_FRAC_BITS)) << (F_ALL_BITS - F_FRAC_BITS - 1)) >> ((c_db >> F_FRAC_BITS) ^ ((1 << (F_ALL_BITS - F_FRAC_BITS)) - 1));
		s32 rc_lin = (((rc_db & ((1 << F_FRAC_BITS) - 1)) | (1 << F_FRAC_BITS)) << (F_ALL_BITS - F_FRAC_BITS - 1)) >> ((rc_db >> F_FRAC_BITS) ^ ((1 << (F_ALL_BITS - F_FRAC_BITS)) - 1));

		s32 inv_rc_lin = (1 << F_ALL_BITS) - rc_lin;
		chan->feg_v0 = inv_rc_lin * chan->feg_v0 + c_lin * s - c_lin * chan->feg_v1;
		chan->feg_v0 >>= F_ALL_BITS;
		chan->feg_v1 = inv_rc_lin * chan->feg_v1 + c_lin * chan->feg_v0;
		chan->feg_v1 >>= F_ALL_BITS;
		s = chan->feg_v1;


which gives IMO nice result "close enough" to real thing smile
here few recordings for comparison:
BIOS sounds:
Demul http://rghost.ru/7862ZRCJb
real DC http://rghost.ru/8ctcKWMtb

Sega GT sound test track 01
Demul http://rghost.ru/665QFjwl8
real HW https://www.youtube.com/watch?v=oH6gW2bxaJk


But... there is some problem in algorithm. by design it makes sound a bit off/quiet (then C 1 and Q 0 output becomes = input minus previous output), so with Feg_Lv 0x1FF8 and Q 4 output is not the same as input.

is there anyone good at DSP processing and may give advice to look at some another filtering algorithms/formulas ?


#99139 - 04/11/15 10:56 AM Re: AO SDK release 1.0 available [Re: R. Belmont]  
Joined: Mar 2001
Posts: 15,587
R. Belmont Online content
R. Belmont  Online Content

Very Senior Member

Joined: Mar 2001
Posts: 15,587
USA
I'm definitely interested in getting the right filter EG, but I'm not a DSP expert. That'd be Olivier smile

#99142 - 04/11/15 12:50 PM Re: AO SDK release 1.0 available [Re: R. Belmont]  
Joined: Jul 2010
Posts: 20
MetalliC Offline
Member
MetalliC  Offline
Member

Joined: Jul 2010
Posts: 20
ok,
as for filter envelope generation part - it looks the same as AEG in the term of change rate (as noted in html docs).
so time for full 0-0x1FFF change is aproximate 8x longer than AEG times tables, not ~4x like DCDBSysArc990907E.doc says.

but correct EG rate formula is still unknown, for both AEG and FEG (if KRS!=0x0F).
docs says its (KRS[0:15] + OCT[-8:+7]) * 2 + (FNS>>9) + RATE*2
some SCSP/AICA emulators calculate it this way, other like AO uses
KRS[0:15]*2 + OCT[-8:+7] + (FNS>>9[0:1]) + RATE[0:31]*2, so octave isnt *2
others calculate (KRS+OCT)*2 but add it only if value >0 (I currently use this)
but sadly its really unknown for now how exactly EG rate value calculated, in both SCSP and AICA.

Page 55 of 55 1 2 53 54 55

Moderated by  R. Belmont, Richard Bannister 

Who's Online Now
2 registered members (R. Belmont, drewcifer), 17 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Shout Box
Forum Statistics
Forums9
Topics8,341
Posts107,790
Members4,738
Most Online225
May 26th, 2014
Powered by UBB.threads™ PHP Forum Software 7.6.0
Page Time: 0.030s Queries: 14 (0.012s) Memory: 4.9758 MB (Peak: 5.1619 MB) Zlib enabled. Server Time: 2017-05-28 20:28:49 UTC