Previous 15994 Revisions Next

r10001 Wednesday 12th January, 2011 at 10:31:31 UTC by Sandro Ronco
[HD61830] Added a check of screen height/width, to avoid write outside bitmap's bounds. This fixes the micronic test bios crash.
[src/mess/video]hd61830.c hd61830.h

src/mess/video/hd61830.c
r10000r10001
207207   // resolve callbacks
208208    devcb_resolve_read8(&m_in_rd_func, &m_config.m_in_rd_func, this);
209209
210   m_screen = machine->device<screen_device>(m_config.screen_tag);
211
210212   // register for state saving
211213   state_save_register_device_item(this, 0, m_bf);
212214   state_save_register_device_item(this, 0, m_ir);
r10000r10001
539541               pixel = m_cursor ? 1 : 0;
540542         }
541543
542         *BITMAP_ADDR16(bitmap, sy, sx) = pixel;
544         if (sy < m_screen->height() && sx < m_screen->width())
545            *BITMAP_ADDR16(bitmap, sy, sx) = pixel;
543546      }
544547   }
545548}
src/mess/video/hd61830.h
r10000r10001
109109    virtual void device_reset();
110110   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
111111
112   static TIMER_CALLBACK( busy_tick );
113
114112   inline UINT8 readbyte(offs_t address);
115113   inline void writebyte(offs_t address, UINT8 data);
116114

Previous 15994 Revisions Next


© 1998-2018 The MESS Team