MCPcopy Create free account
hub / github.com/AppleWin/AppleWin / ResetMachineState

Function ResetMachineState

source/Utilities.cpp:541–563  ·  view source on GitHub ↗

todo: consolidate CtrlReset() and ResetMachineState()

Source from the content-addressed store, hash-verified

539
540// todo: consolidate CtrlReset() and ResetMachineState()
541void ResetMachineState()
542{
543 LogFileOutput("Apple II power-cycle\n");
544
545 GetCardMgr().Reset(true);
546 g_bFullSpeed = 0; // Might've hit reset in middle of InternalCpuExecute() - so beep may get (partially) muted
547
548 MemReset(); // calls CpuInitialize(), CNoSlotClock.Reset()
549 GetPravets().Reset();
550 if (GetCardMgr().QuerySlot(SLOT6) == CT_Disk2)
551 dynamic_cast<Disk2InterfaceCard&>(GetCardMgr().GetRef(SLOT6)).Boot();
552 GetVideo().VideoResetState();
553 KeybReset();
554 JoyReset();
555 SpkrReset();
556 SetActiveCpu(GetMainCpu());
557#ifdef USE_SPEECH_API
558 g_Speech.Reset();
559#endif
560
561 SoundCore_SetFade(FADE_NONE);
562 LogFileTimeUntilFirstKeyReadReset();
563}
564
565
566//===========================================================================

Callers 2

WndProcMethod · 0.85
ProcessButtonClickMethod · 0.85

Calls 13

LogFileOutputFunction · 0.85
MemResetFunction · 0.85
KeybResetFunction · 0.85
JoyResetFunction · 0.85
SpkrResetFunction · 0.85
SetActiveCpuFunction · 0.85
SoundCore_SetFadeFunction · 0.85
QuerySlotMethod · 0.80
VideoResetStateMethod · 0.80
GetMainCpuFunction · 0.70
ResetMethod · 0.45

Tested by

no test coverage detected