/** * Reset custom chips * In case the RESET instruction is called, we must reset all the peripherals * connected to the CPU's reset pin. */ void customreset(void) { pendingInterrupts = 0; /* Reset the IKBD */ IKBD_Reset ( false ); /* Reseting the GLUE video chip should also set freq/res register to 0 */ Video_Reset_Glue (); /* Reset the YM2149 (stop any sound) */ PSG_Reset (); /* Reset the MFP */ MFP_Reset (); /* Reset the FDC */ FDC_Reset ( false ); }
/** * Reset ST emulator states, chips, interrupts and registers. * Return zero or negative TOS image load error code. */ static int Reset_ST(bool bCold) { if (bCold) { int ret; Floppy_GetBootDrive(); /* Find which device to boot from (A: or C:) */ ret = TOS_LoadImage(); /* Load TOS, writes into cartridge memory */ if (ret) return ret; /* If we can not load a TOS image, return now! */ Cart_ResetImage(); /* Load cartridge program into ROM memory. */ Cart_Patch(); } CycInt_Reset(); /* Reset interrupts */ MFP_Reset(); /* Setup MFP chip */ Video_Reset(); /* Reset video */ VDI_Reset(); /* Reset internal VDI variables */ NvRam_Reset(); /* reset NvRAM (video) settings */ GemDOS_Reset(); /* Reset GEMDOS emulation */ if (bCold) { FDC_Reset( bCold ); /* Reset FDC */ } Floppy_Reset(); /* Reset Floppy */ if (ConfigureParams.System.nMachineType == MACHINE_FALCON || ConfigureParams.System.nMachineType == MACHINE_TT) { Ncr5380_Reset(); } if (ConfigureParams.System.nMachineType == MACHINE_FALCON) { DSP_Reset(); /* Reset the DSP */ Crossbar_Reset(bCold); /* Reset Crossbar sound */ } else DmaSnd_Reset(bCold); /* Reset DMA sound */ PSG_Reset(); /* Reset PSG */ Sound_Reset(); /* Reset Sound */ ACIA_Reset( ACIA_Array ); /* ACIA */ IKBD_Reset(bCold); /* Keyboard (after ACIA) */ if (ConfigureParams.System.nMachineType == MACHINE_FALCON && !bUseVDIRes) VIDEL_reset(); else Screen_Reset(); /* Reset screen */ M68000_Reset(bCold); /* Reset CPU */ DebugCpu_SetDebugging(); /* Re-set debugging flag if needed */ DebugDsp_SetDebugging(); Midi_Reset(); #if defined(__linux__) nf_scsidrv_reset(); #endif /* Start HBL, Timer B and VBL interrupts with a 0 cycle delay */ Video_StartInterrupts( 0 ); return 0; }