Previous Thread
Next Thread
Print Thread
Page 55 of 55 1 2 53 54 55
Joined: Mar 2001
Posts: 17,217
Likes: 234
R
Very Senior Member
OP Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 17,217
Likes: 234
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.

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

Joined: Jul 2010
Posts: 24
M
Member
Offline
Member
M
Joined: Jul 2010
Posts: 24
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/Contenid...c/E_Aica/Aica_spec100e/AICA_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



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 ?


Joined: Mar 2001
Posts: 17,217
Likes: 234
R
Very Senior Member
OP Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 17,217
Likes: 234
I'm definitely interested in getting the right filter EG, but I'm not a DSP expert. That'd be Olivier smile

Joined: Jul 2010
Posts: 24
M
Member
Offline
Member
M
Joined: Jul 2010
Posts: 24
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.

Joined: Oct 2017
Posts: 2
Member
Offline
Member
Joined: Oct 2017
Posts: 2
hello, i've integrated aosdk in my player (oscp, http://talk.maemo.org/showthread.php?t=94590 ), it works, but i have some tunes not playing on my arm build (will report which ones later once i check the x86 build too. what is the status of aosdk? is it still supported/worked on?


oscp - player with network remote and no dependencies - http://talk.maemo.org/showthread.php?t=94590
Joined: Mar 2001
Posts: 17,217
Likes: 234
R
Very Senior Member
OP Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 17,217
Likes: 234
aosdk hasn't been updated in approximately forever, but we're still interested in bugs smile

Joined: Oct 2017
Posts: 2
Member
Offline
Member
Joined: Oct 2017
Posts: 2
just checked on the x86 and the bugs are the same as on arm. maybe it's my integration that is failing but c&d tune is completely silent and ps2 file sounds like it is wrong byteorder or wrong buffer size. i've put those tunes here: https://31.135.195.151:20281/aosdk/xsf-bugs.tar.gz
btw. can i talk to you on irc?


oscp - player with network remote and no dependencies - http://talk.maemo.org/showthread.php?t=94590
Joined: Dec 1969
Posts: 920
Likes: 3
R
Senior Member
Offline
Senior Member
R
Joined: Dec 1969
Posts: 920
Likes: 3
Damn, people still remember AO?

Page 55 of 55 1 2 53 54 55

Moderated by  R. Belmont, Richard Bannister 

Link Copied to Clipboard
Who's Online Now
3 members (AJR, Olivier Galibert, 1 invisible), 381 guests, and 6 robots.
Key: Admin, Global Mod, Mod
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics9,320
Posts121,944
Members5,074
Most Online1,283
Dec 21st, 2022
Our Sponsor
These forums are sponsored by Superior Solitaire, an ad-free card game collection for macOS and iOS. Download it today!

Superior Solitaire
Forum hosted by www.retrogamesformac.com