Previous 199869 Revisions Next

r20946 Monday 11th February, 2013 at 15:37:34 UTC by Fabio Priuli
(MESS) megadriv.c: fixed FRAM saving in Sonic 3 (got lost in some copy&paste I did before the commit :( ).
also fixed access to last byte of SRAM. no whatsnew.
[src/mess/machine]md_rom.c md_rom.h

trunk/src/mess/machine/md_rom.c
r20945r20946
285285   // we access nvram only if m_nvram_handlers_installed has been turned on
286286   if (m_nvram_handlers_installed)
287287   {
288      if (offset >= m_nvram_start/2 && offset < m_nvram_end/2 && m_nvram_active)
288      if (offset >= m_nvram_start/2 && offset <= m_nvram_end/2 && m_nvram_active)
289289         return m_nvram[offset - m_nvram_start/2];
290290   }
291291   if (offset < 0x400000/2)
r20945r20946
326326
327327READ16_MEMBER(md_rom_fram_device::read)
328328{
329   if (offset >= m_nvram_start/2 && offset < m_nvram_end/2 && m_nvram_active)
329   if (offset >= m_nvram_start/2 && offset <= m_nvram_end/2 && m_nvram_active)
330330      return m_nvram[offset - m_nvram_start/2];
331331   if (offset < 0x400000/2)
332332      return m_rom[MD_ADDR(offset)];
r20945r20946
334334      return 0xffff;
335335}
336336
337WRITE16_MEMBER(md_rom_fram_device::write)
338{
339   if (offset >= m_nvram_start/2 && offset <= m_nvram_end/2 && m_nvram_active)
340         m_nvram[offset - m_nvram_start/2] = data;
341}
342
337343WRITE16_MEMBER(md_rom_fram_device::write_a13)
338344{
339345   if (offset == 0xf0/2)
trunk/src/mess/machine/md_rom.h
r20945r20946
5656
5757   // reading and writing
5858   virtual DECLARE_READ16_MEMBER(read);
59   virtual DECLARE_WRITE16_MEMBER(write);
5960   virtual DECLARE_READ16_MEMBER(read_a13);
6061   virtual DECLARE_WRITE16_MEMBER(write_a13);
6162};

Previous 199869 Revisions Next


© 1997-2024 The MAME Team