Previous 15994 Revisions Next

r8770 Friday 13th August, 2010 at 22:22:51 UTC by Angelo Salese
[A310]: POR bit should be high at start-up, fixes a crash
[src/mame/machine]archimds.c

src/mame/machine/archimds.c
r8769r8770
6464
6565   if (ioc_regs[10] & mask)
6666   {
67      cputag_set_input_line(machine, "maincpu", ARM_IRQ_LINE, PULSE_LINE);
67      cputag_set_input_line(machine, "maincpu", ARM_IRQ_LINE, HOLD_LINE); //TODO: was PULSE_LINE before
6868   }
6969}
7070
r8769r8770
7474
7575   if (ioc_regs[14] & mask)
7676   {
77      cputag_set_input_line(machine, "maincpu", ARM_FIRQ_LINE, PULSE_LINE);
77      cputag_set_input_line(machine, "maincpu", ARM_FIRQ_LINE, HOLD_LINE); //TODO: was PULSE_LINE before
7878   }
7979}
8080
r8769r8770
153153   {
154154      memc_pages[i] = -1;      // indicate unmapped
155155   }
156
157   ioc_regs[4] = 0x10; //set up POR (Power On Register) at start-up
156158}
157159
158160void archimedes_init(running_machine *machine)
r8769r8770
319321   #ifdef MESS
320322   running_device *fdc = (running_device *)space->machine->device("wd1772");
321323   #endif
322   if (offset >= 0x80000 && offset < 0xc0000)
324   if (offset*4 >= 0x200000 && offset*4 < 0x300000)
323325   {
324326      switch (offset & 0x1f)
325327      {
r8769r8770
345347            return (ioc_timerout[3]>>8)&0xff;
346348      }
347349
348      logerror("IOC: R %s = %02x (PC=%x)\n", ioc_regnames[offset&0x1f], ioc_regs[offset&0x1f], cpu_get_pc( space->cpu ));
350      logerror("IOC: R %s = %02x (PC=%x) %02x\n", ioc_regnames[offset&0x1f], ioc_regs[offset&0x1f], cpu_get_pc( space->cpu ),offset & 0x1f);
349351      return ioc_regs[offset&0x1f];
350352   }
351353   #ifdef MESS
352   else if (offset >= 0xc4000 && offset <= 0xc4010)
354   else if (offset*4 >= 0x310000 && offset*4 < 0x310040)
353355   {
354356      logerror("17XX: R @ addr %x mask %08x\n", offset*4, mem_mask);
355357      return wd17xx_data_r(fdc, offset&0xf);
r8769r8770
370372   running_device *fdc = (running_device *)space->machine->device("wd1772");
371373   #endif
372374
373   if (offset >= 0x80000 && offset < 0xc0000)
375   if (offset*4 >= 0x200000 && offset*4 < 0x300000)
374376   {
375//      logerror("IOC: W %02x @ reg %s (PC=%x)\n", data&0xff, ioc_regnames[offset&0x1f], cpu_get_pc( space->cpu ));
377//        logerror("IOC: W %02x @ reg %s (PC=%x)\n", data&0xff, ioc_regnames[offset&0x1f], cpu_get_pc( space->cpu ));
376378
377379      switch (offset&0x1f)
378380      {
379381         case 0:   // I2C bus control
380            logerror("IOC I2C: CLK %d DAT %d\n", (data>>1)&1, data&1);
382            //logerror("IOC I2C: CLK %d DAT %d\n", (data>>1)&1, data&1);
381383            break;
382384
383385         case 5:    // IRQ clear A
r8769r8770
452454      }
453455   }
454456   #ifdef MESS
455   else if (offset >= 0xc4000 && offset <= 0xc4010)
457   else if (offset*4 >= 0x310000 && offset*4 < 0x310040)
456458   {
457459      logerror("17XX: %x to addr %x mask %08x\n", data, offset*4, mem_mask);
458460      wd17xx_data_w(fdc, offset&0xf, data&0xff);
459461   }
460   else if (offset == 0xd40006)
462   else if (offset*4 == 0x350018)
461463   {
462464      // latch A
463465      if (data & 1)
r8769r8770
480482      wd17xx_set_side(fdc,(data & 0x10)>>4);
481483
482484   }
483   else if (offset == 0xd40010)
485   else if (offset*4 == 0x350040)
484486   {
485487      // latch B
486488      wd17xx_dden_w(fdc, BIT(data, 1));

Previous 15994 Revisions Next


© 1998-2018 The MESS Team