NoobDog Posted April 18, 2008 Report Posted April 18, 2008 Hi All!Olli Niemitalo just posted this to the music-dsp list. As i am currently a very proud ownder / builder of a midibox-fm (right now the minimum version, next month i'll start with the "UI"), i just thought some readers of this forum might be interested in his findings. i asked for permission to reproduce his post here, and he agreed. here we go!Post sent by Olli Niemitalo to music dsp mailinglist 18.4.08:-----Me and Matthew Gambrell have an interest in emulation of YM3812, whichis the OPL2 sound chip found in the Adlib and 8-bit Sound Blastercards. A later derivative OPL3 is found in early 16-bit SoundBlasters. We sent one YM3812 and one YMF262 (OPL3) to MEFAS fordecapsulation; the cost was around 90 USD each. They indicated thatthe chips would still be operational after decapsulation, but we hadno need to test this. Looking at the revealed YM3812 die surface witha microscope turned out two ROM's. See: http://docs.google.com/Doc?id=dd8kqn9f_13cqjkf4gpThe contents could be read bit-by-bit. The first ROM was a log-sinwaveform table, containing one quarter of a sine wave, 256 sampleslong. The second ROM was an exponential table, 256 samples long. Therewere no other ROM's larger than 16 samples. This is strong evidencethat YM3812 produces the sound without any multiplications, using forfrequency modulated (actually phase modulated) synthesis the formula: out = exp(logsin(phase2 + exp(logsin(phase1) + gain1)) + gain2)There was first some difficulty understanding the ROM's because theywere compressed. Every second sample was stored as a difference valueto the previous. Once this was understood, we were able to deriveformulas that met our expectations and re-created the contents of theROM tables exactly (yes, they used the same rounding and everything atYamaha, back then when they created these tables).Exponential table: x = 0..255, y = round((power(2, x/256)-1)*1024)When such a table is used for calculation of the exponential, the tableis read at the position given by the 8 LSB's of the input. The value +1024 (the hidden bit) is then the significand of the floating point outputand the yet unused MSB's of the input are the exponential of thefloating point output. Indeed, YM3812 sends the audio to the YM3014BDAC in floating point, so it is quite possible that summing of voicesis done in floating point also.Log-sin table: x = 0..255, y = round(-log(sin((x+0.5)*pi/256/2))/log(2)*256)This is the first (rising) quarter of sine wave. The rest can beconstructed by flipping all the bits of x and/or by changing the signof the samples.I hope this will be useful for anyone writing a good emulator. Also,there are no extra ROM's on the YMF262 (OPL3), so the additionalwaveform is probably simply the exponential table.-olli Quote
Jaicen Posted April 18, 2008 Report Posted April 18, 2008 That is truly awesome! Anybody fancy donating a (broken) SID for the same treatment? Quote
Ashiman Posted April 18, 2008 Report Posted April 18, 2008 WOW , FINALLY I GET DAC DIE'S ON MY WALL HELL YEAH :D Quote
Wilba Posted April 19, 2008 Report Posted April 19, 2008 That is truly awesome! Anybody fancy donating a (broken) SID for the same treatment?I have plenty. I don't know what will be gained by it though... other than pretty pictures. Quote
Enth Posted May 2, 2008 Report Posted May 2, 2008 For pretty pictures, you could go here :phttp://www.digital-circuits.org/sid/CSG%20Micrographs/ Quote
sebiiksbcs Posted May 16, 2008 Report Posted May 16, 2008 What was this law about increase in transistors every 4 years like? Moore's law? Quote
ilmenator Posted May 16, 2008 Report Posted May 16, 2008 originally one year, later changed to two: Moore's Law Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.