trunk/src/emu/sound/ay8910.c
| r31235 | r31236 | |
| 68 | 68 | * will NOT work out of the box since RV = RV(RD). |
| 69 | 69 | * |
| 70 | 70 | * The following approach will be used going forward based on die pictures |
| 71 | | * of the AY8910 done by Dr Stack van Hay: |
| 71 | * of the AY8910 done by Dr. Stack van Hay: |
| 72 | 72 | * |
| 73 | 73 | * |
| 74 | | * |
| 75 | 74 | * 5V |
| 76 | 75 | * _| D |
| 77 | 76 | * G | NMOS |
| 78 | | * Vg ---|| |
| 77 | * Vg ---|| Kn depends on volume selected |
| 79 | 78 | * |_ S Vs |
| 80 | 79 | * | |
| 81 | | * Z |
| 82 | | * Z Resistor Value for RV |
| 83 | | * Z |
| 84 | 80 | * | |
| 85 | 81 | * +---> VO Output signal |
| 86 | 82 | * | |
| r31235 | r31236 | |
| 94 | 90 | * |
| 95 | 91 | * Id = Kn * (Vgs - Vtn)^2 |
| 96 | 92 | * |
| 97 | | * Using Id = Vs / (RV + RD) |
| 93 | * Using Id = Vs / RD |
| 98 | 94 | * |
| 99 | | * Vs = Kn * (RV + RD) * (Vg - Vs - Vtn)^2 |
| 95 | * Vs = Kn * RD * (Vg - Vs - Vtn)^2 |
| 100 | 96 | * |
| 101 | 97 | * finally using Vg' = Vg - Vtn |
| 102 | 98 | * |
| 103 | | * Vs = Vg' + 1 / (2 * Kn * (RV + RD)) - sqrt((Vg' + 1 / (2 * Kn * (RV + RD)))^2 - Vg'^2) |
| 99 | * Vs = Vg' + 1 / (2 * Kn * RD) - sqrt((Vg' + 1 / (2 * Kn * RD))^2 - Vg'^2) |
| 104 | 100 | * |
| 105 | | * and thus |
| 101 | * and finally |
| 106 | 102 | * |
| 107 | | * VO = Vs * RD / (RV + RD) |
| 103 | * VO = Vs |
| 108 | 104 | * |
| 109 | 105 | * and this can be used to re-Thenevin to 5V |
| 110 | 106 | * |
| r31235 | r31236 | |
| 113 | 109 | * The RV and Kn parameter are derived using least squares to match |
| 114 | 110 | * calculation results with measurements. |
| 115 | 111 | * |
| 116 | | * |
| 117 | 112 | * FIXME: |
| 118 | 113 | * There is voltage of 60 mV measured with the EX520 (Ri ~ 10M). This may |
| 119 | 114 | * be induced by cutoff currents from the 15 FETs. |