trunk/src/mess/audio/upd1771.c
| r19110 | r19111 | |
| 5 | 5 | Made using recording/analysis on a Yeno (PAL Super Cassete Vision) |
| 6 | 6 | by plgDavid |
| 7 | 7 | |
| 8 | | Full markings on my 2 specimens are "NEC JAPAN 8431K9 D1771C 017" |
| 9 | | 31th week of 1984, mask rom #017 |
| 8 | Full markings on my 2 specimens are |
| 9 | "NEC JAPAN 8431K9 D1771C 017" (31st week of 1984, mask rom #017) |
| 10 | 10 | |
| 11 | | Ive seen mentions of a 006, 011 and 015 on part miner sites. |
| 11 | I've since (October 2012) got a Grandstand Firefox F-7 Handheld game |
| 12 | (AKA Epoch GalagaX6/Epoch Astro Thunder 7/Tandy Astro Thunder), |
| 13 | (http://www.handheldmuseum.com/Grandstand/Firefox.htm) |
| 14 | which includes a |
| 15 | "NEC JAPAN 8319K9 D1771C 011" (19th week of 1983, mask rom #011) |
| 16 | Thanks to user 'Blanka' from Dragonslairfans for the nice catch! |
| 17 | (http://www.dragonslairfans.com/smfor/index.php?topic=3061.0) |
| 18 | |
| 19 | I've also seen mentions of a 006 and 015 on part miner sites, and since lots |
| 20 | of part miner sites are the equivalent of email crawlers for chips, |
| 21 | its possible that these other variants actually exist. |
| 22 | Its anyone's guess at this point in which products. |
| 23 | |
| 12 | 24 | Since the chip generates tones using embeded wavetables, |
| 13 | 25 | it is probable other sounds are possible and were made for other embeded systems. |
| 14 | | Its anyone's guess at this point in which products. |
| 15 | 26 | |
| 16 | 27 | upd17XXX devices are typically 4bit NEC MCUs, so it wouldnt be a stretch to |
| 17 | 28 | say that this chip is part of that lot. |
| 18 | | Maybe mask roms 006,011 and 015 dont generate audio at all. |
| 29 | Maybe mask roms 006,and 015 dont generate audio at all, though 011 does. |
| 19 | 30 | |
| 20 | 31 | Used pinout in the SCV: |
| 21 | 32 | |
| r19110 | r19111 | |
| 49 | 60 | |
| 50 | 61 | Pins 11 and 13 go to a special circuit, which according to kevtris's analysis |
| 51 | 62 | of my schematics, consist of a balanced output (not unlike XLR cables), |
| 52 | | which are then combined togheter then sent to the RF box. |
| 63 | which are then combined together then sent to the RF box. |
| 53 | 64 | |
| 54 | | All NC pins are unknown, maybe some are "test" pins. |
| 65 | All NC pins are unknown, maybe some are "test" pins. |
| 55 | 66 | |
| 56 | 67 | All writes are made through address 0x3600 on the upD7801 |
| 57 | 68 | Instead of using register=value, this chip require sending multiple |
| r19110 | r19111 | |
| 68 | 79 | #define MAX_PACKET_SIZE 0x8000 |
| 69 | 80 | |
| 70 | 81 | /* |
| 71 | | Each of the 8 waveforms have been sampled at 192Khz using period 0xFF, |
| 82 | Each of the 8 waveforms have been sampled at 192kHz using period 0xFF, |
| 72 | 83 | filtered, and each of the 32 levels have been calculated with averages on around 10 samples |
| 73 | | (removing the transition samples) then quantized to 8bit signed. |
| 74 | | We are not clear on the exact DAC details yet, especially with regards to volume changes |
| 84 | (removing the transition samples) then quantized to int8_t's. |
| 85 | We are not clear on the exact DAC details yet, especially with regards to volume changes. |
| 75 | 86 | |
| 76 | 87 | External AC coupling is assumed in the use of this DAC, so we will center the 8bit data using a signed container |
| 77 | 88 | */ |
| r19110 | r19111 | |
| 136 | 147 | UINT8 t_offset; //[0; 32] |
| 137 | 148 | UINT16 t_period; //[0;255] |
| 138 | 149 | UINT8 t_volume; //[0; 31] |
| 139 | | UINT8 t_tpos;//timber pos |
| 150 | UINT8 t_tpos;//timbre pos |
| 140 | 151 | UINT16 t_ppos;//period pos |
| 141 | 152 | |
| 142 | 153 | //noise wavetable LFSR |
| 143 | 154 | UINT8 nw_timbre; //[0; 7] |
| 144 | 155 | UINT8 nw_volume; //[0; 31] |
| 145 | 156 | UINT32 nw_period; |
| 146 | | UINT32 nw_tpos; //timber pos |
| 157 | UINT32 nw_tpos; //timbre pos |
| 147 | 158 | UINT32 nw_ppos; //period pos |
| 148 | 159 | |
| 149 | 160 | //noise pulse components |
| r19110 | r19111 | |
| 169 | 180 | |
| 170 | 181 | /* |
| 171 | 182 | *************TONE***************** |
| 172 | | Tone consist of a wavetable playback mechanism. |
| 183 | Tone consists of a wavetable playback mechanism. |
| 173 | 184 | Each wavetable is a looping period of 32 samples but can be played with an offset from any point in the table |
| 174 | 185 | effectively shrinking the sample loop, thus allowing different pitch "macros ranges" to be played. |
| 175 | 186 | This method is rather crude because the spectrum of the sound get heavily altered... |
| r19110 | r19111 | |
| 220 | 231 | LSB 5 bits of "Volume" |
| 221 | 232 | |
| 222 | 233 | |
| 223 | | Byte4: 0bPPPPPPPP Low Freq0 period(if not 0 this peridically resets the Wavetable LFSR) |
| 224 | | Byte5: 0bPPPPPPPP Low Freq1 period(if not 0 this peridically resets the Wavetable LFSR) |
| 225 | | Byte6: 0bPPPPPPPP Low Freq2 period(if not 0 this peridically resets the Wavetable LFSR) |
| 234 | Byte4: 0bPPPPPPPP Low Freq0 period(if not 0 this periodically resets the Wavetable LFSR) |
| 235 | Byte5: 0bPPPPPPPP Low Freq1 period(if not 0 this periodically resets the Wavetable LFSR) |
| 236 | Byte6: 0bPPPPPPPP Low Freq2 period(if not 0 this periodically resets the Wavetable LFSR) |
| 226 | 237 | |
| 227 | 238 | Byte7: 0b???VVVVV Low Freq0 volume |
| 228 | 239 | Byte8: 0b???VVVVV Low Freq1 volume |