diff options
| author | 2014-03-31 22:25:55 -0400 | |
|---|---|---|
| committer | 2014-03-31 22:25:55 -0400 | |
| commit | c7f4914a907e38fd51157967a08218937c74debc (patch) | |
| tree | 2aee4c7a470be9b1c52d796bc5e8e2c4cc541979 /src | |
| parent | added ELF loading support to loader.cpp (diff) | |
| download | yuzu-c7f4914a907e38fd51157967a08218937c74debc.tar.gz yuzu-c7f4914a907e38fd51157967a08218937c74debc.tar.xz yuzu-c7f4914a907e38fd51157967a08218937c74debc.zip | |
added simple processing loop and ELF loading to main()... hackish, will cleanup later
Diffstat (limited to 'src')
| -rw-r--r-- | src/citra/src/citra.cpp | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/src/citra/src/citra.cpp b/src/citra/src/citra.cpp index fc4610405..26f5a74eb 100644 --- a/src/citra/src/citra.cpp +++ b/src/citra/src/citra.cpp | |||
| @@ -27,11 +27,15 @@ | |||
| 27 | #include "file_util.h" | 27 | #include "file_util.h" |
| 28 | 28 | ||
| 29 | #include "system.h" | 29 | #include "system.h" |
| 30 | #include "core.h" | ||
| 31 | #include "loader.h" | ||
| 30 | 32 | ||
| 31 | #include "emu_window/emu_window_glfw.h" | 33 | #include "emu_window/emu_window_glfw.h" |
| 32 | 34 | ||
| 33 | #include "citra.h" | 35 | #include "citra.h" |
| 34 | 36 | ||
| 37 | #define E_ERR -1 | ||
| 38 | |||
| 35 | //#define PLAY_FIFO_RECORDING | 39 | //#define PLAY_FIFO_RECORDING |
| 36 | 40 | ||
| 37 | /// Application entry point | 41 | /// Application entry point |
| @@ -48,7 +52,7 @@ int __cdecl main(int argc, char **argv) { | |||
| 48 | 52 | ||
| 49 | System::Init(emu_window); | 53 | System::Init(emu_window); |
| 50 | 54 | ||
| 51 | //if (E_OK != core::Init(emu_window)) { | 55 | //if (E_OK != Core::Init(emu_window)) { |
| 52 | // LOG_ERROR(TMASTER, "core initialization failed, exiting..."); | 56 | // LOG_ERROR(TMASTER, "core initialization failed, exiting..."); |
| 53 | // core::Kill(); | 57 | // core::Kill(); |
| 54 | // exit(1); | 58 | // exit(1); |
| @@ -81,10 +85,19 @@ int __cdecl main(int argc, char **argv) { | |||
| 81 | //} | 85 | //} |
| 82 | //core::Kill(); | 86 | //core::Kill(); |
| 83 | 87 | ||
| 84 | while (1) { | 88 | std::string boot_filename = "homebrew.elf"; |
| 85 | } | 89 | std::string error_str; |
| 90 | |||
| 91 | bool res = Loader::LoadFile(boot_filename, &error_str); | ||
| 92 | |||
| 93 | if (!res) { | ||
| 94 | ERROR_LOG(BOOT, "Failed to load ROM: %s", error_str.c_str()); | ||
| 95 | } | ||
| 96 | for (int tight_loop = 0; tight_loop < 10000; ++tight_loop) { | ||
| 97 | Core::SingleStep(); | ||
| 98 | } | ||
| 86 | 99 | ||
| 87 | //delete emu_window; | 100 | delete emu_window; |
| 88 | 101 | ||
| 89 | return 0; | 102 | return 0; |
| 90 | } | 103 | } |