VRC7/YM2413/OPLL Custom Patches
Moderator: Moderators
Re: VRC7/YM2413/OPLL Custom Patches
This PDM stuff is pretty interesting but it is hard to wrap my head around the concept. From what I understand, when you put out 1-bit DAC pulses, if the DAC is high, it increases the resulting analog voltage, low it decreases, both at a defined rate, which differs from poor man's DAC because in that case you're charging/discharging a cap which does not have constant rates. Is this a correct statement or have I completely missed it?
So you can sit there at 50% duty cycle on your 1-bit DAC to hold a constant arbitrary position of the resulting analog signal, similar to the NES's DMC channel? Then the feedback comes back in to help maintain the DC offset of the signal? And now your effective bit depth of the resulting signal is a factor of how precisely you can time/dither the 1-bit DAC pulses?
So you can sit there at 50% duty cycle on your 1-bit DAC to hold a constant arbitrary position of the resulting analog signal, similar to the NES's DMC channel? Then the feedback comes back in to help maintain the DC offset of the signal? And now your effective bit depth of the resulting signal is a factor of how precisely you can time/dither the 1-bit DAC pulses?
Re: VRC7/YM2413/OPLL Custom Patches
Correct. It's a lot like converting an image from 256 grays to 1-bit: you have to add some sort of noise so that the eye's low-pass filter can reconstruct some semblance of the original gray tones.
Re: VRC7/YM2413/OPLL Custom Patches
I think you're overthinking it? These are all fundamentally the same hardware, but with varying levels of cleverness about what digital signal you feed that hardware.Ben Boldt wrote: ↑Sun Sep 20, 2020 11:41 am This PDM stuff is pretty interesting but it is hard to wrap my head around the concept. From what I understand, when you put out 1-bit DAC pulses, if the DAC is high, it increases the resulting analog voltage, low it decreases, both at a defined rate, which differs from poor man's DAC because in that case you're charging/discharging a cap which does not have constant rates. Is this a correct statement or have I completely missed it?
* The simplest to understand is conventional PWM, where you divide the time slot into X equal bits, and the first N slots of each time slot are high and the rest are low, and you can represent any digital value from 0 to X within each time slot. (e.g. high high low low = 50%)
* Only slightly more complicated is Bit Angle Modulation, where you divide the time slot into Y unequal bits, each one twice as long as the previous. (They don't have to be in order, either.) This saves on interrupt service time if you're doing your PWM in an interrupt.
* "conventional" PDM, you divide each time slot into X equal bits, but those N slots are uniformly distributed across the time slot. This means that instead of always having harmonics that are exactly multiples of the PWM period, different DAC values will have more higher-frequency components. (e.g. high low high low = also 50%)
* 1st-order delta sigma, where there's no longer a concept of "time slot": instead you have smooth filtered (ideally) audio at the output rate, and the output dithering continuously responds to the current sample.
Yes. In fact, the NES's DMC channel is basically equivalent to a very low sample rate delta-sigma or PDM output stage, plus a digital lowpass filter.So you can sit there at 50% duty cycle on your 1-bit DAC to hold a constant arbitrary position of the resulting analog signal, similar to the NES's DMC channel?
Approximately? Have you read wikipedia's article? https://en.wikipedia.org/wiki/Pulse-density_modulationThen the feedback comes back in to help maintain the DC offset of the signal?
Yes.And now your effective bit depth of the resulting signal is a factor of how precisely you can time/dither the 1-bit DAC pulses?
Re: VRC7/YM2413/OPLL Custom Patches
Thanks for your help explaining lidnariq. I was looking at the wikipedia article actually. As soon as I see a control loop diagram I know from experience not to trust that I have clue what I am looking at. (Or that the person who drew it did either in most cases, lol). The way you explain it makes a lot of sense to me.
Re: VRC7/YM2413/OPLL Custom Patches
I'm making music in FamiStudio with the VRC7 audio expansion and would love to be able to edit my music in cartridge format. Is there a known way to create this type of cartridge without gutting old copies?
Re: VRC7/YM2413/OPLL Custom Patches
VRC7 itself is unique to the cart. You can get YM2413s used and inexpensively, however, and they're kinda close. (2op FM sound is very itself)
Re: VRC7/YM2413/OPLL Custom Patches
Yes! I know that YM2413 is an option but i read about VRC7 have a memory mapping circuit included in the same chip. Does you know how can i adap an YM2413 to the cartridge circuitry?
Re: VRC7/YM2413/OPLL Custom Patches
What else is on the PCB that you're adding the YM2413 to?
Re: VRC7/YM2413/OPLL Custom Patches
Implementing the rest of the VRC7's functionality could probably be done with an FPGA or CPLD, or maybe even a bunch of individual chips if the cartridge is big enough. Exactly how you implement it is up to you - the mapper documentation on the wiki should contain enough details to get it working.
However, if you want to play VRC7 music, then how are you going to deal with all of the builtin instruments being different (unless you're going to use the "custom" instrument for everything)?
Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.
P.S. If you don't get this note, let me know and I'll write you another.
Re: VRC7/YM2413/OPLL Custom Patches
Yes! I was wondering if someone have the implementation in FPGA or CPLD of a VRC7 working because I know that here I have all the technical data but I'm a musician that knows very little about electronics and I would love to have my work on a real cartridge. I can release it on a rom file but a real cart would be great.