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
doppler has joined ##yamahasynths
doppler has quit [Quit: doppler]
doppler has joined ##yamahasynths
_whitelogger has joined ##yamahasynths
<ValleyBell> cr1901_modern: I'd probably just write a small C or Python program to parse the text file and convert it to VGM.
<ValleyBell> I'd just hardcode the full VGM header.
<ValleyBell> Then the only thing left to do is converting the timestamps into "VGM wait" commands.
<ValleyBell> You can probably do that in 30 minutes.
<cr1901_modern> ValleyBell: I have control over the raw data, so no parsing is needed. I was just wondering if a script already exists given a timestamp and reg reads/writes to convert to a VGM
<cr1901_modern> Though I guess converting to timestamps isn't a huge deal (vgm's granularity is "a write/read can take place anywhere within 1/44100 seconds and they are all pooled together to the beginning of the 1/44100 second period", AIUI)
<cr1901_modern> ValleyBell: Well, it was over an hour, rather than 30 mins, but: http://ix.io/2Lqn
<cr1901_modern> It works
emeb has joined ##yamahasynths
<ValleyBell> cool
<ValleyBell> But no, there is no script for "turn X into VGM". You always start from scratch.
<ValleyBell> ... or you take the MAME VGM mod's "vgmwrite.c" code and adjust it until it fits your needs.
<ValleyBell> That is what I do when I add VGM logging to another emulator.
<ValleyBell> But I usually rewrite the timing code for every emulator and I also strip like 70% of all the code, because MAME supports 40 sound chips and in most emulators you need only 1 or 2.
<ValleyBell> Regarding your dump_vgm() function: The header is actually 0x80 bytes in that case.
<ValleyBell> The "data start offset" is placed at 0x34..0x37 (Little Endian) and the value is 0x4C -> 0x34+0x4C = 0x80
<Sarayan> only 40? damn, we should do better
<ValleyBell> So far I've been only adding the "more commonly used" chips
<ValleyBell> because you 1) need to extend the header for every new chip, 2) assign a set of command bytes for data writes, 3) integrate it into the logger and 4) add it to the player
<Sarayan> oh, you meant 40 chips actually useable in vgms
<Sarayan> that is a good score
<cr1901_modern> ValleyBell: Yup, vgmplay warned me about unknown command thanks to the bad header :P
<cr1901_modern> thanks tho :D
<cr1901_modern> https://twitter.com/cr1901/status/1347998849948921867 This is definitely a good 3.58MHz clock. Definitely nothing wrong here
<cr1901_modern> ej5: https://twitter.com/cr1901/status/1348010575851380743 Is it okay to tag you into this thread. You were the one who recommended these mods to me all this time ago
<ej5> what board is this?
<cr1901_modern> The OPL2Board
<cr1901_modern> uhh lemme link schematic
<ej5> oh yeah i have only the vaguest of memories of this
<cr1901_modern> Ahhh nevermind then. I should prob undo those mods
<cr1901_modern> I did confirm that there's something very wrong with the clock and the shift reg interface is fine
<ej5> those mods make it more like the ad lib, iirc
<cr1901_modern> I will review the logs later
<cr1901_modern> FWIW, I'm debugging this board still because I want to
<ej5> so you could keep C9 as a capacitor
<cr1901_modern> Well aware there are better uses of my time
<ej5> but C5 definitely doesn't below there and will cause problems
<ej5> *belong
<ej5> you should never have a large capacitor like that connected directly between the output of an op-amp and ground
<cr1901_modern> why not... oh... feedback.
<ej5> it ruins the stability
<cr1901_modern> I somehow totally missed that
<cr1901_modern> Does the Z_2/Z_1 equation still apply with that capacitor there, or do we go straight into pos feedback territory immediately?
* cr1901_modern kinda wants to analyze it
<cr1901_modern> http://www.atkinsoft.com/datasheets/YM3014B.PDF "Example of basic circuit" agrees with you
<cr1901_modern> (page 3)
<cr1901_modern> Why is the op amp needed in the first place? Why is there a circuit required to connect RB to MP if RB is generated internally already? Current drive?
<cr1901_modern> Or impedance transformation?
<Sarayan> ej5: when you say C5, you mean C8?
<cr1901_modern> 10pF is small capacitor
<Sarayan> C5 is a decoupling cap one the DAC exponential reference voltage input
<Sarayan> ohhhhhh, the lm358 is a op-amb, I stupidly thought it was a voltage regulator
<cr1901_modern> On the BUFF pin, the lm358 is being used as a buffer/impedance transformer: Vout "sees" a low output impedance..
<cr1901_modern> MP is similar, but the 10uF cap on RB (page 3 of datasheet) changes things, and I forget how offhand
Patater has quit [Quit: Explodes into a thousand pieces]
Patater has joined ##yamahasynths
ej5 has quit [Read error: Connection reset by peer]
Patater has quit [Quit: Explodes into a thousand pieces]
Patater has joined ##yamahasynths
Patater has quit [Client Quit]
Patater has joined ##yamahasynths
emeb has quit [Quit: Leaving.]