Annotation of previous_trunk/src/reset.c, revision 1.1

1.1     ! root        1: /*
        !             2:   Hatari
        !             3: 
        !             4:   This file is distributed under the GNU Public License, version 2 or at
        !             5:   your option any later version. Read the file gpl.txt for details.
        !             6: 
        !             7:   Reset emulation state.
        !             8: */
        !             9: const char Reset_fileid[] = "Hatari reset.c : " __DATE__ " " __TIME__;
        !            10: 
        !            11: #include "main.h"
        !            12: #include "configuration.h"
        !            13: #include "cycInt.h"
        !            14: #include "m68000.h"
        !            15: #include "reset.h"
        !            16: #include "screen.h"
        !            17: #include "nextMemory.h"
        !            18: #include "tmc.h"
        !            19: #include "video.h"
        !            20: #include "debugcpu.h"
        !            21: #include "scsi.h"
        !            22: #include "mo.h"
        !            23: #include "sysReg.h"
        !            24: #include "rtcnvram.h"
        !            25: #include "scc.h"
        !            26: #include "ethernet.h"
        !            27: #include "floppy.h"
        !            28: #include "snd.h"
        !            29: #include "printer.h"
        !            30: #include "dsp.h"
        !            31: #include "kms.h"
        !            32: #include "NextBus.hpp"
        !            33: 
        !            34: /*-----------------------------------------------------------------------*/
        !            35: /**
        !            36:  * Reset NEXT emulator states, chips, interrupts and registers.
        !            37:  */
        !            38: static const char* Reset_NeXT(bool bCold)
        !            39: {
        !            40:        if (bCold) {
        !            41:                const char* error_str;
        !            42:                error_str=memory_init(ConfigureParams.Memory.nMemoryBankSize);
        !            43:                if (error_str!=NULL) {
        !            44:                        return error_str;
        !            45:                }
        !            46:        }
        !            47:     
        !            48:     host_reset();                 /* Reset host related timing vars */
        !            49:     
        !            50:        CycInt_Reset();               /* Reset interrupts */
        !            51:     Main_SpeedReset();            /* Reset speed reporting system */
        !            52:        Video_Reset();                /* Reset video */
        !            53:        TMC_Reset();                              /* Reset TMC Registers */
        !            54:        SCR_Reset();                  /* Reset System Control Registers */
        !            55:        nvram_init();                 /* Reset NVRAM */
        !            56:        SCSI_Reset();                 /* Reset SCSI disks */
        !            57:        MO_Reset();                   /* Reset MO disks */
        !            58:        Floppy_Reset();               /* Reset Floppy disks */
        !            59:        SCC_Reset(2);                 /* Reset SCC */
        !            60:        Ethernet_Reset(true);         /* Reset Ethernet */
        !            61:     KMS_Reset();                  /* Reset KMS */
        !            62:        Sound_Reset();                /* Reset Sound */
        !            63:        Printer_Reset();              /* Reset Printer */
        !            64:        DSP_Reset();                  /* Reset DSP */
        !            65:     NextBus_Reset();              /* Reset NextBus */
        !            66:        M68000_Reset(bCold);          /* Reset CPU */
        !            67:        DebugCpu_SetDebugging();      /* Re-set debugging flag if needed */
        !            68:     
        !            69:        return NULL;
        !            70: }
        !            71: 
        !            72: 
        !            73: /*-----------------------------------------------------------------------*/
        !            74: /**
        !            75:  * Cold reset ST (reset memory, all registers and reboot)
        !            76:  */
        !            77: const char* Reset_Cold(void)
        !            78: {
        !            79:        Main_WarpMouse(sdlscrn->w/2, sdlscrn->h/2);  /* Set mouse pointer to the middle of the screen */
        !            80: 
        !            81:        return Reset_NeXT(true);
        !            82: }
        !            83: 
        !            84: 
        !            85: /*-----------------------------------------------------------------------*/
        !            86: /**
        !            87:  * Warm reset ST (reset registers, leave in same state and reboot)
        !            88:  */
        !            89: const char* Reset_Warm(void)
        !            90: {
        !            91:        return Reset_NeXT(false);
        !            92: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.