Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - YM2413 OPLL - Register writes causing buggy output

Reply to topic
Author Message
  • Joined: 02 Dec 2021
  • Posts: 5
Reply with quote
YM2413 OPLL - Register writes causing buggy output
Post Posted: Sat Jan 15, 2022 7:08 pm
I'm turning to this community as well, as I have discovered a rare case where the chip is playing a cymbal (and possibly hihat too), when only other drums should be played.

Like, this register write [reg val]: 0x0E 0x30

... should produce bass drum only, but if you send this "command" after you have played a 9-channel tune and reset chip or set KEYs OFF -- you get an unwanted cymbal played as well (once).

Note: the playing of an 9 channel tune prior to this, is a required step. (My 9-channel "test-vgms" used for this, has been recorded from MoonBlaster. I'm not sure if this is important or not)

Video, vgm-file and additional details over at msx.org (I'm not allowed to include links as I am "recent member", but the topic on msx.org is called "ym2413-producing-buggy-output-is-that-even-possible" and is under "graphics-and-music")

Let me know if anyone knows anything about this surprising behaviour.
  View user's profile Send private message
  • Joined: 02 Dec 2021
  • Posts: 5
Reply with quote
Post Posted: Sat Jan 15, 2022 7:11 pm
Link:

msx.org/forum/msx-talk/graphics-and-music/ym2413-producing-buggy-output-is-that-even-possible
  View user's profile Send private message
  • Joined: 01 Feb 2014
  • Posts: 697
Reply with quote
Post Posted: Mon Jan 31, 2022 2:11 pm
Thank you for that link. While it doesn't address the problem at hand, at least your discussion prompted me to change the way the rhythm instruments are triggered in the SMS port of MBMPlay from the wrong method found in the original source to the (presumably) correct one.
  View user's profile Send private message
  • Joined: 02 Dec 2021
  • Posts: 5
Reply with quote
Post Posted: Mon Jan 31, 2022 2:44 pm
Yes, I got help in the other forum from people who really knows a lot of the inner workings of this chip. The problem is identified, and to some extent traced down. Short version: Even if you reset the chip/registers, there are internal states that are *not* reset, and remnants from a previous state can be heard when you start "playing another tune". A proper remedy is not yet found.

People that work with this chip should be aware.
  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 3118
Reply with quote
Post Posted: Tue Feb 01, 2022 11:22 am
AFAIK there's no 'chip reset' so the only way to avoid that issue seems to be to program the chip in 9 channels mode, zero all the volumes, then play a note on each channel with a (custom?) instrument that has very fast decay so as to quickly reach the end of all the envelopes and then the chip *should* be ready for a new tune.

Actually I think a trick might be to play a custom 'reset the chip' MBM tune when needed (or IF it's needed, since it seems to appear only in some specific situations) - this might hide the problem
  View user's profile Send private message Visit poster's website
  • Joined: 02 Dec 2021
  • Posts: 5
Reply with quote
Post Posted: Tue Feb 01, 2022 2:24 pm
Yes, some custom things seems to be needed.

I read this from the manual earlier (here on smspower.org): "All registers are cleared to 0 by initialization (initial clear IC terminal = 0)."

Returning to this, I see now that it does not say that we can init by clearing registers to 0, but I recall that, that was my impression from reading it earlier :-/
  View user's profile Send private message
Reply to topic



Back to the top of this page

Back to SMS Power!