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
<andlabs>
ValleyBell: and it also segfaults for me every so often :D
<andlabs>
since this is all in thread 5 I am guessing there is a race
<andlabs>
yeah this is pretty loud
<andlabs>
oh boy
<kode54>
andlabs: macOS?
andlabs has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<kode54>
the only race I can think of is that the callbacks will be called from the context of Audio Toolbox
ValleyBell has quit [Ping timeout: 264 seconds]
ValleyBell has joined ##yamahasynths
andlabs has joined ##yamahasynths
<andlabs>
kode54: yes
<andlabs>
hmm
<andlabs>
is the problem the Sleep(50)?
<andlabs>
yeah IDK what the race is
<andlabs>
also vgmrips needs better organization of consoles
_whitelogger has joined ##yamahasynths
andlabs has joined ##yamahasynths
SceneCAT^APUG has quit [Ping timeout: 268 seconds]
ej5 has quit [Read error: Connection reset by peer]
<andlabs>
oh I should mention
<andlabs>
the segfaults themselves only happen when I either change tracks or quit the program, and they happen unpredictably at that
<andlabs>
but ThreadSanitizer is very loud throughout the program execution
<ValleyBell>
I actually thought that libvgm was a lot more thread-safe then the current VGMPlay.
<ValleyBell>
VGMPlay had quite a few race conditions related to start/stop/seek (and I did thread synchronisation via Sleep and bool variables there)
<Sarayan>
Whitequark, if you're around, do you have an opinion on the altera cyclone V se (as in https://github.com/MiSTer-devel/Main_MiSTer/wiki) ? In particular, do you think there's any chance of open source dev tools for it?
<cr1901_modern>
someone's working on cyclone v RE
<cr1901_modern>
so eventually there will be support for it in the open flow
<Sarayan>
yosys seems to have some support for it actually
<cr1901_modern>
Yes, I think yosys understands the primitives. You can feed yosys output into the pnr phase of quartus flow (idk what it's called)
<cr1901_modern>
but there's no FOSS pnr tool for cyclone yet
<Sarayan>
Oh? I thought yosys was pnr in the first place
<cr1901_modern>
No, it spits out a file that describes how FPGA primitives should connect to each other.
<cr1901_modern>
Up to the pnr tool to actually figure out how to physically realize those connections
<Lord_Nightmare>
ValleyBell: does the vgm file format dictate, in any way, the relative mixing volumes for the 4 outputs on a ym2203 (since analog A, B, C for SSG come out 3 pins, and the FM sound comes serially out another pin)?
andlabs has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
l_oliveira has joined ##yamahasynths
l_oliveir has joined ##yamahasynths
l_oliveir has quit [Client Quit]
andlabs has joined ##yamahasynths
<andlabs>
related question
<andlabs>
can we figure out what it's uspposed to be for any platform, please
andlabs has quit [Client Quit]
<Lord_Nightmare>
i assume it should be the same or close to the same for nec pc88 machines (ym2203)
<Lord_Nightmare>
for every arcade pcb its probably different except on common hardwares
andlabs has joined ##yamahasynths
<Lord_Nightmare>
ValleyBell: does vgmwrite work in latest mame, or only in old versions?
linkmauve has quit [Ping timeout: 252 seconds]
andlabs has quit [Ping timeout: 246 seconds]
andlabs has joined ##yamahasynths
<andlabs>
well I found the first race
<andlabs>
calling SetCallback AFTER starting the aduio stream
<andlabs>
all the CoreAudio functions should be locked by that one mutex
<andlabs>
er, the RenderOutputBuffer function, I mean
linkmauve has joined ##yamahasynths
<andlabs>
and also VGMPlayer will either need additional mutexes or use atomic operations
<andlabs>
for instance, around _playSmpl
<andlabs>
but adding a lock to CoreAudio_RenderOutputBuffer fixed the segfaults when seeking between tracks, so
<andlabs>
adding the driver mutex that already exists, I mean
<andlabs>
kode54: ^
<whitequark>
Sarayan: yosys does synthesis
<whitequark>
and only synthesis
<whitequark>
pnr is done mostly by nextpnr, which is a tool by the same people who write yosys mostly
<andlabs>
I wonder if the volume levels on the 3D After Burner II rips are correct
<andlabs>
which reminds me I forget if I thanked sega for doing that
<ValleyBell>
Lord_Nightmare: "vgmwrite" works only in the "VGM mod" versions I posted on vgmrips.
<ValleyBell>
The VGM format allows you to specify the mixing volume of the YM2203's FM and SSG parts separately.
<ValleyBell>
(in VGM v1.71 at least)
<ValleyBell>
The 3 SSG channels are "one output" in libvgm.
<ValleyBell>
so the volume of those can't be controlled separately.
<andlabs>
(this is due to the historical nature of VGM originally being specifically for the Genesis and Master System)
<superctr_>
usually VGMPlay (and thus the VGM format) only distinguishes between "left" and "right" outputs and tends to merge extra outputs for chips that have more than one output per speaker
<superctr_>
for example, the melody and percussion parts of OPLL, SSG channels (they can now be hardpanned though), 2A03 square and noise/triangle/pcm
<superctr_>
the SSG part of the OPN chips is sort of an exception due to the way it's implemented
<kode54>
andlabs: I can't fix it at the moment, I am down that mac environment
<cr1901_modern>
Sarayan: Yea, this was a bad oversight on my part... the person doing cyclone V RE is already in here... cc: ZirconiumX
<ZirconiumX>
Hi, yes, hello
<cr1901_modern>
Not sure how I missed that ._.
* ZirconiumX
reads the backlog
<ZirconiumX>
The current flow for Intel chips under Yosys is essentially to offload RTL synthesis to Quartus
<ZirconiumX>
It's anything but free
<ZirconiumX>
Anyway, Sarayan, if you have any questions about the RE stuff, shout
<cr1901_modern>
Mister might be fun to add nmigen support, but I don't have any current plans to install the Quartus flow
<cr1901_modern>
MiSTer*
<ZirconiumX>
I'm actually also in the emulation scene, so I've got a few people who might be interested
<cr1901_modern>
I'm not a stickler for on-topic, and MAME development is intimately intertwined w/ Yamaha emulation, so emu talk is fine :P.
<ZirconiumX>
Flawless logic :P
<ZirconiumX>
While I'm curious about how Yamaha chip emulation works (I've studied music enough to know the fundamentals), I'm actively shying away from anything other than Cyclone RE at the moment