tag:blogger.com,1999:blog-1981425846546053493.post362442390408934300..comments2024-01-17T22:33:52.069+01:00Comments on Arcade Hacker: UM3481A Series - Multi-Instrument Melody GeneratorEduardo Cruzhttp://www.blogger.com/profile/18379284498583161191noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-1981425846546053493.post-6802943494715518062020-07-07T20:25:41.221+02:002020-07-07T20:25:41.221+02:00Thanks for working on this!
The little 16x9 ROM c...Thanks for working on this!<br /><br />The little 16x9 ROM contains the starting offset of each song in the array:<br /><br />000 058 0A5 0D5 10F 149 166 1A5<br />1F3 1F3 1F3 1F3 1F3 1F3 1F3 1F3<br /><br />These offsets match your end of song word patterns. The last 8 offsets point to the unused area at the end of the melody ROM. Interestingly, the UM3482A's 16x9 ROM has 16 unique indices, although the chip only has 12 songs.<br /><br />The number of notes in a song might not directly relate to the song's length in seconds, since one song might have lots of short duration notes and another might have fewer longer duration notes.<br /><br />I tried to interpret the wav file as notes by counting the number of cycles of square waves of different widths, and got this for Jingle Bells (note/duration):<br /><br />C5/1 A5/1 G5/1 F5/1 C5/5 A5/1 G5/1 F5/1 D5/5 A#5/1 A5/1<br />G5/1 E5/4 C6/2 A#5/1 G5/1 A5/4 C5/1 A5/1 G5/1 F5/1 C5/5<br />A5/1 G5/1 F5/1 D5/5 A#5/1 A5/1 G5/1 C6/4 D6/1 C6/1 A#5/1<br />G5/1 F5/4 A5/9 C6/1 F5/1 G5/1 A5/4 A#5/5 A5/4 G5/2 A5/1<br />G5/2 C6/2 A5/5 A5/4 C6/1 F5/1 G5/1 A5/4 A#5/5 A5/3 C6/2<br />A#5/1 G5/1 F5/4 <br /><br />Counting each note with a duration>1 as 2 bytes, that totals 81 bytes, although the length in ROM is 88.<br /><br />Rudolph and Happy Birthday are odd; the waveforms look weird and I count a lot more notes in those songs than in the others. So there's more to figure out.<br /><br />The 2nd byte for a long note might be a "repeat" or "hold" command. The 14th note in Jingle Bells has a duration of 2, and it looks like the byte is duplicated in the ROM (no harm, since a repeat command would also take 2 bytes).<br /><br />Wording in the datasheet made me think that there were 3 bits for duration and 4 bits for frequency in each 7-bit note, but then the longer notes wouldn't need 2 bytes.<br />Sean Riddlehttps://www.blogger.com/profile/15340204195796997353noreply@blogger.com