From 9162957bc6f0b4bdec979789f597bd63207e0d5c Mon Sep 17 00:00:00 2001 From: espes Date: Thu, 4 Feb 2016 02:38:07 +1000 Subject: [PATCH] kill object_method method numbering (finally) --- hw/xbox/nv2a.c | 119 +++++++++------- hw/xbox/nv2a_int.h | 342 ++++++++++++++++++++++----------------------- 2 files changed, 237 insertions(+), 224 deletions(-) diff --git a/hw/xbox/nv2a.c b/hw/xbox/nv2a.c index a6d2004c32..4e6cd5ef10 100644 --- a/hw/xbox/nv2a.c +++ b/hw/xbox/nv2a.c @@ -2750,8 +2750,10 @@ static void pgraph_method(NV2AState *d, return; } - uint32_t class_method = (object->graphics_class << 16) | method; - switch (class_method) { + /* ugly switch for now */ + switch (object->graphics_class) { + + case NV_CONTEXT_SURFACES_2D: { switch (method) { case NV062_SET_CONTEXT_DMA_IMAGE_SOURCE: context_surfaces_2d->dma_image_source = parameter; break; @@ -2771,7 +2773,9 @@ static void pgraph_method(NV2AState *d, case NV062_SET_OFFSET_DESTIN: context_surfaces_2d->dest_offset = parameter & 0x07FFFFFF; break; + } break; } + case NV_IMAGE_BLIT: { switch (method) { case NV09F_SET_CONTEXT_SURFACES: image_blit->context_surfaces = parameter; break; @@ -2851,8 +2855,10 @@ static void pgraph_method(NV2AState *d, } break; + } break; } + case NV_KELVIN_PRIMITIVE: { switch (method) { case NV097_NO_OPERATION: /* The bios uses nop as a software method call - * it seems to expect a notify interrupt if the parameter isn't 0. @@ -3026,7 +3032,7 @@ static void pgraph_method(NV2AState *d, case NV097_SET_COMBINER_ALPHA_ICW ... NV097_SET_COMBINER_ALPHA_ICW + 28: - slot = (class_method - NV097_SET_COMBINER_ALPHA_ICW) / 4; + slot = (method - NV097_SET_COMBINER_ALPHA_ICW) / 4; pg->regs[NV_PGRAPH_COMBINEALPHAI0 + slot*4] = parameter; break; @@ -3039,7 +3045,7 @@ static void pgraph_method(NV2AState *d, break; CASE_4(NV097_SET_TEXTURE_ADDRESS, 64): - slot = (class_method - NV097_SET_TEXTURE_ADDRESS) / 64; + slot = (method - NV097_SET_TEXTURE_ADDRESS) / 64; pg->regs[NV_PGRAPH_TEXADDRESS0 + slot * 4] = parameter; break; case NV097_SET_CONTROL0: { @@ -3423,7 +3429,7 @@ static void pgraph_method(NV2AState *d, break; CASE_4(NV097_SET_TEXGEN_S, 16): { - slot = (class_method - NV097_SET_TEXGEN_S) / 16; + slot = (method - NV097_SET_TEXGEN_S) / 16; unsigned int reg = (slot < 2) ? NV_PGRAPH_CSV1_A : NV_PGRAPH_CSV1_B; unsigned int mask = (slot % 2) ? NV_PGRAPH_CSV1_A_T1_S @@ -3432,7 +3438,7 @@ static void pgraph_method(NV2AState *d, break; } CASE_4(NV097_SET_TEXGEN_T, 16): { - slot = (class_method - NV097_SET_TEXGEN_T) / 16; + slot = (method - NV097_SET_TEXGEN_T) / 16; unsigned int reg = (slot < 2) ? NV_PGRAPH_CSV1_A : NV_PGRAPH_CSV1_B; unsigned int mask = (slot % 2) ? NV_PGRAPH_CSV1_A_T1_T @@ -3441,7 +3447,7 @@ static void pgraph_method(NV2AState *d, break; } CASE_4(NV097_SET_TEXGEN_R, 16): { - slot = (class_method - NV097_SET_TEXGEN_R) / 16; + slot = (method - NV097_SET_TEXGEN_R) / 16; unsigned int reg = (slot < 2) ? NV_PGRAPH_CSV1_A : NV_PGRAPH_CSV1_B; unsigned int mask = (slot % 2) ? NV_PGRAPH_CSV1_A_T1_R @@ -3450,7 +3456,7 @@ static void pgraph_method(NV2AState *d, break; } CASE_4(NV097_SET_TEXGEN_Q, 16): { - slot = (class_method - NV097_SET_TEXGEN_Q) / 16; + slot = (method - NV097_SET_TEXGEN_Q) / 16; unsigned int reg = (slot < 2) ? NV_PGRAPH_CSV1_A : NV_PGRAPH_CSV1_B; unsigned int mask = (slot % 2) ? NV_PGRAPH_CSV1_A_T1_Q @@ -3459,13 +3465,13 @@ static void pgraph_method(NV2AState *d, break; } CASE_4(NV097_SET_TEXTURE_MATRIX_ENABLE,4): - slot = (class_method - NV097_SET_TEXTURE_MATRIX_ENABLE) / 4; + slot = (method - NV097_SET_TEXTURE_MATRIX_ENABLE) / 4; pg->texture_matrix_enable[slot] = parameter; break; case NV097_SET_PROJECTION_MATRIX ... NV097_SET_PROJECTION_MATRIX + 0x3c: { - slot = (class_method - NV097_SET_PROJECTION_MATRIX) / 4; + slot = (method - NV097_SET_PROJECTION_MATRIX) / 4; // pg->projection_matrix[slot] = *(float*)¶meter; unsigned int row = NV_IGRAPH_XF_XFCTX_PMAT0 + slot/4; pg->vsh_constants[row][slot%4] = parameter; @@ -3475,7 +3481,7 @@ static void pgraph_method(NV2AState *d, case NV097_SET_MODEL_VIEW_MATRIX ... NV097_SET_MODEL_VIEW_MATRIX + 0xfc: { - slot = (class_method - NV097_SET_MODEL_VIEW_MATRIX) / 4; + slot = (method - NV097_SET_MODEL_VIEW_MATRIX) / 4; unsigned int matnum = slot / 16; unsigned int entry = slot % 16; unsigned int row = NV_IGRAPH_XF_XFCTX_MMAT0 + matnum*8 + entry/4; @@ -3486,7 +3492,7 @@ static void pgraph_method(NV2AState *d, case NV097_SET_INVERSE_MODEL_VIEW_MATRIX ... NV097_SET_INVERSE_MODEL_VIEW_MATRIX + 0xfc: { - slot = (class_method - NV097_SET_INVERSE_MODEL_VIEW_MATRIX) / 4; + slot = (method - NV097_SET_INVERSE_MODEL_VIEW_MATRIX) / 4; unsigned int matnum = slot / 16; unsigned int entry = slot % 16; unsigned int row = NV_IGRAPH_XF_XFCTX_IMMAT0 + matnum*8 + entry/4; @@ -3497,7 +3503,7 @@ static void pgraph_method(NV2AState *d, case NV097_SET_COMPOSITE_MATRIX ... NV097_SET_COMPOSITE_MATRIX + 0x3c: { - slot = (class_method - NV097_SET_COMPOSITE_MATRIX) / 4; + slot = (method - NV097_SET_COMPOSITE_MATRIX) / 4; unsigned int row = NV_IGRAPH_XF_XFCTX_CMAT0 + slot/4; pg->vsh_constants[row][slot%4] = parameter; pg->vsh_constants_dirty[row] = true; @@ -3506,7 +3512,7 @@ static void pgraph_method(NV2AState *d, case NV097_SET_TEXTURE_MATRIX ... NV097_SET_TEXTURE_MATRIX + 0xfc: { - slot = (class_method - NV097_SET_TEXTURE_MATRIX) / 4; + slot = (method - NV097_SET_TEXTURE_MATRIX) / 4; unsigned int tex = slot / 16; unsigned int entry = slot % 16; unsigned int row = NV_IGRAPH_XF_XFCTX_T0MAT + tex*8 + entry/4; @@ -3517,7 +3523,7 @@ static void pgraph_method(NV2AState *d, case NV097_SET_FOG_PARAMS ... NV097_SET_FOG_PARAMS + 8: - slot = (class_method - NV097_SET_FOG_PARAMS) / 4; + slot = (method - NV097_SET_FOG_PARAMS) / 4; if (slot < 2) { pg->regs[NV_PGRAPH_FOGPARAM0 + slot*4] = parameter; } else { @@ -3531,7 +3537,7 @@ static void pgraph_method(NV2AState *d, /* Handles NV097_SET_TEXGEN_PLANE_S,T,R,Q */ case NV097_SET_TEXGEN_PLANE_S ... NV097_SET_TEXGEN_PLANE_S + 0xfc: { - slot = (class_method - NV097_SET_TEXGEN_PLANE_S) / 4; + slot = (method - NV097_SET_TEXGEN_PLANE_S) / 4; unsigned int tex = slot / 16; unsigned int entry = slot % 16; unsigned int row = NV_IGRAPH_XF_XFCTX_TG0MAT + tex*8 + entry/4; @@ -3547,14 +3553,14 @@ static void pgraph_method(NV2AState *d, case NV097_SET_FOG_PLANE ... NV097_SET_FOG_PLANE + 12: - slot = (class_method - NV097_SET_FOG_PLANE) / 4; + slot = (method - NV097_SET_FOG_PLANE) / 4; pg->vsh_constants[NV_IGRAPH_XF_XFCTX_FOG][slot] = parameter; pg->vsh_constants_dirty[NV_IGRAPH_XF_XFCTX_FOG] = true; break; case NV097_SET_SCENE_AMBIENT_COLOR ... NV097_SET_SCENE_AMBIENT_COLOR + 8: - slot = (class_method - NV097_SET_SCENE_AMBIENT_COLOR) / 4; + slot = (method - NV097_SET_SCENE_AMBIENT_COLOR) / 4; // ?? pg->ltctxa[NV_IGRAPH_XF_LTCTXA_FR_AMB][slot] = parameter; pg->ltctxa_dirty[NV_IGRAPH_XF_LTCTXA_FR_AMB] = true; @@ -3562,44 +3568,44 @@ static void pgraph_method(NV2AState *d, case NV097_SET_VIEWPORT_OFFSET ... NV097_SET_VIEWPORT_OFFSET + 12: - slot = (class_method - NV097_SET_VIEWPORT_OFFSET) / 4; + slot = (method - NV097_SET_VIEWPORT_OFFSET) / 4; pg->vsh_constants[NV_IGRAPH_XF_XFCTX_VPOFF][slot] = parameter; pg->vsh_constants_dirty[NV_IGRAPH_XF_XFCTX_VPOFF] = true; break; case NV097_SET_EYE_POSITION ... NV097_SET_EYE_POSITION + 12: - slot = (class_method - NV097_SET_EYE_POSITION) / 4; + slot = (method - NV097_SET_EYE_POSITION) / 4; pg->vsh_constants[NV_IGRAPH_XF_XFCTX_EYEP][slot] = parameter; pg->vsh_constants_dirty[NV_IGRAPH_XF_XFCTX_EYEP] = true; break; case NV097_SET_COMBINER_FACTOR0 ... NV097_SET_COMBINER_FACTOR0 + 28: - slot = (class_method - NV097_SET_COMBINER_FACTOR0) / 4; + slot = (method - NV097_SET_COMBINER_FACTOR0) / 4; pg->regs[NV_PGRAPH_COMBINEFACTOR0 + slot*4] = parameter; break; case NV097_SET_COMBINER_FACTOR1 ... NV097_SET_COMBINER_FACTOR1 + 28: - slot = (class_method - NV097_SET_COMBINER_FACTOR1) / 4; + slot = (method - NV097_SET_COMBINER_FACTOR1) / 4; pg->regs[NV_PGRAPH_COMBINEFACTOR1 + slot*4] = parameter; break; case NV097_SET_COMBINER_ALPHA_OCW ... NV097_SET_COMBINER_ALPHA_OCW + 28: - slot = (class_method - NV097_SET_COMBINER_ALPHA_OCW) / 4; + slot = (method - NV097_SET_COMBINER_ALPHA_OCW) / 4; pg->regs[NV_PGRAPH_COMBINEALPHAO0 + slot*4] = parameter; break; case NV097_SET_COMBINER_COLOR_ICW ... NV097_SET_COMBINER_COLOR_ICW + 28: - slot = (class_method - NV097_SET_COMBINER_COLOR_ICW) / 4; + slot = (method - NV097_SET_COMBINER_COLOR_ICW) / 4; pg->regs[NV_PGRAPH_COMBINECOLORI0 + slot*4] = parameter; break; case NV097_SET_VIEWPORT_SCALE ... NV097_SET_VIEWPORT_SCALE + 12: - slot = (class_method - NV097_SET_VIEWPORT_SCALE) / 4; + slot = (method - NV097_SET_VIEWPORT_SCALE) / 4; pg->vsh_constants[NV_IGRAPH_XF_XFCTX_VPSCL][slot] = parameter; pg->vsh_constants_dirty[NV_IGRAPH_XF_XFCTX_VPSCL] = true; break; @@ -3607,7 +3613,7 @@ static void pgraph_method(NV2AState *d, case NV097_SET_TRANSFORM_PROGRAM ... NV097_SET_TRANSFORM_PROGRAM + 0x7c: { - slot = (class_method - NV097_SET_TRANSFORM_PROGRAM) / 4; + slot = (method - NV097_SET_TRANSFORM_PROGRAM) / 4; int program_load = GET_MASK(pg->regs[NV_PGRAPH_CHEOPS_OFFSET], NV_PGRAPH_CHEOPS_OFFSET_PROG_LD_PTR); @@ -3626,7 +3632,7 @@ static void pgraph_method(NV2AState *d, case NV097_SET_TRANSFORM_CONSTANT ... NV097_SET_TRANSFORM_CONSTANT + 0x7c: { - slot = (class_method - NV097_SET_TRANSFORM_CONSTANT) / 4; + slot = (method - NV097_SET_TRANSFORM_CONSTANT) / 4; int const_load = GET_MASK(pg->regs[NV_PGRAPH_CHEOPS_OFFSET], NV_PGRAPH_CHEOPS_OFFSET_CONST_LD_PTR); @@ -3646,7 +3652,7 @@ static void pgraph_method(NV2AState *d, case NV097_SET_VERTEX3F ... NV097_SET_VERTEX3F + 8: { - slot = (class_method - NV097_SET_VERTEX3F) / 4; + slot = (method - NV097_SET_VERTEX3F) / 4; VertexAttribute *attribute = &pg->vertex_attributes[NV2A_VERTEX_ATTR_POSITION]; pgraph_allocate_inline_buffer_vertices(pg, NV2A_VERTEX_ATTR_POSITION); @@ -3661,7 +3667,7 @@ static void pgraph_method(NV2AState *d, /* Handles NV097_SET_BACK_LIGHT_* */ case NV097_SET_BACK_LIGHT_AMBIENT_COLOR ... NV097_SET_BACK_LIGHT_SPECULAR_COLOR + 0x1C8: { - slot = (class_method - NV097_SET_BACK_LIGHT_AMBIENT_COLOR) / 4; + slot = (method - NV097_SET_BACK_LIGHT_AMBIENT_COLOR) / 4; unsigned int part = NV097_SET_BACK_LIGHT_AMBIENT_COLOR / 4 + slot % 16; slot /= 16; /* [Light index] */ assert(slot < 8); @@ -3693,7 +3699,7 @@ static void pgraph_method(NV2AState *d, /* Handles all the light source props except for NV097_SET_BACK_LIGHT_* */ case NV097_SET_LIGHT_AMBIENT_COLOR ... NV097_SET_LIGHT_LOCAL_ATTENUATION + 0x38C: { - slot = (class_method - NV097_SET_LIGHT_AMBIENT_COLOR) / 4; + slot = (method - NV097_SET_LIGHT_AMBIENT_COLOR) / 4; unsigned int part = NV097_SET_LIGHT_AMBIENT_COLOR / 4 + slot % 32; slot /= 32; /* [Light index] */ assert(slot < 8); @@ -3761,7 +3767,7 @@ static void pgraph_method(NV2AState *d, case NV097_SET_VERTEX4F ... NV097_SET_VERTEX4F + 12: { - slot = (class_method - NV097_SET_VERTEX4F) / 4; + slot = (method - NV097_SET_VERTEX4F) / 4; VertexAttribute *attribute = &pg->vertex_attributes[NV2A_VERTEX_ATTR_POSITION]; pgraph_allocate_inline_buffer_vertices(pg, NV2A_VERTEX_ATTR_POSITION); @@ -3775,7 +3781,7 @@ static void pgraph_method(NV2AState *d, case NV097_SET_VERTEX_DATA_ARRAY_FORMAT ... NV097_SET_VERTEX_DATA_ARRAY_FORMAT + 0x3c: { - slot = (class_method - NV097_SET_VERTEX_DATA_ARRAY_FORMAT) / 4; + slot = (method - NV097_SET_VERTEX_DATA_ARRAY_FORMAT) / 4; VertexAttribute *vertex_attribute = &pg->vertex_attributes[slot]; vertex_attribute->format = @@ -3855,7 +3861,7 @@ static void pgraph_method(NV2AState *d, case NV097_SET_VERTEX_DATA_ARRAY_OFFSET ... NV097_SET_VERTEX_DATA_ARRAY_OFFSET + 0x3c: - slot = (class_method - NV097_SET_VERTEX_DATA_ARRAY_OFFSET) / 4; + slot = (method - NV097_SET_VERTEX_DATA_ARRAY_OFFSET) / 4; pg->vertex_attributes[slot].dma_select = parameter & 0x80000000; @@ -3937,7 +3943,7 @@ static void pgraph_method(NV2AState *d, case NV097_SET_EYE_DIRECTION ... NV097_SET_EYE_DIRECTION + 8: - slot = (class_method - NV097_SET_EYE_DIRECTION) / 4; + slot = (method - NV097_SET_EYE_DIRECTION) / 4; pg->ltctxa[NV_IGRAPH_XF_LTCTXA_EYED][slot] = parameter; pg->ltctxa_dirty[NV_IGRAPH_XF_LTCTXA_EYED] = true; break; @@ -4237,12 +4243,12 @@ static void pgraph_method(NV2AState *d, break; } CASE_4(NV097_SET_TEXTURE_OFFSET, 64): - slot = (class_method - NV097_SET_TEXTURE_OFFSET) / 64; + slot = (method - NV097_SET_TEXTURE_OFFSET) / 64; pg->regs[NV_PGRAPH_TEXOFFSET0 + slot * 4] = parameter; pg->texture_dirty[slot] = true; break; CASE_4(NV097_SET_TEXTURE_FORMAT, 64): { - slot = (class_method - NV097_SET_TEXTURE_FORMAT) / 64; + slot = (method - NV097_SET_TEXTURE_FORMAT) / 64; bool dma_select = GET_MASK(parameter, NV097_SET_TEXTURE_FORMAT_CONTEXT_DMA) == 2; @@ -4278,24 +4284,24 @@ static void pgraph_method(NV2AState *d, break; } CASE_4(NV097_SET_TEXTURE_CONTROL0, 64): - slot = (class_method - NV097_SET_TEXTURE_CONTROL0) / 64; + slot = (method - NV097_SET_TEXTURE_CONTROL0) / 64; pg->regs[NV_PGRAPH_TEXCTL0_0 + slot*4] = parameter; break; CASE_4(NV097_SET_TEXTURE_CONTROL1, 64): - slot = (class_method - NV097_SET_TEXTURE_CONTROL1) / 64; + slot = (method - NV097_SET_TEXTURE_CONTROL1) / 64; pg->regs[NV_PGRAPH_TEXCTL1_0 + slot*4] = parameter; break; CASE_4(NV097_SET_TEXTURE_FILTER, 64): - slot = (class_method - NV097_SET_TEXTURE_FILTER) / 64; + slot = (method - NV097_SET_TEXTURE_FILTER) / 64; pg->regs[NV_PGRAPH_TEXFILTER0 + slot * 4] = parameter; break; CASE_4(NV097_SET_TEXTURE_IMAGE_RECT, 64): - slot = (class_method - NV097_SET_TEXTURE_IMAGE_RECT) / 64; + slot = (method - NV097_SET_TEXTURE_IMAGE_RECT) / 64; pg->regs[NV_PGRAPH_TEXIMAGERECT0 + slot * 4] = parameter; pg->texture_dirty[slot] = true; break; CASE_4(NV097_SET_TEXTURE_PALETTE, 64): { - slot = (class_method - NV097_SET_TEXTURE_PALETTE) / 64; + slot = (method - NV097_SET_TEXTURE_PALETTE) / 64; bool dma_select = GET_MASK(parameter, NV097_SET_TEXTURE_PALETTE_CONTEXT_DMA) == 1; @@ -4314,27 +4320,27 @@ static void pgraph_method(NV2AState *d, } CASE_4(NV097_SET_TEXTURE_BORDER_COLOR, 64): - slot = (class_method - NV097_SET_TEXTURE_BORDER_COLOR) / 64; + slot = (method - NV097_SET_TEXTURE_BORDER_COLOR) / 64; pg->regs[NV_PGRAPH_BORDERCOLOR0 + slot * 4] = parameter; break; CASE_4(NV097_SET_TEXTURE_SET_BUMP_ENV_MAT + 0x0, 64): CASE_4(NV097_SET_TEXTURE_SET_BUMP_ENV_MAT + 0x4, 64): CASE_4(NV097_SET_TEXTURE_SET_BUMP_ENV_MAT + 0x8, 64): CASE_4(NV097_SET_TEXTURE_SET_BUMP_ENV_MAT + 0xc, 64): - slot = (class_method - NV097_SET_TEXTURE_SET_BUMP_ENV_MAT) / 4; + slot = (method - NV097_SET_TEXTURE_SET_BUMP_ENV_MAT) / 4; assert((slot / 16) > 0); slot -= 16; pg->bump_env_matrix[slot / 16][slot % 4] = *(float*)¶meter; break; CASE_4(NV097_SET_TEXTURE_SET_BUMP_ENV_SCALE, 64): - slot = (class_method - NV097_SET_TEXTURE_SET_BUMP_ENV_SCALE) / 64; + slot = (method - NV097_SET_TEXTURE_SET_BUMP_ENV_SCALE) / 64; assert(slot > 0); slot--; pg->regs[NV_PGRAPH_BUMPSCALE1 + slot * 4] = parameter; break; CASE_4(NV097_SET_TEXTURE_SET_BUMP_ENV_OFFSET, 64): - slot = (class_method - NV097_SET_TEXTURE_SET_BUMP_ENV_OFFSET) / 64; + slot = (method - NV097_SET_TEXTURE_SET_BUMP_ENV_OFFSET) / 64; assert(slot > 0); slot--; pg->regs[NV_PGRAPH_BUMPOFFSET1 + slot * 4] = parameter; @@ -4385,13 +4391,13 @@ static void pgraph_method(NV2AState *d, break; case NV097_SET_EYE_VECTOR ... NV097_SET_EYE_VECTOR + 8: - slot = (class_method - NV097_SET_EYE_VECTOR) / 4; + slot = (method - NV097_SET_EYE_VECTOR) / 4; pg->regs[NV_PGRAPH_EYEVEC0 + slot * 4] = parameter; break; case NV097_SET_VERTEX_DATA2F_M ... NV097_SET_VERTEX_DATA2F_M + 0x7c: { - slot = (class_method - NV097_SET_VERTEX_DATA2F_M) / 4; + slot = (method - NV097_SET_VERTEX_DATA2F_M) / 4; unsigned int part = slot % 2; slot /= 2; VertexAttribute *attribute = &pg->vertex_attributes[slot]; @@ -4407,7 +4413,7 @@ static void pgraph_method(NV2AState *d, } case NV097_SET_VERTEX_DATA4F_M ... NV097_SET_VERTEX_DATA4F_M + 0xfc: { - slot = (class_method - NV097_SET_VERTEX_DATA4F_M) / 4; + slot = (method - NV097_SET_VERTEX_DATA4F_M) / 4; unsigned int part = slot % 4; slot /= 4; VertexAttribute *attribute = &pg->vertex_attributes[slot]; @@ -4420,7 +4426,7 @@ static void pgraph_method(NV2AState *d, } case NV097_SET_VERTEX_DATA2S ... NV097_SET_VERTEX_DATA2S + 0x3c: { - slot = (class_method - NV097_SET_VERTEX_DATA2S) / 4; + slot = (method - NV097_SET_VERTEX_DATA2S) / 4; assert(false); /* FIXME: Untested! */ VertexAttribute *attribute = &pg->vertex_attributes[slot]; pgraph_allocate_inline_buffer_vertices(pg, slot); @@ -4440,7 +4446,7 @@ static void pgraph_method(NV2AState *d, } case NV097_SET_VERTEX_DATA4UB ... NV097_SET_VERTEX_DATA4UB + 0x3c: { - slot = (class_method - NV097_SET_VERTEX_DATA4UB) / 4; + slot = (method - NV097_SET_VERTEX_DATA4UB) / 4; VertexAttribute *attribute = &pg->vertex_attributes[slot]; pgraph_allocate_inline_buffer_vertices(pg, slot); attribute->inline_value[0] = (parameter & 0xFF) / 255.0; @@ -4455,7 +4461,7 @@ static void pgraph_method(NV2AState *d, } case NV097_SET_VERTEX_DATA4S_M ... NV097_SET_VERTEX_DATA4S_M + 0x7c: { - slot = (class_method - NV097_SET_VERTEX_DATA4S_M) / 4; + slot = (method - NV097_SET_VERTEX_DATA4S_M) / 4; unsigned int part = slot % 2; slot /= 2; assert(false); /* FIXME: Untested! */ @@ -4687,7 +4693,7 @@ static void pgraph_method(NV2AState *d, case NV097_SET_SPECULAR_FOG_FACTOR ... NV097_SET_SPECULAR_FOG_FACTOR + 4: - slot = (class_method - NV097_SET_SPECULAR_FOG_FACTOR) / 4; + slot = (method - NV097_SET_SPECULAR_FOG_FACTOR) / 4; pg->regs[NV_PGRAPH_SPECFOGFACTOR0 + slot*4] = parameter; break; @@ -4697,7 +4703,7 @@ static void pgraph_method(NV2AState *d, case NV097_SET_COMBINER_COLOR_OCW ... NV097_SET_COMBINER_COLOR_OCW + 28: - slot = (class_method - NV097_SET_COMBINER_COLOR_OCW) / 4; + slot = (method - NV097_SET_COMBINER_COLOR_OCW) / 4; pg->regs[NV_PGRAPH_COMBINECOLORO0 + slot*4] = parameter; break; @@ -4750,6 +4756,13 @@ static void pgraph_method(NV2AState *d, NV2A_GL_DPRINTF(true, " unhandled (0x%02x 0x%08x)", object->graphics_class, method); break; + } break; } + + default: + NV2A_GL_DPRINTF(true, " unhandled (0x%02x 0x%08x)", + object->graphics_class, method); + break; + } } diff --git a/hw/xbox/nv2a_int.h b/hw/xbox/nv2a_int.h index 4bf6e3f251..6814a3c49a 100644 --- a/hw/xbox/nv2a_int.h +++ b/hw/xbox/nv2a_int.h @@ -666,49 +666,49 @@ #define NV_CONTEXT_SURFACES_2D 0x0062 -# define NV062_SET_CONTEXT_DMA_IMAGE_SOURCE 0x00620184 -# define NV062_SET_CONTEXT_DMA_IMAGE_DESTIN 0x00620188 -# define NV062_SET_COLOR_FORMAT 0x00620300 +# define NV062_SET_CONTEXT_DMA_IMAGE_SOURCE 0x00000184 +# define NV062_SET_CONTEXT_DMA_IMAGE_DESTIN 0x00000188 +# define NV062_SET_COLOR_FORMAT 0x00000300 # define NV062_SET_COLOR_FORMAT_LE_Y8 0x01 # define NV062_SET_COLOR_FORMAT_LE_A8R8G8B8 0x0A -# define NV062_SET_PITCH 0x00620304 -# define NV062_SET_OFFSET_SOURCE 0x00620308 -# define NV062_SET_OFFSET_DESTIN 0x0062030C +# define NV062_SET_PITCH 0x00000304 +# define NV062_SET_OFFSET_SOURCE 0x00000308 +# define NV062_SET_OFFSET_DESTIN 0x0000030C #define NV_IMAGE_BLIT 0x009F -# define NV09F_SET_CONTEXT_SURFACES 0x009F019C -# define NV09F_SET_OPERATION 0x009F02FC +# define NV09F_SET_CONTEXT_SURFACES 0x0000019C +# define NV09F_SET_OPERATION 0x000002FC # define NV09F_SET_OPERATION_SRCCOPY 3 -# define NV09F_CONTROL_POINT_IN 0x009F0300 -# define NV09F_CONTROL_POINT_OUT 0x009F0304 -# define NV09F_SIZE 0x009F0308 +# define NV09F_CONTROL_POINT_IN 0x00000300 +# define NV09F_CONTROL_POINT_OUT 0x00000304 +# define NV09F_SIZE 0x00000308 #define NV_KELVIN_PRIMITIVE 0x0097 -# define NV097_NO_OPERATION 0x00970100 -# define NV097_WAIT_FOR_IDLE 0x00970110 -# define NV097_SET_FLIP_READ 0x00970120 -# define NV097_SET_FLIP_WRITE 0x00970124 -# define NV097_SET_FLIP_MODULO 0x00970128 -# define NV097_FLIP_INCREMENT_WRITE 0x0097012C -# define NV097_FLIP_STALL 0x00970130 -# define NV097_SET_CONTEXT_DMA_NOTIFIES 0x00970180 -# define NV097_SET_CONTEXT_DMA_A 0x00970184 -# define NV097_SET_CONTEXT_DMA_B 0x00970188 -# define NV097_SET_CONTEXT_DMA_STATE 0x00970190 -# define NV097_SET_CONTEXT_DMA_COLOR 0x00970194 -# define NV097_SET_CONTEXT_DMA_ZETA 0x00970198 -# define NV097_SET_CONTEXT_DMA_VERTEX_A 0x0097019C -# define NV097_SET_CONTEXT_DMA_VERTEX_B 0x009701A0 -# define NV097_SET_CONTEXT_DMA_SEMAPHORE 0x009701A4 -# define NV097_SET_CONTEXT_DMA_REPORT 0x009701A8 -# define NV097_SET_SURFACE_CLIP_HORIZONTAL 0x00970200 +# define NV097_NO_OPERATION 0x00000100 +# define NV097_WAIT_FOR_IDLE 0x00000110 +# define NV097_SET_FLIP_READ 0x00000120 +# define NV097_SET_FLIP_WRITE 0x00000124 +# define NV097_SET_FLIP_MODULO 0x00000128 +# define NV097_FLIP_INCREMENT_WRITE 0x0000012C +# define NV097_FLIP_STALL 0x00000130 +# define NV097_SET_CONTEXT_DMA_NOTIFIES 0x00000180 +# define NV097_SET_CONTEXT_DMA_A 0x00000184 +# define NV097_SET_CONTEXT_DMA_B 0x00000188 +# define NV097_SET_CONTEXT_DMA_STATE 0x00000190 +# define NV097_SET_CONTEXT_DMA_COLOR 0x00000194 +# define NV097_SET_CONTEXT_DMA_ZETA 0x00000198 +# define NV097_SET_CONTEXT_DMA_VERTEX_A 0x0000019C +# define NV097_SET_CONTEXT_DMA_VERTEX_B 0x000001A0 +# define NV097_SET_CONTEXT_DMA_SEMAPHORE 0x000001A4 +# define NV097_SET_CONTEXT_DMA_REPORT 0x000001A8 +# define NV097_SET_SURFACE_CLIP_HORIZONTAL 0x00000200 # define NV097_SET_SURFACE_CLIP_HORIZONTAL_X 0x0000FFFF # define NV097_SET_SURFACE_CLIP_HORIZONTAL_WIDTH 0xFFFF0000 -# define NV097_SET_SURFACE_CLIP_VERTICAL 0x00970204 +# define NV097_SET_SURFACE_CLIP_VERTICAL 0x00000204 # define NV097_SET_SURFACE_CLIP_VERTICAL_Y 0x0000FFFF # define NV097_SET_SURFACE_CLIP_VERTICAL_HEIGHT 0xFFFF0000 -# define NV097_SET_SURFACE_FORMAT 0x00970208 +# define NV097_SET_SURFACE_FORMAT 0x00000208 # define NV097_SET_SURFACE_FORMAT_COLOR 0x0000000F # define NV097_SET_SURFACE_FORMAT_COLOR_LE_X1R5G5B5_Z1R5G5B5 0x01 # define NV097_SET_SURFACE_FORMAT_COLOR_LE_X1R5G5B5_O1R5G5B5 0x02 @@ -732,44 +732,44 @@ # define NV097_SET_SURFACE_FORMAT_ANTI_ALIASING_SQUARE_OFFSET_4 2 # define NV097_SET_SURFACE_FORMAT_WIDTH 0x00FF0000 # define NV097_SET_SURFACE_FORMAT_HEIGHT 0xFF000000 -# define NV097_SET_SURFACE_PITCH 0x0097020C +# define NV097_SET_SURFACE_PITCH 0x0000020C # define NV097_SET_SURFACE_PITCH_COLOR 0x0000FFFF # define NV097_SET_SURFACE_PITCH_ZETA 0xFFFF0000 -# define NV097_SET_SURFACE_COLOR_OFFSET 0x00970210 -# define NV097_SET_SURFACE_ZETA_OFFSET 0x00970214 -# define NV097_SET_COMBINER_ALPHA_ICW 0x00970260 -# define NV097_SET_COMBINER_SPECULAR_FOG_CW0 0x00970288 -# define NV097_SET_COMBINER_SPECULAR_FOG_CW1 0x0097028C -# define NV097_SET_CONTROL0 0x00970290 +# define NV097_SET_SURFACE_COLOR_OFFSET 0x00000210 +# define NV097_SET_SURFACE_ZETA_OFFSET 0x00000214 +# define NV097_SET_COMBINER_ALPHA_ICW 0x00000260 +# define NV097_SET_COMBINER_SPECULAR_FOG_CW0 0x00000288 +# define NV097_SET_COMBINER_SPECULAR_FOG_CW1 0x0000028C +# define NV097_SET_CONTROL0 0x00000290 # define NV097_SET_CONTROL0_STENCIL_WRITE_ENABLE (1 << 0) # define NV097_SET_CONTROL0_Z_FORMAT (1 << 12) # define NV097_SET_CONTROL0_Z_PERSPECTIVE_ENABLE (1 << 16) -# define NV097_SET_FOG_MODE 0x0097029C +# define NV097_SET_FOG_MODE 0x0000029C # define NV097_SET_FOG_MODE_V_LINEAR 0x2601 # define NV097_SET_FOG_MODE_V_EXP 0x800 # define NV097_SET_FOG_MODE_V_EXP2 0x801 # define NV097_SET_FOG_MODE_V_EXP_ABS 0x802 # define NV097_SET_FOG_MODE_V_EXP2_ABS 0x803 # define NV097_SET_FOG_MODE_V_LINEAR_ABS 0x804 -# define NV097_SET_FOG_GEN_MODE 0x009702A0 +# define NV097_SET_FOG_GEN_MODE 0x000002A0 # define NV097_SET_FOG_GEN_MODE_V_SPEC_ALPHA 0 # define NV097_SET_FOG_GEN_MODE_V_RADIAL 1 # define NV097_SET_FOG_GEN_MODE_V_PLANAR 2 # define NV097_SET_FOG_GEN_MODE_V_ABS_PLANAR 3 # define NV097_SET_FOG_GEN_MODE_V_FOG_X 6 -# define NV097_SET_FOG_ENABLE 0x009702A4 -# define NV097_SET_FOG_COLOR 0x009702A8 +# define NV097_SET_FOG_ENABLE 0x000002A4 +# define NV097_SET_FOG_COLOR 0x000002A8 # define NV097_SET_FOG_COLOR_RED 0x000000FF # define NV097_SET_FOG_COLOR_GREEN 0x0000FF00 # define NV097_SET_FOG_COLOR_BLUE 0x00FF0000 # define NV097_SET_FOG_COLOR_ALPHA 0xFF000000 -# define NV097_SET_ALPHA_TEST_ENABLE 0x00970300 -# define NV097_SET_BLEND_ENABLE 0x00970304 -# define NV097_SET_CULL_FACE_ENABLE 0x00970308 -# define NV097_SET_DEPTH_TEST_ENABLE 0x0097030C -# define NV097_SET_DITHER_ENABLE 0x00970310 -# define NV097_SET_LIGHTING_ENABLE 0x00970314 -# define NV097_SET_SKIN_MODE 0x00970328 +# define NV097_SET_ALPHA_TEST_ENABLE 0x00000300 +# define NV097_SET_BLEND_ENABLE 0x00000304 +# define NV097_SET_CULL_FACE_ENABLE 0x00000308 +# define NV097_SET_DEPTH_TEST_ENABLE 0x0000030C +# define NV097_SET_DITHER_ENABLE 0x00000310 +# define NV097_SET_LIGHTING_ENABLE 0x00000314 +# define NV097_SET_SKIN_MODE 0x00000328 # define NV097_SET_SKIN_MODE_OFF 0 # define NV097_SET_SKIN_MODE_2G 1 # define NV097_SET_SKIN_MODE_2 2 @@ -777,13 +777,13 @@ # define NV097_SET_SKIN_MODE_3 4 # define NV097_SET_SKIN_MODE_4G 5 # define NV097_SET_SKIN_MODE_4 6 -# define NV097_SET_STENCIL_TEST_ENABLE 0x0097032C -# define NV097_SET_POLY_OFFSET_POINT_ENABLE 0x00970330 -# define NV097_SET_POLY_OFFSET_LINE_ENABLE 0x00970334 -# define NV097_SET_POLY_OFFSET_FILL_ENABLE 0x00970338 -# define NV097_SET_ALPHA_FUNC 0x0097033C -# define NV097_SET_ALPHA_REF 0x00970340 -# define NV097_SET_BLEND_FUNC_SFACTOR 0x00970344 +# define NV097_SET_STENCIL_TEST_ENABLE 0x0000032C +# define NV097_SET_POLY_OFFSET_POINT_ENABLE 0x00000330 +# define NV097_SET_POLY_OFFSET_LINE_ENABLE 0x00000334 +# define NV097_SET_POLY_OFFSET_FILL_ENABLE 0x00000338 +# define NV097_SET_ALPHA_FUNC 0x0000033C +# define NV097_SET_ALPHA_REF 0x00000340 +# define NV097_SET_BLEND_FUNC_SFACTOR 0x00000344 # define NV097_SET_BLEND_FUNC_SFACTOR_V_ZERO 0x0000 # define NV097_SET_BLEND_FUNC_SFACTOR_V_ONE 0x0001 # define NV097_SET_BLEND_FUNC_SFACTOR_V_SRC_COLOR 0x0300 @@ -799,7 +799,7 @@ # define NV097_SET_BLEND_FUNC_SFACTOR_V_ONE_MINUS_CONSTANT_COLOR 0x8002 # define NV097_SET_BLEND_FUNC_SFACTOR_V_CONSTANT_ALPHA 0x8003 # define NV097_SET_BLEND_FUNC_SFACTOR_V_ONE_MINUS_CONSTANT_ALPHA 0x8004 -# define NV097_SET_BLEND_FUNC_DFACTOR 0x00970348 +# define NV097_SET_BLEND_FUNC_DFACTOR 0x00000348 # define NV097_SET_BLEND_FUNC_DFACTOR_V_ZERO 0x0000 # define NV097_SET_BLEND_FUNC_DFACTOR_V_ONE 0x0001 # define NV097_SET_BLEND_FUNC_DFACTOR_V_SRC_COLOR 0x0300 @@ -815,8 +815,8 @@ # define NV097_SET_BLEND_FUNC_DFACTOR_V_ONE_MINUS_CONSTANT_COLOR 0x8002 # define NV097_SET_BLEND_FUNC_DFACTOR_V_CONSTANT_ALPHA 0x8003 # define NV097_SET_BLEND_FUNC_DFACTOR_V_ONE_MINUS_CONSTANT_ALPHA 0x8004 -# define NV097_SET_BLEND_COLOR 0x0097034C -# define NV097_SET_BLEND_EQUATION 0x00970350 +# define NV097_SET_BLEND_COLOR 0x0000034C +# define NV097_SET_BLEND_EQUATION 0x00000350 # define NV097_SET_BLEND_EQUATION_V_FUNC_SUBTRACT 0x800A # define NV097_SET_BLEND_EQUATION_V_FUNC_REVERSE_SUBTRACT 0x800B # define NV097_SET_BLEND_EQUATION_V_FUNC_ADD 0x8006 @@ -824,20 +824,20 @@ # define NV097_SET_BLEND_EQUATION_V_MAX 0x8008 # define NV097_SET_BLEND_EQUATION_V_FUNC_REVERSE_SUBTRACT_SIGNED 0xF005 # define NV097_SET_BLEND_EQUATION_V_FUNC_ADD_SIGNED 0xF006 -# define NV097_SET_DEPTH_FUNC 0x00970354 -# define NV097_SET_COLOR_MASK 0x00970358 +# define NV097_SET_DEPTH_FUNC 0x00000354 +# define NV097_SET_COLOR_MASK 0x00000358 # define NV097_SET_COLOR_MASK_BLUE_WRITE_ENABLE (1 << 0) # define NV097_SET_COLOR_MASK_GREEN_WRITE_ENABLE (1 << 8) # define NV097_SET_COLOR_MASK_RED_WRITE_ENABLE (1 << 16) # define NV097_SET_COLOR_MASK_ALPHA_WRITE_ENABLE (1 << 24) -# define NV097_SET_DEPTH_MASK 0x0097035C -# define NV097_SET_STENCIL_MASK 0x00970360 -# define NV097_SET_STENCIL_FUNC 0x00970364 -# define NV097_SET_STENCIL_FUNC_REF 0x00970368 -# define NV097_SET_STENCIL_FUNC_MASK 0x0097036C -# define NV097_SET_STENCIL_OP_FAIL 0x00970370 -# define NV097_SET_STENCIL_OP_ZFAIL 0x00970374 -# define NV097_SET_STENCIL_OP_ZPASS 0x00970378 +# define NV097_SET_DEPTH_MASK 0x0000035C +# define NV097_SET_STENCIL_MASK 0x00000360 +# define NV097_SET_STENCIL_FUNC 0x00000364 +# define NV097_SET_STENCIL_FUNC_REF 0x00000368 +# define NV097_SET_STENCIL_FUNC_MASK 0x0000036C +# define NV097_SET_STENCIL_OP_FAIL 0x00000370 +# define NV097_SET_STENCIL_OP_ZFAIL 0x00000374 +# define NV097_SET_STENCIL_OP_ZPASS 0x00000378 # define NV097_SET_STENCIL_OP_V_KEEP 0x1E00 # define NV097_SET_STENCIL_OP_V_ZERO 0x0000 # define NV097_SET_STENCIL_OP_V_REPLACE 0x1E01 @@ -846,80 +846,80 @@ # define NV097_SET_STENCIL_OP_V_INVERT 0x150A # define NV097_SET_STENCIL_OP_V_INCR 0x8507 # define NV097_SET_STENCIL_OP_V_DECR 0x8508 -# define NV097_SET_POLYGON_OFFSET_SCALE_FACTOR 0x00970384 -# define NV097_SET_POLYGON_OFFSET_BIAS 0x00970388 -# define NV097_SET_FRONT_POLYGON_MODE 0x0097038C +# define NV097_SET_POLYGON_OFFSET_SCALE_FACTOR 0x00000384 +# define NV097_SET_POLYGON_OFFSET_BIAS 0x00000388 +# define NV097_SET_FRONT_POLYGON_MODE 0x0000038C # define NV097_SET_FRONT_POLYGON_MODE_V_POINT 0x1B00 # define NV097_SET_FRONT_POLYGON_MODE_V_LINE 0x1B01 # define NV097_SET_FRONT_POLYGON_MODE_V_FILL 0x1B02 -# define NV097_SET_BACK_POLYGON_MODE 0x00970390 -# define NV097_SET_CLIP_MIN 0x00970394 -# define NV097_SET_CLIP_MAX 0x00970398 -# define NV097_SET_CULL_FACE 0x0097039C +# define NV097_SET_BACK_POLYGON_MODE 0x00000390 +# define NV097_SET_CLIP_MIN 0x00000394 +# define NV097_SET_CLIP_MAX 0x00000398 +# define NV097_SET_CULL_FACE 0x0000039C # define NV097_SET_CULL_FACE_V_FRONT 0x404 # define NV097_SET_CULL_FACE_V_BACK 0x405 # define NV097_SET_CULL_FACE_V_FRONT_AND_BACK 0x408 -# define NV097_SET_FRONT_FACE 0x009703A0 +# define NV097_SET_FRONT_FACE 0x000003A0 # define NV097_SET_FRONT_FACE_V_CW 0x900 # define NV097_SET_FRONT_FACE_V_CCW 0x901 -# define NV097_SET_NORMALIZATION_ENABLE 0x009703A4 -# define NV097_SET_LIGHT_ENABLE_MASK 0x009703BC +# define NV097_SET_NORMALIZATION_ENABLE 0x000003A4 +# define NV097_SET_LIGHT_ENABLE_MASK 0x000003BC # define NV097_SET_LIGHT_ENABLE_MASK_LIGHT0_OFF 0 # define NV097_SET_LIGHT_ENABLE_MASK_LIGHT0_INFINITE 1 # define NV097_SET_LIGHT_ENABLE_MASK_LIGHT0_LOCAL 2 # define NV097_SET_LIGHT_ENABLE_MASK_LIGHT0_SPOT 3 -# define NV097_SET_TEXGEN_S 0x009703C0 +# define NV097_SET_TEXGEN_S 0x000003C0 # define NV097_SET_TEXGEN_S_DISABLE 0x0000 # define NV097_SET_TEXGEN_S_EYE_LINEAR 0x2400 # define NV097_SET_TEXGEN_S_OBJECT_LINEAR 0x2401 # define NV097_SET_TEXGEN_S_SPHERE_MAP 0x2402 # define NV097_SET_TEXGEN_S_REFLECTION_MAP 0x8512 # define NV097_SET_TEXGEN_S_NORMAL_MAP 0x8511 -# define NV097_SET_TEXGEN_T 0x009703C4 -# define NV097_SET_TEXGEN_R 0x009703C8 -# define NV097_SET_TEXGEN_Q 0x009703CC -# define NV097_SET_TEXTURE_MATRIX_ENABLE 0x00970420 -# define NV097_SET_PROJECTION_MATRIX 0x00970440 -# define NV097_SET_MODEL_VIEW_MATRIX 0x00970480 -# define NV097_SET_INVERSE_MODEL_VIEW_MATRIX 0x00970580 -# define NV097_SET_COMPOSITE_MATRIX 0x00970680 -# define NV097_SET_TEXTURE_MATRIX 0x009706C0 -# define NV097_SET_FOG_PARAMS 0x009709C0 -# define NV097_SET_TEXGEN_PLANE_S 0x00970840 -# define NV097_SET_TEXGEN_PLANE_T 0x00970850 -# define NV097_SET_TEXGEN_PLANE_R 0x00970860 -# define NV097_SET_TEXGEN_PLANE_Q 0x00970870 -# define NV097_SET_TEXGEN_VIEW_MODEL 0x009709CC +# define NV097_SET_TEXGEN_T 0x000003C4 +# define NV097_SET_TEXGEN_R 0x000003C8 +# define NV097_SET_TEXGEN_Q 0x000003CC +# define NV097_SET_TEXTURE_MATRIX_ENABLE 0x00000420 +# define NV097_SET_PROJECTION_MATRIX 0x00000440 +# define NV097_SET_MODEL_VIEW_MATRIX 0x00000480 +# define NV097_SET_INVERSE_MODEL_VIEW_MATRIX 0x00000580 +# define NV097_SET_COMPOSITE_MATRIX 0x00000680 +# define NV097_SET_TEXTURE_MATRIX 0x000006C0 +# define NV097_SET_FOG_PARAMS 0x000009C0 +# define NV097_SET_TEXGEN_PLANE_S 0x00000840 +# define NV097_SET_TEXGEN_PLANE_T 0x00000850 +# define NV097_SET_TEXGEN_PLANE_R 0x00000860 +# define NV097_SET_TEXGEN_PLANE_Q 0x00000870 +# define NV097_SET_TEXGEN_VIEW_MODEL 0x000009CC # define NV097_SET_TEXGEN_VIEW_MODEL_LOCAL_VIEWER 0 # define NV097_SET_TEXGEN_VIEW_MODEL_INFINITE_VIEWER 1 -# define NV097_SET_FOG_PLANE 0x009709D0 -# define NV097_SET_SCENE_AMBIENT_COLOR 0x00970A10 -# define NV097_SET_VIEWPORT_OFFSET 0x00970A20 -# define NV097_SET_EYE_POSITION 0x00970A50 -# define NV097_SET_COMBINER_FACTOR0 0x00970A60 -# define NV097_SET_COMBINER_FACTOR1 0x00970A80 -# define NV097_SET_COMBINER_ALPHA_OCW 0x00970AA0 -# define NV097_SET_COMBINER_COLOR_ICW 0x00970AC0 -# define NV097_SET_VIEWPORT_SCALE 0x00970AF0 -# define NV097_SET_TRANSFORM_PROGRAM 0x00970B00 -# define NV097_SET_TRANSFORM_CONSTANT 0x00970B80 -# define NV097_SET_VERTEX3F 0x00971500 -# define NV097_SET_BACK_LIGHT_AMBIENT_COLOR 0x00970C00 -# define NV097_SET_BACK_LIGHT_DIFFUSE_COLOR 0x00970C0C -# define NV097_SET_BACK_LIGHT_SPECULAR_COLOR 0x00970C18 -# define NV097_SET_LIGHT_AMBIENT_COLOR 0x00971000 -# define NV097_SET_LIGHT_DIFFUSE_COLOR 0x0097100C -# define NV097_SET_LIGHT_SPECULAR_COLOR 0x00971018 -# define NV097_SET_LIGHT_LOCAL_RANGE 0x00971024 -# define NV097_SET_LIGHT_INFINITE_HALF_VECTOR 0x00971028 -# define NV097_SET_LIGHT_INFINITE_DIRECTION 0x00971034 -# define NV097_SET_LIGHT_SPOT_FALLOFF 0x00971040 -# define NV097_SET_LIGHT_SPOT_DIRECTION 0x0097104C -# define NV097_SET_LIGHT_LOCAL_POSITION 0x0097105C -# define NV097_SET_LIGHT_LOCAL_ATTENUATION 0x00971068 -# define NV097_SET_VERTEX4F 0x00971518 -# define NV097_SET_VERTEX_DATA_ARRAY_OFFSET 0x00971720 -# define NV097_SET_VERTEX_DATA_ARRAY_FORMAT 0x00971760 +# define NV097_SET_FOG_PLANE 0x000009D0 +# define NV097_SET_SCENE_AMBIENT_COLOR 0x00000A10 +# define NV097_SET_VIEWPORT_OFFSET 0x00000A20 +# define NV097_SET_EYE_POSITION 0x00000A50 +# define NV097_SET_COMBINER_FACTOR0 0x00000A60 +# define NV097_SET_COMBINER_FACTOR1 0x00000A80 +# define NV097_SET_COMBINER_ALPHA_OCW 0x00000AA0 +# define NV097_SET_COMBINER_COLOR_ICW 0x00000AC0 +# define NV097_SET_VIEWPORT_SCALE 0x00000AF0 +# define NV097_SET_TRANSFORM_PROGRAM 0x00000B00 +# define NV097_SET_TRANSFORM_CONSTANT 0x00000B80 +# define NV097_SET_VERTEX3F 0x00001500 +# define NV097_SET_BACK_LIGHT_AMBIENT_COLOR 0x00000C00 +# define NV097_SET_BACK_LIGHT_DIFFUSE_COLOR 0x00000C0C +# define NV097_SET_BACK_LIGHT_SPECULAR_COLOR 0x00000C18 +# define NV097_SET_LIGHT_AMBIENT_COLOR 0x00001000 +# define NV097_SET_LIGHT_DIFFUSE_COLOR 0x0000100C +# define NV097_SET_LIGHT_SPECULAR_COLOR 0x00001018 +# define NV097_SET_LIGHT_LOCAL_RANGE 0x00001024 +# define NV097_SET_LIGHT_INFINITE_HALF_VECTOR 0x00001028 +# define NV097_SET_LIGHT_INFINITE_DIRECTION 0x00001034 +# define NV097_SET_LIGHT_SPOT_FALLOFF 0x00001040 +# define NV097_SET_LIGHT_SPOT_DIRECTION 0x0000104C +# define NV097_SET_LIGHT_LOCAL_POSITION 0x0000105C +# define NV097_SET_LIGHT_LOCAL_ATTENUATION 0x00001068 +# define NV097_SET_VERTEX4F 0x00001518 +# define NV097_SET_VERTEX_DATA_ARRAY_OFFSET 0x00001720 +# define NV097_SET_VERTEX_DATA_ARRAY_FORMAT 0x00001760 # define NV097_SET_VERTEX_DATA_ARRAY_FORMAT_TYPE 0x0000000F # define NV097_SET_VERTEX_DATA_ARRAY_FORMAT_TYPE_UB_D3D 0 # define NV097_SET_VERTEX_DATA_ARRAY_FORMAT_TYPE_S1 1 @@ -929,19 +929,19 @@ # define NV097_SET_VERTEX_DATA_ARRAY_FORMAT_TYPE_CMP 6 # define NV097_SET_VERTEX_DATA_ARRAY_FORMAT_SIZE 0x000000F0 # define NV097_SET_VERTEX_DATA_ARRAY_FORMAT_STRIDE 0xFFFFFF00 -# define NV097_SET_LOGIC_OP_ENABLE 0x009717BC -# define NV097_SET_LOGIC_OP 0x009717C0 -# define NV097_CLEAR_REPORT_VALUE 0x009717C8 +# define NV097_SET_LOGIC_OP_ENABLE 0x000017BC +# define NV097_SET_LOGIC_OP 0x000017C0 +# define NV097_CLEAR_REPORT_VALUE 0x000017C8 # define NV097_CLEAR_REPORT_VALUE_TYPE 0xFFFFFFFF # define NV097_CLEAR_REPORT_VALUE_TYPE_ZPASS_PIXEL_CNT 1 -# define NV097_SET_ZPASS_PIXEL_COUNT_ENABLE 0x009717CC -# define NV097_GET_REPORT 0x009717D0 +# define NV097_SET_ZPASS_PIXEL_COUNT_ENABLE 0x000017CC +# define NV097_GET_REPORT 0x000017D0 # define NV097_GET_REPORT_OFFSET 0x00FFFFFF # define NV097_GET_REPORT_TYPE 0xFF000000 # define NV097_GET_REPORT_TYPE_ZPASS_PIXEL_CNT 1 -# define NV097_SET_EYE_DIRECTION 0x009717E0 -# define NV097_SET_SHADER_CLIP_PLANE_MODE 0x009717F8 -# define NV097_SET_BEGIN_END 0x009717FC +# define NV097_SET_EYE_DIRECTION 0x000017E0 +# define NV097_SET_SHADER_CLIP_PLANE_MODE 0x000017F8 +# define NV097_SET_BEGIN_END 0x000017FC # define NV097_SET_BEGIN_END_OP_END 0x00 # define NV097_SET_BEGIN_END_OP_POINTS 0x01 # define NV097_SET_BEGIN_END_OP_LINES 0x02 @@ -953,20 +953,20 @@ # define NV097_SET_BEGIN_END_OP_QUADS 0x08 # define NV097_SET_BEGIN_END_OP_QUAD_STRIP 0x09 # define NV097_SET_BEGIN_END_OP_POLYGON 0x0A -# define NV097_ARRAY_ELEMENT16 0x00971800 -# define NV097_ARRAY_ELEMENT32 0x00971808 -# define NV097_DRAW_ARRAYS 0x00971810 +# define NV097_ARRAY_ELEMENT16 0x00001800 +# define NV097_ARRAY_ELEMENT32 0x00001808 +# define NV097_DRAW_ARRAYS 0x00001810 # define NV097_DRAW_ARRAYS_COUNT 0xFF000000 # define NV097_DRAW_ARRAYS_START_INDEX 0x00FFFFFF -# define NV097_INLINE_ARRAY 0x00971818 -# define NV097_SET_EYE_VECTOR 0x0097181C -# define NV097_SET_VERTEX_DATA2F_M 0x00971880 -# define NV097_SET_VERTEX_DATA4F_M 0x00971A00 -# define NV097_SET_VERTEX_DATA2S 0x00971900 -# define NV097_SET_VERTEX_DATA4UB 0x00971940 -# define NV097_SET_VERTEX_DATA4S_M 0x00971980 -# define NV097_SET_TEXTURE_OFFSET 0x00971B00 -# define NV097_SET_TEXTURE_FORMAT 0x00971B04 +# define NV097_INLINE_ARRAY 0x00001818 +# define NV097_SET_EYE_VECTOR 0x0000181C +# define NV097_SET_VERTEX_DATA2F_M 0x00001880 +# define NV097_SET_VERTEX_DATA4F_M 0x00001A00 +# define NV097_SET_VERTEX_DATA2S 0x00001900 +# define NV097_SET_VERTEX_DATA4UB 0x00001940 +# define NV097_SET_VERTEX_DATA4S_M 0x00001980 +# define NV097_SET_TEXTURE_OFFSET 0x00001B00 +# define NV097_SET_TEXTURE_FORMAT 0x00001B04 # define NV097_SET_TEXTURE_FORMAT_CONTEXT_DMA 0x00000003 # define NV097_SET_TEXTURE_FORMAT_CUBEMAP_ENABLE (1 << 2) # define NV097_SET_TEXTURE_FORMAT_BORDER_SOURCE (1 << 3) @@ -1014,14 +1014,14 @@ # define NV097_SET_TEXTURE_FORMAT_BASE_SIZE_U 0x00F00000 # define NV097_SET_TEXTURE_FORMAT_BASE_SIZE_V 0x0F000000 # define NV097_SET_TEXTURE_FORMAT_BASE_SIZE_P 0xF0000000 -# define NV097_SET_TEXTURE_ADDRESS 0x00971B08 -# define NV097_SET_TEXTURE_CONTROL0 0x00971B0C +# define NV097_SET_TEXTURE_ADDRESS 0x00001B08 +# define NV097_SET_TEXTURE_CONTROL0 0x00001B0C # define NV097_SET_TEXTURE_CONTROL0_ENABLE (1 << 30) # define NV097_SET_TEXTURE_CONTROL0_MIN_LOD_CLAMP 0x3FFC0000 # define NV097_SET_TEXTURE_CONTROL0_MAX_LOD_CLAMP 0x0003FFC0 -# define NV097_SET_TEXTURE_CONTROL1 0x00971B10 +# define NV097_SET_TEXTURE_CONTROL1 0x00001B10 # define NV097_SET_TEXTURE_CONTROL1_IMAGE_PITCH 0xFFFF0000 -# define NV097_SET_TEXTURE_FILTER 0x00971B14 +# define NV097_SET_TEXTURE_FILTER 0x00001B14 # define NV097_SET_TEXTURE_FILTER_MIPMAP_LOD_BIAS 0x00001FFF # define NV097_SET_TEXTURE_FILTER_MIN 0x00FF0000 # define NV097_SET_TEXTURE_FILTER_MAG 0x0F000000 @@ -1029,10 +1029,10 @@ # define NV097_SET_TEXTURE_FILTER_RSIGNED (1 << 29) # define NV097_SET_TEXTURE_FILTER_GSIGNED (1 << 30) # define NV097_SET_TEXTURE_FILTER_BSIGNED (1 << 31) -# define NV097_SET_TEXTURE_IMAGE_RECT 0x00971B1C +# define NV097_SET_TEXTURE_IMAGE_RECT 0x00001B1C # define NV097_SET_TEXTURE_IMAGE_RECT_WIDTH 0xFFFF0000 # define NV097_SET_TEXTURE_IMAGE_RECT_HEIGHT 0x0000FFFF -# define NV097_SET_TEXTURE_PALETTE 0x00971B20 +# define NV097_SET_TEXTURE_PALETTE 0x00001B20 # define NV097_SET_TEXTURE_PALETTE_CONTEXT_DMA (1 << 0) # define NV097_SET_TEXTURE_PALETTE_LENGTH 0x0000000C # define NV097_SET_TEXTURE_PALETTE_LENGTH_256 0 @@ -1040,15 +1040,15 @@ # define NV097_SET_TEXTURE_PALETTE_LENGTH_64 2 # define NV097_SET_TEXTURE_PALETTE_LENGTH_32 3 # define NV097_SET_TEXTURE_PALETTE_OFFSET 0xFFFFFFC0 -# define NV097_SET_TEXTURE_BORDER_COLOR 0x00971B24 -# define NV097_SET_TEXTURE_SET_BUMP_ENV_MAT 0x00971B28 -# define NV097_SET_TEXTURE_SET_BUMP_ENV_SCALE 0x00971B38 -# define NV097_SET_TEXTURE_SET_BUMP_ENV_OFFSET 0x00971B3C -# define NV097_SET_SEMAPHORE_OFFSET 0x00971D6C -# define NV097_BACK_END_WRITE_SEMAPHORE_RELEASE 0x00971D70 -# define NV097_SET_ZSTENCIL_CLEAR_VALUE 0x00971D8C -# define NV097_SET_COLOR_CLEAR_VALUE 0x00971D90 -# define NV097_CLEAR_SURFACE 0x00971D94 +# define NV097_SET_TEXTURE_BORDER_COLOR 0x00001B24 +# define NV097_SET_TEXTURE_SET_BUMP_ENV_MAT 0x00001B28 +# define NV097_SET_TEXTURE_SET_BUMP_ENV_SCALE 0x00001B38 +# define NV097_SET_TEXTURE_SET_BUMP_ENV_OFFSET 0x00001B3C +# define NV097_SET_SEMAPHORE_OFFSET 0x00001D6C +# define NV097_BACK_END_WRITE_SEMAPHORE_RELEASE 0x00001D70 +# define NV097_SET_ZSTENCIL_CLEAR_VALUE 0x00001D8C +# define NV097_SET_COLOR_CLEAR_VALUE 0x00001D90 +# define NV097_CLEAR_SURFACE 0x00001D94 # define NV097_CLEAR_SURFACE_Z (1 << 0) # define NV097_CLEAR_SURFACE_STENCIL (1 << 1) # define NV097_CLEAR_SURFACE_COLOR 0x000000F0 @@ -1056,21 +1056,21 @@ # define NV097_CLEAR_SURFACE_G (1 << 5) # define NV097_CLEAR_SURFACE_B (1 << 6) # define NV097_CLEAR_SURFACE_A (1 << 7) -# define NV097_SET_CLEAR_RECT_HORIZONTAL 0x00971D98 -# define NV097_SET_CLEAR_RECT_VERTICAL 0x00971D9C -# define NV097_SET_SPECULAR_FOG_FACTOR 0x00971E20 -# define NV097_SET_COMBINER_COLOR_OCW 0x00971E40 -# define NV097_SET_COMBINER_CONTROL 0x00971E60 -# define NV097_SET_SHADOW_ZSLOPE_THRESHOLD 0x00971E68 -# define NV097_SET_SHADER_STAGE_PROGRAM 0x00971E70 -# define NV097_SET_SHADER_OTHER_STAGE_INPUT 0x00971E78 -# define NV097_SET_TRANSFORM_EXECUTION_MODE 0x00971E94 +# define NV097_SET_CLEAR_RECT_HORIZONTAL 0x00001D98 +# define NV097_SET_CLEAR_RECT_VERTICAL 0x00001D9C +# define NV097_SET_SPECULAR_FOG_FACTOR 0x00001E20 +# define NV097_SET_COMBINER_COLOR_OCW 0x00001E40 +# define NV097_SET_COMBINER_CONTROL 0x00001E60 +# define NV097_SET_SHADOW_ZSLOPE_THRESHOLD 0x00001E68 +# define NV097_SET_SHADER_STAGE_PROGRAM 0x00001E70 +# define NV097_SET_SHADER_OTHER_STAGE_INPUT 0x00001E78 +# define NV097_SET_TRANSFORM_EXECUTION_MODE 0x00001E94 # define NV097_SET_TRANSFORM_EXECUTION_MODE_MODE 0x00000003 # define NV097_SET_TRANSFORM_EXECUTION_MODE_RANGE_MODE 0xFFFFFFFC -# define NV097_SET_TRANSFORM_PROGRAM_CXT_WRITE_EN 0x00971E98 -# define NV097_SET_TRANSFORM_PROGRAM_LOAD 0x00971E9C -# define NV097_SET_TRANSFORM_PROGRAM_START 0x00971EA0 -# define NV097_SET_TRANSFORM_CONSTANT_LOAD 0x00971EA4 +# define NV097_SET_TRANSFORM_PROGRAM_CXT_WRITE_EN 0x00001E98 +# define NV097_SET_TRANSFORM_PROGRAM_LOAD 0x00001E9C +# define NV097_SET_TRANSFORM_PROGRAM_START 0x00001EA0 +# define NV097_SET_TRANSFORM_CONSTANT_LOAD 0x00001EA4 /* vertex processing (cheops) context layout */ #define NV_IGRAPH_XF_XFCTX_CMAT0 0x00