core.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // Copyright 2014 Citra Emulator Project
  2. // Licensed under GPLv2
  3. // Refer to the license.txt file included.
  4. #pragma once
  5. #include "core/arm/arm_interface.h"
  6. #include "core/arm/interpreter/armdefs.h"
  7. ////////////////////////////////////////////////////////////////////////////////////////////////////
  8. namespace Core {
  9. extern ARM_Interface* g_app_core; ///< ARM11 application core
  10. extern ARM_Interface* g_sys_core; ///< ARM11 system (OS) core
  11. ////////////////////////////////////////////////////////////////////////////////////////////////////
  12. /// Start the core
  13. void Start();
  14. /**
  15. * Run the core CPU loop
  16. * This function loops for 100 instructions in the CPU before trying to update hardware. This is a
  17. * little bit faster than SingleStep, and should be pretty much equivalent. The number of
  18. * instructions chosen is fairly arbitrary, however a large number will more drastically affect the
  19. * frequency of GSP interrupts and likely break things. The point of this is to just loop in the CPU
  20. * for more than 1 instruction to reduce overhead and make it a little bit faster...
  21. */
  22. void RunLoop(int tight_loop=100);
  23. /// Step the CPU one instruction
  24. void SingleStep();
  25. /// Halt the core
  26. void Halt(const char *msg);
  27. /// Kill the core
  28. void Stop();
  29. /// Initialize the core
  30. int Init();
  31. /// Shutdown the core
  32. void Shutdown();
  33. } // namespace