VGMPlay for MSX

Page 30/42
23 | 24 | 25 | 26 | 27 | 28 | 29 | | 31 | 32 | 33 | 34 | 35

By ToriHino

Champion (276)

ToriHino's picture

24-04-2018, 23:55

Isnt't it enough to use just one OPL4? It basically can handle the output of two OPL2 chips on it's own.

By Pencioner

Paladin (842)

Pencioner's picture

25-04-2018, 01:13

I'm not familiar with the OPLx yet, i only started looking into technical details of those chips this year. Maybe that is also possible, but then it might need translation of some vgm commands i guess. I didn't try to route all commands from both chips to one chip without any "preprocessing", but i bet it will not play correctly.

...And of course having DalSoRi as a second OPL only makes use of FM part because wave register ports are the same and can't be changed. So maybe it is not worth adding to actual vgmplayer. Anyway, that soundtrack sounds better with it's second part, so i had enjoyed it, and also it was fun to dig a little and see how vgmplayer is implemented inside so i got my dopamine delivered Hannibal

By Parn

Champion (341)

Parn's picture

25-04-2018, 20:14

@Pencioner, the OPL3 (and the FM part of OPL4) is pretty much like two OPL2 stuck together, plus a few extra features (like extra waveforms and the 4-operator mode) that can be ignored. There's also a few redundant features that aren't present in the "second" OPL2, like the timers and the rhythm mode. If you try to send rhythm data to the "second" OPL2, nothing happens.

Since Dual OPL2 soundtracks were originally made to take advantage of the stereo setup of the original Sound Blaster Pro, which sends each OPL2's full mono output to each left and right stereo outputs, you should configure array 0's registers $C0 to $C7 to output sound to the left channel, while array 1's registers $C0 to $C7 are configured to output sound to the right channel. And you should OR the output to register $BD of each OPL2 and write it to register $BD of the OPL3's array 0 in order to play every drumpiece.

I believe this would be very simple to do.

By Parn

Champion (341)

Parn's picture

25-04-2018, 20:30

@Grauw, a small question: I have a Zemmix Neo BR, which can be configured to have an SCC+ in any slot. I use this to play VGMs without any problems. However, I also have a slot expander and a single SCC game cartridge, which is Pennant Race 1 and its ROM is not disabled. I tried to insert the game in the slot expander, and when its slot is enabled the game runs as expected when I turn on the computer. I also tried to disabled its slot before turning on the computer and enabling it again after booting, and then tried to play some SCC music with VGMPlay, but it wouldn't detect the SCC. I tried TinyYarou's Tiny Slot Check, and it detected the SCC normally. Could there be some problem with the VGMPlay's SCC detection routine?

By Grauw

Enlighted (7840)

Grauw's picture

25-04-2018, 22:05

Hey Parn, hmm, there could be an issue, I do have some improvements for SCC detection on my release checklist because it has some flaws. Pencioner also reported an SCC detection issue earlier, and Eugeny as well. Though did you try enabling it after booting?

About 2xOPL2 on OPL4, indeed the rhythm is something to deal with, if it wasn’t for that it would be really straightforward. Thanks for the tips on the stereo spread.

Pencioner, thanks for your patch, I will look at it at some later time, atm I’m working on something else so I’m kind of trying to focus my attention on that for a while, so in advance I’ll say please pardon my tardiness following up on this Smile. It’s well appreciated though, definitely.

By Pencioner

Paladin (842)

Pencioner's picture

25-04-2018, 22:59

@Parn yes, i have noticed for this particular sountrack - it sounded best if i route all output from one Moonsound to the left channel and from other to the right channel on mixer, then it sounded much better.

@Parn @Grauw - i should investigate that sountrack VGMs on the matter of drums. If they have same drum command on both OPL2s then it for sure can be done on one Moonsound (OPL3 part) since there's enough operators to handle that. And the suggestion on that stereo layout is very good. Only drums could be an issue, theoretically.

@Grauw No hurry whatsoever, so your secret and very nessesary stuff first Wink I'm going to improve it a little bit, adding also support for playing OPL4 tunes of there's only one MS configured on port C0 in system, to make support of second MS more complete btw. I also will try to add support and command line option for making the priorities over (similar) chips. So you can pick them up in desired order (f.e. use MFR PSG chip first, then internal PSG only as second one if needed, etc). This will be more complicated than support for second MS, btw, but i think it is worth trying.

By Grauw

Enlighted (7840)

Grauw's picture

26-04-2018, 00:52

Btw Pencioner had a brief look at your patch, looks good!

I sacrificed 15 minutes of sleep time or so and just pushed it with only a few minor nitpicktweaks Smile.

By Pencioner

Paladin (842)

Pencioner's picture

26-04-2018, 15:26

Grauw wrote:

Btw Pencioner had a brief look at your patch, looks good!

I sacrificed 15 minutes of sleep time or so and just pushed it with only a few minor nitpicktweaks Smile.

Thanks! I will get back with other patch with improvements - i'm willing to initialize sound output panning of one OPL4 to the left and other to the right in dual OPL2 chip configuration - because it really sounds better.

By Parn

Champion (341)

Parn's picture

26-04-2018, 18:51

@Grauw: About SCC on an expanded slot: Yes, I did enable it back. I should test it with more machines. I tried a similar configuration with OpenMSX and it seemed to work fine. I'll go back to it as soon as I can. About 2xOPL2 on OPL4: I have no idea whether stereo settings affect rhythm channels on OPL3. If not, then there's no way to reproduce the exact same 2xOPL2 stereo effects on OPL3. If so, then reproducing the same effect would take some non-trivial processing, and it could also be impossible if different drum pieces share the same stereo settings. I suspect it's probably not worth the effort.

@Pencioner: IIRC, in a SB Pro you use ports 0x220 and 0x221 to communicate with the left OPL2 and ports 0x222 and 0x223 to communicate with the right OPL2. When you write anything to ports 0x388 and 0x389 (the original AdLib ports) it is simultaneously sent to both OPL2s, for compatibility reasons. I'm looking forward Dual OPL2 support in VGMPlay, thank you very much for taking the time to implement it! Wink

By ToriHino

Champion (276)

ToriHino's picture

27-04-2018, 09:40

Here are some examples of dual OPL2 on a single OPL4:
Dual OPL2

Page 30/42
23 | 24 | 25 | 26 | 27 | 28 | 29 | | 31 | 32 | 33 | 34 | 35
My MSX profile