[sdiy] Removing the effect of a DC blocking filter through DSP
Didrik Madheden
nitro2k01 at gmail.com
Mon Dec 12 11:10:38 CET 2022
On Sun, 11 Dec 2022 at 20:53, Gordonjcp <gordonjcp at gjcp.net> wrote:
> Which console?
>
> Why not just pick audio up directly from the output of the sound chip?
It's the original Gameboy, and the quirk in question is that the
amplitude setting of one of the channels is sometimes glitchy (called
"zombie mode" in the community) so what I needed to do was measure
amplitude levels fairly precisely. In the last couple of years people
have started to reverse engineer the hardware from die shots, so now
we're validating theories of what the hardware should do in very
specific situations, theorized based on looking at reverse engineered
schematics.
Right now I'm just inspecting the waveforms by eye, and the sloped
waveforms threw me off enough that I wasn't confident in my readings.
It's a totally reasonable thing to do in my case to probe the signal
directly from the chip. The reason for not doing so initially was
pretty "analog". I don't have an oscilloscope at home and I didn't
feel like leaving home in the freezing weather on a Sunday to go to a
lab that I have access to unless I really needed to. And I thought the
question was sufficiently interesting to bring it up on this list, in
case someone had any good advice, which of course people did.
In the end I did a really simple integration technique with hand tuned
constants to correct the signal recorded from the soundcard, and this
worked well enough to where I could read the waveform and extract the
information I needed.
a=200000000
igain=.0000000000339
tmp=0
for i in range(len(samples_in)):
samp_in=samples_in[i]
tmp+=samp_in*a
samples_out[i]=samp_in+tmp*igain
--
/Didrik
More information about the Synth-diy
mailing list