Previous 199869 Revisions Next

r32764 Wednesday 15th October, 2014 at 15:34:06 UTC by Alex Jackson
k054156: save correct amount of videoram, fixes lethalen savestates [Alex Jackson]
[src/mame/video]k054156_k054157_k056832.c k054156_k054157_k056832.h

trunk/src/mame/video/k054156_k054157_k056832.c
r32763r32764
186186   //m_regs[0x20],
187187   //m_regsb[4],
188188   m_rombase(NULL),
189   m_videoram(NULL),
190189   m_num_gfx_banks(0),
191190   m_cur_gfx_banks(0),
192191   m_gfx_memory_region(NULL),
r32763r32764
280279
281280
282281
283   m_videoram = auto_alloc_array_clear(machine(), UINT16, 0x2000 * (K056832_PAGE_COUNT + 1) / 2);
282   m_videoram.resize_and_clear(0x2000 * (K056832_PAGE_COUNT + 1) / 2);
284283
285284   m_tilemap[0x0] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info0),this), TILEMAP_SCAN_ROWS,  8, 8, 64, 32);
286285   m_tilemap[0x1] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info1),this), TILEMAP_SCAN_ROWS,  8, 8, 64, 32);
r32763r32764
319318   change_rambank();
320319   change_rombank();
321320
322   save_pointer(NAME(m_videoram), 0x10000);
321   save_item(NAME(m_videoram));
323322   save_item(NAME(m_regs));
324323   save_item(NAME(m_regsb));
325324   save_item(NAME(m_x));
trunk/src/mame/video/k054156_k054157_k056832.h
r32763r32764
125125   tilemap_t   *m_tilemap[K056832_PAGE_COUNT];
126126   bitmap_ind16  *m_pixmap[K056832_PAGE_COUNT];
127127
128   dynamic_array<UINT16> m_videoram;
129
128130   UINT16    m_regs[0x20];   // 157/832 regs group 1
129131   UINT16    m_regsb[4]; // 157/832 regs group 2, board dependent
130132
131133   UINT8 *   m_rombase;  // pointer to tile gfx data
132   UINT16 *  m_videoram;
134
133135   int       m_num_gfx_banks;    // depends on size of graphics ROMs
134136   int       m_cur_gfx_banks;        // cached info for K056832_regs[0x1a]
135137

Previous 199869 Revisions Next


© 1997-2024 The MAME Team