|
| 1 | +/*==================================================================== |
| 2 | + * |
| 3 | + * Copyright 1993, Silicon Graphics, Inc. |
| 4 | + * All Rights Reserved. |
| 5 | + * |
| 6 | + * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, |
| 7 | + * Inc.; the contents of this file may not be disclosed to third |
| 8 | + * parties, copied or duplicated in any form, in whole or in part, |
| 9 | + * without the prior written permission of Silicon Graphics, Inc. |
| 10 | + * |
| 11 | + * RESTRICTED RIGHTS LEGEND: |
| 12 | + * Use, duplication or disclosure by the Government is subject to |
| 13 | + * restrictions as set forth in subdivision (c)(1)(ii) of the Rights |
| 14 | + * in Technical Data and Computer Software clause at DFARS |
| 15 | + * 252.227-7013, and/or in similar or successor clauses in the FAR, |
| 16 | + * DOD or NASA FAR Supplement. Unpublished - rights reserved under the |
| 17 | + * Copyright Laws of the United States. |
| 18 | + *====================================================================*/ |
| 19 | + |
| 20 | +#include "n_synthInternals.h" |
| 21 | + |
| 22 | +// This function appears to be different than the stock n_alMainBusPull. |
| 23 | + |
| 24 | +extern u8 D_800FC824; |
| 25 | +extern u8 D_80077D98; |
| 26 | +extern u8* D_800FC6D8; |
| 27 | +extern u32 D_800FD6F0; |
| 28 | +extern u8* D_800FCF28[]; |
| 29 | +extern u32 D_800FCF30[]; |
| 30 | + |
| 31 | +Acmd *n_alMainBusPull(s32 sampleOffset, Acmd *p) |
| 32 | +{ |
| 33 | + Acmd *ptr = p; |
| 34 | + s32 i; |
| 35 | + |
| 36 | + aClearBuffer(ptr++, N_AL_MAIN_L_OUT, N_AL_DIVIDED<<1); |
| 37 | + |
| 38 | + ptr = (n_syn->mainBus->filter.handler)(sampleOffset,ptr); |
| 39 | + |
| 40 | + aMix(ptr++, 0, 0x7fff, N_AL_AUX_L_OUT, N_AL_MAIN_L_OUT); |
| 41 | + aMix(ptr++, 0, 0x7fff, N_AL_AUX_R_OUT, N_AL_MAIN_R_OUT); |
| 42 | + |
| 43 | + // theres more code after? |
| 44 | + if (D_800FC824 != 0) { |
| 45 | + aClearBuffer(ptr++, 0x7C0, 0x2E0); |
| 46 | + n_aLoadBuffer(ptr++, 0x170, 0x7C0, osVirtualToPhysical(&D_800FC6D8[D_800FD6F0 * 2])); |
| 47 | + n_aLoadBuffer(ptr++, 0x170, 0x930, osVirtualToPhysical(&D_800FC6D8[D_800FD6F0 * 2])); |
| 48 | + |
| 49 | + D_800FD6F0 += 0xB8; |
| 50 | + if (D_800FD6F0 >= 0xB80) { |
| 51 | + D_800FD6F0 = 0; |
| 52 | + } |
| 53 | + aMix(ptr++, 0, 0x7fff, N_AL_AUX_L_OUT, N_AL_MAIN_L_OUT); |
| 54 | + aMix(ptr++, 0, 0x7fff, N_AL_AUX_R_OUT, N_AL_MAIN_R_OUT); |
| 55 | + aClearBuffer(ptr++, 0x7C0, 0x2E0); |
| 56 | + } |
| 57 | + |
| 58 | + if (D_80077D98 != 0) { |
| 59 | + for (i = 0; i < 2; i++) { |
| 60 | + aClearBuffer(ptr++, 0x7C0, 0x2E0); |
| 61 | + n_aLoadBuffer(ptr++, 0x170, 0x7C0, osVirtualToPhysical(&D_800FCF28[i][D_800FCF30[i] * 2])); |
| 62 | + n_aLoadBuffer(ptr++, 0x170, 0x930, osVirtualToPhysical(&D_800FCF28[i][D_800FCF30[i] * 2])); |
| 63 | + |
| 64 | + D_800FCF30[i] += 0xB8; |
| 65 | + if (D_800FCF30[i] >= 0x8A0) { |
| 66 | + D_800FCF30[i] = 0; |
| 67 | + } |
| 68 | + |
| 69 | + aMix(ptr++, 0, 0x7fff, N_AL_AUX_L_OUT, N_AL_MAIN_L_OUT); |
| 70 | + aMix(ptr++, 0, 0x7fff, N_AL_AUX_R_OUT, N_AL_MAIN_R_OUT); |
| 71 | + } |
| 72 | + } |
| 73 | + |
| 74 | + return ptr; |
| 75 | +} |
| 76 | + |
0 commit comments