core.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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/skyeye_common/armdefs.h"
  7. ////////////////////////////////////////////////////////////////////////////////////////////////////
  8. namespace Core {
  9. enum CPUCore {
  10. CPU_Interpreter,
  11. CPU_FastInterpreter
  12. };
  13. extern ARM_Interface* g_app_core; ///< ARM11 application core
  14. extern ARM_Interface* g_sys_core; ///< ARM11 system (OS) core
  15. ////////////////////////////////////////////////////////////////////////////////////////////////////
  16. /// Start the core
  17. void Start();
  18. /**
  19. * Run the core CPU loop
  20. * This function loops for 100 instructions in the CPU before trying to update hardware. This is a
  21. * little bit faster than SingleStep, and should be pretty much equivalent. The number of
  22. * instructions chosen is fairly arbitrary, however a large number will more drastically affect the
  23. * frequency of GSP interrupts and likely break things. The point of this is to just loop in the CPU
  24. * for more than 1 instruction to reduce overhead and make it a little bit faster...
  25. */
  26. void RunLoop(int tight_loop=100);
  27. /// Step the CPU one instruction
  28. void SingleStep();
  29. /// Halt the core
  30. void Halt(const char *msg);
  31. /// Kill the core
  32. void Stop();
  33. /// Initialize the core
  34. int Init();
  35. /// Shutdown the core
  36. void Shutdown();
  37. } // namespace