trunk/src/mess/video/nubus_48gc.c
| r24540 | r24541 | |
| 76 | 76 | |
| 77 | 77 | jmfb_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) : |
| 78 | 78 | device_t(mconfig, type, name, tag, owner, clock, shortname, source), |
| 79 | device_video_interface(mconfig, *this), |
| 79 | 80 | device_nubus_card_interface(mconfig, *this) |
| 80 | 81 | { |
| 82 | m_screen_tag = GC48_SCREEN_NAME; |
| 81 | 83 | } |
| 82 | 84 | |
| 83 | 85 | nubus_48gc_device::nubus_48gc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
| r24540 | r24541 | |
| 112 | 114 | install_bank(slotspace, slotspace+VRAM_SIZE-1, 0, 0, "bank_48gc", m_vram); |
| 113 | 115 | |
| 114 | 116 | 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? |
| 115 | 120 | } |
| 116 | 121 | |
| 117 | 122 | //------------------------------------------------- |
| r24540 | r24541 | |
| 139 | 144 | |
| 140 | 145 | ***************************************************************************/ |
| 141 | 146 | |
| 147 | void 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 | |
| 142 | 157 | UINT32 jmfb_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 143 | 158 | { |
| 144 | 159 | UINT32 *scanline, *base; |
| r24540 | r24541 | |
| 146 | 161 | UINT8 *vram8 = (UINT8 *)m_vram; |
| 147 | 162 | UINT8 pixels; |
| 148 | 163 | |
| 149 | | if (!m_vbl_disable) |
| 164 | // first time? kick off the VBL timer |
| 165 | if (!m_screen) |
| 150 | 166 | { |
| 151 | | raise_slot_irq(); |
| 167 | m_screen = &screen; |
| 168 | m_timer->adjust(m_screen->time_until_pos(479, 0), 0); |
| 152 | 169 | } |
| 153 | 170 | |
| 154 | 171 | vram8 += 0xa00; |
trunk/src/mess/video/nubus_48gc.h
| r24540 | r24541 | |
| 14 | 14 | |
| 15 | 15 | class jmfb_device : |
| 16 | 16 | public device_t, |
| 17 | public device_video_interface, |
| 17 | 18 | public device_nubus_card_interface |
| 18 | 19 | { |
| 19 | 20 | public: |
| r24540 | r24541 | |
| 23 | 24 | // optional information overrides |
| 24 | 25 | virtual machine_config_constructor device_mconfig_additions() const; |
| 25 | 26 | virtual const rom_entry *device_rom_region() const; |
| 27 | virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); |
| 26 | 28 | |
| 27 | 29 | UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 30 | |
| 31 | screen_device *m_screen; |
| 32 | emu_timer *m_timer; |
| 28 | 33 | protected: |
| 29 | 34 | // device-level overrides |
| 30 | 35 | virtual void device_start(); |