src/mame/machine/archimds.c
| r8769 | r8770 | |
| 64 | 64 | |
| 65 | 65 | if (ioc_regs[10] & mask) |
| 66 | 66 | { |
| 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 |
| 68 | 68 | } |
| 69 | 69 | } |
| 70 | 70 | |
| r8769 | r8770 | |
| 74 | 74 | |
| 75 | 75 | if (ioc_regs[14] & mask) |
| 76 | 76 | { |
| 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 |
| 78 | 78 | } |
| 79 | 79 | } |
| 80 | 80 | |
| r8769 | r8770 | |
| 153 | 153 | { |
| 154 | 154 | memc_pages[i] = -1; // indicate unmapped |
| 155 | 155 | } |
| 156 | |
| 157 | ioc_regs[4] = 0x10; //set up POR (Power On Register) at start-up |
| 156 | 158 | } |
| 157 | 159 | |
| 158 | 160 | void archimedes_init(running_machine *machine) |
| r8769 | r8770 | |
| 319 | 321 | #ifdef MESS |
| 320 | 322 | running_device *fdc = (running_device *)space->machine->device("wd1772"); |
| 321 | 323 | #endif |
| 322 | | if (offset >= 0x80000 && offset < 0xc0000) |
| 324 | if (offset*4 >= 0x200000 && offset*4 < 0x300000) |
| 323 | 325 | { |
| 324 | 326 | switch (offset & 0x1f) |
| 325 | 327 | { |
| r8769 | r8770 | |
| 345 | 347 | return (ioc_timerout[3]>>8)&0xff; |
| 346 | 348 | } |
| 347 | 349 | |
| 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); |
| 349 | 351 | return ioc_regs[offset&0x1f]; |
| 350 | 352 | } |
| 351 | 353 | #ifdef MESS |
| 352 | | else if (offset >= 0xc4000 && offset <= 0xc4010) |
| 354 | else if (offset*4 >= 0x310000 && offset*4 < 0x310040) |
| 353 | 355 | { |
| 354 | 356 | logerror("17XX: R @ addr %x mask %08x\n", offset*4, mem_mask); |
| 355 | 357 | return wd17xx_data_r(fdc, offset&0xf); |
| r8769 | r8770 | |
| 370 | 372 | running_device *fdc = (running_device *)space->machine->device("wd1772"); |
| 371 | 373 | #endif |
| 372 | 374 | |
| 373 | | if (offset >= 0x80000 && offset < 0xc0000) |
| 375 | if (offset*4 >= 0x200000 && offset*4 < 0x300000) |
| 374 | 376 | { |
| 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 )); |
| 376 | 378 | |
| 377 | 379 | switch (offset&0x1f) |
| 378 | 380 | { |
| 379 | 381 | 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); |
| 381 | 383 | break; |
| 382 | 384 | |
| 383 | 385 | case 5: // IRQ clear A |
| r8769 | r8770 | |
| 452 | 454 | } |
| 453 | 455 | } |
| 454 | 456 | #ifdef MESS |
| 455 | | else if (offset >= 0xc4000 && offset <= 0xc4010) |
| 457 | else if (offset*4 >= 0x310000 && offset*4 < 0x310040) |
| 456 | 458 | { |
| 457 | 459 | logerror("17XX: %x to addr %x mask %08x\n", data, offset*4, mem_mask); |
| 458 | 460 | wd17xx_data_w(fdc, offset&0xf, data&0xff); |
| 459 | 461 | } |
| 460 | | else if (offset == 0xd40006) |
| 462 | else if (offset*4 == 0x350018) |
| 461 | 463 | { |
| 462 | 464 | // latch A |
| 463 | 465 | if (data & 1) |
| r8769 | r8770 | |
| 480 | 482 | wd17xx_set_side(fdc,(data & 0x10)>>4); |
| 481 | 483 | |
| 482 | 484 | } |
| 483 | | else if (offset == 0xd40010) |
| 485 | else if (offset*4 == 0x350040) |
| 484 | 486 | { |
| 485 | 487 | // latch B |
| 486 | 488 | wd17xx_dden_w(fdc, BIT(data, 1)); |