t_stat set_iobase(UNIT *uptr, int32 val, CONST char *cptr, void *desc) { DEVICE* dptr; PNP_INFO* pnp; t_stat rc; uint16 newbase; if (!cptr) return SCPE_ARG; if (!uptr) return SCPE_IERR; if (!(dptr = find_dev_from_unit(uptr))) return SCPE_IERR; if (!(pnp = (PNP_INFO*)dptr->ctxt)) return SCPE_IERR; newbase = get_uint (cptr, 16, 0xFF, &rc); if (rc != SCPE_OK) return rc; if (dptr->flags & DEV_DIS) { printf("Device not enabled yet.\n"); pnp->io_base = newbase; } else { dptr->flags |= DEV_DIS; dptr->reset(dptr); pnp->io_base = newbase; dptr->flags &= ~DEV_DIS; dptr->reset(dptr); } return SCPE_OK; }
void VM::reset() { // reset all devices for(DEVICE* device = first_device; device; device = device->next_device) { device->reset(); } }
void VM::reset() { memory->readrom(config.device_type); // reset all devices for(DEVICE* device = first_device; device; device = device->next_device) { device->reset(); } }
void VM::special_reset() { // system reset for(DEVICE* device = first_device; device; device = device->next_device) { device->reset(); } io->sysreset(); }
void VM::reset() { // reset all devices for(DEVICE* device = first_device; device; device = device->next_device) { device->reset(); } and_int->write_signal(SIG_AND_BIT_0, 0, 1); // CLOCK = L and_int->write_signal(SIG_AND_BIT_1, 1, 1); // INTMASK = H #if defined(_MZ800) || defined(_MZ1500) and_snd->write_signal(SIG_AND_BIT_1, 1, 1); // SNDMASK = H #endif }
void VM::reset() { // reset all devices for(DEVICE* device = first_device; device; device = device->next_device) { device->reset(); } #if defined(_PC98DO) || defined(_PC98DOPLUS) for(DEVICE* device = first_device; device; device = device->next_device) { device->reset(); } #endif // initial device settings pio_mouse->write_signal(SIG_I8255_PORT_A, 0xf0, 0xff); // clear mouse status pio_mouse->write_signal(SIG_I8255_PORT_B, 0x40, 0xff); // cpu high & sw3-6 uint8_t port_c = 0x08; // normal mode & sw1-5 & sw1-6 #if defined(HAS_V30) || defined(HAS_V33) port_c |= 0x04; // V30 #endif pio_mouse->write_signal(SIG_I8255_PORT_C, 0x40, 0xff); pio_sys->write_signal(SIG_I8255_PORT_A, 0xe3, 0xff); pio_sys->write_signal(SIG_I8255_PORT_B, 0xf8, 0xff);//0xe8?? #if defined(_PC9801) uint8_t prn_b = 0x00; // system type = first PC-9801 #elif defined(_PC9801U) uint8_t prn_b = 0xc0; // system type = PC-9801U,PC-98LT,PC-98HA #else uint8_t prn_b = 0x80; // system type = others #endif if(pit_clock_8mhz) { prn_b |= 0x20; // system clock is 8MHz } prn_b |= 0x10; // don't use LCD display #if !defined(SUPPORT_16_COLORS) prn_b |= 0x08; // standard graphics #endif prn_b |= 0x04; // printer is not busy #if defined(HAS_V30) || defined(HAS_V33) prn_b |= 0x02; #endif #if defined(_PC9801VF) || defined(_PC9801U) prn_b |= 0x01; // PC-9801VF or PC-9801U #endif pio_prn->write_signal(SIG_I8255_PORT_B, prn_b, 0xff); #if defined(SUPPORT_320KB_FDD_IF) pio_fdd->write_signal(SIG_I8255_PORT_A, 0xff, 0xff); pio_fdd->write_signal(SIG_I8255_PORT_B, 0xff, 0xff); pio_fdd->write_signal(SIG_I8255_PORT_C, 0xff, 0xff); #endif #if defined(SUPPORT_2DD_FDD_IF) fdc_2dd->write_signal(SIG_UPD765A_FREADY, 1, 1); // 2DD FDC RDY is pulluped #endif if(sound_device_type == 0 || sound_device_type == 1) { // opn->write_signal(SIG_YM2203_PORT_A, 0x3f, 0xff); // PC-9801-26(K) INT0 // opn->write_signal(SIG_YM2203_PORT_A, 0xbf, 0xff); // PC-9801-26(K) INT41 opn->write_signal(SIG_YM2203_PORT_A, 0xff, 0xff); // PC-9801-26(K) INT5 // opn->write_signal(SIG_YM2203_PORT_A, 0x7f, 0xff); // PC-9801-26(K) INT6 } #if defined(SUPPORT_OLD_BUZZER) beep->write_signal(SIG_BEEP_ON, 1, 1); beep->write_signal(SIG_BEEP_MUTE, 1, 1); #else beep->write_signal(SIG_PCM1BIT_ON, 1, 1); beep->write_signal(SIG_PCM1BIT_MUTE, 1, 1); #endif #if defined(_PC98DO) || defined(_PC98DOPLUS) pc88opn->set_reg(0x29, 3); // for Misty Blue pc88pio->write_signal(SIG_I8255_PORT_C, 0, 0xff); pc88pio_sub->write_signal(SIG_I8255_PORT_C, 0, 0xff); #endif }