Previous 199869 Revisions Next

r19002 Saturday 17th November, 2012 at 06:11:29 UTC by R. Belmont
rtc65271: some minor fixes so Firebeat's RTC check passes [R. Belmont]

(nw part: you must delete the "rtc" file from your nvram for this to become effective)
[src/emu/machine]rtc65271.c

trunk/src/emu/machine/rtc65271.c
r19001r19002
1313    * Support DSE mode?
1414
1515    Raphael Nabet, 2003-2004
16    R. Belmont, 2012
1617*/
1718
1819#include "emu.h"
r19001r19002
161162{
162163   memset(m_regs,0, sizeof(m_regs));
163164   memset(m_xram,0, sizeof(m_xram));
165
166   m_regs[reg_B] |= reg_B_DM;   // Firebeat assumes the chip factory defaults to non-BCD mode (or maybe Konami programs it that way?)
164167}
165168
166169//-------------------------------------------------
r19001r19002
225228            systime.local_time.hour -= 12;
226229         }
227230         else
231         {
228232            m_regs[reg_hour] = 0;
229         m_regs[reg_hour] |= systime.local_time.hour ? systime.local_time.hour : 12;
233         }
234
235         // Firebeat indicates non-BCD 12-hour mode has 0-based hour, so 12 AM is 0x00 and 12 PM is 0x80
236         m_regs[reg_hour] |= systime.local_time.hour; // ? systime.local_time.hour : 12;
230237      }
231238      m_regs[reg_weekday] = systime.local_time.weekday + 1;
232239      m_regs[reg_monthday] = systime.local_time.mday;
r19001r19002
310317         /* data register */
311318         switch (m_cur_reg)
312319         {
320         case reg_A:
321            reply = m_regs[m_cur_reg] & ~reg_A_DV;
322            reply |= 0x20;   // indicate normal RTC operation
323            break;
324
313325         case reg_C:
314326            reply = m_regs[m_cur_reg];
315327            m_regs[m_cur_reg] = 0;

Previous 199869 Revisions Next


© 1997-2024 The MAME Team