Previous 199869 Revisions Next

r33480 Friday 21st November, 2014 at 12:50:48 UTC by David Haywood
mp_soni2 was trashing so much memory I'm surprised Mame didn't become self aware ;-)

still haven't figured out what causes mp_gslam to trash part of the screen since we started using the real SMS code for the overlay, nor have I fixed the SMS mixing in interlace mode (soni2) or the incorrect horizontal offset (all games) that were also introduced at that time.
[src/emu/video]315_5313.c

trunk/src/emu/video/315_5313.c
r241991r241992
163163
164164
165165   if (!m_use_alt_timing)
166      m_render_bitmap = auto_bitmap_ind16_alloc(machine(), m_screen->width(), m_screen->height());
166      m_render_bitmap = auto_bitmap_ind16_alloc(machine(), 320, 512); // allocate maximum sizes we're going to use, it's safer.
167167   else
168      m_render_line = auto_alloc_array(machine(), UINT16, m_screen->width());
168      m_render_line = auto_alloc_array(machine(), UINT16, 320);
169169
170   m_render_line_raw = auto_alloc_array(machine(), UINT16, m_screen->width());
170   m_render_line_raw = auto_alloc_array(machine(), UINT16, 320);
171171
172172   // FIXME: are these all needed? I'm pretty sure some of these (most?) are just helpers which don't need to be saved,
173173   // but better safe than sorry...
r241991r241992
178178   save_pointer(NAME(m_palette_lookup_sprite), 0x40/2);
179179   save_pointer(NAME(m_palette_lookup_shadow), 0x40/2);
180180   save_pointer(NAME(m_palette_lookup_highlight), 0x40/2);
181   save_pointer(NAME(m_render_line_raw), m_screen->width()/2);
181   save_pointer(NAME(m_render_line_raw), 320/2);
182182   if (m_use_alt_timing)
183      save_pointer(NAME(m_render_line), m_screen->width()/2);
183      save_pointer(NAME(m_render_line), 320/2);
184184
185185   m_irq6_on_timer = machine().scheduler().timer_alloc(FUNC(irq6_on_timer_callback), (void*)this);
186186   m_irq4_on_timer = machine().scheduler().timer_alloc(FUNC(irq4_on_timer_callback), (void*)this);
r241991r241992
25032503{
25042504   UINT16 *lineptr;
25052505
2506   
2507
25062508   if (!m_use_alt_timing)
2509   {
2510      if (scanline >= m_render_bitmap->height()) // safety, shouldn't happen now we allocate a fixed amount tho
2511         return;
2512
25072513      lineptr = &m_render_bitmap->pix16(scanline);
2514
2515   }
25082516   else
25092517      lineptr = m_render_line;
25102518


Previous 199869 Revisions Next


© 1997-2024 The MAME Team