Previous 15994 Revisions Next

r10505 Saturday 19th February, 2011 at 11:55:11 UTC by Miodrag Milanović
Sync with MAME
[src/emu]clifront.c schedule.c schedule.h
[src/emu/cpu/tlcs90]tlcs90.c
[src/emu/sound]disc_mth.c disc_wav.c multipcm.c okim9810.c okim9810.h
[src/osd/sdl]drawogl.c

src/osd/sdl/drawogl.c
r10504r10505
303303#else
304304INLINE HashT texture_compute_hash(const render_texinfo *texture, UINT32 flags)
305305{
306   HashT h = (HashT)texture ^ (flags & (PRIMFLAG_BLENDMODE_MASK | PRIMFLAG_TEXFORMAT_MASK));
306   HashT h = (HashT)texture->base ^ (flags & (PRIMFLAG_BLENDMODE_MASK | PRIMFLAG_TEXFORMAT_MASK));
307307   //printf("hash %d\n", (int) h % HASH_SIZE);
308308   return (h >> 8) % HASH_SIZE;
309309}
r10504r10505
17671767        (
17681768       texture->format==SDL_TEXFORMAT_PALETTE16 ||       // glsl idx16 lut
17691769            texture->format==SDL_TEXFORMAT_RGB32_PALETTED ||  // glsl rgb32 lut/direct
1770            texture->format==SDL_TEXFORMAT_RGB15_PALETTED     // glsl rgb15 lut/direct
1770             texture->format==SDL_TEXFORMAT_RGB32 ||
1771             texture->format==SDL_TEXFORMAT_RGB15_PALETTED ||    // glsl rgb15 lut/direct
1772             texture->format==SDL_TEXFORMAT_RGB15
17711773        ) &&
17721774        texture->xprescale == 1 && texture->yprescale == 1 &&
17731775        texsource->rowpixels <= sdl->texture_max_width
r10504r10505
20522054   switch(texture->format)
20532055   {
20542056      case SDL_TEXFORMAT_RGB32_PALETTED:
2057      case SDL_TEXFORMAT_RGB32:
20552058         glsl_shader_type          = glsl_shader_type_rgb32;
20562059         texture->lut_table_width  = 1 << 8; // 8 bits per component
20572060         texture->lut_table_width *= 3;      // BGR ..
20582061         break;
20592062
20602063      case SDL_TEXFORMAT_RGB15_PALETTED:
2064      case SDL_TEXFORMAT_RGB15:
20612065         glsl_shader_type          = glsl_shader_type_rgb32;
20622066         texture->lut_table_width  = 1 << 5; // 5 bits per component
20632067         texture->lut_table_width *= 3;      // BGR ..
r10504r10505
20872091     *
20882092     * Shape the lut texture to achieve texture max size compliance and equal 2D partitioning
20892093     */
2090   lut_texture_width  = sqrt((double)(texture->lut_table_width));
2091   lut_texture_width  = get_valid_pow2_value (lut_texture_width, 1);
2092
2093   texture->lut_table_height = texture->lut_table_width / lut_texture_width;
2094
2095   if ( lut_texture_width*texture->lut_table_height < texture->lut_table_width )
2094   
2095   if ( texture->format == SDL_TEXFORMAT_PALETTE16 )
20962096   {
2097      texture->lut_table_height  += 1;
2097      lut_texture_width  = sqrt((double)(texture->lut_table_width));
2098      lut_texture_width  = get_valid_pow2_value (lut_texture_width, 1);
2099     
2100      texture->lut_table_height = texture->lut_table_width / lut_texture_width;
2101     
2102      if ( lut_texture_width*texture->lut_table_height < texture->lut_table_width )
2103      {
2104         texture->lut_table_height  += 1;
2105      }
2106     
2107      texture->lut_table_width   = lut_texture_width;
2108   }
2109   else
2110   {
2111      lut_texture_width = texture->lut_table_width;
2112      texture->lut_table_height = 1;
20982113   }
20992114
2100   texture->lut_table_width   = lut_texture_width;
2101
21022115   /**
21032116     * always use pow2 for LUT, to minimize the chance for floating point arithmetic errors
21042117     * (->buggy GLSL engine)
src/emu/cpu/tlcs90/tlcs90.c
r10504r10505
2121   MODE_MI16,   MODE_MR16,   MODE_MR16D8,   MODE_MR16R8,
2222   MODE_R16D8,   MODE_R16R8
2323}   e_mode;
24ALLOW_SAVE_TYPE(e_mode); // allow save_item on a non-fundamental type
2425
2526typedef UINT16 e_r;
2627
src/emu/sound/okim9810.c
r10504r10505
4040   0x04,   // -30.0 dB
4141};
4242
43// sampling frequency lookup table.
44const UINT32 okim9810_device::s_sampling_freq_table[16] =
45{
46    4000,
47    8000,
48    16000,
49    32000,
50    0,
51    6400,
52    12800,
53    25600,
54    0,
55    5300,
56    10600,
57    21200,
58    0,
59    0,
60    0,
61    0
62};
63
4364// default address map
4465static ADDRESS_MAP_START( okim9810, 0, 8 )
4566    AM_RANGE(0x000000, 0xffffff) AM_ROM
r10504r10505
294315            endAddr |= m_direct->read_raw_byte(base + 6) << 8;
295316            endAddr |= m_direct->read_raw_byte(base + 7) << 0;
296317
318         // Sub-table
319            if (startFlags & 0x80)
320            {
321                // TODO: Offset (oldStart+0) and (oldStart+4) are currently ignored - can the chaining continue?
322                offs_t oldStart = startAddr;
323                startAddr  = m_direct->read_raw_byte(oldStart + 1) << 16;
324                startAddr |= m_direct->read_raw_byte(oldStart + 2) << 8;
325                startAddr |= m_direct->read_raw_byte(oldStart + 3) << 0;
326               
327                endAddr  = m_direct->read_raw_byte(oldStart + 5) << 16;
328                endAddr |= m_direct->read_raw_byte(oldStart + 6) << 8;
329                endAddr |= m_direct->read_raw_byte(oldStart + 7) << 0;
330            }
331
297332            mame_printf_verbose("FADR  channel %d phrase offset %02x => ", channel, m_TMP_register);
298333            mame_printf_verbose("\tstartFlags(%02x) startAddr(%06x) endFlags(%02x) endAddr(%06x) bytes(%d)\n", startFlags, startAddr, endFlags, endAddr, endAddr-startAddr);
299334            m_voice[channel].m_sample = 0;
r10504r10505
314349
315350        case 0x06:  // DADR (direct address playback)
316351        {
317            mame_printf_warning("DADR  channel %d complex data %02x\n", channel, m_TMP_register);
352            mame_printf_warning("DADR  channel %d complex data %02x\n", channel, m_TMP_register);
318353            mame_printf_warning("MSM9810: UNIMPLEMENTED COMMAND!\n");
319354            break;
320355        }
321356        case 0x07:  // CVOL (channel volume)
322357        {
323            mame_printf_verbose("CVOL  channel %d volume level %02x\n", channel, m_TMP_register);
358            mame_printf_verbose("CVOL  channel %d volume level %02x\n", channel, m_TMP_register);
324359            mame_printf_verbose("\tChannel %d -> volume %d.\n", channel, s_volume_table[m_TMP_register & 0x0f]);
325360
326361            m_voice[channel].m_volume = s_volume_table[m_TMP_register & 0x0f];
src/emu/sound/okim9810.h
r10504r10505
3333    OKIM9810_NONLINEAR8_PLAYBACK = 3
3434};
3535
36enum
37{
38   OKIM9810_SECONDARY_FILTER = 0,
39   OKIM9810_PRIMARY_FILTER = 1,
40    OKIM9810_NO_FILTER = 2,
41    OKIM9810_NO_FILTER2 = 3
42};
3643
44enum
45{
46   OKIM9810_OUTPUT_TO_DIRECT_DAC = 0,
47   OKIM9810_OUTPUT_TO_VOLTAGE_FOLLOWER = 1
48};
49
50
3751//**************************************************************************
3852//  INTERFACE CONFIGURATION MACROS
3953//**************************************************************************
r10504r10505
144158   okim_voice m_voice[OKIM9810_VOICES];
145159
146160   static const UINT8 s_volume_table[16];
161    static const UINT32 s_sampling_freq_table[16];
147162};
148163
149164
src/emu/sound/disc_mth.c
r10504r10505
108108
109109   int i, bit;
110110   int bit_length = info->length;
111   int length = 1 << bit_length;
112111
113   assert(length <= 256);
112   assert(bit_length <= 8);
114113
115114   /* pre-calculate all possible values to speed up step routine */
116   for(i = 0; i < length; i++)
115   for(i = 0; i < 256; i++)
117116   {
118117      switch (info->type)
119118      {
src/emu/sound/disc_wav.c
r10504r10505
131131      else
132132      {
133133         count -= inc;
134         while (count < m_min)
134         while (count < m_min || count > (0xffffffff - inc))
135135         {
136136            count += m_diff;
137137         }
src/emu/sound/multipcm.c
r10504r10505
4949};
5050
5151typedef enum {ATTACK,DECAY1,DECAY2,RELEASE} _STATE;
52ALLOW_SAVE_TYPE(_STATE); // allow save_item on a non-fundamental type
5253struct _EG
5354{
5455   int volume;   //
src/emu/clifront.c
r10504r10505
15421542            for (rom = rom_first_file(region); rom; rom = rom_next_file(rom))
15431543            {
15441544               hash_collection romhashes(ROM_GETHASHDATA(rom));
1545               if (hashes == romhashes)
1545               if (!romhashes.flag(hash_collection::FLAG_NO_DUMP) && hashes == romhashes)
15461546               {
1547                  bool baddump = romhashes.flag(hash_collection::FLAG_NO_DUMP);
1547                  bool baddump = romhashes.flag(hash_collection::FLAG_BAD_DUMP);
15481548
15491549                  /* output information about the match */
15501550                  if (*found != 0)
src/emu/schedule.c
r10504r10505
9494
9595
9696//-------------------------------------------------
97//  ~emu_timer - destructor
98//-------------------------------------------------
99
100emu_timer::~emu_timer()
101{
102}
103
104
105//-------------------------------------------------
97106//  init - completely initialize the state when
98107//  re-allocated as a non-device timer
99108//-------------------------------------------------
src/emu/schedule.h
r10504r10505
8989   friend class device_scheduler;
9090   friend class simple_list<emu_timer>;
9191   friend class fixed_allocator<emu_timer>;
92   friend class resource_pool_object<emu_timer>;
9293
9394   // construction/destruction
9495   emu_timer();
96   ~emu_timer();
9597
9698   // allocation and re-use
9799   emu_timer &init(running_machine &machine, timer_expired_func callback, const char *name, void *ptr, bool temporary);

Previous 15994 Revisions Next


© 1998-2018 The MESS Team