Subject: Bug in UADE digital illusions -&gt; mod conversion

From: alankila
Date: Sun Jan 7 15:26:46 2007

To: UADE-Developer-discussion
Me and shd have been writing a better UAE for the last couple of days. I've implemented the Amiga sound emulation improvements into UAE, and using eagleplayer 2.03b to play some classic songs, I stumbled upon the fact that the di.steelwheels track contains double (and maybe triple) drumkicks that do not get played the same way on uade123, which renders just one drum kick. I guess the DI-&gt;MOD converter in UADE is buggy on this respect.

---

From: mld/uade team
Date: Mon Jan 8 15:00:49 2007

To: UADE-Developer-discussion
I'll check that, and try to find the original mod somewhere, and check against ... 

OTH It seems gryzor's prowiz has some serious bugs, maybe we should switch to or additionally use either noiseconverter (m68k) or prowiz/pc(in c)

---

From: mld/uade team
Date: Mon Jan 8 17:20:30 2007

To: UADE-Developer-discussion
Ok, there and back again... seems prowiz is innocent :-)

I'll converted DI.Steelwheels now with three different converters back to mod and compared them in uade123 (Prowiz4PC, Eagleplayers Noiseconverter, and Prowiz used in UADE) and it seems all sound the same with uade123.

The retrigging drumkicks (second subsong?) are there for all three files. At least for me. Is there a time index, where it's heard best?

My setup for uade: filter a1200, resample default, no panning, no headphones, pt30 mode.

If you like I can send you the converted textfiles and test against Don Adan's Protracker replayer (a stock 1.1b, afaik)

---

From: alankila
Date: Thu Jan 11 15:30:33 2007

To: UADE-Developer-discussion
Please make the files available.

Here are my versions:

http://bel.fi/~alankila/di.steelwheels
http://bel.fi/~alankila/uade.flac
http://bel.fi/~alankila/uae.flac

The difference should be clear.

---

From: alankila
Date: Fri Jan 12 11:16:02 2007

To: UADE-Developer-discussion
Never mind. Eagleplayer sucks.

The original game playback engine seems to play it like uade does it, at least under UAE.

That being said, it's possible that these doubled/tripled hits may have been intended in the *original* version of the module but the replayers actually used never did do them. Fun, eh? I best not pretend I know what's going on, because I'm merely guessing.

Eagleplayer also has some fascinating shoot-yourself-at-the-foot features. For instance, it has the concept of amplifiers, such as the 14-bit mixer. These seem to run alright under uae, but produce classic aliasing sounds, of course, so everything sounds pretty horrible.

Because the amplifiers are apparently &quot;desynced&quot; from the playback routine, a few rare songs that are extremely timing sensitive due to playing same sample at same pitch on different channels sound all wrong. For instance, Battle Squadron title is one of those where the intial &quot;Welcome to Battle Squadron&quot; sounds rather odd.

I'm guessing that the modified eagleplayer first issues the commands to some buffer which then gets handed by the &quot;amplifier&quot; to Paula too quickly, without the time delays imposed by the playback engine... For instance, a programmer might feel tempted to optimize the Paula &quot;DMA wait&quot; by issuing new samples on all channels that were to get new samples, and then waiting just once for all the channels to update. Or maybe not. Either way, the effect is notably different.

So I guess I wouldn't recommend eagleplayer under UAE as a music playback solution.

---

From: mld/uade team
Date: Fri Jan 12 18:13:41 2007

To: UADE-Developer-discussion
you can try to replace the internal modplayer of Eagleplayer with Don/Adans external replayer. 

Last time I looked into the source it was plain old banging on HW just like ours, no amp no noteplayer :-)

---

From: shd
Date: Mon Jan 15 02:50:44 2007

To: UADE-Developer-discussion
[quote:9cbe070cac="alankila"]Because the amplifiers are apparently &quot;desynced&quot; from the playback routine, a few rare songs that are extremely timing sensitive due to playing same sample at same pitch on different channels sound all wrong.
[/quote:9cbe070cac]
They are not desynced, usually.

Most of the time (Don Adan replayers), amplifiers just issue abstract register writes in places where they would usually hit hw directly. In uade, we just hit hw registers directly when those abstract writes happen, so the end result should be the same as in the original replayer. btw. our AMP support is approximately 150 lines of asm.

However, see next comment.

[quote:9cbe070cac]I'm guessing that the modified eagleplayer first issues the commands to some buffer which then gets handed by the &quot;amplifier&quot; to Paula too quickly, without the time delays imposed by the playback engine... For instance, a programmer might feel tempted to optimize the Paula &quot;DMA wait&quot; by issuing new samples on all channels that were to get new samples, and then waiting just once for all the channels to update. Or maybe not. Either way, the effect is notably different.
[/quote:9cbe070cac]
It's possible the amplifier creator has done an optimisation like that which causes desync between channels, but I don't blame him really, because the original playroutine author made an error. Not enabling DMA synchronously (at the same time) is just begging for desync in the original replay.