|
|
1.1 ! root 1: // ! 2: // r_varsa.s ! 3: // ! 4: ! 5: #include "qasm.h" ! 6: #include "d_ifacea.h" ! 7: ! 8: #if id386 ! 9: ! 10: .data ! 11: ! 12: //------------------------------------------------------- ! 13: // ASM-only variables ! 14: //------------------------------------------------------- ! 15: .globl float_1, float_particle_z_clip, float_point5 ! 16: .globl float_minus_1, float_0 ! 17: float_0: .single 0.0 ! 18: float_1: .single 1.0 ! 19: float_minus_1: .single -1.0 ! 20: float_particle_z_clip: .single PARTICLE_Z_CLIP ! 21: float_point5: .single 0.5 ! 22: ! 23: .globl fp_16, fp_64k, fp_1m, fp_64kx64k ! 24: .globl fp_1m_minus_1 ! 25: .globl fp_8 ! 26: fp_1m: .single 1048576.0 ! 27: fp_1m_minus_1: .single 1048575.0 ! 28: fp_64k: .single 65536.0 ! 29: fp_8: .single 8.0 ! 30: fp_16: .single 16.0 ! 31: fp_64kx64k: .long 0x4f000000 // (float)0x8000*0x10000 ! 32: ! 33: ! 34: .globl FloatZero, Float2ToThe31nd, FloatMinus2ToThe31nd ! 35: FloatZero: .long 0 ! 36: Float2ToThe31nd: .long 0x4f000000 ! 37: FloatMinus2ToThe31nd: .long 0xcf000000 ! 38: ! 39: .globl C(r_bmodelactive) ! 40: C(r_bmodelactive): .long 0 ! 41: ! 42: //------------------------------------------------------- ! 43: // global refresh variables ! 44: //------------------------------------------------------- ! 45: ! 46: // FIXME: put all refresh variables into one contiguous block. Make into one ! 47: // big structure, like cl or sv? ! 48: ! 49: .align 4 ! 50: .globl C(d_sdivzstepu) ! 51: .globl C(d_tdivzstepu) ! 52: .globl C(d_zistepu) ! 53: .globl C(d_sdivzstepv) ! 54: .globl C(d_tdivzstepv) ! 55: .globl C(d_zistepv) ! 56: .globl C(d_sdivzorigin) ! 57: .globl C(d_tdivzorigin) ! 58: .globl C(d_ziorigin) ! 59: C(d_sdivzstepu): .single 0 ! 60: C(d_tdivzstepu): .single 0 ! 61: C(d_zistepu): .single 0 ! 62: C(d_sdivzstepv): .single 0 ! 63: C(d_tdivzstepv): .single 0 ! 64: C(d_zistepv): .single 0 ! 65: C(d_sdivzorigin): .single 0 ! 66: C(d_tdivzorigin): .single 0 ! 67: C(d_ziorigin): .single 0 ! 68: ! 69: .globl C(sadjust) ! 70: .globl C(tadjust) ! 71: .globl C(bbextents) ! 72: .globl C(bbextentt) ! 73: C(sadjust): .long 0 ! 74: C(tadjust): .long 0 ! 75: C(bbextents): .long 0 ! 76: C(bbextentt): .long 0 ! 77: ! 78: .globl C(cacheblock) ! 79: .globl C(d_viewbuffer) ! 80: .globl C(cachewidth) ! 81: .globl C(d_pzbuffer) ! 82: .globl C(d_zrowbytes) ! 83: .globl C(d_zwidth) ! 84: C(cacheblock): .long 0 ! 85: C(cachewidth): .long 0 ! 86: C(d_viewbuffer): .long 0 ! 87: C(d_pzbuffer): .long 0 ! 88: C(d_zrowbytes): .long 0 ! 89: C(d_zwidth): .long 0 ! 90: ! 91: ! 92: //------------------------------------------------------- ! 93: // ASM-only variables ! 94: //------------------------------------------------------- ! 95: .globl izi ! 96: izi: .long 0 ! 97: ! 98: .globl pbase, s, t, sfracf, tfracf, snext, tnext ! 99: .globl spancountminus1, zi16stepu, sdivz16stepu, tdivz16stepu ! 100: .globl zi8stepu, sdivz8stepu, tdivz8stepu, pz ! 101: s: .long 0 ! 102: t: .long 0 ! 103: snext: .long 0 ! 104: tnext: .long 0 ! 105: sfracf: .long 0 ! 106: tfracf: .long 0 ! 107: pbase: .long 0 ! 108: zi8stepu: .long 0 ! 109: sdivz8stepu: .long 0 ! 110: tdivz8stepu: .long 0 ! 111: zi16stepu: .long 0 ! 112: sdivz16stepu: .long 0 ! 113: tdivz16stepu: .long 0 ! 114: spancountminus1: .long 0 ! 115: pz: .long 0 ! 116: ! 117: .globl izistep ! 118: izistep: .long 0 ! 119: ! 120: //------------------------------------------------------- ! 121: // local variables for d_draw16.s ! 122: //------------------------------------------------------- ! 123: ! 124: .globl reciprocal_table_16, entryvec_table_16 ! 125: // 1/2, 1/3, 1/4, 1/5, 1/6, 1/7, 1/8, 1/9, 1/10, 1/11, 1/12, 1/13, ! 126: // 1/14, and 1/15 in 0.32 form ! 127: reciprocal_table_16: .long 0x40000000, 0x2aaaaaaa, 0x20000000 ! 128: .long 0x19999999, 0x15555555, 0x12492492 ! 129: .long 0x10000000, 0xe38e38e, 0xccccccc, 0xba2e8ba ! 130: .long 0xaaaaaaa, 0x9d89d89, 0x9249249, 0x8888888 ! 131: ! 132: #ifndef NeXT ! 133: .extern Entry2_16 ! 134: .extern Entry3_16 ! 135: .extern Entry4_16 ! 136: .extern Entry5_16 ! 137: .extern Entry6_16 ! 138: .extern Entry7_16 ! 139: .extern Entry8_16 ! 140: .extern Entry9_16 ! 141: .extern Entry10_16 ! 142: .extern Entry11_16 ! 143: .extern Entry12_16 ! 144: .extern Entry13_16 ! 145: .extern Entry14_16 ! 146: .extern Entry15_16 ! 147: .extern Entry16_16 ! 148: #endif ! 149: ! 150: entryvec_table_16: .long 0, Entry2_16, Entry3_16, Entry4_16 ! 151: .long Entry5_16, Entry6_16, Entry7_16, Entry8_16 ! 152: .long Entry9_16, Entry10_16, Entry11_16, Entry12_16 ! 153: .long Entry13_16, Entry14_16, Entry15_16, Entry16_16 ! 154: ! 155: //------------------------------------------------------- ! 156: // local variables for d_parta.s ! 157: //------------------------------------------------------- ! 158: .globl DP_Count, DP_u, DP_v, DP_32768, DP_Color, DP_Pix, DP_EntryTable ! 159: DP_Count: .long 0 ! 160: DP_u: .long 0 ! 161: DP_v: .long 0 ! 162: DP_32768: .single 32768.0 ! 163: DP_Color: .long 0 ! 164: DP_Pix: .long 0 ! 165: ! 166: ! 167: #if 0 ! 168: .extern DP_1x1 ! 169: .extern DP_2x2 ! 170: .extern DP_3x3 ! 171: .extern DP_4x4 ! 172: ! 173: DP_EntryTable: .long DP_1x1, DP_2x2, DP_3x3, DP_4x4 ! 174: #endif ! 175: ! 176: // ! 177: // advancetable is 8 bytes, but points to the middle of that range so negative ! 178: // offsets will work ! 179: // ! 180: .globl advancetable, sstep, tstep, pspantemp, counttemp, jumptemp ! 181: advancetable: .long 0, 0 ! 182: sstep: .long 0 ! 183: tstep: .long 0 ! 184: ! 185: pspantemp: .long 0 ! 186: counttemp: .long 0 ! 187: jumptemp: .long 0 ! 188: ! 189: // 1/2, 1/3, 1/4, 1/5, 1/6, and 1/7 in 0.32 form ! 190: .globl reciprocal_table, entryvec_table ! 191: reciprocal_table: .long 0x40000000, 0x2aaaaaaa, 0x20000000 ! 192: .long 0x19999999, 0x15555555, 0x12492492 ! 193: ! 194: #if 0 ! 195: .extern Entry2_8 ! 196: .extern Entry3_8 ! 197: .extern Entry4_8 ! 198: .extern Entry5_8 ! 199: .extern Entry6_8 ! 200: .extern Entry7_8 ! 201: .extern Entry8_8 ! 202: ! 203: entryvec_table: .long 0, Entry2_8, Entry3_8, Entry4_8 ! 204: .long Entry5_8, Entry6_8, Entry7_8, Entry8_8 ! 205: #endif ! 206: ! 207: #ifndef NeXT ! 208: .extern Spr8Entry2_8 ! 209: .extern Spr8Entry3_8 ! 210: .extern Spr8Entry4_8 ! 211: .extern Spr8Entry5_8 ! 212: .extern Spr8Entry6_8 ! 213: .extern Spr8Entry7_8 ! 214: .extern Spr8Entry8_8 ! 215: #endif ! 216: ! 217: .globl spr8entryvec_table ! 218: spr8entryvec_table: .long 0, Spr8Entry2_8, Spr8Entry3_8, Spr8Entry4_8 ! 219: .long Spr8Entry5_8, Spr8Entry6_8, Spr8Entry7_8, Spr8Entry8_8 ! 220: ! 221: #endif // id386 ! 222: ! 223:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.