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 runs the core for the specified number of CPU instructions before trying to update
  21. * hardware. This is much faster than SingleStep (and should be equivalent), as the CPU is not
  22. * required to do a full dispatch with each instruction. NOTE: the number of instructions requested
  23. * is not guaranteed to run, as this will be interrupted preemptively if a hardware update is
  24. * requested (e.g. on a thread switch).
  25. */
  26. void RunLoop(int tight_loop=1000);
  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