Previous Thread
Next Thread
Print Thread
Page 23 of 55 1 2 21 22 23 24 25 54 55
Re: AO SDK release 1.3.2 available [Re: R. Belmont] #38558 02/19/08 03:48 AM
Joined: Mar 2001
Posts: 16,471
R
R. Belmont Online Content OP
Very Senior Member
OP Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,471
A7: http://rbelmont.mameworld.info/aosdk_140a7.zip

ADPCM samples no longer click and go silent when they hit the loop start. I'm slightly disappointed nobody realized this just from the code, but this does greatly help the sound so I'm just happy it's fixed.

Dear Mysterious Plugin Guy: please make new plugins based on this version as soon as possible. Thanks!

Last edited by R. Belmont; 02/19/08 03:55 AM.
Re: AO SDK release 1.3.2 available [Re: R. Belmont] #38563 02/19/08 10:27 AM
Joined: Feb 2008
Posts: 107
D
Deunan Knute Offline
Senior Member
Offline
Senior Member
D
Joined: Feb 2008
Posts: 107
I see you reset (or rather, recall precomputed LSA value) for both ADPCM types now? Well, your call. I'm pretty sure you're going to be reverting those changes once you get more acquainted with type 3 in MESS *evil grin*.

I'm going to test few more type 2 with non-zero LSA later, so far simple reset always worked for me. Now that I have several DSF players I have some reference source.

Re: AO SDK release 1.3.2 available [Re: R. Belmont] #38564 02/19/08 10:37 AM
Joined: Feb 2008
Posts: 14
M
marioman Offline
Member
Offline
Member
M
Joined: Feb 2008
Posts: 14
Quote:
That log has all but put me off of further development of this code. I assume from the overall hostility to all things not Corlett that it's that "marioman" from HCS's forum?

Hi R. Belmont,

I thought that I would just stop by and and say that the person in the above discussion log is not me. I am not sure where you get the idea that I am hostile to any non-Corlett plugins, but that is not the case. I am actually one of the biggest supporters of your plugins. Take a look around this thread and you can see that I regularly keep an eye out for updates to aossf and aodsf.

Anyways, I am looking forward to getting my hands on the new version of aodsf. Keep up the good work.

Last edited by marioman; 02/19/08 10:38 AM.
Re: AO SDK release 1.3.2 available [Re: marioman] #38565 02/19/08 01:45 PM
Joined: Mar 2001
Posts: 16,471
R
R. Belmont Online Content OP
Very Senior Member
OP Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,471
DK: we'll see smile I got the Dreamcast BIOS farther in MESS. It issues a GDROM command, sits a while, fiddles with the interrupt enables, and then does nothing (well, actually it's running a lot of code, it just doesn't seem to go anywhere). soa-350-03 is *the* test for type 2 looping with nonzero LSA (it's actually still not exactly right in my code, but at least it's much closer).

marioman: my apologies if that wasn't you. You were the only person I knew of saying anything about the plugin and it seemed like a similar writing style.

Re: AO SDK release 1.3.2 available [Re: R. Belmont] #38566 02/19/08 02:12 PM
Joined: Feb 2008
Posts: 107
D
Deunan Knute Offline
Senior Member
Offline
Senior Member
D
Joined: Feb 2008
Posts: 107
I assume you didn't get BIOS to play the opening swirl sound, because you'd notice it's not OK on that ADPCM processing smile
Anyway, my bet is you're not issuing interrupts. You should get away without GD, but Maple has to be there. Not to mention VSYNC and related IRQ events: HBLANK_IN (doesn't have to be accurate except few cases), VBLANK_IN and VBLANK_OUT. There's a register that keeps track of current scanline - VPOS. That one has to be properly maintained, especially around zero wrap.

Re: AO SDK release 1.3.2 available [Re: Deunan Knute] #38567 02/19/08 02:28 PM
Joined: Mar 2001
Posts: 16,471
R
R. Belmont Online Content OP
Very Senior Member
OP Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,471
Ahh, yeah, that makes sense. I forgot, this is Sega, you need HBlank in/out to go anywhere smile

Re: AO SDK release 1.3.2 available [Re: R. Belmont] #38594 02/20/08 04:27 AM
Joined: Mar 2001
Posts: 16,471
R
R. Belmont Online Content OP
Very Senior Member
OP Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,471
Tonight's improvement: http://rbelmont.mameworld.info/aosdk_140a8.zip

This fixes the random volume spikes that sometimes happened when looping type 2 ADPCM samples, and it also avoids resetting the sampler state for Type 3 (which is intended for streaming anyway).

Re: AO SDK release 1.3.2 available [Re: R. Belmont] #38598 02/20/08 10:30 AM
Joined: Feb 2008
Posts: 107
D
Deunan Knute Offline
Senior Member
Offline
Senior Member
D
Joined: Feb 2008
Posts: 107
My code plays that SoA tune in a bit different way. On loop re-entry the sound gets very quiet, but near the end it's again at full strength. This however produces pulsating modulation and is not correct either.
It's time to see why my previous attempt at saving and restoring ADPCM state has failed...

Re: AO SDK release 1.3.2 available [Re: Deunan Knute] #38600 02/20/08 01:20 PM
Joined: Mar 2001
Posts: 16,471
R
R. Belmont Online Content OP
Very Senior Member
OP Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,471
Yeah, that's not right - it's supposed to just loop at full strength. This is why that particular song is so valuable for loop tuning :-)

Re: AO SDK release 1.3.2 available [Re: R. Belmont] #38701 02/24/08 04:48 AM
Joined: Sep 2007
Posts: 56
K
kingshriek Offline
Member
Offline
Member
K
Joined: Sep 2007
Posts: 56
Here are some more DSFs, covering Segagaga, Rune Jade, Super Robot Taisen Alpha --> http://www.sendspace.com/file/v1emz7 (thanks to Knurek for supplying much of this sound data)

Segagaga is quite interesting as it appears to be highly sensitive to AICA slot monitor reads. It breaks apart quite badly w/ the current AOSDK. I've attempted to address as much of this as I could in the following patch:

Code:
diff -Nru aosdk_base/eng_dsf/aica.c aosdk/eng_dsf/aica.c
--- aosdk_base/eng_dsf/aica.c	2008-02-19 23:19:46.000000000 -0800
+++ aosdk/eng_dsf/aica.c	2008-02-20 20:38:16.000000000 -0800
@@ -130,6 +130,7 @@
 	int curstep, nxtstep;
 	int cur_lpquant, cur_lpsample, cur_lpstep;
 	UINT8 *adbase, *nxtbase, *adlpbase;
+	UINT8 mslc;			// monitored?
 };
 
 
@@ -144,6 +145,9 @@
 #define MIFULL(aica)		((aica->udata.data[4]>>0x0)&0x0200)
 #define MIEMPTY(aica)		((aica->udata.data[4]>>0x0)&0x0100)
 
+#define AFSEL(aica)		((aica->udata.data[6]>>0x0)&0x4000)
+#define MSLC(aica)		((aica->udata.data[6]>>0x8)&0x3F)
+
 #define SCILV0(aica)    	((aica->udata.data[0xa8/2]>>0x0)&0xff)
 #define SCILV1(aica)    	((aica->udata.data[0xac/2]>>0x0)&0xff)
 #define SCILV2(aica)    	((aica->udata.data[0xb0/2]>>0x0)&0xff)
@@ -593,6 +597,7 @@
 		AICA->Slots[i].active=0;
 		AICA->Slots[i].base=NULL;
 		AICA->Slots[i].EG.state=RELEASE;
+		AICA->Slots[i].mslc=0;
 	}
 
 	AICALFO_Init();
@@ -625,6 +630,7 @@
 					{
 						if(KEYONB(s2) && s2->EG.state==RELEASE/*&& !s2->active*/)
 						{
+							if(s2->mslc) AICA->udata.data[0x10] &= 0x7FFF; // reset LP at KEY_ON
 							AICA_StartSlot(AICA, s2);
 							#if 0
 							printf("StartSlot[%02X]:   SSCTL %01X SA %06X LSA %04X LEA %04X PCMS %01X LPCTL %01X\n",sl,SSCTL(s2),SA(s2),LSA(s2),LEA(s2),PCMS(s2),LPCTL(s2));
@@ -687,13 +693,13 @@
 		case 0x9:
 			AICA_MidiIn(0, AICA->udata.data[0x8/2]&0xff, 0);
 			break;
-/*		case 0x12:
+		case 0x12:
 		case 0x13:
 		case 0x14:
 		case 0x15:
 		case 0x16:
 		case 0x17:
-			break;*/
+			break;
 		case 0x90:
 		case 0x91:
 			if(AICA->Master)
@@ -786,12 +792,10 @@
 		case 0x10:	// LP check
 		case 0x11:
 			{
-				int MSLC = (AICA->udata.data[0xc/2]>>8) & 0x3f;	// which slot are we monitoring?
-
-//				AICA->udata.data[0x10/2] |= 0x8000;	// set LP if necessary
+				//int MSLC = (AICA->udata.data[0xc/2]>>8) & 0x3f;	// which slot are we monitoring?
 			}
 			break;
-
+			
 		case 0x14:	// CA (slot address)
 		case 0x15:
 			{
@@ -885,6 +889,7 @@
 		{
 			AICA_UpdateRegR(AICA, addr&0xff);
 			v= *((unsigned short *) (AICA->udata.datab+((addr&0xff))));
+			if((addr&0xfe)==0x10) AICA->udata.data[0x10/2] &= 0x7FFF;	// reset LP on read
 		}
 		else if (addr == 0x2d00)
 		{
@@ -1075,12 +1080,14 @@
 			if(*addr[addr_select]>=LSA(slot) && *addr[addr_select]>=LEA(slot))
 			{
 			//slot->active=0;
+			if(slot->mslc) AICA->udata.data[8] |= 0x8000;
 			AICA_StopSlot(slot,0);
 			}
 			break;
 		case 1: //normal loop
 			if(*addr[addr_select]>=LEA(slot))
 			{
+				if(slot->mslc) AICA->udata.data[8] |= 0x8000;
 				rem_addr = *slot_addr[addr_select] - (LEA(slot)<<SHIFT);
 				*slot_addr[addr_select]=(LSA(slot)<<SHIFT) + rem_addr;
 
@@ -1122,6 +1129,16 @@
 		sample=(sample*EG_Update(slot))>>SHIFT;
 	else
 		sample=(sample*EG_TABLE[EG_Update(slot)>>(SHIFT-10)])>>SHIFT;
+		
+	if(slot->mslc) 
+	{
+		AICA->udata.data[0x12/2] = addr1;
+		if (!(AFSEL(AICA)))
+		{
+			AICA->udata.data[0x10/2] |= slot->EG.state<<13;
+			AICA->udata.data[0x10/2] |= 0x3FF - (slot->EG.volume>>EG_SHIFT);
+		}
+	}
 
 	return sample;
 }
@@ -1143,10 +1160,11 @@
 		// mix slots' direct output
 		for(sl=0;sl<64;++sl)
 		{
+			struct _SLOT *slot=AICA->Slots+sl;
+			slot->mslc = (MSLC(AICA)==sl);
 			RBUFDST=AICA->RINGBUF+AICA->BUFPTR;
 			if(AICA->Slots[sl].active)
 			{
-				struct _SLOT *slot=AICA->Slots+sl;
 				unsigned int Enc;
 				signed int sample;
 


Still not perfect, but perhaps the absence of the filter envelope may be somewhat responsible since filter envelopes can be monitored too.

Page 23 of 55 1 2 21 22 23 24 25 54 55

Moderated by  R. Belmont, Richard Bannister 

Who's Online Now
2 registered members (Cpt. Pugwash, Breiztiger), 147 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,763
Posts115,160
Members4,889
Most Online890
Jan 17th, 2020
Powered by UBB.threads™ PHP Forum Software 7.7.3