core.cpp 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. // Copyright 2014 Citra Emulator Project
  2. // Licensed under GPLv2
  3. // Refer to the license.txt file included.
  4. #include "common/common_types.h"
  5. #include "common/log.h"
  6. #include "core/core.h"
  7. #include "core/mem_map.h"
  8. #include "core/hw/hw.h"
  9. #include "core/arm/disassembler/arm_disasm.h"
  10. #include "core/arm/interpreter/arm_interpreter.h"
  11. namespace Core {
  12. ARM_Disasm* g_disasm = NULL; ///< ARM disassembler
  13. ARM_Interface* g_app_core = NULL; ///< ARM11 application core
  14. ARM_Interface* g_sys_core = NULL; ///< ARM11 system (OS) core
  15. /// Run the core CPU loop
  16. void RunLoop() {
  17. // TODO(ShizZy): ImplementMe
  18. }
  19. /// Step the CPU one instruction
  20. void SingleStep() {
  21. g_app_core->Step();
  22. HW::Update();
  23. }
  24. /// Halt the core
  25. void Halt(const char *msg) {
  26. // TODO(ShizZy): ImplementMe
  27. }
  28. /// Kill the core
  29. void Stop() {
  30. // TODO(ShizZy): ImplementMe
  31. }
  32. /// Initialize the core
  33. int Init() {
  34. NOTICE_LOG(MASTER_LOG, "initialized OK");
  35. g_disasm = new ARM_Disasm();
  36. g_app_core = new ARM_Interpreter();
  37. g_sys_core = new ARM_Interpreter();
  38. return 0;
  39. }
  40. void Shutdown() {
  41. delete g_disasm;
  42. delete g_app_core;
  43. delete g_sys_core;
  44. NOTICE_LOG(MASTER_LOG, "shutdown OK");
  45. }
  46. } // namespace