Annotation of previous/src/reset.c, revision 1.1.1.6

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"
1.1.1.4   root       18: #include "tmc.h"
1.1       root       19: #include "video.h"
1.1.1.2   root       20: #include "debugcpu.h"
1.1.1.3   root       21: #include "scsi.h"
1.1.1.4   root       22: #include "mo.h"
1.1.1.3   root       23: #include "sysReg.h"
1.1.1.4   root       24: #include "rtcnvram.h"
1.1.1.3   root       25: #include "scc.h"
                     26: #include "ethernet.h"
1.1.1.4   root       27: #include "floppy.h"
                     28: #include "snd.h"
                     29: #include "printer.h"
                     30: #include "dsp.h"
1.1.1.5   root       31: #include "kms.h"
1.1.1.6 ! root       32: #include "NextBus.hpp"
1.1       root       33: 
                     34: /*-----------------------------------------------------------------------*/
                     35: /**
1.1.1.5   root       36:  * Reset NEXT emulator states, chips, interrupts and registers.
1.1       root       37:  */
1.1.1.5   root       38: static const char* Reset_NeXT(bool bCold)
1.1       root       39: {
1.1.1.5   root       40:        if (bCold) {
1.1.1.3   root       41:                const char* error_str;
                     42:                error_str=memory_init(ConfigureParams.Memory.nMemoryBankSize);
                     43:                if (error_str!=NULL) {
                     44:                        return error_str;
                     45:                }
1.1       root       46:        }
1.1.1.5   root       47:     
                     48:     host_reset();                 /* Reset host related timing vars */
                     49:     
1.1       root       50:        CycInt_Reset();               /* Reset interrupts */
1.1.1.5   root       51:     Main_SpeedReset();            /* Reset speed reporting system */
1.1       root       52:        Video_Reset();                /* Reset video */
1.1.1.4   root       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 */
1.1.1.5   root       61:     KMS_Reset();                  /* Reset KMS */
1.1.1.4   root       62:        Sound_Reset();                /* Reset Sound */
                     63:        Printer_Reset();              /* Reset Printer */
                     64:        DSP_Reset();                  /* Reset DSP */
1.1.1.6 ! root       65:     NextBus_Reset();              /* Reset NextBus */
1.1       root       66:        M68000_Reset(bCold);          /* Reset CPU */
1.1.1.4   root       67:        DebugCpu_SetDebugging();      /* Re-set debugging flag if needed */
1.1.1.5   root       68:     
1.1.1.3   root       69:        return NULL;
1.1       root       70: }
                     71: 
                     72: 
                     73: /*-----------------------------------------------------------------------*/
                     74: /**
                     75:  * Cold reset ST (reset memory, all registers and reboot)
                     76:  */
1.1.1.3   root       77: const char* Reset_Cold(void)
1.1       root       78: {
                     79:        Main_WarpMouse(sdlscrn->w/2, sdlscrn->h/2);  /* Set mouse pointer to the middle of the screen */
                     80: 
1.1.1.5   root       81:        return Reset_NeXT(true);
1.1       root       82: }
                     83: 
                     84: 
                     85: /*-----------------------------------------------------------------------*/
                     86: /**
                     87:  * Warm reset ST (reset registers, leave in same state and reboot)
                     88:  */
1.1.1.3   root       89: const char* Reset_Warm(void)
1.1       root       90: {
1.1.1.5   root       91:        return Reset_NeXT(false);
1.1       root       92: }

unix.superglobalmegacorp.com

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