Previous 199869 Revisions Next

r21441 Monday 25th February, 2013 at 23:28:29 UTC by David Haywood
tagmap stuff for coolridrs
[src/mame/drivers]coolridr.c

trunk/src/mame/drivers/coolridr.c
r21440r21441
388388      m_sysh1_workram_h(*this, "sysh1_workrah"),
389389      m_sound_dma(*this, "sound_dma"),
390390      m_soundram(*this, "soundram"),
391      m_soundram2(*this, "soundram2")
391      m_soundram2(*this, "soundram2"),
392      m_io_an0(*this, "AN0"),
393      m_io_an1(*this, "AN1"),
394      m_io_an2(*this, "AN2"),
395      m_io_an3(*this, "AN3"),
396      m_io_an4(*this, "AN4"),
397      m_io_an5(*this, "AN5"),
398      m_io_an6(*this, "AN6"),
399      m_io_an7(*this, "AN7"),
400      m_io_config(*this, "CONFIG")
392401   {
393402      m_work_queue[0] = osd_work_queue_alloc(WORK_QUEUE_FLAG_HIGH_FREQ);
394403      m_work_queue[1] = osd_work_queue_alloc(WORK_QUEUE_FLAG_HIGH_FREQ);
395404   }
396
405   
397406   // Blitter state
398407   UINT16 m_textBytesToWrite;
399408   INT16  m_blitterSerialCount;
r21440r21441
423432   required_shared_ptr<UINT32> m_sound_dma;
424433   required_shared_ptr<UINT16> m_soundram;
425434   required_shared_ptr<UINT16> m_soundram2;
435   required_ioport m_io_an0;
436   required_ioport m_io_an1;
437   required_ioport m_io_an2;
438   required_ioport m_io_an3;
439   required_ioport m_io_an4;
440   required_ioport m_io_an5;
441   required_ioport m_io_an6;
442   required_ioport m_io_an7;
443   required_ioport m_io_config;
444
426445   bitmap_rgb32 m_temp_bitmap_sprites[4];
427446   bitmap_rgb32 m_temp_bitmap_sprites2[4];
428447   bitmap_ind16 m_zbuffer_bitmap;
r21440r21441
495514
496515   osd_work_queue *    m_work_queue[2]; // work queue, one per screen
497516   static void *draw_object_threaded(void *param, int threadid);
517   int m_usethreads;
498518};
499519
500520#define PRINT_BLIT_STUFF \
r21440r21441
18001820            m_clipvals[0][2] = m_spriteblit[3];
18011821            m_clipblitterMode[0] = m_blitterMode;
18021822         }
1803         printf("(mode %02x) unknown sprite list type 1 - %04x %04x %04x %04x (%08x %08x %08x)\n", m_blitterMode, (m_spriteblit[1]&0xffff0000)>>16,(m_spriteblit[1]&0x0000ffff)>>0, ((m_spriteblit[2]&0xffff0000)>>16)-((m_spriteblit[3]&0x0000ffff)>>0),((m_spriteblit[2]&0x0000ffff)>>0)-((m_spriteblit[3]&0x0000ffff)>>0),    m_spriteblit[1],m_spriteblit[2],m_spriteblit[3]);
1823         //printf("(mode %02x) unknown sprite list type 1 - %04x %04x %04x %04x (%08x %08x %08x)\n", m_blitterMode, (m_spriteblit[1]&0xffff0000)>>16,(m_spriteblit[1]&0x0000ffff)>>0, ((m_spriteblit[2]&0xffff0000)>>16)-((m_spriteblit[3]&0x0000ffff)>>0),((m_spriteblit[2]&0x0000ffff)>>0)-((m_spriteblit[3]&0x0000ffff)>>0),    m_spriteblit[1],m_spriteblit[2],m_spriteblit[3]);
18041824
18051825      }
18061826
r21440r21441
18851905      queue = m_work_queue[1];
18861906   }
18871907
1888   osd_work_item_queue(queue, draw_object_threaded, testobject, WORK_ITEM_FLAG_AUTO_RELEASE);
1908   if (m_usethreads)
1909   {
1910      osd_work_item_queue(queue, draw_object_threaded, testobject, WORK_ITEM_FLAG_AUTO_RELEASE);
1911   }
1912   else
1913   {
1914      draw_object_threaded((void*)testobject,0);
1915   }
18891916}
18901917
18911918
r21440r21441
23842411
23852412READ8_MEMBER( coolridr_state::analog_mux_r )
23862413{
2387   static const char *const adcnames[] = { "AN0", "AN1", "AN2", "AN3", "AN4", "AN5", "AN6", "AN7" };
2388   UINT8 adc_data = ioport(adcnames[an_mux_data])->read_safe(0);
2414   UINT8 adc_data = 0;
2415   switch(an_mux_data)
2416   {
2417      case 0x0: adc_data = m_io_an0->read(); break;
2418      case 0x1: adc_data = m_io_an1->read(); break;
2419      case 0x2: adc_data = m_io_an2->read(); break;
2420      case 0x3: adc_data = m_io_an3->read(); break;
2421      case 0x4: adc_data = m_io_an4->read(); break;
2422      case 0x5: adc_data = m_io_an5->read(); break;
2423      case 0x6: adc_data = m_io_an6->read(); break;
2424      case 0x7: adc_data = m_io_an7->read(); break;
2425   }
23892426   an_mux_data++;
23902427   an_mux_data &= 0x7;
23912428   return adc_data;
r21440r21441
28752912
28762913   PORT_START("AN7")
28772914   PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
2915
2916
2917   // driver debug
2918   PORT_START("CONFIG")
2919   PORT_CONFNAME( 0x01, 0x01, "Use Threading Code" )
2920   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
2921   PORT_DIPSETTING(    0x01, DEF_STR( On ) )
28782922INPUT_PORTS_END
28792923
28802924
r21440r21441
30273071//   memcpy(m_soundram, memregion("soundcpu")->base()+0x80000, 0x80000);
30283072//  m_soundcpu->reset();
30293073
3030
3074   m_usethreads = m_io_config->read()&1;
30313075}
30323076
30333077#if 0

Previous 199869 Revisions Next


© 1997-2024 The MAME Team