src/mame/video/rdptpipe.c
| r14517 | r14518 | |
| 148 | 148 | *T = SIGN16(*T); |
| 149 | 149 | } |
| 150 | 150 | |
| 151 | | void N64TexturePipeT::ClampCycle(INT32* S, INT32* T, INT32* SFRAC, INT32* TFRAC, INT32 maxs, INT32 maxt, INT32 num, rdp_span_aux *userdata, const rdp_poly_state& object) |
| 151 | void N64TexturePipeT::ClampCycle(INT32* S, INT32* T, INT32* SFRAC, INT32* TFRAC, INT32 maxs, INT32 maxt, INT32 num, rdp_span_aux *userdata, const rdp_poly_state& object, INT32 *m_clamp_s_diff, INT32 *m_clamp_t_diff) |
| 152 | 152 | { |
| 153 | 153 | const N64Tile* tile = object.m_tiles; |
| 154 | 154 | int dos = tile[num].cs || !tile[num].mask_s; |
| r14517 | r14518 | |
| 163 | 163 | } |
| 164 | 164 | else if (maxs) |
| 165 | 165 | { |
| 166 | | *S = userdata->m_clamp_s_diff[num]; |
| 166 | *S = m_clamp_s_diff[num]; |
| 167 | 167 | *SFRAC = 0; |
| 168 | 168 | } |
| 169 | 169 | else |
| r14517 | r14518 | |
| 185 | 185 | } |
| 186 | 186 | else if (maxt) |
| 187 | 187 | { |
| 188 | | *T = userdata->m_clamp_t_diff[num]; |
| 188 | *T = m_clamp_t_diff[num]; |
| 189 | 189 | *TFRAC = 0; |
| 190 | 190 | } |
| 191 | 191 | else |
| r14517 | r14518 | |
| 199 | 199 | } |
| 200 | 200 | } |
| 201 | 201 | |
| 202 | | void N64TexturePipeT::ClampCycleLight(INT32* S, INT32* T, bool maxs, bool maxt, INT32 num, rdp_span_aux *userdata, const rdp_poly_state& object) |
| 202 | void N64TexturePipeT::ClampCycleLight(INT32* S, INT32* T, bool maxs, bool maxt, INT32 num, rdp_span_aux *userdata, const rdp_poly_state& object, INT32 *m_clamp_s_diff, INT32 *m_clamp_t_diff) |
| 203 | 203 | { |
| 204 | 204 | const N64Tile* tile = object.m_tiles; |
| 205 | 205 | int dos = tile[num].cs || !tile[num].mask_s; |
| r14517 | r14518 | |
| 213 | 213 | } |
| 214 | 214 | else if (maxs) |
| 215 | 215 | { |
| 216 | | *S = userdata->m_clamp_s_diff[num]; |
| 216 | *S = m_clamp_s_diff[num]; |
| 217 | 217 | } |
| 218 | 218 | else |
| 219 | 219 | { |
| r14517 | r14518 | |
| 233 | 233 | } |
| 234 | 234 | else if (maxt) |
| 235 | 235 | { |
| 236 | | *T = userdata->m_clamp_t_diff[num]; |
| 236 | *T = m_clamp_t_diff[num]; |
| 237 | 237 | } |
| 238 | 238 | else |
| 239 | 239 | { |
| r14517 | r14518 | |
| 246 | 246 | } |
| 247 | 247 | } |
| 248 | 248 | |
| 249 | | void N64TexturePipeT::Cycle(Color* TEX, Color* prev, INT32 SSS, INT32 SST, UINT32 tilenum, UINT32 cycle, rdp_span_aux *userdata, const rdp_poly_state& object) |
| 249 | void N64TexturePipeT::Cycle(Color* TEX, Color* prev, INT32 SSS, INT32 SST, UINT32 tilenum, UINT32 cycle, rdp_span_aux *userdata, const rdp_poly_state& object, INT32 *m_clamp_s_diff, INT32 *m_clamp_t_diff) |
| 250 | 250 | { |
| 251 | 251 | const N64Tile* tile = object.m_tiles; |
| 252 | 252 | |
| r14517 | r14518 | |
| 279 | 279 | INT32 sfrac = sss1 & 0x1f; |
| 280 | 280 | INT32 tfrac = sst1 & 0x1f; |
| 281 | 281 | |
| 282 | | ClampCycle(&sss1, &sst1, &sfrac, &tfrac, maxs, maxt, tilenum, userdata, object); |
| 282 | ClampCycle(&sss1, &sst1, &sfrac, &tfrac, maxs, maxt, tilenum, userdata, object, m_clamp_s_diff, m_clamp_t_diff); |
| 283 | 283 | |
| 284 | 284 | sss2 = sss1 + 1; |
| 285 | 285 | sst2 = sst1 + 1; |
| r14517 | r14518 | |
| 374 | 374 | sss1 = TRELATIVE(sss1, tile[tilenum].sl); |
| 375 | 375 | sst1 = TRELATIVE(sst1, tile[tilenum].tl); |
| 376 | 376 | |
| 377 | | ClampCycleLight(&sss1, &sst1, maxs, maxt, tilenum, userdata, object); |
| 377 | ClampCycleLight(&sss1, &sst1, maxs, maxt, tilenum, userdata, object, m_clamp_s_diff, m_clamp_t_diff); |
| 378 | 378 | |
| 379 | 379 | Mask(&sss1, &sst1, tilenum, object); |
| 380 | 380 | |
| r14517 | r14518 | |
| 774 | 774 | } |
| 775 | 775 | } |
| 776 | 776 | |
| 777 | | void N64TexturePipeT::CalculateClampDiffs(UINT32 prim_tile, rdp_span_aux *userdata, const rdp_poly_state& object) |
| 777 | void N64TexturePipeT::CalculateClampDiffs(UINT32 prim_tile, rdp_span_aux *userdata, const rdp_poly_state& object, INT32 *m_clamp_s_diff, INT32 *m_clamp_t_diff) |
| 778 | 778 | { |
| 779 | 779 | const N64Tile* tile = object.m_tiles; |
| 780 | 780 | if (object.OtherModes.cycle_type == CYCLE_TYPE_2) |
| r14517 | r14518 | |
| 785 | 785 | int end = 7; |
| 786 | 786 | for (; start <= end; start++) |
| 787 | 787 | { |
| 788 | | userdata->m_clamp_s_diff[start] = (tile[start].sh >> 2) - (tile[start].sl >> 2); |
| 789 | | userdata->m_clamp_t_diff[start] = (tile[start].th >> 2) - (tile[start].tl >> 2); |
| 788 | m_clamp_s_diff[start] = (tile[start].sh >> 2) - (tile[start].sl >> 2); |
| 789 | m_clamp_t_diff[start] = (tile[start].th >> 2) - (tile[start].tl >> 2); |
| 790 | 790 | } |
| 791 | 791 | } |
| 792 | 792 | else |
| 793 | 793 | { |
| 794 | 794 | int start = prim_tile; |
| 795 | 795 | int end = (prim_tile + 1) & 7; |
| 796 | | userdata->m_clamp_s_diff[start] = (tile[start].sh >> 2) - (tile[start].sl >> 2); |
| 797 | | userdata->m_clamp_t_diff[start] = (tile[start].th >> 2) - (tile[start].tl >> 2); |
| 798 | | userdata->m_clamp_s_diff[end] = (tile[end].sh >> 2) - (tile[end].sl >> 2); |
| 799 | | userdata->m_clamp_t_diff[end] = (tile[end].th >> 2) - (tile[end].tl >> 2); |
| 796 | m_clamp_s_diff[start] = (tile[start].sh >> 2) - (tile[start].sl >> 2); |
| 797 | m_clamp_t_diff[start] = (tile[start].th >> 2) - (tile[start].tl >> 2); |
| 798 | m_clamp_s_diff[end] = (tile[end].sh >> 2) - (tile[end].sl >> 2); |
| 799 | m_clamp_t_diff[end] = (tile[end].th >> 2) - (tile[end].tl >> 2); |
| 800 | 800 | } |
| 801 | 801 | } |
| 802 | 802 | else//1-cycle or copy |
| 803 | 803 | { |
| 804 | | userdata->m_clamp_s_diff[prim_tile] = (tile[prim_tile].sh >> 2) - (tile[prim_tile].sl >> 2); |
| 805 | | userdata->m_clamp_t_diff[prim_tile] = (tile[prim_tile].th >> 2) - (tile[prim_tile].tl >> 2); |
| 804 | m_clamp_s_diff[prim_tile] = (tile[prim_tile].sh >> 2) - (tile[prim_tile].sl >> 2); |
| 805 | m_clamp_t_diff[prim_tile] = (tile[prim_tile].th >> 2) - (tile[prim_tile].tl >> 2); |
| 806 | 806 | } |
| 807 | 807 | } |
| 808 | 808 | |
src/mame/video/rdptpipe.h
| r14517 | r14518 | |
| 74 | 74 | TexelFetch[71] = &N64TexturePipeT::_FetchI_8_TLUT1; |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | | void Cycle(Color* TEX, Color* prev, INT32 SSS, INT32 SST, UINT32 tilenum, UINT32 cycle, rdp_span_aux *userdata, const rdp_poly_state& object); |
| 77 | void Cycle(Color* TEX, Color* prev, INT32 SSS, INT32 SST, UINT32 tilenum, UINT32 cycle, rdp_span_aux *userdata, const rdp_poly_state& object, INT32 *m_clamp_s_diff, INT32 *m_clamp_t_diff); |
| 78 | 78 | void Copy(Color* TEX, INT32 SSS, INT32 SST, UINT32 tilenum, const rdp_poly_state& object, rdp_span_aux *userdata); |
| 79 | 79 | UINT32 Fetch(INT32 SSS, INT32 SST, INT32 tile, const rdp_poly_state& object, rdp_span_aux *userdata); |
| 80 | | void CalculateClampDiffs(UINT32 prim_tile, rdp_span_aux *userdata, const rdp_poly_state& object); |
| 80 | void CalculateClampDiffs(UINT32 prim_tile, rdp_span_aux *userdata, const rdp_poly_state& object, INT32 *m_clamp_s_diff, INT32 *m_clamp_t_diff); |
| 81 | 81 | void LOD1Cycle(INT32* sss, INT32* sst, INT32 s, INT32 t, INT32 w, INT32 dsinc, INT32 dtinc, INT32 dwinc, rdp_span_aux *userdata, const rdp_poly_state& object); |
| 82 | 82 | void LOD2Cycle(INT32* sss, INT32* sst, INT32 s, INT32 t, INT32 w, INT32 dsinc, INT32 dtinc, INT32 dwinc, INT32 prim_tile, INT32* t1, INT32* t2, rdp_span_aux *userdata, const rdp_poly_state& object); |
| 83 | 83 | void LOD2CycleLimited(INT32* sss, INT32* sst, INT32 s, INT32 t, INT32 w, INT32 dsinc, INT32 dtinc, INT32 dwinc, INT32 prim_tile, INT32* t1, const rdp_poly_state& object); |
| r14517 | r14518 | |
| 95 | 95 | void ShiftCycle(INT32* S, INT32* T, INT32* maxs, INT32* maxt, UINT32 num, const rdp_poly_state& object); |
| 96 | 96 | void ShiftCopy(INT32* S, INT32* T, UINT32 num, const rdp_poly_state& object); |
| 97 | 97 | |
| 98 | | void ClampCycle(INT32* S, INT32* T, INT32* SFRAC, INT32* TFRAC, INT32 maxs, INT32 maxt, INT32 num, rdp_span_aux *userdata, const rdp_poly_state& object); |
| 99 | | void ClampCycleLight(INT32* S, INT32* T, bool maxs, bool maxt, INT32 num, rdp_span_aux *userdata, const rdp_poly_state& object); |
| 98 | void ClampCycle(INT32* S, INT32* T, INT32* SFRAC, INT32* TFRAC, INT32 maxs, INT32 maxt, INT32 num, rdp_span_aux *userdata, const rdp_poly_state& object, INT32 *m_clamp_s_diff, INT32 *m_clamp_t_diff); |
| 99 | void ClampCycleLight(INT32* S, INT32* T, bool maxs, bool maxt, INT32 num, rdp_span_aux *userdata, const rdp_poly_state& object, INT32 *m_clamp_s_diff, INT32 *m_clamp_t_diff); |
| 100 | 100 | |
| 101 | 101 | UINT32 _FetchNOP(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata); |
| 102 | 102 | |
src/mame/video/rdpspn16.c
| r14517 | r14518 | |
| 4 | 4 | |
| 5 | 5 | #define LookUpCC(A, B, C, D) m_rdp->GetCCLUT2()[(m_rdp->GetCCLUT1()[(A << 16) | (B << 8) | C] << 8) | D] |
| 6 | 6 | |
| 7 | | void n64_rdp::RenderSpans(int start, int end, int tilenum, bool flip, extent_t *Spans, bool rect, rdp_poly_state &object) |
| 7 | void n64_rdp::RenderSpans(int start, int end, int tilenum, bool flip, extent_t *Spans, bool rect, rdp_poly_state *object) |
| 8 | 8 | { |
| 9 | 9 | int clipy1 = Scissor.m_yh; |
| 10 | 10 | int clipy2 = Scissor.m_yl; |
| r14517 | r14518 | |
| 34 | 34 | end = clipy2 - 1; |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | | object.m_rdp = this; |
| 38 | | memcpy(&object.MiscState, &MiscState, sizeof(MiscStateT)); |
| 39 | | memcpy(&object.OtherModes, &OtherModes, sizeof(OtherModesT)); |
| 40 | | memcpy(&object.SpanBase, &SpanBase, sizeof(SpanBaseT)); |
| 41 | | memcpy(&object.Scissor, &Scissor, sizeof(Rectangle)); |
| 42 | | memcpy(&object.m_tiles, &m_tiles, 8 * sizeof(N64Tile)); |
| 43 | | object.tilenum = tilenum; |
| 44 | | object.flip = flip; |
| 45 | | object.FillColor = FillColor; |
| 46 | | object.rect = rect; |
| 37 | object->m_rdp = this; |
| 38 | memcpy(&object->MiscState, &MiscState, sizeof(MiscStateT)); |
| 39 | memcpy(&object->OtherModes, &OtherModes, sizeof(OtherModesT)); |
| 40 | memcpy(&object->SpanBase, &SpanBase, sizeof(SpanBaseT)); |
| 41 | memcpy(&object->Scissor, &Scissor, sizeof(Rectangle)); |
| 42 | memcpy(&object->m_tiles, &m_tiles, 8 * sizeof(N64Tile)); |
| 43 | object->tilenum = tilenum; |
| 44 | object->flip = flip; |
| 45 | object->FillColor = FillColor; |
| 46 | object->rect = rect; |
| 47 | 47 | |
| 48 | 48 | switch(OtherModes.cycle_type) |
| 49 | 49 | { |
| r14517 | r14518 | |
| 62 | 62 | render_triangle_custom(visarea, render_delegate(FUNC(n64_rdp::SpanDrawFill), this), start, (end - start) + 1, Spans + offset); |
| 63 | 63 | break; |
| 64 | 64 | } |
| 65 | wait(); |
| 65 | 66 | } |
| 66 | 67 | |
| 67 | 68 | void n64_rdp::RGBAZClip(int sr, int sg, int sb, int sa, int *sz, rdp_span_aux *userdata) |
| r14517 | r14518 | |
| 140 | 141 | |
| 141 | 142 | rdp_span_aux *userdata = (rdp_span_aux*)extent.userdata; |
| 142 | 143 | |
| 143 | | m_rdp->TexPipe.CalculateClampDiffs(tile1, userdata, object); |
| 144 | INT32 m_clamp_s_diff[8]; |
| 145 | INT32 m_clamp_t_diff[8]; |
| 146 | m_rdp->TexPipe.CalculateClampDiffs(tile1, userdata, object, m_clamp_s_diff, m_clamp_t_diff); |
| 144 | 147 | |
| 145 | 148 | bool partialreject = (userdata->ColorInputs.blender2b_a[0] == &userdata->InvPixelColor.i.a && userdata->ColorInputs.blender1b_a[0] == &userdata->PixelColor.i.a); |
| 146 | 149 | bool bsel0 = (userdata->ColorInputs.blender2b_a[0] == &userdata->MemoryColor.i.a); |
| r14517 | r14518 | |
| 170 | 173 | int length = flip ? (xstart - xend) : (xend - xstart); |
| 171 | 174 | UINT32 fir, fig, fib; |
| 172 | 175 | |
| 173 | | //if(object.rect) printf("(%s) Scan %d Span %d to %d %d, length %d\n", flip ? "Flip" : "NoFlip", scanline, xstart, xend_scissored, xend, length); fflush(stdout); |
| 174 | | |
| 175 | 176 | if(object.OtherModes.z_source_sel) |
| 176 | 177 | { |
| 177 | 178 | z.w = ((UINT32)object.MiscState.PrimitiveZ) << 16; |
| r14517 | r14518 | |
| 221 | 222 | RGBAZCorrectTriangle(offx, offy, &sr, &sg, &sb, &sa, &sz, userdata, object); |
| 222 | 223 | RGBAZClip(sr, sg, sb, sa, &sz, userdata); |
| 223 | 224 | |
| 224 | | m_rdp->TexPipe.Cycle(&userdata->Texel0Color, &userdata->Texel0Color, sss, sst, tilenum, 0, userdata, object); |
| 225 | m_rdp->TexPipe.Cycle(&userdata->Texel0Color, &userdata->Texel0Color, sss, sst, tilenum, 0, userdata, object, m_clamp_s_diff, m_clamp_t_diff); |
| 225 | 226 | |
| 226 | 227 | m_rdp->ColorCombiner1Cycle(userdata); |
| 227 | 228 | |
| r14517 | r14518 | |
| 243 | 244 | if (rendered) |
| 244 | 245 | { |
| 245 | 246 | ((this)->*(_Write[((object.MiscState.FBSize - 2) << 3) | (object.OtherModes.cvg_dest << 1) | userdata->BlendEnable]))(curpixel, fir, fig, fib, userdata, object); |
| 247 | |
| 246 | 248 | if (object.OtherModes.z_update_en) |
| 247 | 249 | { |
| 248 | 250 | m_rdp->ZStore(zbcur, zhbcur, sz, userdata->m_dzpix_enc); |
| r14517 | r14518 | |
| 262 | 264 | |
| 263 | 265 | x += xinc; |
| 264 | 266 | } |
| 265 | | |
| 266 | | //printf("\n"); |
| 267 | 267 | } |
| 268 | 268 | |
| 269 | 269 | void n64_rdp::SpanDraw2Cycle(INT32 scanline, const extent_t &extent, const rdp_poly_state &object, int threadid) |
| r14517 | r14518 | |
| 297 | 297 | |
| 298 | 298 | rdp_span_aux *userdata = (rdp_span_aux*)extent.userdata; |
| 299 | 299 | |
| 300 | | m_rdp->TexPipe.CalculateClampDiffs(tile1, userdata, object); |
| 300 | INT32 m_clamp_s_diff[8]; |
| 301 | INT32 m_clamp_t_diff[8]; |
| 302 | m_rdp->TexPipe.CalculateClampDiffs(tile1, userdata, object, m_clamp_s_diff, m_clamp_t_diff); |
| 301 | 303 | |
| 302 | 304 | bool partialreject = (userdata->ColorInputs.blender2b_a[1] == &userdata->InvPixelColor.i.a && userdata->ColorInputs.blender1b_a[1] == &userdata->PixelColor.i.a); |
| 303 | 305 | bool bsel0 = (userdata->ColorInputs.blender2b_a[0] == &userdata->MemoryColor.i.a); |
| r14517 | r14518 | |
| 383 | 385 | RGBAZCorrectTriangle(offx, offy, &sr, &sg, &sb, &sa, &sz, userdata, object); |
| 384 | 386 | RGBAZClip(sr, sg, sb, sa, &sz, userdata); |
| 385 | 387 | |
| 386 | | m_rdp->TexPipe.Cycle(&userdata->Texel0Color, &userdata->Texel0Color, sss, sst, tile1, 0, userdata, object); |
| 387 | | m_rdp->TexPipe.Cycle(&userdata->Texel1Color, &userdata->Texel0Color, sss, sst, tile2, 1, userdata, object); |
| 388 | m_rdp->TexPipe.Cycle(&userdata->Texel0Color, &userdata->Texel0Color, sss, sst, tile1, 0, userdata, object, m_clamp_s_diff, m_clamp_t_diff); |
| 389 | m_rdp->TexPipe.Cycle(&userdata->Texel1Color, &userdata->Texel0Color, sss, sst, tile2, 1, userdata, object, m_clamp_s_diff, m_clamp_t_diff); |
| 388 | 390 | |
| 389 | | m_rdp->TexPipe.Cycle(&userdata->NextTexelColor, &userdata->NextTexelColor, sss, sst, tile2, 1, userdata, object); |
| 391 | m_rdp->TexPipe.Cycle(&userdata->NextTexelColor, &userdata->NextTexelColor, sss, sst, tile2, 1, userdata, object, m_clamp_s_diff, m_clamp_t_diff); |
| 390 | 392 | |
| 391 | 393 | m_rdp->ColorCombiner2Cycle(userdata); |
| 392 | 394 | |
src/mame/video/n64.c
| r14517 | r14518 | |
| 119 | 119 | UINT32 hres = ((float)hdiff * hcoeff); |
| 120 | 120 | INT32 invisiblewidth = n64->vi_width - hres; |
| 121 | 121 | |
| 122 | | //printf("%d, %f, %d, %d\n", hdiff, hcoeff, hres, invisiblewidth); |
| 123 | 122 | INT32 vdiff = ((n64->vi_vstart & 0x3ff) - ((n64->vi_vstart >> 16) & 0x3ff)) >> 1; |
| 124 | 123 | float vcoeff = ((float)(n64->vi_yscale & 0xfff) / (1 << 10)); |
| 125 | 124 | UINT32 vres = ((float)vdiff * vcoeff); |
| r14517 | r14518 | |
| 1169 | 1168 | { |
| 1170 | 1169 | if (m_status & 0x1) // XBUS_DMEM_DMA enabled |
| 1171 | 1170 | { |
| 1172 | | //printf("%08x\n", rsp_dmem[(address & 0xfff) / 4]); |
| 1173 | 1171 | return rsp_dmem[(address & 0xfff) / 4]; |
| 1174 | 1172 | } |
| 1175 | 1173 | else |
| r14517 | r14518 | |
| 2112 | 2110 | |
| 2113 | 2111 | int xfrac = ((xright >> 8) & 0xff); |
| 2114 | 2112 | |
| 2115 | | rdp_poly_state &object = object_data_alloc(); |
| 2116 | | memcpy(&object.m_tmem, m_tmem, 0x1000); |
| 2113 | bool new_object = true; |
| 2114 | rdp_poly_state *object = NULL; |
| 2117 | 2115 | |
| 2118 | 2116 | if(flip) |
| 2119 | 2117 | { |
| r14517 | r14518 | |
| 2152 | 2150 | |
| 2153 | 2151 | if (spix == 0) |
| 2154 | 2152 | { |
| 2153 | if(new_object) |
| 2154 | { |
| 2155 | object = &object_data_alloc(); |
| 2156 | memcpy(object->m_tmem, m_tmem, 0x1000); |
| 2157 | new_object = false; |
| 2158 | } |
| 2159 | |
| 2155 | 2160 | Spans[j - (ycur >> 2)].userdata = (void*)((UINT8*)AuxBuf + AuxBufPtr); |
| 2156 | 2161 | AuxBufPtr += sizeof(rdp_span_aux); |
| 2157 | 2162 | |
| r14517 | r14518 | |
| 2161 | 2166 | } |
| 2162 | 2167 | |
| 2163 | 2168 | rdp_span_aux *userdata = (rdp_span_aux*)Spans[j - (ycur >> 2)].userdata; |
| 2164 | | userdata->m_tmem = object.m_tmem; |
| 2165 | 2169 | |
| 2170 | userdata->m_tmem = object->m_tmem; |
| 2171 | |
| 2166 | 2172 | userdata->BlendColor = BlendColor; |
| 2167 | 2173 | userdata->PrimColor = PrimColor; |
| 2168 | 2174 | userdata->EnvColor = EnvColor; |
| r14517 | r14518 | |
| 2310 | 2316 | |
| 2311 | 2317 | if (spix == 0) |
| 2312 | 2318 | { |
| 2319 | if(new_object) |
| 2320 | { |
| 2321 | object = &object_data_alloc(); |
| 2322 | memcpy(object->m_tmem, m_tmem, 0x1000); |
| 2323 | new_object = false; |
| 2324 | } |
| 2325 | |
| 2313 | 2326 | Spans[j - (ycur >> 2)].userdata = (void*)((UINT8*)AuxBuf + AuxBufPtr); |
| 2314 | 2327 | AuxBufPtr += sizeof(rdp_span_aux); |
| 2315 | 2328 | |
| r14517 | r14518 | |
| 2319 | 2332 | } |
| 2320 | 2333 | |
| 2321 | 2334 | rdp_span_aux *userdata = (rdp_span_aux*)Spans[j - (ycur >> 2)].userdata; |
| 2322 | | userdata->m_tmem = object.m_tmem; |
| 2335 | userdata->m_tmem = object->m_tmem; |
| 2323 | 2336 | |
| 2324 | 2337 | userdata->BlendColor = BlendColor; |
| 2325 | 2338 | userdata->PrimColor = PrimColor; |
| r14517 | r14518 | |
| 2431 | 2444 | } |
| 2432 | 2445 | } |
| 2433 | 2446 | |
| 2434 | | RenderSpans(yh >> 2, yl >> 2, tilenum, flip ? true : false, Spans, rect, object); |
| 2447 | if(!new_object) |
| 2448 | { |
| 2449 | RenderSpans(yh >> 2, yl >> 2, tilenum, flip ? true : false, Spans, rect, object); |
| 2450 | } |
| 2451 | |
| 2435 | 2452 | //wait("DrawTriangle"); |
| 2436 | 2453 | } |
| 2437 | 2454 | |
| r14517 | r14518 | |
| 2892 | 2909 | |
| 2893 | 2910 | void n64_rdp::CmdSyncFull(UINT32 w1, UINT32 w2) |
| 2894 | 2911 | { |
| 2895 | | wait("SyncFull"); |
| 2912 | //wait("SyncFull"); |
| 2896 | 2913 | dp_full_sync(*m_machine); |
| 2897 | 2914 | } |
| 2898 | 2915 | |
| r14517 | r14518 | |
| 3459 | 3476 | |
| 3460 | 3477 | void n64_rdp::CmdSetMaskImage(UINT32 w1, UINT32 w2) |
| 3461 | 3478 | { |
| 3462 | | wait("SetMaskImage"); |
| 3479 | //wait("SetMaskImage"); |
| 3463 | 3480 | |
| 3464 | 3481 | MiscState.ZBAddress = w2 & 0x01ffffff; |
| 3465 | 3482 | } |
| 3466 | 3483 | |
| 3467 | 3484 | void n64_rdp::CmdSetColorImage(UINT32 w1, UINT32 w2) |
| 3468 | 3485 | { |
| 3469 | | wait("SetColorImage"); |
| 3486 | //wait("SetColorImage"); |
| 3470 | 3487 | |
| 3471 | 3488 | MiscState.FBFormat = (w1 >> 21) & 0x7; |
| 3472 | 3489 | MiscState.FBSize = (w1 >> 19) & 0x3; |