Subject: Possible bug with some TFMX files?

From: Genju
Date: Fri Apr 21 14:27:38 2006

To: UADE-Developer-discussion
Hello.
I noticed several TFMX players suffer from a bug (noticable on World 3, Track 2, &quot;Unidirectional Flight&quot; from Turrican 2, for example, get the rip here: [url]http://www.exotica.org.uk/tunes/archive/Authors/Game/Huelsbeck_Chris/Turrican_2.lha[/url]  ).
The affected track is shown as subsong 3 of mdat.world3 in Deliplayer.
Now why I post here is because I'd like to know if UADE suffers from the same bug and if it's possible to correct it. I would test it myself, but I don't have any pc/os combination capable of actually running it :)

Also, here's a short sample of how the song is supposed to sound, captured straight from winuae running the SPS dump of the original game: [url]http://zakalwe.fi/tmp/genjuroxl/winuae_sample.flac[/url]
The problem manifests itself as weird echo sounds. If you heard how it's supposed to sound, you can hardly miss a wrong rendition of the song, just seek to ~20 seconds into the track.
Thanks in advance for your help, guys :)

Edit:
This is probably not the only TFMX song affected, but it's the best example i could find for now.

---

From: shd
Date: Fri Apr 21 14:39:58 2006

[quote:dcba19f71b="Genju"]Hello.

Edit:
This is probably not the only TFMX song affected, but it's the best example i could find for now.[/quote:dcba19f71b]

I recorded them with uade:

[code:1:dcba19f71b]
$ uade123 --filter=none MDAT.TurricanII_3-Flight -s2 -j19 -t38 -f /tmp/t2_w3_no_filter.wav
$ uade123 --filter=a500 MDAT.TurricanII_3-Flight -s2 -j19 -t38 -f /tmp/t2_w3_a500_filter.wav
$ uade123 --filter=a1200 MDAT.TurricanII_3-Flight -s2 -j19 -t38 -f /tmp/t2_w3_a1200_filter.wav
[/code:1:dcba19f71b]

Results are here:
http://zakalwe.fi/tmp/genjuroxl/uade_t2_w3_no_filter.flac
http://zakalwe.fi/tmp/genjuroxl/uade_t2_w3_a500_filter.flac
http://zakalwe.fi/tmp/genjuroxl/uade_t2_w3_a1200_filter.flac

---

From: Genju
Date: Fri Apr 21 14:42:41 2006

To: UADE-Developer-discussion
Thanks for providing the samples, shd.
Looks like UADE suffers from the bug indeed. Interesting :)

---

From: shd
Date: Sat Apr 22 10:03:47 2006

To: UADE-Developer-discussion
[quote:299cf9ef78="Genju"]Thanks for providing the samples, shd.
Looks like UADE suffers from the bug indeed. Interesting :)[/quote:299cf9ef78]

I couldn't hear anything wrong in a fast hearing test. Furthermore, I do not hold WinUAE to be absolute authority in this matter (maybe WinUAE wasn't set to faithful A500 emulation??). But I do admit, it's likely that our TFMX player is somewhat different than the replayer in the game.

---

From: shd
Date: Sat Apr 22 10:08:23 2006

To: UADE-Developer-discussion
[quote:a7b8da8e28="shd"][quote:a7b8da8e28="Genju"]Thanks for providing the samples, shd.
Looks like UADE suffers from the bug indeed. Interesting :)[/quote:a7b8da8e28]

I couldn't hear anything wrong in a fast hearing test. Furthermore, I do not hold WinUAE to be absolute authority in this matter (maybe WinUAE wasn't set to faithful A500 emulation??). But I do admit, it's likely that our TFMX player is somewhat different than the replayer in the game.[/quote:a7b8da8e28]

Speaking of WinUAE, its sound output is always bad if A500 is emulated. A500 always does some filtering, regardless of LED state. WinUAE is only good if target is A1200 with LED off, because then almost no filtering happens in a real amiga.

However, uades filtering doesn't compensate for replayer bugs ;)

---

From: Genju
Date: Sat Apr 22 10:27:16 2006

To: UADE-Developer-discussion
Filtering etc. don't affect the actual bug in the replayer code, I'd say :)

---

From: shd
Date: Sat Apr 22 12:27:46 2006

To: UADE-Developer-discussion
I tested TFMX-Pro eagleplayer on real A1200. It plays exactly like uade does. This makes it a bug in the eagleplayer.

---

From: Genju
Date: Sat Apr 22 12:30:48 2006

Thanks for testing.

---

From: Guest
Date: Mon Apr 24 19:40:42 2006

To: UADE-Developer-discussion
Something I found on HAM and in Don Adan's Readme to the TFMX replayer. It seems Turrican 2 was hacked in a way to use DMA Timing, while other TFMX relied on VBI.

[quote:7e9b88d718]
&quot;Don Adan's Readme&quot;

2. This version of the TFMX Pro player is configurable via the EP player
   manager. You can change the wait mode. The default wait mode (VBI) works
   correctly with most TFMX Pro songs. The second wait mode (DMA) is
   recommended for listening to &quot;Turrican 2&quot; loading song. The configuration
   will be saved to the &quot;EnvArc:EaglePlayer/&quot; and/or &quot;Configs/&quot; directories.
   If none of these directories exist then the configuration can not be saved.
[/quote:7e9b88d718]

[quote:7e9b88d718]
-&gt;http://advantage.dk/tfxdk//ham/Rips.php#T

Turrican 2
THE ONLY 102% RIP EVER!!!

Composer		Chris Hülsbeck
Copyright		1991 Factor 5 and Rainbow Arts
Original format		TFMX (hacked)
Rip method		Disk/Memory Rip
Ripper			Kyzer, Sunbeam/DC, and Jan Krolzig

Yep, it is here! Turrican 2 100% complete rip! All tunes except the loader tune are disk ripped by Sunbeam.

What there made the loader tune different from the others, was that the coder had hacked the format. Hard to tell the reason, as it was the only one there was stored that way....

The loader tune have now been re-ripped by Jan Krolzig so the drums are played correct.

Jan Krolzig:
I entered HRTmon right after the Turrican 2 intro music was fading. Then I was looking for the TFMX-routine. After I found it, I set a freezepoint at TFMX init to get startaddress from song- and sample-data. I saved song- and sampledata. Then I rebuilt the TFMX mdat-header and used ExoticRipper to calculate length of sample data. That was the ripping part :-)

After I've recognized the bad sounding drums with DT/EP, I had a look at it inside TFMX-Editor. Both macros, that sound bad sometimes (macro $00 and $01) had the macro-command $0E SetVolume $000040 at the beginning, which was responsible for the bad sound. I removed this macro-command from the beginning and inserted it after the $01 DMAon macro-command and now it sounds good.

~Major greetings to Kyzer, Sunbeam, and Jan for doing this ~major cool rip!!=)[/quote:7e9b88d718]

---

From: shd
Date: Thu May 3 19:47:38 2007

To: UADE-Developer-discussion
I'm just pasting here the quote that you gave me:
[code:1:a4d315ae48]The problem is that pattern volume commands seem to take effect with one tick delay
[/code:1:a4d315ae48]
Maybe this will be useful to someone, at least it will be if I ever get to use this information.