Previous 199869 Revisions Next

r19319 Wednesday 5th December, 2012 at 02:33:23 UTC by R. Belmont
macrtc: Remove weird address swizzle that confused systems with extended PRAM [Rob Braun]
[src/mess/machine]macrtc.c

trunk/src/mess/machine/macrtc.c
r19318r19319
252252      case 8: case 9: case 10: case 11:   /* RAM address $10-$13 */
253253         if (LOG_RTC)
254254            printf("PRAM write, address = %X, data = %X\n", (i & 3) + 0x10, (int) m_rtc_data_byte);
255         m_pram[(i & 3) + 0x10] = m_rtc_data_byte;
255         m_pram[i] = m_rtc_data_byte;
256256         break;
257257
258258      case 12:
r19318r19319
274274      case 28: case 29: case 30: case 31:
275275         if (LOG_RTC)
276276            printf("PRAM write, address = %X, data = %X\n", i & 15, (int) m_rtc_data_byte);
277         m_pram[i & 15] = m_rtc_data_byte;
277         m_pram[i] = m_rtc_data_byte;
278278         break;
279279
280280      default:
r19318r19319
314314               case 8: case 9: case 10: case 11:
315315                  if (LOG_RTC)
316316                     printf("PRAM read, address = %X data = %x\n", (i & 3) + 0x10, m_pram[(i & 3) + 0x10]);
317                  m_rtc_data_byte = m_pram[(i & 3) + 0x10];
317                  m_rtc_data_byte = m_pram[i];
318318                  break;
319319
320320               case 16: case 17: case 18: case 19:
r19318r19319
323323               case 28: case 29: case 30: case 31:
324324                  if (LOG_RTC)
325325                     printf("PRAM read, address = %X data = %x\n", i & 15, m_pram[i & 15]);
326                  m_rtc_data_byte = m_pram[i & 15];
326                  m_rtc_data_byte = m_pram[i];
327327                  break;
328328
329329               default:
r19318r19319
350350void rtc3430042_device::nvram_default()
351351{
352352   memset(m_pram, 0, 0x100);
353
354    // some Mac ROMs are buggy in the presence of
355    // no NVRAM, so let's try to setup some reasonable defaults
356    m_pram[0] = 0xa8;   // valid
357    m_pram[4] = 0xcc;
358    m_pram[5] = 0x0a;
359    m_pram[6] = 0xcc;
360    m_pram[7] = 0x0a;
361    m_pram[0xc] = 0x42;   // XPRAM valid for Plus/SE
362    m_pram[0xd] = 0x75;
363    m_pram[0xe] = 0x67;
364    m_pram[0xf] = 0x73;
365    m_pram[0x10] = 0x1b;    // volume
366    m_pram[0x11] = 0x88;
367    m_pram[0x12] = 0x01;
368    m_pram[0x13] = 0x4c;
369353}
370354
371355void rtc3430042_device::nvram_read(emu_file &file)

Previous 199869 Revisions Next


© 1997-2024 The MAME Team