| 297 | */ |
| 298 | |
| 299 | void adlib_reg(int i, int v) |
| 300 | { |
| 301 | if (opl[0]==0) return; |
| 302 | int v2, i3, v3; |
| 303 | i3 = -1; |
| 304 | Transpose(i, v, &v2, &i3, &v3); |
| 305 | |
| 306 | OPLWrite(opl[0], 0, i); |
| 307 | OPLWrite(opl[0], 1, v); |
| 308 | OPLWrite(opl[1], 0, i); |
| 309 | if (i >= 0x20 && i <= 0x3f) //no tremolo/vibrato |
| 310 | v2 = (v2 & 0x3F); |
| 311 | if (i >= 0xE0 && i <= 0xFC) |
| 312 | { |
| 313 | if ((slot_array[i & 0x1f] & 1) == 1) //wave form |
| 314 | v2 = v2 & 0x02; |
| 315 | } |
| 316 | // if ((i >= 0x60 && i <= 0x7F) && ((slot_array[i & 0x1f] & 1) == 1)) //altered attack/decoy |
| 317 | // v2 = v2 ^ 0x20; |
| 318 | OPLWrite(opl[1], 1, v2); |
| 319 | if (i3 != -1) |
| 320 | { |
| 321 | OPLWrite(opl[1], 0, i3); |
| 322 | OPLWrite(opl[1], 1, v3); |
| 323 | } |
| 324 | } |
| 325 | |
| 326 | |
| 327 | // initialises adlib parameters |
no test coverage detected