Tuesday 7 July 2020

UM3481A Series - Multi-Instrument Melody Generator

The UM348x family of sound generating devices is currently unemulated mainly due to a lack of understanding of the chip internal rom structure and data.

The sound of these devices should be familiar to many of you as they have been broadly used in many 80s and 90s low end gadgets, doorbells, etc. Bootleg arcade games have used these chips as a way to integrate music at a minimum cost.




Each chip contains a fixed number of melodies hardcoded in the silicon during manufacturing.

Sean Riddle and ClawGrip have made extensive efforts to document these devices, full decap images, sound recordings, and main mask rom dump available for UM3481A and UM3482A here: http://www.seanriddle.com/um348x/


The following notes taken during my analysis of the mask ROM array structure:

Overall view of the UM3481A chips internals with metal removed. Mask ROMs highlighted. 


Zoomed structure view of the main internal mask rom, metal removed.


To obtain usable data, individual bits from each bank are grouped together to form 7-bit words. 



The resulting data consist of 8 banks of 7 bit words containing the melody information. The pattern 100011 marks the beginning of the data space, this pattern is also used at the very end in any unused remaining space. Perhaps it resets the oscillators to not generate sound.



The word pattern 000011 signals the end of every melody. The UM3481A chip contains 8 songs, therefore we find 8x 000011 words in the data. 



The eight melodies occupy the corresponding space according to their length, melody #6 is the shorter of them all by far. 



These lengths are also observable in the WAV, the recording matches all observed melodies in the mask rom.



Most notes seem to take just one word, here's an example from the first UM3481A melody "Jingle Bells", in the song three notes repeat almost at the very beginning, this is clearly visible in the data itself. 



Longer duration notes seem to take two words, in the following example also from the beginning of "Jingle Bells",  two longer duration notes are played after the initial repeating single notes.



That's all from my observation notes, I hope the better understanding of the data structure helps the emulation of this family of sound generating devices.