summaryrefslogtreecommitdiff
path: root/src/akiru
diff options
context:
space:
mode:
authorGravatar ShizZy2013-09-04 22:09:15 -0400
committerGravatar ShizZy2013-09-04 22:09:15 -0400
commit86495a83c16538ddcab7da4ea68de38ee2d1837e (patch)
tree7f6b57ca0e01e972556f335b3000e2ffac6e0b96 /src/akiru
parentadded build directory to be ignored by git (diff)
downloadyuzu-86495a83c16538ddcab7da4ea68de38ee2d1837e.tar.gz
yuzu-86495a83c16538ddcab7da4ea68de38ee2d1837e.tar.xz
yuzu-86495a83c16538ddcab7da4ea68de38ee2d1837e.zip
various fixes to be able to build project
Diffstat (limited to 'src/akiru')
-rw-r--r--src/akiru/akiru.rcbin3284 -> 3144 bytes
-rw-r--r--src/akiru/akiru.vcxproj44
-rw-r--r--src/akiru/akiru.vcxproj.filters19
-rw-r--r--src/akiru/src/akiru.cpp135
-rw-r--r--src/akiru/src/emuwindow/emu_window_glfw.cpp (renamed from src/akiru/src/emuwindow/emuwindow_glfw.cpp)0
-rw-r--r--src/akiru/src/emuwindow/emu_window_glfw.h (renamed from src/akiru/src/emuwindow/emuwindow_glfw.h)0
6 files changed, 80 insertions, 118 deletions
diff --git a/src/akiru/akiru.rc b/src/akiru/akiru.rc
index db4fc80b9..dd5241bdf 100644
--- a/src/akiru/akiru.rc
+++ b/src/akiru/akiru.rc
Binary files differ
diff --git a/src/akiru/akiru.vcxproj b/src/akiru/akiru.vcxproj
index f5ab86719..f74948853 100644
--- a/src/akiru/akiru.vcxproj
+++ b/src/akiru/akiru.vcxproj
@@ -46,35 +46,35 @@
46 </ImportGroup> 46 </ImportGroup>
47 <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> 47 <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
48 <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> 48 <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
49 <Import Project="..\..\vsprops\Base.props" /> 49 <Import Project="..\..\vsprops\base.props" />
50 <Import Project="..\..\vsprops\CodeGen_Debug.props" /> 50 <Import Project="..\..\vsprops\code_generation_debug.props" />
51 <Import Project="..\..\vsprops\App.props" /> 51 <Import Project="..\..\vsprops\app.props" />
52 <Import Project="..\..\vsprops\Optimization_Debug.props" /> 52 <Import Project="..\..\vsprops\optimization_debug.props" />
53 <Import Project="..\..\vsprops\Externals.props" /> 53 <Import Project="..\..\vsprops\externals.props" />
54 </ImportGroup> 54 </ImportGroup>
55 <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> 55 <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
56 <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> 56 <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
57 <Import Project="..\..\vsprops\Base.props" /> 57 <Import Project="..\..\vsprops\base.props" />
58 <Import Project="..\..\vsprops\CodeGen_Debug.props" /> 58 <Import Project="..\..\vsprops\code_generation_debug.props" />
59 <Import Project="..\..\vsprops\App.props" /> 59 <Import Project="..\..\vsprops\app.props" />
60 <Import Project="..\..\vsprops\Optimization_Debug.props" /> 60 <Import Project="..\..\vsprops\optimization_debug.props" />
61 <Import Project="..\..\vsprops\Externals.props" /> 61 <Import Project="..\..\vsprops\externals.props" />
62 </ImportGroup> 62 </ImportGroup>
63 <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> 63 <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
64 <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> 64 <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
65 <Import Project="..\..\vsprops\Base.props" /> 65 <Import Project="..\..\vsprops\base.props" />
66 <Import Project="..\..\vsprops\CodeGen_Release.props" /> 66 <Import Project="..\..\vsprops\code_generation_release.props" />
67 <Import Project="..\..\vsprops\App.props" /> 67 <Import Project="..\..\vsprops\app.props" />
68 <Import Project="..\..\vsprops\Optimization_Release.props" /> 68 <Import Project="..\..\vsprops\optimization_release.props" />
69 <Import Project="..\..\vsprops\Externals.props" /> 69 <Import Project="..\..\vsprops\externals.props" />
70 </ImportGroup> 70 </ImportGroup>
71 <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> 71 <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
72 <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> 72 <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
73 <Import Project="..\..\vsprops\Base.props" /> 73 <Import Project="..\..\vsprops\base.props" />
74 <Import Project="..\..\vsprops\CodeGen_Release.props" /> 74 <Import Project="..\..\vsprops\code_generation_release.props" />
75 <Import Project="..\..\vsprops\App.props" /> 75 <Import Project="..\..\vsprops\app.props" />
76 <Import Project="..\..\vsprops\Optimization_Release.props" /> 76 <Import Project="..\..\vsprops\optimization_release.props" />
77 <Import Project="..\..\vsprops\Externals.props" /> 77 <Import Project="..\..\vsprops\externals.props" />
78 </ImportGroup> 78 </ImportGroup>
79 <PropertyGroup Label="UserMacros" /> 79 <PropertyGroup Label="UserMacros" />
80 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> 80 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
@@ -190,13 +190,13 @@
190 </ProjectReference> 190 </ProjectReference>
191 </ItemGroup> 191 </ItemGroup>
192 <ItemGroup> 192 <ItemGroup>
193 <ClCompile Include="src\emuwindow\emuwindow_glfw.cpp" />
194 <ClCompile Include="src\akiru.cpp" /> 193 <ClCompile Include="src\akiru.cpp" />
194 <ClCompile Include="src\emu_window\emu_window_glfw.cpp" />
195 </ItemGroup> 195 </ItemGroup>
196 <ItemGroup> 196 <ItemGroup>
197 <ClInclude Include="resource.h" /> 197 <ClInclude Include="resource.h" />
198 <ClInclude Include="src\emuwindow\emuwindow_glfw.h" />
199 <ClInclude Include="src\akiru.h" /> 198 <ClInclude Include="src\akiru.h" />
199 <ClInclude Include="src\emu_window\emu_window_glfw.h" />
200 <ClInclude Include="src\version.h" /> 200 <ClInclude Include="src\version.h" />
201 </ItemGroup> 201 </ItemGroup>
202 <ItemGroup> 202 <ItemGroup>
diff --git a/src/akiru/akiru.vcxproj.filters b/src/akiru/akiru.vcxproj.filters
index 2fc1128af..a0cff2548 100644
--- a/src/akiru/akiru.vcxproj.filters
+++ b/src/akiru/akiru.vcxproj.filters
@@ -2,32 +2,23 @@
2<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 2<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <ItemGroup> 3 <ItemGroup>
4 <ClCompile Include="src\akiru.cpp" /> 4 <ClCompile Include="src\akiru.cpp" />
5 <ClCompile Include="src\emuwindow\emuwindow_glfw.cpp"> 5 <ClCompile Include="src\emu_window\emu_window_glfw.cpp">
6 <Filter>emuwindow</Filter> 6 <Filter>emu_window</Filter>
7 </ClCompile>
8 <ClCompile Include="src\emuwindow\emuwindow_sdl.cpp">
9 <Filter>emuwindow</Filter>
10 </ClCompile> 7 </ClCompile>
11 </ItemGroup> 8 </ItemGroup>
12 <ItemGroup> 9 <ItemGroup>
13 <ClInclude Include="resource.h" /> 10 <ClInclude Include="resource.h" />
14 <ClInclude Include="src\version.h" /> 11 <ClInclude Include="src\version.h" />
15 <ClInclude Include="src\emuwindow\emuwindow_glfw.h">
16 <Filter>emuwindow</Filter>
17 </ClInclude>
18 <ClInclude Include="src\akiru.h" /> 12 <ClInclude Include="src\akiru.h" />
19 <ClInclude Include="src\emuwindow\emuwindow_sdl.h"> 13 <ClInclude Include="src\emu_window\emu_window_glfw.h">
20 <Filter>emuwindow</Filter> 14 <Filter>emu_window</Filter>
21 </ClInclude> 15 </ClInclude>
22 </ItemGroup> 16 </ItemGroup>
23 <ItemGroup> 17 <ItemGroup>
24 <ResourceCompile Include="akiru.rc" /> 18 <ResourceCompile Include="akiru.rc" />
25 </ItemGroup> 19 </ItemGroup>
26 <ItemGroup> 20 <ItemGroup>
27 <None Include="res\icon3_48x48.ico" /> 21 <Filter Include="emu_window">
28 </ItemGroup>
29 <ItemGroup>
30 <Filter Include="emuwindow">
31 <UniqueIdentifier>{e3161526-9f53-4670-8dae-2be81ff01bc2}</UniqueIdentifier> 22 <UniqueIdentifier>{e3161526-9f53-4670-8dae-2be81ff01bc2}</UniqueIdentifier>
32 </Filter> 23 </Filter>
33 </ItemGroup> 24 </ItemGroup>
diff --git a/src/akiru/src/akiru.cpp b/src/akiru/src/akiru.cpp
index 0d15c5b20..bb69cf1b1 100644
--- a/src/akiru/src/akiru.cpp
+++ b/src/akiru/src/akiru.cpp
@@ -1,9 +1,9 @@
1/*! 1/**
2 * Copyright (C) 2013 Akiru Emulator 2 * Copyright (C) 2013 Akiru Emulator
3 * 3 *
4 * @file akiry.cpp 4 * @file akiru.cpp
5 * @author ShizZy <shizzy247@gmail.com> 5 * @author ShizZy <shizzy247@gmail.com>
6 * @date 2012-02-11 6 * @date 2013-09-04
7 * @brief Main entry point 7 * @brief Main entry point
8 * 8 *
9 * @section LICENSE 9 * @section LICENSE
@@ -23,102 +23,73 @@
23 */ 23 */
24 24
25#include "common.h" 25#include "common.h"
26#include "platform.h"
27 26
28#if EMU_PLATFORM == PLATFORM_LINUX 27//#if EMU_PLATFORM == PLATFORM_LINUX
29#include <unistd.h> 28//#include <unistd.h>
30#endif 29//#endif
31 30
32#include "config.h" 31#include "emu_window/emu_window_glfw.h"
33#include "xml.h"
34#include "x86_utils.h"
35
36//#include "core.h"
37//#include "dvd/loader.h"
38//#include "powerpc/cpu_core.h"
39//#include "hw/hw.h"
40//#include "video_core.h"
41
42#include "emuwindow/emuwindow_glfw.h"
43 32
44#include "akiru.h" 33#include "akiru.h"
45 34
46////////////////////////////////////////////////////////////////////////////////////////////////////
47// This is needed to fix SDL in certain build environments
48#ifdef main
49#undef main
50#endif
51
52//#define PLAY_FIFO_RECORDING 35//#define PLAY_FIFO_RECORDING
53 36
54/// Application entry point 37/// Application entry point
55int __cdecl main(int argc, char **argv) { 38int __cdecl main(int argc, char **argv) {
56 u32 tight_loop; 39 u32 tight_loop;
57 40
58 LOG_NOTICE(TMASTER, APP_NAME " starting...\n"); 41 printf("akiru starting...\n");
59 42
60 char program_dir[MAX_PATH]; 43 //char program_dir[MAX_PATH];
61 _getcwd(program_dir, MAX_PATH-1); 44 //_getcwd(program_dir, MAX_PATH-1);
62 size_t cwd_len = strlen(program_dir); 45 //size_t cwd_len = strlen(program_dir);
63 program_dir[cwd_len] = '/'; 46 //program_dir[cwd_len] = '/';
64 program_dir[cwd_len+1] = '\0'; 47 //program_dir[cwd_len+1] = '\0';
65 48
66 common::ConfigManager config_manager; 49 //common::ConfigManager config_manager;
67 config_manager.set_program_dir(program_dir, MAX_PATH); 50 //config_manager.set_program_dir(program_dir, MAX_PATH);
68 config_manager.ReloadConfig(NULL); 51 //config_manager.ReloadConfig(NULL);
69 core::SetConfigManager(&config_manager); 52 //core::SetConfigManager(&config_manager);
70 53
71 EmuWindow_GLFW* emu_window = new EmuWindow_GLFW; 54 EmuWindow_GLFW* emu_window = new EmuWindow_GLFW;
72 55
73 if (E_OK != core::Init(emu_window)) { 56 //if (E_OK != core::Init(emu_window)) {
74 LOG_ERROR(TMASTER, "core initialization failed, exiting..."); 57 // LOG_ERROR(TMASTER, "core initialization failed, exiting...");
75 core::Kill(); 58 // core::Kill();
76 exit(1); 59 // exit(1);
77 } 60 //}
78 61
79#ifndef PLAY_FIFO_RECORDING 62 //// Load a game or die...
80 // Load a game or die... 63 //if (E_OK == dvd::LoadBootableFile(common::g_config->default_boot_file())) {
81 if (E_OK == dvd::LoadBootableFile(common::g_config->default_boot_file())) { 64 // if (common::g_config->enable_auto_boot()) {
82 if (common::g_config->enable_auto_boot()) { 65 // core::Start();
83 core::Start(); 66 // } else {
84 } else { 67 // LOG_ERROR(TMASTER, "Autoboot required in no-GUI mode... Exiting!\n");
85 LOG_ERROR(TMASTER, "Autoboot required in no-GUI mode... Exiting!\n"); 68 // }
86 } 69 //} else {
87 } else { 70 // LOG_ERROR(TMASTER, "Failed to load a bootable file... Exiting!\n");
88 LOG_ERROR(TMASTER, "Failed to load a bootable file... Exiting!\n"); 71 // exit(E_ERR);
89 exit(E_ERR); 72 //}
90 } 73 //// run the game
91 // run the game 74 //while(core::SYS_DIE != core::g_state) {
92 while(core::SYS_DIE != core::g_state) { 75 // if (core::SYS_RUNNING == core::g_state) {
93 if (core::SYS_RUNNING == core::g_state) { 76 // if(!(cpu->is_on)) {
94 if(!(cpu->is_on)) { 77 // cpu->Start(); // Initialize and start CPU.
95 cpu->Start(); // Initialize and start CPU. 78 // } else {
96 } else { 79 // for(tight_loop = 0; tight_loop < 10000; ++tight_loop) {
97 for(tight_loop = 0; tight_loop < 10000; ++tight_loop) { 80 // cpu->execStep();
98 cpu->execStep(); 81 // }
99 } 82 // }
100 } 83 // } else if (core::SYS_HALTED == core::g_state) {
101 } else if (core::SYS_HALTED == core::g_state) { 84 // core::Stop();
102 core::Stop(); 85 // }
103 } 86 //}
104 } 87 //core::Kill();
105 core::Kill(); 88
106#else 89 while (1) {
107 // load fifo log and replay it 90 }
108
109 // TODO: Restructure initialization process - Fix Flipper_Open being called from dvd loaders (wtf?)
110 Flipper_Open();
111 video_core::Start(emu_window);
112 core::SetState(core::SYS_RUNNING);
113
114 fifo_player::FPFile file;
115 fifo_player::Load("/home/tony/20_frames.gff", file);
116 fifo_player::PlayFile(file);
117 91
118 // TODO: Wait for video core to finish - PlayFile should handle this
119 while (1);
120#endif
121 delete emu_window; 92 delete emu_window;
122 93
123 return E_OK; 94 return 0;
124} 95}
diff --git a/src/akiru/src/emuwindow/emuwindow_glfw.cpp b/src/akiru/src/emuwindow/emu_window_glfw.cpp
index 884c10ad0..884c10ad0 100644
--- a/src/akiru/src/emuwindow/emuwindow_glfw.cpp
+++ b/src/akiru/src/emuwindow/emu_window_glfw.cpp
diff --git a/src/akiru/src/emuwindow/emuwindow_glfw.h b/src/akiru/src/emuwindow/emu_window_glfw.h
index 1256cabe4..1256cabe4 100644
--- a/src/akiru/src/emuwindow/emuwindow_glfw.h
+++ b/src/akiru/src/emuwindow/emu_window_glfw.h