ChanServ changed the topic of ##yamahasynths to: Channel dedicated to questions and discussion of Yamaha FM Synthesizer internals and corresponding REing. Discussion of synthesis methods similar to the Yamaha line of chips, Sound Blasters + clones, PCM chips like RF5C68, and CD theory of operation are also on-topic. Channel logs: https://freenode.irclog.whitequark.org/~h~yamahasynths
_whitelogger has joined ##yamahasynths
ej5 has quit [Read error: Connection reset by peer]
<cr1901_modern>
Lord_Nightmare: 2151 LFO is in the bottom left corner, correct? I've decided to "suck it up" and label each part w/ what my best guess of it is
<Lord_Nightmare>
2151 lfo i thought was in the bottom right
<cr1901_modern>
Ahhh well, let me quickly create an image... h/o
<cr1901_modern>
I see 20 inputs- 10 from 2 separate sources, that go into one of the big ROMs
<cr1901_modern>
this is consistent w/ generating a phase output from the sin ROM
<Lord_Nightmare>
you make a compelling point, i'll update my diagram
<cr1901_modern>
Everything else I labeled is based on this (possibly wrong!) observation
<cr1901_modern>
Particularly, if I mixed up the sin/exp ROM order, everything falls apart
<Lord_Nightmare>
i'm relatively sure the lfo is in the lower right because its a fairly isolated area of the die, and it has what looks like a multi-use structure in it which can act as an LFSR or a linear(?) counter
<Lord_Nightmare>
i'm trying to figure what that structure is above the PG area at the top left of the die, the sideways structure
<Lord_Nightmare>
is that the big phase counter? or something to do with feedback?
<cr1901_modern>
My guess is that it's the final adder/mixer before it's sent to the shifter to be emitted
<Lord_Nightmare>
and its two structures mirroring one another since its stereo?
<cr1901_modern>
Sounds reasonable :)
<cr1901_modern>
I should trace where it goes... I never actually had much luck figuring out where on the chip the output shifter is
<cr1901_modern>
even tracing backwards from SH1/SH2 etc
<Lord_Nightmare>
i'd love to see a decap of the ym2414b, since that's a weird ym2151 derivative with more bits
<cr1901_modern>
I don't like the fact that the accumulator isn't 16-bits tho (it's more)
<Lord_Nightmare>
it might be completely different
<cr1901_modern>
err the "final adder"
<Lord_Nightmare>
the mix area has an odd structure which is 'slanted' so different rows are different lengths, which reminds me of a radix-2 booth multiplier array
<Lord_Nightmare>
where the bits 'lower' in the array have different length rotary shifters
<cr1901_modern>
base 2 multiplication might be easier than base 10 multiplication, but I'm clueless about efficient algorithms to do it
<cr1901_modern>
additionally, there's going to be another place where a multiply happens- the frequency multiplier
<Lord_Nightmare>
radix 1 multiplier is a 'stupid' array where you pass 1 or 0 to successive rows. its fast, but it takes up extreme amounts of die space
<Lord_Nightmare>
radix 2 you pass -2 -1 0 +1 or +2 between cells
<Lord_Nightmare>
iirc the famouc intel FDIV bug was in a radix 2 LUT
<Lord_Nightmare>
where the last 5 values were all supposed to be +2 but were stored as 0s
<cr1901_modern>
You mean the last 4.9991789457 values :)
<Lord_Nightmare>
patent US4209844 has a radix-1 multiplier in it
<Lord_Nightmare>
patent US4189779 has a radix-2 multiplier in it
<Lord_Nightmare>
you can see the different length shifters which makes the diagram sort of 'slanted'
<Lord_Nightmare>
i wonder if that's what's going on in the ym2151
<Lord_Nightmare>
the reason to use a big array multiplier like this is it can do many calculations in parallel, so every 4 chip clocks it produces a result, but it takes a total of 4*(num_bits) clocks since the two values to be multiplied were fed to the array to actually process the multiplication
<cr1901_modern>
Lord_Nightmare: So yea, I'm now pretty confident that the top left corner is the final accumulator, becuase it's _right_ next the SH1/2 etc
<cr1901_modern>
I think the next part I'm really curious about is: where does the "f-number" to phase increment calculation occur?
<cr1901_modern>
But I'm gonna take a break for now :P
<Lord_Nightmare>
i assume it happens in that center bottom area, near the lfsr
<cr1901_modern>
Looks like all of us agree on the left third
<cr1901_modern>
anyways I legitimately am gonna vectorize today, even though my laptop will hate me for it and I actually have things I need to be doing instead
<cr1901_modern>
SVG is essentially XML, correct?
<cr1901_modern>
Yak stack: I want to write a pre-commit hook to enable all (non-debug) layers of the output SVG, commit it, and then revert back to the original settings I had before saving in post-commit
<cr1901_modern>
since Inkscape conveniently remembers my settings for which layers are enabled/disabled when I'm working
<whitequark>
yes, svg is just xml
<cr1901_modern>
thanks
_whitelogger has joined ##yamahasynths
futarisIRCcloud has quit [Quit: Connection closed for inactivity]
l_oliveira has joined ##yamahasynths
<Lord_Nightmare>
ah, so the 'operator unit' part is the logic which turns the sine table into an actual sine waveform, and handles the feedback input/addition operation?
<Lord_Nightmare>
that section will be much more complex on the ym2414b since it can do all 8 opl3 waveforms afaik
<l_oliveira>
2414 is that enhanced OPM that is on some midi modules?
<Lord_Nightmare>
yes
<cr1901_modern>
>anyways I legitimately am gonna vectorize today
<cr1901_modern>
It's 4 hours later. I still haven't opened inkscape
<cr1901_modern>
(tbf, I've actually been trying to do something useful w/ my life today, but that's still pretty bad)
<Lord_Nightmare>
i'm curious if there's any hidden features on the ym2151 that are disabled on the silicon
<cr1901_modern>
Maybe some stuff hidden in the test register...
<l_oliveira>
I don't think you will find any LN
<l_oliveira>
because 2151 is from 1983
<l_oliveira>
but of course, please go for it
<cr1901_modern>
April 22, 2019 11:10 AM- I managed to open Inkscape. Rations are running low
<cr1901_modern>
Tried opening the help manual which opened my web browser which is explicitly NOT what I wanted
<cr1901_modern>
There's GOTTA be a way to set a custom palette in inkscape
<cr1901_modern>
(I mean, in the toolbar near the bottom of the window
<cr1901_modern>
Okay, there is a way to set a custom palette, but dietools doesn't like the SVG generated. Guess I'll live w/ the dropper tool for now
<Lord_Nightmare>
there's at least one more FM chip that nobody has spoken about, the one chip which came before the ops/egs for the dx7
<Lord_Nightmare>
iirc it was used on just one or two particular electric pianos that yamaha made
<l_oliveira>
would be complicated to source some of it, no?
<cr1901_modern>
Vectorized metal for an hour... taking a break. Thankless task lmao
<Lord_Nightmare>
cr1901_modern: thanks!
nukeykt has quit [Quit: Page closed]
<cr1901_modern>
Maybe I should allocate at least once a week for vectorizing, no matter how I feel
<cr1901_modern>
Wish there was incentive (i.e. someone will yell at me if I don't)
<Sarayan>
yay, ym2203 metal layer done
<Sarayan>
ok, still a lot of work left, butyay anyway
<cr1901_modern>
Metal is probably the nastiest part IMO
<cr1901_modern>
Well actually, my problem is switching between layers, since I have to manually change colors, lock/unlock layers etc
<cr1901_modern>
wish there was a macro I could use to do all this for me, so layer switching is "free"
<cr1901_modern>
anyways, ty for your work Sarayan
<cr1901_modern>
Lord_Nightmare: >ah, so the 'operator unit' part is the logic which turns the sine table into an actual sine waveform, and handles the feedback input/addition operation?
<cr1901_modern>
AFAIK, "operator" is Yamaha jargon that just stuck around after the patents ran out. But yes, it refers to the sine wave generator
<superctr>
operator is what would be called oscillator in analog synths
<cr1901_modern>
that's a better answer than mine :P
<Sarayan>
cr1901: I usually don't lock the layers, as for changing colors I recommend selecting something of the appropriate layer, do alt-P, and pick the colors for the tools you need (usually pen or rectangle) with "pick from selection"
<Sarayan>
it's particularly nice because the selection switches you to the correct layer
<cr1901_modern>
because of alpha being < 255, "pick from selection" won't actually choose the right color
<cr1901_modern>
unless I misunderstand what you're saying
<Sarayan>
huh? It will grab the exact fill and stroke config from the object you've selected
<Sarayan>
It's take from selection actually
<Sarayan>
it's not a color picker, it's a fill configuration picker
<cr1901_modern>
alright let's see
<cr1901_modern>
I have inkscape open
<cr1901_modern>
alt-P opens up a context menu
<cr1901_modern>
oh wait nevermind I found it
<Sarayan>
shift-control-p sorry
<Sarayan>
preferences
<cr1901_modern>
Well this is certainly faster, thanks
__sen has quit [Ping timeout: 252 seconds]
__sen has joined ##yamahasynths
<cr1901_modern>
Sarayan: https://imgur.com/oEk4d5E The three regions I circled are capacitors, correct?
<cr1901_modern>
okay, thanks. This took me like 20 minutes to figure out the boundaries of active
<Sarayan>
looks correct to me
<Sarayan>
well, it's connected to the right too of course, but I'm sure you know that
<cr1901_modern>
yes, didn't get that far yet
<cr1901_modern>
there's a few repeating patterns in this region (I suspect it's the part where the two 10-bit inputs get added together), but this part is unique
<cr1901_modern>
X: 6100 Y:12250 if you wish to play along
<Sarayan>
actually right now I wish to go to bed, early plane tomorrow
<ValleyBell>
6 of the 7 ADPCM channels use fixed samples though
<ValleyBell>
but the ADPCM-B channel is awesome, because it fetches sample data from its own RAM
<ValleyBell>
(and it's also up to 55 KHz, I think)
<Lord_Nightmare>
i pushed the fix to the wrapping behavior to the neogeodev wiki
<Lord_Nightmare>
for adpcm-a
<Lord_Nightmare>
so now all that's left is for the fm.cpp changes to propagate to various MAME forks etc
<ValleyBell>
I need to admit that I feel a bit more comfortable with the SN76496 than the AY8910 though. And the periodic noise is also a neat little thing.
<Lord_Nightmare>
what's really weird is that wrapping code looks like it never worked right, and nobody noticed it for years
<Lord_Nightmare>
the old code
<ValleyBell>
Maybe there were barely any samples that reached the point of wrapping/clipping?
kode544 has joined ##yamahasynths
<ValleyBell>
Also if you clamp the value instead of wrapping it, the effect is likely less audible than the other way around.
<Lord_Nightmare>
actually there's tons of games which do, surprisingly many
<Lord_Nightmare>
the pistol shot sound and item reload sound in the entire metal slug series
<Lord_Nightmare>
drums in cameltry
<Lord_Nightmare>
ValleyBell: the real hardware wraps, it doesn't clamp, i have hardware recordings from darrylrev of metal slug 3's attract mode which prove this
<ValleyBell>
Yes, I got that.
akacastor2 has joined ##yamahasynths
<Lord_Nightmare>
what MAME did before was broken: it worked if you overflowed from 7ff to 800 (which correctly became 0xFFF800), but it broke horribly if you underflowed from 0xFFFFF800 to 0xFFFFF7FF
kode54 has quit [Ping timeout: 250 seconds]
akacastor has quit [Ping timeout: 250 seconds]
<Lord_Nightmare>
this had the effect of introducing a large negative offset to the accumulator at that underflowed sample, and the accumulator would effectively be allowed to go as far negative as 0xfff000 before 'wrapping back' to 0xffffff again
<Lord_Nightmare>
i'm surprised the effect wasn't noticed in more games