diff options
29 files changed, 177 insertions, 44 deletions
diff --git a/src/citra_qt/bootmanager.hxx b/src/citra_qt/bootmanager.hxx index 5f69f15ea..1c893384c 100644 --- a/src/citra_qt/bootmanager.hxx +++ b/src/citra_qt/bootmanager.hxx | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | // Copyright 2014 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 1 | #include <atomic> | 5 | #include <atomic> |
| 2 | 6 | ||
| 3 | #include <QThread> | 7 | #include <QThread> |
diff --git a/src/citra_qt/config/controller_config.cpp b/src/citra_qt/config/controller_config.cpp index 52dfb627c..41000e29b 100644 --- a/src/citra_qt/config/controller_config.cpp +++ b/src/citra_qt/config/controller_config.cpp | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | // Copyright 2014 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 1 | #include <QDialogButtonBox> | 5 | #include <QDialogButtonBox> |
| 2 | 6 | ||
| 3 | #include "controller_config.hxx" | 7 | #include "controller_config.hxx" |
diff --git a/src/citra_qt/config/controller_config.hxx b/src/citra_qt/config/controller_config.hxx index 0e423ee50..451593de1 100644 --- a/src/citra_qt/config/controller_config.hxx +++ b/src/citra_qt/config/controller_config.hxx | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | // Copyright 2014 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 1 | #ifndef _CONTROLLER_CONFIG_HXX_ | 5 | #ifndef _CONTROLLER_CONFIG_HXX_ |
| 2 | #define _CONTROLLER_CONFIG_HXX_ | 6 | #define _CONTROLLER_CONFIG_HXX_ |
| 3 | 7 | ||
diff --git a/src/citra_qt/config/controller_config_util.cpp b/src/citra_qt/config/controller_config_util.cpp index aee3f8616..272e8d41e 100644 --- a/src/citra_qt/config/controller_config_util.cpp +++ b/src/citra_qt/config/controller_config_util.cpp | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | // Copyright 2014 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 1 | #include <QPushButton> | 5 | #include <QPushButton> |
| 2 | #include <QStyle> | 6 | #include <QStyle> |
| 3 | #include <QGridLayout> | 7 | #include <QGridLayout> |
diff --git a/src/citra_qt/config/controller_config_util.hxx b/src/citra_qt/config/controller_config_util.hxx index af38f126c..15e025b57 100644 --- a/src/citra_qt/config/controller_config_util.hxx +++ b/src/citra_qt/config/controller_config_util.hxx | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | // Copyright 2014 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 1 | #ifndef _CONTROLLER_CONFIG_UTIL_HXX_ | 5 | #ifndef _CONTROLLER_CONFIG_UTIL_HXX_ |
| 2 | #define _CONTROLLER_CONFIG_UTIL_HXX_ | 6 | #define _CONTROLLER_CONFIG_UTIL_HXX_ |
| 3 | 7 | ||
diff --git a/src/citra_qt/debugger/callstack.cpp b/src/citra_qt/debugger/callstack.cpp index 16c6113be..4a47ad468 100644 --- a/src/citra_qt/debugger/callstack.cpp +++ b/src/citra_qt/debugger/callstack.cpp | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | // Copyright 2014 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 1 | #include <QStandardItemModel> | 5 | #include <QStandardItemModel> |
| 2 | 6 | ||
| 3 | #include "callstack.hxx" | 7 | #include "callstack.hxx" |
diff --git a/src/citra_qt/debugger/callstack.hxx b/src/citra_qt/debugger/callstack.hxx index 680a73b6d..4f4f74823 100644 --- a/src/citra_qt/debugger/callstack.hxx +++ b/src/citra_qt/debugger/callstack.hxx | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | // Copyright 2014 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 1 | #include <QDockWidget> | 5 | #include <QDockWidget> |
| 2 | #include "ui_callstack.h" | 6 | #include "ui_callstack.h" |
| 3 | 7 | ||
diff --git a/src/citra_qt/debugger/disassembler.cpp b/src/citra_qt/debugger/disassembler.cpp index 14745f3bb..636a0f187 100644 --- a/src/citra_qt/debugger/disassembler.cpp +++ b/src/citra_qt/debugger/disassembler.cpp | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | // Copyright 2014 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 1 | #include "disassembler.hxx" | 5 | #include "disassembler.hxx" |
| 2 | 6 | ||
| 3 | #include "../bootmanager.hxx" | 7 | #include "../bootmanager.hxx" |
diff --git a/src/citra_qt/debugger/disassembler.hxx b/src/citra_qt/debugger/disassembler.hxx index a842da956..6d3cef108 100644 --- a/src/citra_qt/debugger/disassembler.hxx +++ b/src/citra_qt/debugger/disassembler.hxx | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | // Copyright 2014 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 1 | #include <QAbstractItemModel> | 5 | #include <QAbstractItemModel> |
| 2 | #include <QDockWidget> | 6 | #include <QDockWidget> |
| 3 | #include "ui_disassembler.h" | 7 | #include "ui_disassembler.h" |
diff --git a/src/citra_qt/debugger/ramview.cpp b/src/citra_qt/debugger/ramview.cpp index 3f899b95e..d3ff69a61 100644 --- a/src/citra_qt/debugger/ramview.cpp +++ b/src/citra_qt/debugger/ramview.cpp | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | // Copyright 2014 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 1 | #include "ramview.hxx" | 5 | #include "ramview.hxx" |
| 2 | 6 | ||
| 3 | #include "common/common.h" | 7 | #include "common/common.h" |
diff --git a/src/citra_qt/debugger/ramview.hxx b/src/citra_qt/debugger/ramview.hxx index 1db1546aa..18423036f 100644 --- a/src/citra_qt/debugger/ramview.hxx +++ b/src/citra_qt/debugger/ramview.hxx | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | // Copyright 2014 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 1 | #include "qhexedit.h" | 5 | #include "qhexedit.h" |
| 2 | 6 | ||
| 3 | class GRamView : public QHexEdit | 7 | class GRamView : public QHexEdit |
diff --git a/src/citra_qt/debugger/registers.cpp b/src/citra_qt/debugger/registers.cpp index ed17ee4b4..f798495b2 100644 --- a/src/citra_qt/debugger/registers.cpp +++ b/src/citra_qt/debugger/registers.cpp | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | // Copyright 2014 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 1 | #include "registers.hxx" | 5 | #include "registers.hxx" |
| 2 | 6 | ||
| 3 | #include "core/core.h" | 7 | #include "core/core.h" |
diff --git a/src/citra_qt/debugger/registers.hxx b/src/citra_qt/debugger/registers.hxx index 4cca957ce..ac8429f2b 100644 --- a/src/citra_qt/debugger/registers.hxx +++ b/src/citra_qt/debugger/registers.hxx | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | // Copyright 2014 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 1 | #include "ui_registers.h" | 5 | #include "ui_registers.h" |
| 2 | 6 | ||
| 3 | #include <QDockWidget> | 7 | #include <QDockWidget> |
diff --git a/src/citra_qt/hotkeys.cpp b/src/citra_qt/hotkeys.cpp index 5d0b52e4f..08be7ff74 100644 --- a/src/citra_qt/hotkeys.cpp +++ b/src/citra_qt/hotkeys.cpp | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | // Copyright 2014 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 1 | #include <QKeySequence> | 5 | #include <QKeySequence> |
| 2 | #include <QSettings> | 6 | #include <QSettings> |
| 3 | #include "hotkeys.hxx" | 7 | #include "hotkeys.hxx" |
diff --git a/src/citra_qt/hotkeys.hxx b/src/citra_qt/hotkeys.hxx index 66ef7bb4e..75c7cc625 100644 --- a/src/citra_qt/hotkeys.hxx +++ b/src/citra_qt/hotkeys.hxx | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | // Copyright 2014 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 1 | #include <QShortcut> | 5 | #include <QShortcut> |
| 2 | #include <QDialog> | 6 | #include <QDialog> |
| 3 | #include "ui_hotkeys.h" | 7 | #include "ui_hotkeys.h" |
diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp index 5864f1f9d..64e389f25 100644 --- a/src/citra_qt/main.cpp +++ b/src/citra_qt/main.cpp | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | // Copyright 2014 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 1 | #include <thread> | 5 | #include <thread> |
| 2 | 6 | ||
| 3 | #include <QtGui> | 7 | #include <QtGui> |
| @@ -175,7 +179,7 @@ void GMainWindow::BootGame(std::string filename) | |||
| 175 | 179 | ||
| 176 | void GMainWindow::OnMenuLoadFile() | 180 | void GMainWindow::OnMenuLoadFile() |
| 177 | { | 181 | { |
| 178 | QString filename = QFileDialog::getOpenFileName(this, tr("Load File"), QString(), tr("3DS executable (*.3dsx *.elf *.axf *.bin *.cci *.cxi)")); | 182 | QString filename = QFileDialog::getOpenFileName(this, tr("Load File"), QString(), tr("3DS executable (*.3ds *.3dsx *.elf *.axf *.bin *.cci *.cxi)")); |
| 179 | if (filename.size()) | 183 | if (filename.size()) |
| 180 | BootGame(filename.toLatin1().data()); | 184 | BootGame(filename.toLatin1().data()); |
| 181 | } | 185 | } |
diff --git a/src/citra_qt/main.hxx b/src/citra_qt/main.hxx index b1b40df46..72df17c50 100644 --- a/src/citra_qt/main.hxx +++ b/src/citra_qt/main.hxx | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | // Copyright 2014 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 1 | #ifndef _CITRA_QT_MAIN_HXX_ | 5 | #ifndef _CITRA_QT_MAIN_HXX_ |
| 2 | #define _CITRA_QT_MAIN_HXX_ | 6 | #define _CITRA_QT_MAIN_HXX_ |
| 3 | 7 | ||
diff --git a/src/citra_qt/version.h b/src/citra_qt/version.h index 07022de5c..9d5a2b1a2 100644 --- a/src/citra_qt/version.h +++ b/src/citra_qt/version.h | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | // Copyright 2014 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 1 | // TODO: Supposed to be generated... | 5 | // TODO: Supposed to be generated... |
| 2 | // GENERATED - Do not edit! | 6 | // GENERATED - Do not edit! |
| 3 | #ifndef VERSION_H_ | 7 | #ifndef VERSION_H_ |
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index addcb953c..b67226d8d 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt | |||
| @@ -66,6 +66,7 @@ set(SRCS | |||
| 66 | hle/service/soc_u.cpp | 66 | hle/service/soc_u.cpp |
| 67 | hle/service/srv.cpp | 67 | hle/service/srv.cpp |
| 68 | hle/service/ssl_c.cpp | 68 | hle/service/ssl_c.cpp |
| 69 | hle/service/y2r_u.cpp | ||
| 69 | hle/config_mem.cpp | 70 | hle/config_mem.cpp |
| 70 | hle/hle.cpp | 71 | hle/hle.cpp |
| 71 | hle/svc.cpp | 72 | hle/svc.cpp |
| @@ -157,6 +158,7 @@ set(HEADERS | |||
| 157 | hle/service/soc_u.h | 158 | hle/service/soc_u.h |
| 158 | hle/service/srv.h | 159 | hle/service/srv.h |
| 159 | hle/service/ssl_c.h | 160 | hle/service/ssl_c.h |
| 161 | hle/service/y2r_u.h | ||
| 160 | hle/config_mem.h | 162 | hle/config_mem.h |
| 161 | hle/result.h | 163 | hle/result.h |
| 162 | hle/function_wrappers.h | 164 | hle/function_wrappers.h |
diff --git a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp index 30f68f47a..ffe05cdbc 100644 --- a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp +++ b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp | |||
| @@ -1079,7 +1079,7 @@ typedef struct _cdp_inst { | |||
| 1079 | unsigned int cp_num; | 1079 | unsigned int cp_num; |
| 1080 | unsigned int opcode_2; | 1080 | unsigned int opcode_2; |
| 1081 | unsigned int CRm; | 1081 | unsigned int CRm; |
| 1082 | uint32 inst; | 1082 | unsigned int inst; |
| 1083 | }cdp_inst; | 1083 | }cdp_inst; |
| 1084 | 1084 | ||
| 1085 | typedef struct _uxtb_inst { | 1085 | typedef struct _uxtb_inst { |
| @@ -3485,7 +3485,7 @@ static tdstate decode_thumb_instr(arm_processor *cpu, uint32_t inst, addr_t addr | |||
| 3485 | tdstate ret = thumb_translate (addr, inst, arm_inst, inst_size); | 3485 | tdstate ret = thumb_translate (addr, inst, arm_inst, inst_size); |
| 3486 | if(ret == t_branch){ | 3486 | if(ret == t_branch){ |
| 3487 | // TODO: FIXME, endian should be judged | 3487 | // TODO: FIXME, endian should be judged |
| 3488 | uint32 tinstr; | 3488 | u32 tinstr; |
| 3489 | if((addr & 0x3) != 0) | 3489 | if((addr & 0x3) != 0) |
| 3490 | tinstr = inst >> 16; | 3490 | tinstr = inst >> 16; |
| 3491 | else | 3491 | else |
| @@ -3498,7 +3498,7 @@ static tdstate decode_thumb_instr(arm_processor *cpu, uint32_t inst, addr_t addr | |||
| 3498 | case 26: | 3498 | case 26: |
| 3499 | case 27: | 3499 | case 27: |
| 3500 | if (((tinstr & 0x0F00) != 0x0E00) && ((tinstr & 0x0F00) != 0x0F00)){ | 3500 | if (((tinstr & 0x0F00) != 0x0E00) && ((tinstr & 0x0F00) != 0x0F00)){ |
| 3501 | uint32 cond = (tinstr & 0x0F00) >> 8; | 3501 | u32 cond = (tinstr & 0x0F00) >> 8; |
| 3502 | inst_index = table_length - 4; | 3502 | inst_index = table_length - 4; |
| 3503 | *ptr_inst_base = arm_instruction_trans[inst_index](tinstr, inst_index); | 3503 | *ptr_inst_base = arm_instruction_trans[inst_index](tinstr, inst_index); |
| 3504 | } else { | 3504 | } else { |
| @@ -6720,7 +6720,7 @@ unsigned InterpreterMainLoop(ARMul_State* state) { | |||
| 6720 | BLX_1_THUMB: | 6720 | BLX_1_THUMB: |
| 6721 | { | 6721 | { |
| 6722 | // BLX 1 for armv5t and above | 6722 | // BLX 1 for armv5t and above |
| 6723 | uint32 tmp = cpu->Reg[15]; | 6723 | u32 tmp = cpu->Reg[15]; |
| 6724 | blx_1_thumb *inst_cream = (blx_1_thumb *)inst_base->component; | 6724 | blx_1_thumb *inst_cream = (blx_1_thumb *)inst_base->component; |
| 6725 | cpu->Reg[15] = (cpu->Reg[14] + inst_cream->imm) & 0xFFFFFFFC; | 6725 | cpu->Reg[15] = (cpu->Reg[14] + inst_cream->imm) & 0xFFFFFFFC; |
| 6726 | cpu->Reg[14] = ((tmp + 2) | 1); | 6726 | cpu->Reg[14] = ((tmp + 2) | 1); |
diff --git a/src/core/arm/dyncom/arm_dyncom_run.h b/src/core/arm/dyncom/arm_dyncom_run.h index aeabeac16..c70522274 100644 --- a/src/core/arm/dyncom/arm_dyncom_run.h +++ b/src/core/arm/dyncom/arm_dyncom_run.h | |||
| @@ -24,8 +24,8 @@ | |||
| 24 | void switch_mode(arm_core_t *core, uint32_t mode); | 24 | void switch_mode(arm_core_t *core, uint32_t mode); |
| 25 | 25 | ||
| 26 | /* FIXME, we temporarily think thumb instruction is always 16 bit */ | 26 | /* FIXME, we temporarily think thumb instruction is always 16 bit */ |
| 27 | static inline uint32 GET_INST_SIZE(arm_core_t* core){ | 27 | static inline u32 GET_INST_SIZE(arm_core_t* core) { |
| 28 | return core->TFlag? 2 : 4; | 28 | return core->TFlag? 2 : 4; |
| 29 | } | 29 | } |
| 30 | 30 | ||
| 31 | /** | 31 | /** |
| @@ -36,8 +36,8 @@ static inline uint32 GET_INST_SIZE(arm_core_t* core){ | |||
| 36 | * | 36 | * |
| 37 | * @return | 37 | * @return |
| 38 | */ | 38 | */ |
| 39 | static inline addr_t CHECK_READ_REG15_WA(arm_core_t* core, int Rn){ | 39 | static inline addr_t CHECK_READ_REG15_WA(arm_core_t* core, int Rn) { |
| 40 | return (Rn == 15)? ((core->Reg[15] & ~0x3) + GET_INST_SIZE(core) * 2) : core->Reg[Rn]; | 40 | return (Rn == 15)? ((core->Reg[15] & ~0x3) + GET_INST_SIZE(core) * 2) : core->Reg[Rn]; |
| 41 | } | 41 | } |
| 42 | 42 | ||
| 43 | /** | 43 | /** |
| @@ -48,8 +48,8 @@ static inline addr_t CHECK_READ_REG15_WA(arm_core_t* core, int Rn){ | |||
| 48 | * | 48 | * |
| 49 | * @return | 49 | * @return |
| 50 | */ | 50 | */ |
| 51 | static inline uint32 CHECK_READ_REG15(arm_core_t* core, int Rn){ | 51 | static inline u32 CHECK_READ_REG15(arm_core_t* core, int Rn) { |
| 52 | return (Rn == 15)? ((core->Reg[15] & ~0x1) + GET_INST_SIZE(core) * 2) : core->Reg[Rn]; | 52 | return (Rn == 15)? ((core->Reg[15] & ~0x1) + GET_INST_SIZE(core) * 2) : core->Reg[Rn]; |
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | #endif | 55 | #endif |
diff --git a/src/core/arm/dyncom/arm_dyncom_thumb.h b/src/core/arm/dyncom/arm_dyncom_thumb.h index 5541de9d1..bf69b2fd4 100644 --- a/src/core/arm/dyncom/arm_dyncom_thumb.h +++ b/src/core/arm/dyncom/arm_dyncom_thumb.h | |||
| @@ -37,10 +37,10 @@ enum tdstate { | |||
| 37 | t_uninitialized, | 37 | t_uninitialized, |
| 38 | }; | 38 | }; |
| 39 | 39 | ||
| 40 | tdstate | 40 | tdstate thumb_translate(addr_t addr, u32 instr, u32* ainstr, u32* inst_size); |
| 41 | thumb_translate(addr_t addr, uint32_t instr, uint32_t* ainstr, uint32_t* inst_size); | 41 | |
| 42 | static inline uint32 get_thumb_instr(uint32 instr, addr_t pc){ | 42 | static inline u32 get_thumb_instr(u32 instr, addr_t pc) { |
| 43 | uint32 tinstr; | 43 | u32 tinstr; |
| 44 | if ((pc & 0x3) != 0) | 44 | if ((pc & 0x3) != 0) |
| 45 | tinstr = instr >> 16; | 45 | tinstr = instr >> 16; |
| 46 | else | 46 | else |
diff --git a/src/core/arm/skyeye_common/skyeye_types.h b/src/core/arm/skyeye_common/skyeye_types.h index e7f022f19..fc7d8d922 100644 --- a/src/core/arm/skyeye_common/skyeye_types.h +++ b/src/core/arm/skyeye_common/skyeye_types.h | |||
| @@ -22,34 +22,10 @@ | |||
| 22 | * 12/16/2006 Michael.Kang <blackfin.kang@gmail.com> | 22 | * 12/16/2006 Michael.Kang <blackfin.kang@gmail.com> |
| 23 | */ | 23 | */ |
| 24 | 24 | ||
| 25 | #ifndef __SKYEYE_TYPES_H | 25 | #pragma once |
| 26 | #define __SKYEYE_TYPES_H | ||
| 27 | 26 | ||
| 28 | #include <stdint.h> | 27 | #include <cstdint> |
| 29 | |||
| 30 | /*default machine word length */ | ||
| 31 | |||
| 32 | #ifndef __BEOS__ | ||
| 33 | /* To avoid the type conflict with the qemu */ | ||
| 34 | #ifndef QEMU | ||
| 35 | typedef uint8_t uint8; | ||
| 36 | typedef uint16_t uint16; | ||
| 37 | typedef uint32_t uint32; | ||
| 38 | typedef uint64_t uint64; | ||
| 39 | |||
| 40 | typedef int8_t sint8; | ||
| 41 | typedef int16_t sint16; | ||
| 42 | typedef int32_t sint32; | ||
| 43 | typedef int64_t sint64; | ||
| 44 | #endif | ||
| 45 | 28 | ||
| 46 | typedef uint32_t address_t; | 29 | typedef uint32_t address_t; |
| 47 | typedef uint32_t uinteger_t; | ||
| 48 | typedef int32_t integer_t; | ||
| 49 | |||
| 50 | typedef uint32_t physical_address_t; | 30 | typedef uint32_t physical_address_t; |
| 51 | typedef uint32_t generic_address_t; | 31 | typedef uint32_t generic_address_t; |
| 52 | |||
| 53 | #endif | ||
| 54 | |||
| 55 | #endif | ||
diff --git a/src/core/hle/kernel/address_arbiter.cpp b/src/core/hle/kernel/address_arbiter.cpp index 38705e3cd..736bbc36a 100644 --- a/src/core/hle/kernel/address_arbiter.cpp +++ b/src/core/hle/kernel/address_arbiter.cpp | |||
| @@ -51,6 +51,17 @@ ResultCode ArbitrateAddress(Handle handle, ArbitrationType type, u32 address, s3 | |||
| 51 | HLE::Reschedule(__func__); | 51 | HLE::Reschedule(__func__); |
| 52 | } | 52 | } |
| 53 | break; | 53 | break; |
| 54 | |||
| 55 | case ArbitrationType::DecrementAndWaitIfLessThan: | ||
| 56 | { | ||
| 57 | s32 memory_value = Memory::Read32(address) - 1; | ||
| 58 | Memory::Write32(address, memory_value); | ||
| 59 | if (memory_value <= value) { | ||
| 60 | Kernel::WaitCurrentThread(WAITTYPE_ARB, handle, address); | ||
| 61 | HLE::Reschedule(__func__); | ||
| 62 | } | ||
| 63 | break; | ||
| 64 | } | ||
| 54 | 65 | ||
| 55 | default: | 66 | default: |
| 56 | LOG_ERROR(Kernel, "unknown type=%d", type); | 67 | LOG_ERROR(Kernel, "unknown type=%d", type); |
diff --git a/src/core/hle/kernel/mutex.cpp b/src/core/hle/kernel/mutex.cpp index 558068c79..3dfeffc9b 100644 --- a/src/core/hle/kernel/mutex.cpp +++ b/src/core/hle/kernel/mutex.cpp | |||
| @@ -168,9 +168,9 @@ Handle CreateMutex(bool initial_locked, const std::string& name) { | |||
| 168 | ResultVal<bool> Mutex::WaitSynchronization() { | 168 | ResultVal<bool> Mutex::WaitSynchronization() { |
| 169 | bool wait = locked; | 169 | bool wait = locked; |
| 170 | if (locked) { | 170 | if (locked) { |
| 171 | waiting_threads.push_back(GetCurrentThreadHandle()); | ||
| 171 | Kernel::WaitCurrentThread(WAITTYPE_MUTEX, GetHandle()); | 172 | Kernel::WaitCurrentThread(WAITTYPE_MUTEX, GetHandle()); |
| 172 | } | 173 | } else { |
| 173 | else { | ||
| 174 | // Lock the mutex when the first thread accesses it | 174 | // Lock the mutex when the first thread accesses it |
| 175 | locked = true; | 175 | locked = true; |
| 176 | MutexAcquireLock(this); | 176 | MutexAcquireLock(this); |
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index 0f3cc2aa8..c5233e687 100644 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp | |||
| @@ -37,6 +37,7 @@ | |||
| 37 | #include "core/hle/service/soc_u.h" | 37 | #include "core/hle/service/soc_u.h" |
| 38 | #include "core/hle/service/srv.h" | 38 | #include "core/hle/service/srv.h" |
| 39 | #include "core/hle/service/ssl_c.h" | 39 | #include "core/hle/service/ssl_c.h" |
| 40 | #include "core/hle/service/y2r_u.h" | ||
| 40 | 41 | ||
| 41 | namespace Service { | 42 | namespace Service { |
| 42 | 43 | ||
| @@ -122,6 +123,7 @@ void Init() { | |||
| 122 | g_manager->AddService(new PTM_U::Interface); | 123 | g_manager->AddService(new PTM_U::Interface); |
| 123 | g_manager->AddService(new SOC_U::Interface); | 124 | g_manager->AddService(new SOC_U::Interface); |
| 124 | g_manager->AddService(new SSL_C::Interface); | 125 | g_manager->AddService(new SSL_C::Interface); |
| 126 | g_manager->AddService(new Y2R_U::Interface); | ||
| 125 | 127 | ||
| 126 | LOG_DEBUG(Service, "initialized OK"); | 128 | LOG_DEBUG(Service, "initialized OK"); |
| 127 | } | 129 | } |
diff --git a/src/core/hle/service/y2r_u.cpp b/src/core/hle/service/y2r_u.cpp new file mode 100644 index 000000000..f9e3619dd --- /dev/null +++ b/src/core/hle/service/y2r_u.cpp | |||
| @@ -0,0 +1,45 @@ | |||
| 1 | // Copyright 2014 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include "common/log.h" | ||
| 6 | #include "core/hle/hle.h" | ||
| 7 | #include "core/hle/kernel/event.h" | ||
| 8 | #include "core/hle/service/y2r_u.h" | ||
| 9 | |||
| 10 | //////////////////////////////////////////////////////////////////////////////////////////////////// | ||
| 11 | // Namespace Y2R_U | ||
| 12 | |||
| 13 | namespace Y2R_U { | ||
| 14 | |||
| 15 | const Interface::FunctionInfo FunctionTable[] = { | ||
| 16 | {0x00010040, nullptr, "SetInputFormat"}, | ||
| 17 | {0x00030040, nullptr, "SetOutputFormat"}, | ||
| 18 | {0x00050040, nullptr, "SetRotation"}, | ||
| 19 | {0x00070040, nullptr, "SetBlockAlignment"}, | ||
| 20 | {0x000D0040, nullptr, "SetTransferEndInterrupt"}, | ||
| 21 | {0x000F0000, nullptr, "GetTransferEndEvent"}, | ||
| 22 | {0x00100102, nullptr, "SetSendingY"}, | ||
| 23 | {0x00110102, nullptr, "SetSendingU"}, | ||
| 24 | {0x00120102, nullptr, "SetSendingV"}, | ||
| 25 | {0x00180102, nullptr, "SetReceiving"}, | ||
| 26 | {0x001A0040, nullptr, "SetInputLineWidth"}, | ||
| 27 | {0x001C0040, nullptr, "SetInputLines"}, | ||
| 28 | {0x00200040, nullptr, "SetStandardCoefficient"}, | ||
| 29 | {0x00220040, nullptr, "SetAlpha"}, | ||
| 30 | {0x00260000, nullptr, "StartConversion"}, | ||
| 31 | {0x00270000, nullptr, "StopConversion"}, | ||
| 32 | {0x00280000, nullptr, "IsBusyConversion"}, | ||
| 33 | {0x002A0000, nullptr, "PingProcess"}, | ||
| 34 | {0x002B0000, nullptr, "DriverInitialize"}, | ||
| 35 | {0x002C0000, nullptr, "DriverFinalize"} | ||
| 36 | }; | ||
| 37 | |||
| 38 | //////////////////////////////////////////////////////////////////////////////////////////////////// | ||
| 39 | // Interface class | ||
| 40 | |||
| 41 | Interface::Interface() { | ||
| 42 | Register(FunctionTable, ARRAY_SIZE(FunctionTable)); | ||
| 43 | } | ||
| 44 | |||
| 45 | } // namespace | ||
diff --git a/src/core/hle/service/y2r_u.h b/src/core/hle/service/y2r_u.h new file mode 100644 index 000000000..171aecfd1 --- /dev/null +++ b/src/core/hle/service/y2r_u.h | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | // Copyright 2014 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | #include "core/hle/service/service.h" | ||
| 8 | |||
| 9 | //////////////////////////////////////////////////////////////////////////////////////////////////// | ||
| 10 | // Namespace Y2R_U | ||
| 11 | |||
| 12 | namespace Y2R_U { | ||
| 13 | |||
| 14 | class Interface : public Service::Interface { | ||
| 15 | public: | ||
| 16 | Interface(); | ||
| 17 | |||
| 18 | std::string GetPortName() const override { | ||
| 19 | return "y2r:u"; | ||
| 20 | } | ||
| 21 | }; | ||
| 22 | |||
| 23 | } // namespace | ||
diff --git a/src/core/loader/loader.cpp b/src/core/loader/loader.cpp index 87580cb2a..45cf425df 100644 --- a/src/core/loader/loader.cpp +++ b/src/core/loader/loader.cpp | |||
| @@ -45,6 +45,8 @@ FileType IdentifyFile(const std::string &filename) { | |||
| 45 | return FileType::CCI; | 45 | return FileType::CCI; |
| 46 | } else if (extension == ".bin") { | 46 | } else if (extension == ".bin") { |
| 47 | return FileType::BIN; | 47 | return FileType::BIN; |
| 48 | } else if (extension == ".3ds") { | ||
| 49 | return FileType::CCI; | ||
| 48 | } else if (extension == ".3dsx") { | 50 | } else if (extension == ".3dsx") { |
| 49 | return FileType::THREEDSX; | 51 | return FileType::THREEDSX; |
| 50 | } | 52 | } |