Author Topic: How do I make Anex86 emulate YM-2608 (OPNA) music + rhythms?  (Read 22366 times)

unicode787plus

  • PC-98 Music Arranger
  • I fell in love with KAJA's PMD98 music format.
    • My YouTube Channel (includes Touhou music)
I downloaded Hoot (video/computer-game sound-hardware emulator) and listened to Touhou's OPNA (YM-2608) arrangements of TH01 music, complete with beats and rhythms. However, when I play the same music from TH05's Music Room on the Anex86 emulator, the music doesn't sound exactly like OPNA but more like OPN (the beats and rhythms are not present, even though I have the 2608_*.wav files installed on the same folder as Anex86). Has anybody ever succeeded in making Anex86 completely emulate OPNA music & rhythms in the same way Hoot does?
View my Touhou music slideshows in high definition (720p):
http://www.youtube.com/view_play_list?p=D55907D0551F4CDA

Momiji

  • Cya
Re: How do I make Anex86 emulate YM-2608 (OPNA) music + rhythms?
« Reply #1 on: June 24, 2009, 07:54:43 PM »
Anex86 doesn't actually include any sort've emulation for the higher-end "Speak Board" (using the OPNA) that Hoot can emulate, as far as I know, just the basic FM+SSG sound (OPN).

Try using T98-Next instead.
« Last Edit: June 24, 2009, 08:00:55 PM by Momiji »

unicode787plus

  • PC-98 Music Arranger
  • I fell in love with KAJA's PMD98 music format.
    • My YouTube Channel (includes Touhou music)
Re: How do I make Anex86 emulate YM-2608 (OPNA) music + rhythms?
« Reply #2 on: June 24, 2009, 08:24:11 PM »
One more thing: when playing the original TH01 on Anex86, its music (residing in obscure-format .MDT files) sounds very different from what I hear from Hoot, even though Hoot only uses FM-26k (rather than the Speak Board) to emulate the original tracks.
View my Touhou music slideshows in high definition (720p):
http://www.youtube.com/view_play_list?p=D55907D0551F4CDA

Momiji

  • Cya
Re: How do I make Anex86 emulate YM-2608 (OPNA) music + rhythms?
« Reply #3 on: June 24, 2009, 08:45:30 PM »
Oh yeah, okay, I think I understand the issue now.

Th01 doesn't actually support more than the 26k, but the other games do (Speak Board, etc.).  On top of that, Mystic Square includes remixes for all of the older games (in 26k and SB format).  This is why your Th01 music sounds different, you might have an MDT of the Mystic Square remixes.

One other thing:  ZUN was able to get rudimentary PCM percussion sounds out of the third SSG channel on the later PC98 games, including all of the remixes in Th05.  So even if you're listening to the Th05 remixes of the Th01 music on a 26k board, you'll still get some percussion sounds.

I uploaded my own PC98 Touhou music here, the archive includes every available version of the music from the PC98 games.  I'm pretty sure it's legal to put these up here, since Amusement Makers has the full games up for download anyway.  If it's not, let me know. =<
« Last Edit: June 24, 2009, 09:32:44 PM by Momiji »

unicode787plus

  • PC-98 Music Arranger
  • I fell in love with KAJA's PMD98 music format.
    • My YouTube Channel (includes Touhou music)
Re: How do I make Anex86 emulate YM-2608 (OPNA) music + rhythms?
« Reply #4 on: June 24, 2009, 09:46:31 PM »
No, the Mystic Square OPN/OPNA remixes are not in .MDT file format, but in .M file format (TH01_01.M, TH01_02.M, etc. are OPNA/Sound Board, TH01_01o.M, TH01_02o.M, etc. are OPN). The *.MDT files (ALICE.MDT, INIT.MDT, IRIS.MDT, etc.) in the Hoot package TH01.ZIP are the original non-OPN/non-OPNA music files also found on the TH01 Anex86 HDI image, as I checked their file sizes and they match, yet they sound different when played by both Anex86 and Hoot. Does Hoot actually use a different 26k board for *.MDT than the one used by Anex86?

This lengthy (10:30-long) YouTube HD video I uploaded (http://www.youtube.com/watch?v=E4gd4Bm_6ic&fmt=22) compares the following:
  • original TH01 title theme as output by Anex86 (when Anex86's Config->Wave->Rate/Buffer is set at 44 KHz)
  • same theme as output by Anex86 (Config->Wave->Rate/Buffer set at 55 KHz)
  • same theme as output by Hoot (from the non-OPN/non-OPNA list)
  • TH05 remix of TH01 title theme as output by both Anex86 (when BGM in TH05's Options menu is set to FM-26k) and Hoot (from the OPN list)
  • same remix as output by Anex86 (BGM in TH05's Options menu set to FM-86)
  • same remix as output by Hoot (from the OPNA list)

On this video you will hear that the Hoot non-OPN/non-OPNA audio (a.k.a. the non-TH05-remix music) sounds different from the Anex86 audio. The only instance where both Anex86 and Hoot matched closely was when playing the OPN TH05 remixes.
View my Touhou music slideshows in high definition (720p):
http://www.youtube.com/view_play_list?p=D55907D0551F4CDA

Momiji

  • Cya
Re: How do I make Anex86 emulate YM-2608 (OPNA) music + rhythms?
« Reply #5 on: June 24, 2009, 10:09:46 PM »
Not too sure why it's doing this, but I may have a theory based off something I read on a Sega Megadrive/Genesis emulation forum (the MD/Genesis uses a YM2612, a.k.a. OPN2, same family of FM synth chip).

The OPN chips are based on Yamaha's higher-end FM chips, but instead of a real accumulator-based mixer they time-divide the output of the channels (one slot every 24 clock cycles of the FM chip, apparently).  So Anex86 may be implementing a time-division multiplexer (hardware-accurate emulation), while Hoot does actual mixing (high-quality sound).

You might be able to see this happening if you compare the waveforms from Anex86 and Hoot recordings.

From what I also read, 55khz is the proper sampling rate for the OPN-series chips.

By the way, the forum thread is here, very interesting reading if you like hardcore sound synthesis and electronics.  Plus it's very relevant to the PC98 too, as both system's synth chips are related, and quite a bit of their material comes from the OPNA documentation.
« Last Edit: June 24, 2009, 10:52:56 PM by Momiji »

Momiji

  • Cya
Re: How do I make Anex86 emulate YM-2608 (OPNA) music + rhythms?
« Reply #6 on: June 24, 2009, 11:58:57 PM »
Scratch that, I was wrong.  Both the YM2203 (OPN) and YM2608 (OPNA) have internal accumulators. =[

So I really don't know why Anex86 and Hoot sound different.  It could just be differences in the sound emulation cores.

unicode787plus

  • PC-98 Music Arranger
  • I fell in love with KAJA's PMD98 music format.
    • My YouTube Channel (includes Touhou music)
Re: How do I make Anex86 emulate YM-2608 (OPNA) music + rhythms?
« Reply #7 on: July 03, 2009, 04:13:55 AM »
I tried the T98-Next emulator, and it sounds quite a lot like the Anex86 except it adds rhythms and beats to the music (as if the music were native OPNA).

Also found a YouTube video of someone playing the original TH01 title theme as captured from T98-Next, and indeed it sounds VERY DIFFERENT from Hoot (but very similar to Anex86 except for the added Speakboard beats):
http://www.youtube.com/watch?v=i5QfOOtp31I&feature=PlayList&p=CD0FF1519A6E496A&index=0

I also played original TH02 & TH03 on T98-Next and they sound very OPNA-esque (while Hoot only emulates their original non-TH05-remix music as FM-26k without any rhythm at all).

Looks like I am losing faith on Hoot and trying to embrace T98-Next instead (although I should admit it doesn't run quite as smooth in my WinVista x64 machine as Anex86 does - music often stutters, speeds up, slows down, etc. even if I commit T98-Next to one single CPU core and give it 8 MB of running RAM).

::::EDIT::::

I found some way for Hoot to emulate original (non-TH05-remix) TH01-03 music as if it were using the Speak Board. I just had to edit the file doujin.XML by changing "opn" to "opna" on the <driver> tags and "pmd" to "pmdb2" on the <rom> tags. Attached is my modified doujin.XML with the original opn lines enclosed in <!-- -->. Now I love Hoot, after tricking it into using Speak Board. Now it sounds a lot like T98-Next.

But still, for gameplay purposes, I would stick to Anex86, it is more stable in my 64-bit computer... Even if I don't get Speakboard music.
View my Touhou music slideshows in high definition (720p):
http://www.youtube.com/view_play_list?p=D55907D0551F4CDA

Emulating TH01's music + rhythms in Hoot.
« Reply #8 on: August 02, 2009, 10:42:21 AM »
I found some way for Hoot to emulate original (non-TH05-remix) TH01-03 music as if it were using the Speak Board. I just had to edit the file doujin.XML by changing "opn" to "opna" on the <driver> tags and "pmd" to "pmdb2" on the <rom> tags. Attached is my modified doujin.XML with the original opn lines enclosed in <!-- -->. Now I love Hoot, after tricking it into using Speak Board. Now it sounds a lot like T98-Next.

I followed your suggestion and modified my Hoot's TH01 original music config in the same way, changing the driver type from "opn" to "opna" (no rom changes, since I was only modifying TH01), and the result sounds very similar to that YouTube video you mentioned.  The tempo is still a bit slower; perhaps the version in the YouTube video is a bit too fast.

The TH01 Japanese documentation on the Touhou wiki makes it clear (once you find and translate the hardware requirements) that the sound was indeed designed for FM-86 ("Speak Board") OPNA hardware.  Pity that all the TH01 replay videos on YouTube have been recorded with incomplete music support.

LHCling

  • Metang@
  • ( 。゚ 3っ   )っ
Re: Emulating TH01's music + rhythms in Hoot.
« Reply #9 on: August 02, 2009, 01:35:01 PM »
Ah, I thought something was wrong lacking with my BGM.

...cheers for chowell for giving me incentive to 1cc PC-98 Lunatics again.
« Last Edit: August 02, 2009, 01:38:42 PM by BaitySM »
[16:25] <Kuruminut> Shut up MS Word, "fangirlism" is totally a word
<>
[07:59] <Sapz> ベーティさんは馬鹿っぽいだろう、この「っぽい」好き者

Alice Fact

  • Kingdom Hearts
  • let's play shintopuncher
Re: How do I make Anex86 emulate YM-2608 (OPNA) music + rhythms?
« Reply #10 on: August 03, 2009, 02:15:03 PM »
OPN seems to sound better, listen to the Grimoire of Alice, it sounds like a rave and if there is a way to duplicate that I really really want the answer because T98 doesn't lag all over the place
Regarding score threads: For the time being, I'm not going to be online much; I would suggest that you simply do as you normally do, because I will come back and I will want those threads when I do.