Previous 199869 Revisions Next

r24541 Saturday 27th July, 2013 at 16:56:42 UTC by R. Belmont
48gc: Convert to debugger-friendly timer-based VBL IRQ (nw)
[src/mess/video]nubus_48gc.c nubus_48gc.h

trunk/src/mess/video/nubus_48gc.c
r24540r24541
7676
7777jmfb_device::jmfb_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
7878      device_t(mconfig, type, name, tag, owner, clock, shortname, source),
79      device_video_interface(mconfig, *this),
7980      device_nubus_card_interface(mconfig, *this)
8081{
82   m_screen_tag = GC48_SCREEN_NAME;
8183}
8284
8385nubus_48gc_device::nubus_48gc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
r24540r24541
112114   install_bank(slotspace, slotspace+VRAM_SIZE-1, 0, 0, "bank_48gc", m_vram);
113115
114116   m_nubus->install_device(slotspace+0x200000, slotspace+0x2003ff, read32_delegate(FUNC(jmfb_device::mac_48gc_r), this), write32_delegate(FUNC(jmfb_device::mac_48gc_w), this));
117
118   m_timer = timer_alloc(0, NULL);
119   m_screen = NULL;    // can we look this up now?
115120}
116121
117122//-------------------------------------------------
r24540r24541
139144
140145***************************************************************************/
141146
147void jmfb_device::device_timer(emu_timer &timer, device_timer_id tid, int param, void *ptr)
148{
149   if (!m_vbl_disable)
150   {
151      raise_slot_irq();
152   }
153
154   m_timer->adjust(m_screen->time_until_pos(479, 0), 0);
155}
156
142157UINT32 jmfb_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
143158{
144159   UINT32 *scanline, *base;
r24540r24541
146161   UINT8 *vram8 = (UINT8 *)m_vram;
147162   UINT8 pixels;
148163
149   if (!m_vbl_disable)
164   // first time?  kick off the VBL timer
165   if (!m_screen)
150166   {
151      raise_slot_irq();
167      m_screen = &screen;
168      m_timer->adjust(m_screen->time_until_pos(479, 0), 0);
152169   }
153170
154171   vram8 += 0xa00;
trunk/src/mess/video/nubus_48gc.h
r24540r24541
1414
1515class jmfb_device :
1616      public device_t,
17      public device_video_interface,
1718      public device_nubus_card_interface
1819{
1920public:
r24540r24541
2324      // optional information overrides
2425      virtual machine_config_constructor device_mconfig_additions() const;
2526      virtual const rom_entry *device_rom_region() const;
27      virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
2628
2729      UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
30
31      screen_device *m_screen;
32      emu_timer *m_timer;
2833protected:
2934      // device-level overrides
3035      virtual void device_start();

Previous 199869 Revisions Next


© 1997-2024 The MAME Team