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
ahihi has joined ##yamahasynths
<cr1901_modern> https://twitter.com/whitequark/status/1105622335028150273 I'm guessing this might be VRC7 music?
<whitequark> what's VRC7?
<cr1901_modern> It's an OPL2-like from Konami that also served as a bank switcher
<cr1901_modern> the main difference is that all but 1 of the instruments are fixed, and the instrument table is an implant ROM
<whitequark> okay
<cr1901_modern> Reading the datasheet more closesly, I have an idea of why the 14 MHz clock is required...
<cr1901_modern> 1, OPL3 instruments can have 4 operators (*s 2)
<cr1901_modern> 2. OPL3 has 4 channels of data (*s 2)
<cr1901_modern> Idk why you'd want more than 2 channels, but whatever
<whitequark> mhmm
<cr1901_modern> For my own reference: Sample rate of 3812 is phi/72, and sample rate of ymf262 is phi/288 (duh! But it's nice to see it spelled out for me)
<whitequark> yeah, in the source code i actually have it as 72 * 4
<whitequark> because fuck calculating
<whitequark> [✔] bring up a synthesizer in anger
<cr1901_modern> [*] find lost application manuals in anger
<cr1901_modern> >OPL3 instruments can have 4 operators (*s 2) <-- scrap this, this is irrelevant. What _is_ relevant, is the YMF262 can play _twice_ as many 2-operator instruments as YM3812
<whitequark> i mean
<whitequark> couldn't they have just paralleled the silicon
<whitequark> isn't ymf262 like two ym3812s glued together
<whitequark> i always assumed that was literal
<cr1901_modern> Maybe, I don't know. But I know this is bugging me enough that I'm reading two datasheets that are both known to lie for _any_ hints
<cr1901_modern> Oh, I'm an idiot
<cr1901_modern> 3812 is a mono chip
<cr1901_modern> Yea, that must be where the 4*s comes from... twice as many channels it has to iterate through, and twice the amount of time to emit a single sample due to stereo output. Doesn't tell me about how the actual pipleline is organized though.
<cr1901_modern> It could be in OPL2 mode, only 1/4 of those cycles are used for anything
<cr1901_modern> whitequark: The problems w/ timing also happened using OPL3 mode, correct?
<whitequark> i'm not entirely sure
<whitequark> it's much harder to hear this in OPL3 mode
<whitequark> for some reason
<whitequark> i think because you need really sparse VGMs for that
<whitequark> and i only really have one and it's OPL2
<cr1901_modern> The Ultima theme?
<whitequark> i'm not sure what is it
<whitequark> i posted it above
<cr1901_modern> https://cloud.whitequark.org/s/PZ9zaDFPRgoCXRp this one, right
<cr1901_modern> pain.wav
<cr1901_modern> After reading the app manual for ymf262, I believe the 14MHz clock _is_ used, at the very least in OPL3 mode, and I'd be curious to know whether 32 cycle wait is valid in opl3 mode only and the datasheet does a horrible job explaining this.
<cr1901_modern> The application manual repeats the "32 cycle" figure, but it's only under a section describing OPL3 features.
<whitequark> hm
<cr1901_modern> If correct, I wonder how the OPL2 compatibility is implemented, b/c shoving a 36*4 cycle wait into a "32-cycle" (prob not the whole) pipeline is baffling to me.
<cr1901_modern> Conclusions for tonight: The rabbit hole never ends lmao
<whitequark> so something i wonder about
<whitequark> oh wait
<whitequark> cr1901_modern: are you suggesting that for OPL3 mode, it is enough to use 32*4, or 32?
<cr1901_modern> 32
<whitequark> hrm
<whitequark> that
<whitequark> seems to work
<cr1901_modern> I put "32-cycle" in quotes, because my guess is that pipeline impl is such that fewer channels are vulnerable to being overwritten
<cr1901_modern> like a... register window ._.
<cr1901_modern> (By the pigeonhole principle, 32 cycles at 14MHz is not sufficient to do 36 operators- 18 channels * 2 ops/channel)
<whitequark> yeah looks like it works
<cr1901_modern> well, at least that's one question answered :D
<whitequark> thanks i hate it
<cr1901_modern> :)
<cr1901_modern> I have seen that before, but I don't remember where
<cr1901_modern> I thought YM2612 was the most cursed chip, but I'm beginning to change my stance
<cr1901_modern> OPL3 seems rather f***ed up
<whitequark> # What the fuck compatibility
<whitequark> # ---------------------------
* whitequark adds a doc section
<TD-Linux> you would really enjoy the wonderswan audio
<TD-Linux> one of the pcm channels is only audible through headphones
<cr1901_modern> wonderswan if the evolution of Virtual Boy's sound chip AIUI
<cr1901_modern> wavetable stuff, one channel of FM
<whitequark> incredible
<TD-Linux> have a friend who did a homebrew game recently http://firelancer.ws/
<cr1901_modern> Yea trap0xf
<cr1901_modern> I've tried getting him in here, but never heard back
<TD-Linux> it detects if headphones are inserted and moves some sounds over to the extra channel
<cr1901_modern> I mean... it's cute, but... why?
<cr1901_modern> ("it" as in "that behavior")
<TD-Linux> why did they do it that way? dunno. but the channel was added for the color
<TD-Linux> might have just been a mistake? also consider that the headphones have a separate dac in a dongle
<cr1901_modern> wavetable stuff is pretty cool, but I've only ever experienced it on Virtual Boy
<cr1901_modern> I learned today OPL4 has it
* whitequark stares at her code
<whitequark> i'm going to have to do some kind of uhhhhh
<cr1901_modern> why do I feel like these chips get exponentially more fucked up
<whitequark> universal parallel bus sequencer with configurable wait states
<whitequark> because like
<whitequark> i need to be able to change the inserted wait states dynamically now
<whitequark> depending on whether NEW=0 or NEW=1
<cr1901_modern> Do OPL3 VGMs assume OPL2 mode initially?
<whitequark> yeah
<TD-Linux> probably useful for other stuff too. especially if one of the "wait" commands is to wait on an external pin
<whitequark> nope
<whitequark> none of the chips I have actually have a BUSY pin
<whitequark> that would actually have been sane
<TD-Linux> meant more like you could use the same hw to drive hd44 lcds too etc
<whitequark> ew
<whitequark> no, i can't
<whitequark> hd44780 is true asynchronous logic
<TD-Linux> but I guess glasgow makes generating hw easy enough that it's not worth trying to reuse it
<whitequark> if you read its status it will change with no strobes at all
<whitequark> it just fucking connects the drivers to the status register directly
<whitequark> and yeah, not worth reusing
<whitequark> most of the gateware is sequencing
<whitequark> yamaha has the thing where wait states depend on the address
<cr1901_modern> Should ##yamahasynths be renamed ##whitequark-descent-into-despair?
<cr1901_modern> are channel names allowed to be that long?
<cr1901_modern> https://twitter.com/nicolas09F9/status/1105605597498671104 Ahh right, good ol' Sega2.doc
<cr1901_modern> https://www.youtube.com/watch?v=fQOAWZO0bR0 It's a good night for some PC-98 music
andlabs has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sixtysix_ has joined ##yamahasynths
sixtysix__ has quit [Ping timeout: 246 seconds]
andlabs has joined ##yamahasynths
ej5 has quit [Read error: Connection reset by peer]
andlabs has quit [Ping timeout: 250 seconds]
andlabs has joined ##yamahasynths
andlabs has quit [Ping timeout: 246 seconds]
andlabs has joined ##yamahasynths
sixtysix_ has quit [Ping timeout: 245 seconds]
andlabs has quit [Ping timeout: 246 seconds]
andlabs has joined ##yamahasynths
sixtysix has joined ##yamahasynths
sixtysix has quit [Ping timeout: 246 seconds]
sixtysix has joined ##yamahasynths
<Sarayan> ok, I don't think geojson is going to work out, because it *really* wants the coordinates to be longitude and latitude
sixtysix has quit [Ping timeout: 252 seconds]
sixtysix has joined ##yamahasynths
Xyz_39808 has joined ##yamahasynths
<Lord_Nightmare> Xyz_39808: you're missing a few oddball ones
<Lord_Nightmare> OPP and OPZ and OPK and OPQ afaik are yamaha internal only chips, used on their syntesizers
<Lord_Nightmare> OPP and OPZ are based on OPM/ym2151
<Lord_Nightmare> OPK and OPQ i have no idea
<Xyz_39808> ehhh, it was more geared towards the chip crowd
<Xyz_39808> chiptune*
<Lord_Nightmare> OPX/ymf271 is another which WAS sold but only used on the seibu SPI system; it seems to be a subset/predecessor to the SCSP from the sega saturn
<Xyz_39808> OPP is DX7 iirc
<Lord_Nightmare> OPP is YM2164, used on the FB-01, the IBM music feature card, and the msx SFG-05 cart
<Lord_Nightmare> and at least one korg synth
<Lord_Nightmare> DX7 is OPS/EGS, its two chips
<Lord_Nightmare> the IBM MFC card is basically an FB-01 on an ISA card
<Sarayan> ym2164, that's the synth or the dsp?
<Xyz_39808> I thought this whole time SFG05 was true OPM. ap0c lied to me
<Sarayan> opl3/4 is more than stereo, it's 4.0 iirc
<Sarayan> e.g. two stereo outputs
<Sarayan> opl2 too
<Sarayan> geee, I don't have the tg01 service manual, that's just unacceptable
<Sarayan> I mean fb01
<Sarayan> (collided with tg33 :-)
<ValleyBell> whitequark: During log initializazion, DOSBox dumps a set of defined registers for all ports. So it always dumps reg 1, 4, 5 and 0xBD for port 0 and port 1, even if those registers are unused.
<Sarayan> ah, fb01 does not have a dsp
<ValleyBell> whitequark: The only thing the NEW bit on OPL3 does, it masking out certain registers. Just assume it is always in OPL3 mode.
<Lord_Nightmare> sarayan ym2164 is the sme as the opm except the test register has been moved around. since most emulators just ignore writes to the test register, it works fine in them
<Lord_Nightmare> ym2164 is same pinout as ym2151 etc
<ValleyBell> Sarayan: Yes, OPL3/4 are 4.0. I'm not sure how often the latter two channels were connected to something though.
<Sarayan> heh
<Sarayan> ValleyBell: never? :-)
<ValleyBell> OPL4 is also a bit weird. You have a register that controls panning. But panning is 15 levels for left/right only, so you have a separate bit that moves the voice from channel 1/2 to 3/4.
<ValleyBell> This doc says that the OPL3 needs 0.28 us after a data write. IIRC that worked fine on my SB16.
<Lord_Nightmare> whitequark: once again, vimana's "02 Opening ~ Space High.vgz" sounds wrong in the web opl player. it sounds like drums are not being enabled when they should be.
<Lord_Nightmare> vimana is a weird file since its intended for either ym3526 or ym3812, and runs the 3812 in 3526 mode
<Xyz_39808> anyone have a datasheet for OPP? I've had no luck
<Lord_Nightmare> no, its an internal use part
<Lord_Nightmare> no datasheet
<Lord_Nightmare> same with OPZ, OPQ(I think), and OPK(I think)
<Lord_Nightmare> OPX however WAS sold (to seibu) so there probably is a datasheet for it, somewhere.
<Lord_Nightmare> likely in japanese
<Xyz_39808> oh ,derp, I forgot to try a jp search
<whitequark> Lord_Nightmare: hrm
<whitequark> you are correct, indeed
<Sarayan> opl3 has already been decapped, but the result is not really public, only partially
<Xyz_39808> damn, best I could find http://sr4.sakura.ne.jp/fmsound/opp.html
<Sarayan> plus there's the one on pr0n, I wonder if it's the not really public one
<Sarayan> don't think so though
<whitequark> also no delayers
<Sarayan> you can see there's only one oscillator loop, so it's not two opl2 on the same die
<whitequark> hmmm
<Sarayan> you recognize the loop from the two roms
<whitequark> horrible code
<whitequark> yeah i know that document
<Sarayan> good
<whitequark> so why the fuck are the drums missing
<whitequark> hm
sixtysix has quit [Ping timeout: 252 seconds]
<whitequark> cr1901_modern: so remember we were talking about phase accumulator and correction in software?
<whitequark> i think i actually do need to move it to hardware now
<whitequark> for very high master clock rates
<Lord_Nightmare> whitequark: the song deliberately writes 0 to the bit in the test reg which enables opl2 mode
<Lord_Nightmare> maybe on the opl3, for some reason, that same bit disables drums if you zero it?
<Lord_Nightmare> i have no idea why that would happen
<whitequark> Lord_Nightmare: i actually had that idea
<whitequark> and no, it makes no difference
<whitequark> Lord_Nightmare: also played more with the timings
<whitequark> no effect
<Lord_Nightmare> for some reason is it playing on the 'second half' of the opl3 instead of the 'first half'?
<Lord_Nightmare> since the second half has no drums
<whitequark> Lord_Nightmare: i thought about that but https://vgmrips.net/packs/pack/zero-wing-toaplan-1
<whitequark> this has drums right?
<whitequark> and that plays just fine
<Lord_Nightmare> could the drum channels have the panning/output set wrong? or could it be the chip is being 'left' in 4op mode and not reset?
<Lord_Nightmare> i gtg
<whitequark> i'm pretty sure i reset the entire thing correctly
<whitequark> Lord_Nightmare: so i tried explicitly ORing the addresses with 0x100
<whitequark> the chip is silent now
sixtysix has joined ##yamahasynths
l_oliveira has joined ##yamahasynths
andlabs has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
andlabs has joined ##yamahasynths
andlabs has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
andlabs has joined ##yamahasynths
andlabs has quit [Ping timeout: 240 seconds]
andlabs has joined ##yamahasynths
andlabs has quit [Ping timeout: 250 seconds]
<ValleyBell> whitequark: Maybe some of the TL registers aren't reset? Do you write 0 to all registers before starting VGM playback?
<whitequark> all defined registers
<ValleyBell> okay
<whitequark> hold on, i'm having an absolutely horrifying evening. better talk to me tomorrow
<ValleyBell> ORing the address with 0x100 in OPL2 mode should be like not ORing 0x100 to them, except for register 0x04 and 0x05
<ValleyBell> (or maybe 0x05 only)
<l_oliveira> WQ: was any of that stuff useful for you?
<l_oliveira> (twitter link)
<whitequark> l_oliveira: yeah, i've incorporated it into my docs
<l_oliveira> glad it helped
<cr1901_modern> whitequark: I don't quite remember the context (and what my opinion of hardware vs software was). But yea clock speeds are a good reason to do it on FPGA; Idk the speeds of some of the more modern chips
<cr1901_modern> Hmm the cheatsheat linked is over 2 years old
<cr1901_modern> wonder who wrote it
andlabs has joined ##yamahasynths
Xyz_39808 has quit [Read error: Connection reset by peer]
andlabs has quit [Ping timeout: 252 seconds]
Xyz39808 has joined ##yamahasynths
Xyz39808 has quit [Ping timeout: 255 seconds]
Xyz_39808 has joined ##yamahasynths
l_oliveira has quit [Ping timeout: 252 seconds]
ej5 has joined ##yamahasynths
<cr1901_modern> ej5: Bot idea... everytime someone types $sb, a bot responds with a word that begins with "S" followed by a word that begins with "B" from a whitelist
<cr1901_modern> at random
<ej5> :-/
<cr1901_modern> You don't like :P?
<ej5> O_O
<cr1901_modern> too easy to abuse?
cr1901_modern1 has joined ##yamahasynths
cr1901_modern has quit [Ping timeout: 246 seconds]
cr1901_modern1 has quit [Client Quit]
cr1901_modern has joined ##yamahasynths
<cr1901_modern> https://twitter.com/TubeTimeUS/status/1105965418198458368 What's the transistor in the dead center of the differential input stage for?
<cr1901_modern> (the one between the current mirror and the transistors actually doing the difference measurement
<cr1901_modern> And yes, what a horrible tagline ._.
<cr1901_modern> If I had a pen and paper plus an hour to divert myself, I'd do the calculations myself. I want to design an amp. But all my amps suck :(
<cr1901_modern> Wohali: Also... eeep, what a rabbit hole you've found :P
<Wohali> opamp design is a discipline to itself, a rapidly vanishing one unfortunately
<cr1901_modern> Discrete electronics is dead
<cr1901_modern> Gonna be huge problems in a few years when most analog ppl are gone. Dunno how true it is, but you can't really get hired for analog work without a PhD these days.
<TD-Linux> all we need anymore are adc designers t. sdr enthusiast
<fseidel> cr1901_modern: purely anecdotal but I know a few people without PhD who got hired for analog
<fseidel> all had an MS though