trunk/src/emu/video/vooddefs.h
| r32015 | r32016 | |
| 1346 | 1346 | #define TEXDETAIL_ALPHA_MAG_FILTER(val) (((val) >> 20) & 1) /* Voodoo 2 only */ |
| 1347 | 1347 | #define TEXDETAIL_SEPARATE_RGBA_FILTER(val) (((val) >> 21) & 1) /* Voodoo 2 only */ |
| 1348 | 1348 | |
| 1349 | #define TREXINIT_SEND_TMU_CONFIG(val) (((val) >> 18) & 1) |
| 1349 | 1350 | |
| 1350 | 1351 | |
| 1351 | 1352 | /************************************* |
| r32015 | r32016 | |
| 1724 | 1725 | int next_rasterizer; /* next rasterizer index */ |
| 1725 | 1726 | raster_info rasterizer[MAX_RASTERIZERS]; /* array of rasterizers */ |
| 1726 | 1727 | raster_info * raster_hash[RASTER_HASH_SIZE]; /* hash table of rasterizers */ |
| 1728 | |
| 1729 | bool send_config; |
| 1730 | UINT32 tmu_config; |
| 1727 | 1731 | }; |
| 1728 | 1732 | |
| 1729 | 1733 | |
| r32015 | r32016 | |
| 3642 | 3646 | /* result in texel */ \ |
| 3643 | 3647 | /* note that they set LOD min to 8 to "disable" a TMU */ \ |
| 3644 | 3648 | if (TMUS >= 1 && v->tmu[0].lodmin < (8 << 8)) \ |
| 3645 | | TEXTURE_PIPELINE(&v->tmu[0], x, dither4, TEXMODE0, texel, \ |
| 3646 | | v->tmu[0].lookup, extra->lodbase0, \ |
| 3647 | | iters0, itert0, iterw0, texel); \ |
| 3649 | { \ |
| 3650 | if (!v->send_config) \ |
| 3651 | { \ |
| 3652 | TEXTURE_PIPELINE(&v->tmu[0], x, dither4, TEXMODE0, texel, \ |
| 3653 | v->tmu[0].lookup, extra->lodbase0, \ |
| 3654 | iters0, itert0, iterw0, texel); \ |
| 3655 | } \ |
| 3656 | else \ |
| 3657 | { \ |
| 3658 | texel.u=v->tmu_config; \ |
| 3659 | } \ |
| 3660 | } \ |
| 3648 | 3661 | \ |
| 3649 | 3662 | /* colorpath pipeline selects source colors and does blending */ \ |
| 3650 | 3663 | CLAMPED_ARGB(iterr, iterg, iterb, itera, FBZCOLORPATH, iterargb); \ |
trunk/src/emu/video/voodoo.c
| r32015 | r32016 | |
| 2885 | 2885 | } |
| 2886 | 2886 | break; |
| 2887 | 2887 | |
| 2888 | case trexInit1: |
| 2889 | /* send tmu config data to the frame buffer */ |
| 2890 | v->send_config = (TREXINIT_SEND_TMU_CONFIG(data) > 0); |
| 2891 | goto default_case; |
| 2892 | break; |
| 2893 | |
| 2888 | 2894 | /* these registers are referenced in the renderer; we must wait for pending work before changing */ |
| 2889 | 2895 | case chromaRange: |
| 2890 | 2896 | case chromaKey: |
| r32015 | r32016 | |
| 2901 | 2907 | |
| 2902 | 2908 | /* by default, just feed the data to the chips */ |
| 2903 | 2909 | default: |
| 2910 | default_case: |
| 2904 | 2911 | if (chips & 1) v->reg[0x000 + regnum].u = data; |
| 2905 | 2912 | if (chips & 2) v->reg[0x100 + regnum].u = data; |
| 2906 | 2913 | if (chips & 4) v->reg[0x200 + regnum].u = data; |
| r32015 | r32016 | |
| 4913 | 4920 | } |
| 4914 | 4921 | } |
| 4915 | 4922 | |
| 4923 | v->tmu_config = 0x11; // revision 1 |
| 4924 | |
| 4916 | 4925 | /* configure type-specific values */ |
| 4917 | 4926 | switch (v->type) |
| 4918 | 4927 | { |
| r32015 | r32016 | |
| 4928 | 4937 | v->regnames = voodoo_reg_name; |
| 4929 | 4938 | v->alt_regmap = 0; |
| 4930 | 4939 | v->fbi.lfb_stride = 10; |
| 4940 | v->tmu_config |= 0x800; |
| 4931 | 4941 | break; |
| 4932 | 4942 | |
| 4933 | 4943 | case TYPE_VOODOO_BANSHEE: |
| r32015 | r32016 | |
| 4963 | 4973 | assert_always(v->screen != NULL, "Unable to find screen attached to voodoo"); |
| 4964 | 4974 | v->cpu = machine().device(m_cputag); |
| 4965 | 4975 | assert_always(v->cpu != NULL, "Unable to find CPU attached to voodoo"); |
| 4976 | |
| 4977 | if (m_tmumem1 != 0) |
| 4978 | v->tmu_config |= 0xc0; // two TMUs |
| 4979 | |
| 4966 | 4980 | v->chipmask = 0x01; |
| 4967 | 4981 | v->attoseconds_per_cycle = ATTOSECONDS_PER_SECOND / v->freq; |
| 4968 | 4982 | v->trigger = 51324 + v->index; |
| r32015 | r32016 | |
| 5007 | 5021 | { |
| 5008 | 5022 | init_tmu(v, &v->tmu[1], &v->reg[0x200], tmumem[1], m_tmumem1 << 20); |
| 5009 | 5023 | v->chipmask |= 0x04; |
| 5024 | v->tmu_config |= 0x40; |
| 5010 | 5025 | } |
| 5011 | 5026 | |
| 5012 | 5027 | /* initialize some registers */ |