Previous 199869 Revisions Next

r32016 Tuesday 9th September, 2014 at 07:44:33 UTC by Tafoid
voodoo.c, vooddefs.h: Added support for writes to trexInit1 register, to return TMU configuration data.  [Peter Ferrie]
[src/emu/video]vooddefs.h voodoo.c

trunk/src/emu/video/vooddefs.h
r32015r32016
13461346#define TEXDETAIL_ALPHA_MAG_FILTER(val)     (((val) >> 20) & 1)     /* Voodoo 2 only */
13471347#define TEXDETAIL_SEPARATE_RGBA_FILTER(val) (((val) >> 21) & 1)     /* Voodoo 2 only */
13481348
1349#define TREXINIT_SEND_TMU_CONFIG(val)       (((val) >> 18) & 1)
13491350
13501351
13511352/*************************************
r32015r32016
17241725   int                 next_rasterizer;        /* next rasterizer index */
17251726   raster_info         rasterizer[MAX_RASTERIZERS]; /* array of rasterizers */
17261727   raster_info *       raster_hash[RASTER_HASH_SIZE]; /* hash table of rasterizers */
1728
1729   bool            send_config;
1730   UINT32            tmu_config;
17271731};
17281732
17291733
r32015r32016
36423646      /* result in texel */                                                   \
36433647      /* note that they set LOD min to 8 to "disable" a TMU */                \
36443648      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                }                                                                   \
36483661                                                            \
36493662      /* colorpath pipeline selects source colors and does blending */        \
36503663      CLAMPED_ARGB(iterr, iterg, iterb, itera, FBZCOLORPATH, iterargb);       \
trunk/src/emu/video/voodoo.c
r32015r32016
28852885         }
28862886         break;
28872887
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
28882894      /* these registers are referenced in the renderer; we must wait for pending work before changing */
28892895      case chromaRange:
28902896      case chromaKey:
r32015r32016
29012907
29022908      /* by default, just feed the data to the chips */
29032909      default:
2910default_case:
29042911         if (chips & 1) v->reg[0x000 + regnum].u = data;
29052912         if (chips & 2) v->reg[0x100 + regnum].u = data;
29062913         if (chips & 4) v->reg[0x200 + regnum].u = data;
r32015r32016
49134920      }
49144921   }
49154922
4923   v->tmu_config = 0x11;   // revision 1
4924
49164925   /* configure type-specific values */
49174926   switch (v->type)
49184927   {
r32015r32016
49284937         v->regnames = voodoo_reg_name;
49294938         v->alt_regmap = 0;
49304939         v->fbi.lfb_stride = 10;
4940         v->tmu_config |= 0x800;
49314941         break;
49324942
49334943      case TYPE_VOODOO_BANSHEE:
r32015r32016
49634973   assert_always(v->screen != NULL, "Unable to find screen attached to voodoo");
49644974   v->cpu = machine().device(m_cputag);
49654975   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
49664980   v->chipmask = 0x01;
49674981   v->attoseconds_per_cycle = ATTOSECONDS_PER_SECOND / v->freq;
49684982   v->trigger = 51324 + v->index;
r32015r32016
50075021   {
50085022      init_tmu(v, &v->tmu[1], &v->reg[0x200], tmumem[1], m_tmumem1 << 20);
50095023      v->chipmask |= 0x04;
5024      v->tmu_config |= 0x40;
50105025   }
50115026
50125027   /* initialize some registers */

Previous 199869 Revisions Next


© 1997-2024 The MAME Team