Previous Thread
Next Thread
Print Thread
Page 6 of 55 1 2 4 5 6 7 8 54 55
Re: AO SDK release 1.2.0 available [Re: belegdol] #37085 01/06/08 06:42 PM
Joined: Mar 2001
Posts: 16,335
R
R. Belmont Offline OP
Very Senior Member
OP Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 16,335
I don't hear anything wrong with either of those songs compared to the Windows reference player.

Re: AO SDK release 1.2.0 available [Re: R. Belmont] #37088 01/06/08 09:09 PM
Joined: Mar 2004
Posts: 621
belegdol Online Content
Senior Member
Online Content
Senior Member
Joined: Mar 2004
Posts: 621
Ahh, right. Something really bad happened to my headphones...

Re: AO SDK release 1.2.1 available [Re: R. Belmont] #37356 01/13/08 09:00 AM
Joined: Sep 2007
Posts: 56
K
kingshriek Offline
Member
Offline
Member
K
Joined: Sep 2007
Posts: 56
I just discovered two lines that aren't necessary in the FM code. More importantly, removing these two lines fixes some problems resulting from me not sanity-checking the cycle length (I don't advise playing Guardian Force in the 0.122u5 version of MAME - it has a tendency to enter an infinite loop after pressing start on the title screen).

Patch:
Code:
diff -Nru aosdk_base/eng_ssf/scsp.c aosdk/eng_ssf/scsp.c
--- aosdk_base/eng_ssf/scsp.c	2008-01-13 00:54:50.000000000 -0800
+++ aosdk/eng_ssf/scsp.c	2008-01-13 00:54:35.000000000 -0800
@@ -1122,11 +1122,9 @@
 	if(MDL(slot)!=0 || MDXSL(slot)!=0 || MDYSL(slot)!=0)
 	{
 		INT32 smp=(SCSP->RINGBUF[(SCSP->BUFPTR+MDXSL(slot))&63]+SCSP->RINGBUF[(SCSP->BUFPTR+MDYSL(slot))&63])/2;
-		INT32 cycle=LEA(slot)-LSA(slot); // cycle corresponds to 2 pi
 
 		smp<<=0xA; // associate cycle with 1024
 		smp>>=0x1A-MDL(slot); // ex. for MDL=0xF, sample range corresponds to +/- 64 pi (32=2^5 cycles) so shift by 11 (16-5 == 0x1A-0xF)
-		while(smp<0) smp+=cycle; smp%=cycle; // keep modulation sampler within a single cycle
 		if(!PCM8B(slot)) smp<<=1;
 		
 		addr1+=smp; addr2+=smp;



Sorry about that.

Re: AO SDK release 1.2.1 available [Re: kingshriek] #37360 01/13/08 04:09 PM
Joined: Mar 2001
Posts: 16,335
R
R. Belmont Offline OP
Very Senior Member
OP Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 16,335
Thanks, submitted.

Re: AO SDK release 1.3 available [Re: R. Belmont] #37377 01/13/08 10:07 PM
Joined: Mar 2001
Posts: 16,335
R
R. Belmont Offline OP
Very Senior Member
OP Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 16,335
The SDK is updated again.

This has the latest SCSP stuff plus time and fade tag support for SSF files.

Re: AO SDK release 1.3 available [Re: R. Belmont] #37378 01/13/08 11:59 PM
Joined: Oct 2002
Posts: 1,017
M
MooglyGuy Offline
Senior Member
Offline
Senior Member
M
Joined: Oct 2002
Posts: 1,017
Wahey, still can't view the page, redirected to Google regardless of copy/pasting the link.

Re: AO SDK release 1.3 available [Re: R. Belmont] #37553 01/19/08 11:47 AM
Joined: Sep 2007
Posts: 56
K
kingshriek Offline
Member
Offline
Member
K
Joined: Sep 2007
Posts: 56
I've finally resolved most of the remaining pitch issues in the SCSP emulation. What was happening was that the remaining fractional play position was not being carried over upon crossing over LSA/LEA resulting in an overall lower pitch for looped samples.

Patch against AOSDK 1.3:

Code:
diff -Nru aosdk_base/eng_ssf/scsp.c aosdk/eng_ssf/scsp.c
--- aosdk_base/eng_ssf/scsp.c	2008-01-13 15:33:54.000000000 -0800
+++ aosdk/eng_ssf/scsp.c	2008-01-19 03:45:38.000000000 -0800
@@ -36,7 +36,7 @@
 
 
 #define EG_SHIFT	16
-#define FM_DELAY    4    // delay in number of slots processed before samples are written to the FM ring buffer
+#define FM_DELAY    0   // delay in number of slots processed before samples are written to the FM ring buffer
 
 // include the LFO handling code
 #include "scsplfo.c"
@@ -939,6 +939,7 @@
 	
 	for (addr_select=0;addr_select<2;addr_select++)
 	{
+		INT32 rem_addr;
 		switch(LPCTL(slot))
 		{
 		case 0:	//no loop
@@ -950,26 +951,35 @@
 			break;
 		case 1: //normal loop
 			if(*addr[addr_select]>=LEA(slot))
-				*slot_addr[addr_select]=LSA(slot)<<SHIFT;
+			{
+				rem_addr = *slot_addr[addr_select] - (LEA(slot)<<SHIFT);
+				*slot_addr[addr_select]=(LSA(slot)<<SHIFT) + rem_addr;
+			}
 			break;
 		case 2:	//reverse loop
 			if((*addr[addr_select]>=LSA(slot)) && !(slot->Backwards))
 			{
-				*slot_addr[addr_select]=LEA(slot)<<SHIFT;
+				rem_addr = *slot_addr[addr_select] - (LSA(slot)<<SHIFT);
+				*slot_addr[addr_select]=(LEA(slot)<<SHIFT) - rem_addr;
 				slot->Backwards=1;
 			}
-			if((*addr[addr_select]<=LSA(slot) || (*slot_addr[addr_select]&0x80000000)) && slot->Backwards)
-				*slot_addr[addr_select]=LEA(slot)<<SHIFT;
+			else if((*addr[addr_select]<LSA(slot) || (*slot_addr[addr_select]&0x80000000)) && slot->Backwards)
+			{
+				rem_addr = (LSA(slot)<<SHIFT) - *slot_addr[addr_select];
+				*slot_addr[addr_select]=(LEA(slot)<<SHIFT) - rem_addr;
+			}
 			break;
 		case 3: //ping-pong
 			if(*addr[addr_select]>=LEA(slot)) //reached end, reverse till start
 			{
-				*slot_addr[addr_select]=LEA(slot)<<SHIFT;
+				rem_addr = *slot_addr[addr_select] - (LEA(slot)<<SHIFT); 
+				*slot_addr[addr_select]=(LEA(slot)<<SHIFT) - rem_addr;
 				slot->Backwards=1;
 			}
-			if((*addr[addr_select]<=LSA(slot) || (*slot_addr[addr_select]&0x80000000)) && slot->Backwards)//reached start or negative
+			else if((*addr[addr_select]<LSA(slot) || (*slot_addr[addr_select]&0x80000000)) && slot->Backwards)//reached start or negative
 			{
-				*slot_addr[addr_select]=LSA(slot)<<SHIFT;
+				rem_addr = (LSA(slot)<<SHIFT) - *slot_addr[addr_select];
+				*slot_addr[addr_select]=(LSA(slot)<<SHIFT) + rem_addr;
 				slot->Backwards=0;
 			}
 			break;

Re: AO SDK release 1.3 available [Re: kingshriek] #37555 01/19/08 02:32 PM
Joined: Mar 2001
Posts: 16,335
R
R. Belmont Offline OP
Very Senior Member
OP Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 16,335
Ahh, that makes sense. Did you intend to turn off FM_DELAY too?

Re: AO SDK release 1.3 available [Re: R. Belmont] #37559 01/19/08 04:08 PM
Joined: Sep 2007
Posts: 56
K
kingshriek Offline
Member
Offline
Member
K
Joined: Sep 2007
Posts: 56
Oh yeah, I did since the FM sounds better with it off. Turning the delay up causes distortion in some of the FM samples, which is strange because the driver swaps intermediate MDXSL/MDYSL values of 0x1C-0x1F with 0x3C-0x3F, indicating a delay of 4 slots.

Re: AO SDK release 1.3 available [Re: kingshriek] #37560 01/19/08 04:44 PM
Joined: Mar 2001
Posts: 16,335
R
R. Belmont Offline OP
Very Senior Member
OP Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 16,335
Weird. Ok, thanks!

Page 6 of 55 1 2 4 5 6 7 8 54 55

Moderated by  R. Belmont, Richard Bannister 

Who's Online Now
4 registered members (reenigne, AJR, hal3000, 1 invisible), 140 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics8,692
Posts114,253
Members4,865
Most Online510
Aug 26th, 2019
Powered by UBB.threads™ PHP Forum Software 7.7.3