mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-07 15:31:26 +12:00
Merge remote-tracking branch 'upstream/master' into Things
This commit is contained in:
commit
0e8ea4f27c
39 changed files with 2661 additions and 1411 deletions
|
@ -2,11 +2,14 @@ RPCS3
|
|||
=====
|
||||
|
||||
[](https://travis-ci.org/DHrpcs3/rpcs3)
|
||||
|
||||
<a href="https://scan.coverity.com/projects/3960">
|
||||
<img alt="Coverity Scan Build Status"
|
||||
src="https://scan.coverity.com/projects/3960/badge.svg"/>
|
||||
</a>
|
||||
|
||||
[](https://coveralls.io/r/DHrpcs3/rpcs3)
|
||||
|
||||
An open-source PlayStation 3 emulator/debugger written in C++.
|
||||
|
||||
You can find some basic information in the [FAQ](https://github.com/DHrpcs3/rpcs3/wiki/FAQ). For discussion about this emulator and PS3 emulation please visit the [official forums](http://www.emunewz.net/forum/forumdisplay.php?fid=162).
|
||||
|
|
|
@ -206,8 +206,6 @@ namespace fmt
|
|||
{
|
||||
throw "Invalid formatting (u8): " + std::string(fmt, len);
|
||||
}
|
||||
|
||||
return{};
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -228,8 +226,6 @@ namespace fmt
|
|||
{
|
||||
throw "Invalid formatting (u16): " + std::string(fmt, len);
|
||||
}
|
||||
|
||||
return{};
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -250,8 +246,6 @@ namespace fmt
|
|||
{
|
||||
throw "Invalid formatting (u32): " + std::string(fmt, len);
|
||||
}
|
||||
|
||||
return{};
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -272,8 +266,6 @@ namespace fmt
|
|||
{
|
||||
throw "Invalid formatting (u64): " + std::string(fmt, len);
|
||||
}
|
||||
|
||||
return{};
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -294,8 +286,6 @@ namespace fmt
|
|||
{
|
||||
throw "Invalid formatting (s8): " + std::string(fmt, len);
|
||||
}
|
||||
|
||||
return{};
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -316,8 +306,6 @@ namespace fmt
|
|||
{
|
||||
throw "Invalid formatting (s16): " + std::string(fmt, len);
|
||||
}
|
||||
|
||||
return{};
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -338,8 +326,6 @@ namespace fmt
|
|||
{
|
||||
throw "Invalid formatting (s32): " + std::string(fmt, len);
|
||||
}
|
||||
|
||||
return{};
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -360,8 +346,6 @@ namespace fmt
|
|||
{
|
||||
throw "Invalid formatting (s64): " + std::string(fmt, len);
|
||||
}
|
||||
|
||||
return{};
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -382,8 +366,6 @@ namespace fmt
|
|||
{
|
||||
throw "Invalid formatting (float): " + std::string(fmt, len);
|
||||
}
|
||||
|
||||
return{};
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -404,8 +386,6 @@ namespace fmt
|
|||
{
|
||||
throw "Invalid formatting (double): " + std::string(fmt, len);
|
||||
}
|
||||
|
||||
return{};
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -430,8 +410,6 @@ namespace fmt
|
|||
{
|
||||
throw "Invalid formatting (bool): " + std::string(fmt, len);
|
||||
}
|
||||
|
||||
return{};
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -448,8 +426,6 @@ namespace fmt
|
|||
{
|
||||
throw "Invalid formatting (const char*): " + std::string(fmt, len);
|
||||
}
|
||||
|
||||
return{};
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "stdafx.h"
|
||||
#include "Log.h"
|
||||
#pragma warning(disable : 4996)
|
||||
#include <wx/dir.h>
|
||||
#include <wx/file.h>
|
||||
#include <wx/filename.h>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "stdafx.h"
|
||||
#include "restore_new.h"
|
||||
#pragma warning(disable : 4996)
|
||||
#include <wx/msgdlg.h>
|
||||
#include "define_new_memleakdetect.h"
|
||||
#include "rMsgBox.h"
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "stdafx.h"
|
||||
#include "restore_new.h"
|
||||
#pragma warning(disable : 4996)
|
||||
#include <wx/image.h>
|
||||
#include "define_new_memleakdetect.h"
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "stdafx.h"
|
||||
#include "rTime.h"
|
||||
|
||||
#pragma warning(disable : 4996)
|
||||
#include <wx/datetime.h>
|
||||
|
||||
std::string rDefaultDateTimeFormat = "%c";
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include "key_vault.h"
|
||||
#include "unpkg.h"
|
||||
#include "restore_new.h"
|
||||
#pragma warning(disable : 4996)
|
||||
#include <wx/progdlg.h>
|
||||
#include "define_new_memleakdetect.h"
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include "utils.h"
|
||||
#include "Emu/FS/vfsLocalFile.h"
|
||||
#include "unself.h"
|
||||
|
||||
#pragma warning(disable : 4996)
|
||||
#include <wx/mstream.h>
|
||||
#include <wx/zstream.h>
|
||||
|
||||
|
|
|
@ -18,7 +18,6 @@ struct ARMv7Context
|
|||
|
||||
void write_pc(u32 value);
|
||||
u32 read_pc();
|
||||
void put_stack_arg(u32 shift, u32 value);
|
||||
u32 get_stack_arg(u32 pos);
|
||||
void fast_call(u32 addr);
|
||||
|
||||
|
@ -39,6 +38,11 @@ struct ARMv7Context
|
|||
|
||||
u32 LR;
|
||||
};
|
||||
|
||||
struct
|
||||
{
|
||||
u64 GPR_D[8];
|
||||
};
|
||||
};
|
||||
|
||||
union
|
||||
|
|
|
@ -649,8 +649,8 @@ const ARMv7_opcode_t ARMv7_opcode_table[] =
|
|||
ARMv7_OP4(0xfff0, 0xf0f0, 0xfac0, 0xf040, T1, USUB8),
|
||||
ARMv7_OP4(0x0ff0, 0x0ff0, 0x0650, 0x0ff0, A1, USUB8),
|
||||
|
||||
ARMv7_OP4(0xfff0, 0xf0c0, 0xfa50, 0xf080, T1, UXTAB),
|
||||
ARMv7_OP4(0x0ff0, 0x03f0, 0x06e0, 0x0070, A1, UXTAB),
|
||||
ARMv7_OP4(0xfff0, 0xf0c0, 0xfa50, 0xf080, T1, UXTAB, SKIP_IF( BF(16, 19) == 15 )),
|
||||
ARMv7_OP4(0x0ff0, 0x03f0, 0x06e0, 0x0070, A1, UXTAB, SKIP_IF( BF(16, 19) == 15 )),
|
||||
|
||||
ARMv7_OP4(0xfff0, 0xf0c0, 0xfa30, 0xf080, T1, UXTAB16),
|
||||
ARMv7_OP4(0x0ff0, 0x03f0, 0x06c0, 0x0070, A1, UXTAB16),
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -28,71 +28,6 @@ enum SRType : u32
|
|||
|
||||
namespace ARMv7_instrs
|
||||
{
|
||||
template<typename T>
|
||||
static bool IsZero(T x)
|
||||
{
|
||||
return x == T(0);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
static bool IsOnes(T x)
|
||||
{
|
||||
return x == ~T(0);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
static u8 IsZeroBit(T x)
|
||||
{
|
||||
return IsZero(x) ? 1 : 0;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
static bool IsOnesBit(T x, u8 len = sizeof(T) * 8)
|
||||
{
|
||||
return IsOnes(x) ? 1 : 0;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
u8 BitCount(T x, u8 len = sizeof(T) * 8);
|
||||
|
||||
template<typename T>
|
||||
s8 LowestSetBit(T x, u8 len = sizeof(T) * 8);
|
||||
|
||||
template<typename T>
|
||||
s8 HighestSetBit(T x, u8 len = sizeof(T) * 8);
|
||||
|
||||
template<typename T>
|
||||
s8 CountLeadingZeroBits(T x, u8 len = sizeof(T) * 8);
|
||||
|
||||
SRType DecodeImmShift(u32 type, u32 imm5, u32* shift_n);
|
||||
SRType DecodeRegShift(u8 type);
|
||||
|
||||
u32 LSL_C(u32 x, s32 shift, bool& carry_out);
|
||||
u32 LSL_(u32 x, s32 shift);
|
||||
u32 LSR_C(u32 x, s32 shift, bool& carry_out);
|
||||
u32 LSR_(u32 x, s32 shift);
|
||||
|
||||
s32 ASR_C(s32 x, s32 shift, bool& carry_out);
|
||||
s32 ASR_(s32 x, s32 shift);
|
||||
|
||||
u32 ROR_C(u32 x, s32 shift, bool& carry_out);
|
||||
u32 ROR_(u32 x, s32 shift);
|
||||
|
||||
u32 RRX_C(u32 x, bool carry_in, bool& carry_out);
|
||||
u32 RRX_(u32 x, bool carry_in);
|
||||
|
||||
template<typename T> T Shift_C(T value, SRType type, s32 amount, bool carry_in, bool& carry_out);
|
||||
|
||||
template<typename T> T Shift(T value, SRType type, s32 amount, bool carry_in);
|
||||
|
||||
template<typename T> T AddWithCarry(T x, T y, bool carry_in, bool& carry_out, bool& overflow);
|
||||
|
||||
u32 ThumbExpandImm_C(u32 imm12, bool carry_in, bool& carry_out);
|
||||
u32 ThumbExpandImm(ARMv7Context& context, u32 imm12);
|
||||
|
||||
bool ConditionPassed(ARMv7Context& context, u32 cond);
|
||||
|
||||
// instructions
|
||||
void UNK(ARMv7Context& context, const ARMv7Code code);
|
||||
|
||||
void NULL_OP(ARMv7Context& context, const ARMv7Code code, const ARMv7_encoding type);
|
||||
|
|
|
@ -20,11 +20,6 @@ u32 ARMv7Context::read_pc()
|
|||
return thread.PC;
|
||||
}
|
||||
|
||||
void ARMv7Context::put_stack_arg(u32 shift, u32 value)
|
||||
{
|
||||
vm::psv::write32(SP + shift, value);
|
||||
}
|
||||
|
||||
u32 ARMv7Context::get_stack_arg(u32 pos)
|
||||
{
|
||||
return vm::psv::read32(SP + sizeof(u32) * (pos - 5));
|
||||
|
|
File diff suppressed because it is too large
Load diff
595
rpcs3/Emu/ARMv7/Modules/sceLibKernel.h
Normal file
595
rpcs3/Emu/ARMv7/Modules/sceLibKernel.h
Normal file
|
@ -0,0 +1,595 @@
|
|||
#pragma once
|
||||
|
||||
// Error Codes
|
||||
|
||||
enum
|
||||
{
|
||||
SCE_KERNEL_ERROR_ERROR = 0x80020001,
|
||||
SCE_KERNEL_ERROR_NOT_IMPLEMENTED = 0x80020002,
|
||||
SCE_KERNEL_ERROR_INVALID_ARGUMENT = 0x80020003,
|
||||
SCE_KERNEL_ERROR_INVALID_ARGUMENT_SIZE = 0x80020004,
|
||||
SCE_KERNEL_ERROR_INVALID_FLAGS = 0x80020005,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_SIZE = 0x80020006,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_ADDR = 0x80020007,
|
||||
SCE_KERNEL_ERROR_UNSUP = 0x80020008,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_MODE = 0x80020009,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_ALIGNMENT = 0x8002000A,
|
||||
SCE_KERNEL_ERROR_NOSYS = 0x8002000B,
|
||||
SCE_KERNEL_ERROR_DEBUG_ERROR = 0x80021000,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_DIPSW_NUMBER = 0x80021001,
|
||||
SCE_KERNEL_ERROR_CPU_ERROR = 0x80022000,
|
||||
SCE_KERNEL_ERROR_MMU_ILLEGAL_L1_TYPE = 0x80022001,
|
||||
SCE_KERNEL_ERROR_MMU_L2_INDEX_OVERFLOW = 0x80022002,
|
||||
SCE_KERNEL_ERROR_MMU_L2_SIZE_OVERFLOW = 0x80022003,
|
||||
SCE_KERNEL_ERROR_INVALID_CPU_AFFINITY = 0x80022004,
|
||||
SCE_KERNEL_ERROR_INVALID_MEMORY_ACCESS = 0x80022005,
|
||||
SCE_KERNEL_ERROR_INVALID_MEMORY_ACCESS_PERMISSION = 0x80022006,
|
||||
SCE_KERNEL_ERROR_VA2PA_FAULT = 0x80022007,
|
||||
SCE_KERNEL_ERROR_VA2PA_MAPPED = 0x80022008,
|
||||
SCE_KERNEL_ERROR_VALIDATION_CHECK_FAILED = 0x80022009,
|
||||
SCE_KERNEL_ERROR_SYSMEM_ERROR = 0x80024000,
|
||||
SCE_KERNEL_ERROR_INVALID_PROCESS_CONTEXT = 0x80024001,
|
||||
SCE_KERNEL_ERROR_UID_NAME_TOO_LONG = 0x80024002,
|
||||
SCE_KERNEL_ERROR_VARANGE_IS_NOT_PHYSICAL_CONTINUOUS = 0x80024003,
|
||||
SCE_KERNEL_ERROR_PHYADDR_ERROR = 0x80024100,
|
||||
SCE_KERNEL_ERROR_NO_PHYADDR = 0x80024101,
|
||||
SCE_KERNEL_ERROR_PHYADDR_USED = 0x80024102,
|
||||
SCE_KERNEL_ERROR_PHYADDR_NOT_USED = 0x80024103,
|
||||
SCE_KERNEL_ERROR_NO_IOADDR = 0x80024104,
|
||||
SCE_KERNEL_ERROR_PHYMEM_ERROR = 0x80024300,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_PHYPAGE_STATUS = 0x80024301,
|
||||
SCE_KERNEL_ERROR_NO_FREE_PHYSICAL_PAGE = 0x80024302,
|
||||
SCE_KERNEL_ERROR_NO_FREE_PHYSICAL_PAGE_UNIT = 0x80024303,
|
||||
SCE_KERNEL_ERROR_PHYMEMPART_NOT_EMPTY = 0x80024304,
|
||||
SCE_KERNEL_ERROR_NO_PHYMEMPART_LPDDR2 = 0x80024305,
|
||||
SCE_KERNEL_ERROR_NO_PHYMEMPART_CDRAM = 0x80024306,
|
||||
SCE_KERNEL_ERROR_FIXEDHEAP_ERROR = 0x80024400,
|
||||
SCE_KERNEL_ERROR_FIXEDHEAP_ILLEGAL_SIZE = 0x80024401,
|
||||
SCE_KERNEL_ERROR_FIXEDHEAP_ILLEGAL_INDEX = 0x80024402,
|
||||
SCE_KERNEL_ERROR_FIXEDHEAP_INDEX_OVERFLOW = 0x80024403,
|
||||
SCE_KERNEL_ERROR_FIXEDHEAP_NO_CHUNK = 0x80024404,
|
||||
SCE_KERNEL_ERROR_UID_ERROR = 0x80024500,
|
||||
SCE_KERNEL_ERROR_INVALID_UID = 0x80024501,
|
||||
SCE_KERNEL_ERROR_SYSMEM_UID_INVALID_ARGUMENT = 0x80024502,
|
||||
SCE_KERNEL_ERROR_SYSMEM_INVALID_UID_RANGE = 0x80024503,
|
||||
SCE_KERNEL_ERROR_SYSMEM_NO_VALID_UID = 0x80024504,
|
||||
SCE_KERNEL_ERROR_SYSMEM_CANNOT_ALLOCATE_UIDENTRY = 0x80024505,
|
||||
SCE_KERNEL_ERROR_NOT_PROCESS_UID = 0x80024506,
|
||||
SCE_KERNEL_ERROR_NOT_KERNEL_UID = 0x80024507,
|
||||
SCE_KERNEL_ERROR_INVALID_UID_CLASS = 0x80024508,
|
||||
SCE_KERNEL_ERROR_INVALID_UID_SUBCLASS = 0x80024509,
|
||||
SCE_KERNEL_ERROR_UID_CANNOT_FIND_BY_NAME = 0x8002450A,
|
||||
SCE_KERNEL_ERROR_VIRPAGE_ERROR = 0x80024600,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_VIRPAGE_TYPE = 0x80024601,
|
||||
SCE_KERNEL_ERROR_BLOCK_ERROR = 0x80024700,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_BLOCK_ID = 0x80024701,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_BLOCK_TYPE = 0x80024702,
|
||||
SCE_KERNEL_ERROR_BLOCK_IN_USE = 0x80024703,
|
||||
SCE_KERNEL_ERROR_PARTITION_ERROR = 0x80024800,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_PARTITION_ID = 0x80024801,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_PARTITION_INDEX = 0x80024802,
|
||||
SCE_KERNEL_ERROR_NO_L2PAGETABLE = 0x80024803,
|
||||
SCE_KERNEL_ERROR_HEAPLIB_ERROR = 0x80024900,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_HEAP_ID = 0x80024901,
|
||||
SCE_KERNEL_ERROR_OUT_OF_RANG = 0x80024902,
|
||||
SCE_KERNEL_ERROR_HEAPLIB_NOMEM = 0x80024903,
|
||||
SCE_KERNEL_ERROR_SYSMEM_ADDRESS_SPACE_ERROR = 0x80024A00,
|
||||
SCE_KERNEL_ERROR_INVALID_ADDRESS_SPACE_ID = 0x80024A01,
|
||||
SCE_KERNEL_ERROR_INVALID_PARTITION_INDEX = 0x80024A02,
|
||||
SCE_KERNEL_ERROR_ADDRESS_SPACE_CANNOT_FIND_PARTITION_BY_ADDR = 0x80024A03,
|
||||
SCE_KERNEL_ERROR_SYSMEM_MEMBLOCK_ERROR = 0x80024B00,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_MEMBLOCK_TYPE = 0x80024B01,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_MEMBLOCK_REMAP_TYPE = 0x80024B02,
|
||||
SCE_KERNEL_ERROR_NOT_PHY_CONT_MEMBLOCK = 0x80024B03,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_MEMBLOCK_CODE = 0x80024B04,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_MEMBLOCK_SIZE = 0x80024B05,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_USERMAP_SIZE = 0x80024B06,
|
||||
SCE_KERNEL_ERROR_MEMBLOCK_TYPE_FOR_KERNEL_PROCESS = 0x80024B07,
|
||||
SCE_KERNEL_ERROR_PROCESS_CANNOT_REMAP_MEMBLOCK = 0x80024B08,
|
||||
SCE_KERNEL_ERROR_SYSMEM_PHYMEMLOW_ERROR = 0x80024C00,
|
||||
SCE_KERNEL_ERROR_CANNOT_ALLOC_PHYMEMLOW = 0x80024C01,
|
||||
SCE_KERNEL_ERROR_UNKNOWN_PHYMEMLOW_TYPE = 0x80024C02,
|
||||
SCE_KERNEL_ERROR_SYSMEM_BITHEAP_ERROR = 0x80024D00,
|
||||
SCE_KERNEL_ERROR_CANNOT_ALLOC_BITHEAP = 0x80024D01,
|
||||
SCE_KERNEL_ERROR_LOADCORE_ERROR = 0x80025000,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_ELF_HEADER = 0x80025001,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_SELF_HEADER = 0x80025002,
|
||||
SCE_KERNEL_ERROR_EXCPMGR_ERROR = 0x80027000,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_EXCPCODE = 0x80027001,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_EXCPHANDLER = 0x80027002,
|
||||
SCE_KERNEL_ERROR_NOTFOUND_EXCPHANDLER = 0x80027003,
|
||||
SCE_KERNEL_ERROR_CANNOT_RELEASE_EXCPHANDLER = 0x80027004,
|
||||
SCE_KERNEL_ERROR_INTRMGR_ERROR = 0x80027100,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_CONTEXT = 0x80027101,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_INTRCODE = 0x80027102,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_INTRPARAM = 0x80027103,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_INTRPRIORITY = 0x80027104,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_TARGET_CPU = 0x80027105,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_INTRFILTER = 0x80027106,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_INTRTYPE = 0x80027107,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_HANDLER = 0x80027108,
|
||||
SCE_KERNEL_ERROR_FOUND_HANDLER = 0x80027109,
|
||||
SCE_KERNEL_ERROR_NOTFOUND_HANDLER = 0x8002710A,
|
||||
SCE_KERNEL_ERROR_NO_MEMORY = 0x8002710B,
|
||||
SCE_KERNEL_ERROR_DMACMGR_ERROR = 0x80027200,
|
||||
SCE_KERNEL_ERROR_ALREADY_QUEUED = 0x80027201,
|
||||
SCE_KERNEL_ERROR_NOT_QUEUED = 0x80027202,
|
||||
SCE_KERNEL_ERROR_NOT_SETUP = 0x80027203,
|
||||
SCE_KERNEL_ERROR_ON_TRANSFERRING = 0x80027204,
|
||||
SCE_KERNEL_ERROR_NOT_INITIALIZED = 0x80027205,
|
||||
SCE_KERNEL_ERROR_TRANSFERRED = 0x80027206,
|
||||
SCE_KERNEL_ERROR_NOT_UNDER_CONTROL = 0x80027207,
|
||||
SCE_KERNEL_ERROR_SYSTIMER_ERROR = 0x80027300,
|
||||
SCE_KERNEL_ERROR_NO_FREE_TIMER = 0x80027301,
|
||||
SCE_KERNEL_ERROR_TIMER_NOT_ALLOCATED = 0x80027302,
|
||||
SCE_KERNEL_ERROR_TIMER_COUNTING = 0x80027303,
|
||||
SCE_KERNEL_ERROR_TIMER_STOPPED = 0x80027304,
|
||||
SCE_KERNEL_ERROR_THREADMGR_ERROR = 0x80028000,
|
||||
SCE_KERNEL_ERROR_DORMANT = 0x80028001,
|
||||
SCE_KERNEL_ERROR_NOT_DORMANT = 0x80028002,
|
||||
SCE_KERNEL_ERROR_UNKNOWN_THID = 0x80028003,
|
||||
SCE_KERNEL_ERROR_CAN_NOT_WAIT = 0x80028004,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_THID = 0x80028005,
|
||||
SCE_KERNEL_ERROR_THREAD_TERMINATED = 0x80028006,
|
||||
SCE_KERNEL_ERROR_DELETED = 0x80028007,
|
||||
SCE_KERNEL_ERROR_WAIT_TIMEOUT = 0x80028008,
|
||||
SCE_KERNEL_ERROR_NOTIFY_CALLBACK = 0x80028009,
|
||||
SCE_KERNEL_ERROR_WAIT_DELETE = 0x8002800A,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_ATTR = 0x8002800B,
|
||||
SCE_KERNEL_ERROR_EVF_MULTI = 0x8002800C,
|
||||
SCE_KERNEL_ERROR_WAIT_CANCEL = 0x8002800D,
|
||||
SCE_KERNEL_ERROR_EVF_COND = 0x8002800E,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_COUNT = 0x8002800F,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_PRIORITY = 0x80028010,
|
||||
SCE_KERNEL_ERROR_MUTEX_RECURSIVE = 0x80028011,
|
||||
SCE_KERNEL_ERROR_MUTEX_LOCK_OVF = 0x80028012,
|
||||
SCE_KERNEL_ERROR_MUTEX_NOT_OWNED = 0x80028013,
|
||||
SCE_KERNEL_ERROR_MUTEX_UNLOCK_UDF = 0x80028014,
|
||||
SCE_KERNEL_ERROR_MUTEX_FAILED_TO_OWN = 0x80028015,
|
||||
SCE_KERNEL_ERROR_FAST_MUTEX_RECURSIVE = 0x80028016,
|
||||
SCE_KERNEL_ERROR_FAST_MUTEX_LOCK_OVF = 0x80028017,
|
||||
SCE_KERNEL_ERROR_FAST_MUTEX_FAILED_TO_OWN = 0x80028018,
|
||||
SCE_KERNEL_ERROR_FAST_MUTEX_NOT_OWNED = 0x80028019,
|
||||
SCE_KERNEL_ERROR_FAST_MUTEX_OWNED = 0x8002801A,
|
||||
SCE_KERNEL_ERROR_ALARM_CAN_NOT_CANCEL = 0x8002801B,
|
||||
SCE_KERNEL_ERROR_INVALID_OBJECT_TYPE = 0x8002801C,
|
||||
SCE_KERNEL_ERROR_KERNEL_TLS_FULL = 0x8002801D,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_KERNEL_TLS_INDEX = 0x8002801E,
|
||||
SCE_KERNEL_ERROR_KERNEL_TLS_BUSY = 0x8002801F,
|
||||
SCE_KERNEL_ERROR_DIFFERENT_UID_CLASS = 0x80028020,
|
||||
SCE_KERNEL_ERROR_UNKNOWN_UID = 0x80028021,
|
||||
SCE_KERNEL_ERROR_SEMA_ZERO = 0x80028022,
|
||||
SCE_KERNEL_ERROR_SEMA_OVF = 0x80028023,
|
||||
SCE_KERNEL_ERROR_PMON_NOT_THREAD_MODE = 0x80028024,
|
||||
SCE_KERNEL_ERROR_PMON_NOT_CPU_MODE = 0x80028025,
|
||||
SCE_KERNEL_ERROR_ALREADY_REGISTERED = 0x80028026,
|
||||
SCE_KERNEL_ERROR_INVALID_THREAD_ID = 0x80028027,
|
||||
SCE_KERNEL_ERROR_ALREADY_DEBUG_SUSPENDED = 0x80028028,
|
||||
SCE_KERNEL_ERROR_NOT_DEBUG_SUSPENDED = 0x80028029,
|
||||
SCE_KERNEL_ERROR_CAN_NOT_USE_VFP = 0x8002802A,
|
||||
SCE_KERNEL_ERROR_RUNNING = 0x8002802B,
|
||||
SCE_KERNEL_ERROR_EVENT_COND = 0x8002802C,
|
||||
SCE_KERNEL_ERROR_MSG_PIPE_FULL = 0x8002802D,
|
||||
SCE_KERNEL_ERROR_MSG_PIPE_EMPTY = 0x8002802E,
|
||||
SCE_KERNEL_ERROR_ALREADY_SENT = 0x8002802F,
|
||||
SCE_KERNEL_ERROR_CAN_NOT_SUSPEND = 0x80028030,
|
||||
SCE_KERNEL_ERROR_FAST_MUTEX_ALREADY_INITIALIZED = 0x80028031,
|
||||
SCE_KERNEL_ERROR_FAST_MUTEX_NOT_INITIALIZED = 0x80028032,
|
||||
SCE_KERNEL_ERROR_THREAD_STOPPED = 0x80028033,
|
||||
SCE_KERNEL_ERROR_THREAD_SUSPENDED = 0x80028034,
|
||||
SCE_KERNEL_ERROR_NOT_SUSPENDED = 0x80028035,
|
||||
SCE_KERNEL_ERROR_WAIT_DELETE_MUTEX = 0x80028036,
|
||||
SCE_KERNEL_ERROR_WAIT_CANCEL_MUTEX = 0x80028037,
|
||||
SCE_KERNEL_ERROR_WAIT_DELETE_COND = 0x80028038,
|
||||
SCE_KERNEL_ERROR_WAIT_CANCEL_COND = 0x80028039,
|
||||
SCE_KERNEL_ERROR_LW_MUTEX_NOT_OWNED = 0x8002803A,
|
||||
SCE_KERNEL_ERROR_LW_MUTEX_LOCK_OVF = 0x8002803B,
|
||||
SCE_KERNEL_ERROR_LW_MUTEX_UNLOCK_UDF = 0x8002803C,
|
||||
SCE_KERNEL_ERROR_LW_MUTEX_RECURSIVE = 0x8002803D,
|
||||
SCE_KERNEL_ERROR_LW_MUTEX_FAILED_TO_OWN = 0x8002803E,
|
||||
SCE_KERNEL_ERROR_WAIT_DELETE_LW_MUTEX = 0x8002803F,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_STACK_SIZE = 0x80028040,
|
||||
SCE_KERNEL_ERROR_RW_LOCK_RECURSIVE = 0x80028041,
|
||||
SCE_KERNEL_ERROR_RW_LOCK_LOCK_OVF = 0x80028042,
|
||||
SCE_KERNEL_ERROR_RW_LOCK_NOT_OWNED = 0x80028043,
|
||||
SCE_KERNEL_ERROR_RW_LOCK_UNLOCK_UDF = 0x80028044,
|
||||
SCE_KERNEL_ERROR_RW_LOCK_FAILED_TO_LOCK = 0x80028045,
|
||||
SCE_KERNEL_ERROR_RW_LOCK_FAILED_TO_UNLOCK = 0x80028046,
|
||||
|
||||
SCE_KERNEL_ERROR_PROCESSMGR_ERROR = 0x80029000,
|
||||
SCE_KERNEL_ERROR_INVALID_PID = 0x80029001,
|
||||
SCE_KERNEL_ERROR_INVALID_PROCESS_TYPE = 0x80029002,
|
||||
SCE_KERNEL_ERROR_PLS_FULL = 0x80029003,
|
||||
SCE_KERNEL_ERROR_INVALID_PROCESS_STATUS = 0x80029004,
|
||||
SCE_KERNEL_ERROR_INVALID_BUDGET_ID = 0x80029005,
|
||||
SCE_KERNEL_ERROR_INVALID_BUDGET_SIZE = 0x80029006,
|
||||
SCE_KERNEL_ERROR_CP14_DISABLED = 0x80029007,
|
||||
SCE_KERNEL_ERROR_EXCEEDED_MAX_PROCESSES = 0x80029008,
|
||||
SCE_KERNEL_ERROR_PROCESS_REMAINING = 0x80029009,
|
||||
SCE_KERNEL_ERROR_IOFILEMGR_ERROR = 0x8002A000,
|
||||
SCE_KERNEL_ERROR_IO_NAME_TOO_LONG = 0x8002A001,
|
||||
SCE_KERNEL_ERROR_IO_REG_DEV = 0x8002A002,
|
||||
SCE_KERNEL_ERROR_IO_ALIAS_USED = 0x8002A003,
|
||||
SCE_KERNEL_ERROR_IO_DEL_DEV = 0x8002A004,
|
||||
SCE_KERNEL_ERROR_IO_WOULD_BLOCK = 0x8002A005,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_START_FAILED = 0x8002D000,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_STOP_FAIL = 0x8002D001,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_IN_USE = 0x8002D002,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_NO_LIB = 0x8002D003,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_SYSCALL_REG = 0x8002D004,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_NOMEM_LIB = 0x8002D005,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_NOMEM_STUB = 0x8002D006,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_NOMEM_SELF = 0x8002D007,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_NOMEM = 0x8002D008,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_INVALID_LIB = 0x8002D009,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_INVALID_STUB = 0x8002D00A,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_NO_FUNC_NID = 0x8002D00B,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_NO_VAR_NID = 0x8002D00C,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_INVALID_TYPE = 0x8002D00D,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_NO_MOD_ENTRY = 0x8002D00E,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_INVALID_PROC_PARAM = 0x8002D00F,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_NO_MODOBJ = 0x8002D010,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_NO_MOD = 0x8002D011,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_NO_PROCESS = 0x8002D012,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_OLD_LIB = 0x8002D013,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_STARTED = 0x8002D014,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_NOT_STARTED = 0x8002D015,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_NOT_STOPPED = 0x8002D016,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_INVALID_PROCESS_UID = 0x8002D017,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_CANNOT_EXPORT_LIB_TO_SHARED = 0x8002D018,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_INVALID_REL_INFO = 0x8002D019,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_INVALID_REF_INFO = 0x8002D01A,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_ELINK = 0x8002D01B,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_NOENT = 0x8002D01C,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_BUSY = 0x8002D01D,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_NOEXEC = 0x8002D01E,
|
||||
SCE_KERNEL_ERROR_MODULEMGR_NAMETOOLONG = 0x8002D01F,
|
||||
SCE_KERNEL_ERROR_LIBRARYDB_NOENT = 0x8002D080,
|
||||
SCE_KERNEL_ERROR_LIBRARYDB_NO_LIB = 0x8002D081,
|
||||
SCE_KERNEL_ERROR_LIBRARYDB_NO_MOD = 0x8002D082,
|
||||
SCE_KERNEL_ERROR_AUTHFAIL = 0x8002F000,
|
||||
SCE_KERNEL_ERROR_NO_AUTH = 0x8002F001,
|
||||
};
|
||||
|
||||
union SceKernelSysClock
|
||||
{
|
||||
struct
|
||||
{
|
||||
u32 low;
|
||||
u32 hi;
|
||||
};
|
||||
|
||||
u64 quad;
|
||||
};
|
||||
|
||||
struct SceKernelCallFrame
|
||||
{
|
||||
u32 sp;
|
||||
u32 pc;
|
||||
};
|
||||
|
||||
// Memory Manager definitions
|
||||
|
||||
typedef s32 SceKernelMemoryType;
|
||||
|
||||
struct SceKernelMemBlockInfo
|
||||
{
|
||||
u32 size;
|
||||
vm::psv::ptr<void> mappedBase;
|
||||
u32 mappedSize;
|
||||
SceKernelMemoryType memoryType;
|
||||
u32 access;
|
||||
};
|
||||
|
||||
struct SceKernelAllocMemBlockOpt
|
||||
{
|
||||
u32 size;
|
||||
u32 attr;
|
||||
u32 alignment;
|
||||
s32 uidBaseBlock;
|
||||
vm::psv::ptr<const char> strBaseBlockName;
|
||||
};
|
||||
|
||||
// Thread Manager definitions (threads)
|
||||
|
||||
typedef s32(*SceKernelThreadEntry)(u32 argSize, vm::psv::ptr<void> pArgBlock);
|
||||
|
||||
struct SceKernelThreadOptParam
|
||||
{
|
||||
u32 size;
|
||||
u32 attr;
|
||||
};
|
||||
|
||||
struct SceKernelThreadInfo
|
||||
{
|
||||
u32 size;
|
||||
s32 processId;
|
||||
char name[32];
|
||||
u32 attr;
|
||||
u32 status;
|
||||
vm::psv::ptr<SceKernelThreadEntry> entry;
|
||||
vm::psv::ptr<void> pStack;
|
||||
u32 stackSize;
|
||||
s32 initPriority;
|
||||
s32 currentPriority;
|
||||
s32 initCpuAffinityMask;
|
||||
s32 currentCpuAffinityMask;
|
||||
s32 currentCpuId;
|
||||
s32 lastExecutedCpuId;
|
||||
u32 waitType;
|
||||
s32 waitId;
|
||||
s32 exitStatus;
|
||||
SceKernelSysClock runClocks;
|
||||
u32 intrPreemptCount;
|
||||
u32 threadPreemptCount;
|
||||
u32 threadReleaseCount;
|
||||
s32 changeCpuCount;
|
||||
s32 fNotifyCallback;
|
||||
s32 reserved;
|
||||
};
|
||||
|
||||
struct SceKernelThreadRunStatus
|
||||
{
|
||||
u32 size;
|
||||
|
||||
struct
|
||||
{
|
||||
s32 processId;
|
||||
s32 threadId;
|
||||
s32 priority;
|
||||
|
||||
} cpuInfo[4];
|
||||
};
|
||||
|
||||
struct SceKernelSystemInfo
|
||||
{
|
||||
u32 size;
|
||||
u32 activeCpuMask;
|
||||
|
||||
struct
|
||||
{
|
||||
SceKernelSysClock idleClock;
|
||||
u32 comesOutOfIdleCount;
|
||||
u32 threadSwitchCount;
|
||||
|
||||
} cpuInfo[4];
|
||||
};
|
||||
|
||||
// Thread Manager definitions (callbacks)
|
||||
|
||||
typedef s32(*SceKernelCallbackFunction)(s32 notifyId, s32 notifyCount, s32 notifyArg, vm::psv::ptr<void> pCommon);
|
||||
|
||||
struct SceKernelCallbackInfo
|
||||
{
|
||||
u32 size;
|
||||
s32 callbackId;
|
||||
char name[32];
|
||||
u32 attr;
|
||||
s32 threadId;
|
||||
vm::psv::ptr<SceKernelCallbackFunction> callbackFunc;
|
||||
s32 notifyId;
|
||||
s32 notifyCount;
|
||||
s32 notifyArg;
|
||||
vm::psv::ptr<void> pCommon;
|
||||
};
|
||||
|
||||
// Thread Manager definitions (events)
|
||||
|
||||
typedef s32(*SceKernelThreadEventHandler)(s32 type, s32 threadId, s32 arg, vm::psv::ptr<void> pCommon);
|
||||
|
||||
struct SceKernelEventInfo
|
||||
{
|
||||
u32 size;
|
||||
s32 eventId;
|
||||
char name[32];
|
||||
u32 attr;
|
||||
u32 eventPattern;
|
||||
u64 userData;
|
||||
u32 numWaitThreads;
|
||||
s32 reserved[1];
|
||||
};
|
||||
|
||||
struct SceKernelWaitEvent
|
||||
{
|
||||
s32 eventId;
|
||||
u32 eventPattern;
|
||||
};
|
||||
|
||||
struct SceKernelResultEvent
|
||||
{
|
||||
s32 eventId;
|
||||
s32 result;
|
||||
u32 resultPattern;
|
||||
s32 reserved[1];
|
||||
u64 userData;
|
||||
};
|
||||
|
||||
// Thread Manager definitions (event flags)
|
||||
|
||||
struct SceKernelEventFlagOptParam
|
||||
{
|
||||
u32 size;
|
||||
};
|
||||
|
||||
struct SceKernelEventFlagInfo
|
||||
{
|
||||
u32 size;
|
||||
s32 evfId;
|
||||
char name[32];
|
||||
u32 attr;
|
||||
u32 initPattern;
|
||||
u32 currentPattern;
|
||||
s32 numWaitThreads;
|
||||
};
|
||||
|
||||
// Thread Manager definitions (semaphores)
|
||||
|
||||
struct SceKernelSemaOptParam
|
||||
{
|
||||
u32 size;
|
||||
};
|
||||
|
||||
struct SceKernelSemaInfo
|
||||
{
|
||||
u32 size;
|
||||
s32 semaId;
|
||||
char name[32];
|
||||
u32 attr;
|
||||
s32 initCount;
|
||||
s32 currentCount;
|
||||
s32 maxCount;
|
||||
s32 numWaitThreads;
|
||||
};
|
||||
|
||||
// Thread Manager definitions (mutexes)
|
||||
|
||||
struct SceKernelMutexOptParam
|
||||
{
|
||||
u32 size;
|
||||
s32 ceilingPriority;
|
||||
};
|
||||
|
||||
struct SceKernelMutexInfo
|
||||
{
|
||||
u32 size;
|
||||
s32 mutexId;
|
||||
char name[32];
|
||||
u32 attr;
|
||||
s32 initCount;
|
||||
s32 currentCount;
|
||||
s32 currentOwnerId;
|
||||
s32 numWaitThreads;
|
||||
};
|
||||
|
||||
// Thread Manager definitions (lightweight mutexes)
|
||||
|
||||
struct SceKernelLwMutexWork
|
||||
{
|
||||
s32 data[4];
|
||||
};
|
||||
|
||||
struct SceKernelLwMutexOptParam
|
||||
{
|
||||
u32 size;
|
||||
};
|
||||
|
||||
struct SceKernelLwMutexInfo
|
||||
{
|
||||
u32 size;
|
||||
s32 uid;
|
||||
char name[32];
|
||||
u32 attr;
|
||||
vm::psv::ptr<SceKernelLwMutexWork> pWork;
|
||||
s32 initCount;
|
||||
s32 currentCount;
|
||||
s32 currentOwnerId;
|
||||
s32 numWaitThreads;
|
||||
};
|
||||
|
||||
// Thread Manager definitions (condition variables)
|
||||
|
||||
struct SceKernelCondOptParam
|
||||
{
|
||||
u32 size;
|
||||
};
|
||||
|
||||
struct SceKernelCondInfo
|
||||
{
|
||||
u32 size;
|
||||
s32 condId;
|
||||
char name[32];
|
||||
u32 attr;
|
||||
s32 mutexId;
|
||||
u32 numWaitThreads;
|
||||
};
|
||||
|
||||
// Thread Manager definitions (lightweight condition variables)
|
||||
|
||||
struct SceKernelLwCondWork
|
||||
{
|
||||
s32 data[4];
|
||||
};
|
||||
|
||||
struct SceKernelLwCondOptParam
|
||||
{
|
||||
u32 size;
|
||||
};
|
||||
|
||||
struct SceKernelLwCondInfo
|
||||
{
|
||||
u32 size;
|
||||
s32 uid;
|
||||
char name[32];
|
||||
u32 attr;
|
||||
vm::psv::ptr<SceKernelLwCondWork> pWork;
|
||||
vm::psv::ptr<SceKernelLwMutexWork> pLwMutex;
|
||||
u32 numWaitThreads;
|
||||
};
|
||||
|
||||
// Thread Manager definitions (timers)
|
||||
|
||||
struct SceKernelTimerOptParam
|
||||
{
|
||||
u32 size;
|
||||
};
|
||||
|
||||
struct SceKernelTimerInfo
|
||||
{
|
||||
u32 size;
|
||||
s32 timerId;
|
||||
char name[32];
|
||||
u32 attr;
|
||||
s32 fActive;
|
||||
SceKernelSysClock baseTime;
|
||||
SceKernelSysClock currentTime;
|
||||
SceKernelSysClock schedule;
|
||||
SceKernelSysClock interval;
|
||||
s32 type;
|
||||
s32 fRepeat;
|
||||
s32 numWaitThreads;
|
||||
s32 reserved[1];
|
||||
};
|
||||
|
||||
// Thread Manager definitions (reader/writer locks)
|
||||
|
||||
struct SceKernelRWLockOptParam
|
||||
{
|
||||
u32 size;
|
||||
};
|
||||
|
||||
struct SceKernelRWLockInfo
|
||||
{
|
||||
u32 size;
|
||||
s32 rwLockId;
|
||||
char name[32];
|
||||
u32 attr;
|
||||
s32 lockCount;
|
||||
s32 writeOwnerId;
|
||||
s32 numReadWaitThreads;
|
||||
s32 numWriteWaitThreads;
|
||||
};
|
||||
|
||||
// IO/File Manager definitions
|
||||
|
||||
struct SceIoStat
|
||||
{
|
||||
s32 mode;
|
||||
u32 attr;
|
||||
s64 size;
|
||||
SceDateTime ctime;
|
||||
SceDateTime atime;
|
||||
SceDateTime mtime;
|
||||
u64 _private[6];
|
||||
};
|
||||
|
||||
struct SceIoDirent
|
||||
{
|
||||
SceIoStat d_stat;
|
||||
char d_name[256];
|
||||
vm::psv::ptr<void> d_private;
|
||||
s32 dummy;
|
||||
};
|
||||
|
||||
// Module
|
||||
|
||||
extern psv_log_base sceLibKernel;
|
|
@ -1,7 +1,6 @@
|
|||
#include "stdafx.h"
|
||||
#include "Utilities/Log.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/Memory/Memory.h"
|
||||
#include "Emu/ARMv7/PSVFuncList.h"
|
||||
#include "Emu/ARMv7/ARMv7Callback.h"
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/Memory/Memory.h"
|
||||
#include "Emu/ARMv7/PSVFuncList.h"
|
||||
|
||||
extern psv_log_base sceLibm;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/Memory/Memory.h"
|
||||
#include "Emu/ARMv7/PSVFuncList.h"
|
||||
|
||||
extern psv_log_base sceLibstdcxx;
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -15,7 +15,7 @@ void XAudio2Thread::Init()
|
|||
{
|
||||
HRESULT hr = S_OK;
|
||||
|
||||
#if (_WIN32_WINNT < 0x0602)
|
||||
#if (FORCED_WINVER < 0x0602)
|
||||
hr = CoInitializeEx(nullptr, COINIT_MULTITHREADED);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
|
@ -53,7 +53,7 @@ void XAudio2Thread::Quit()
|
|||
m_xaudio2_instance->Release();
|
||||
m_xaudio2_instance = nullptr;
|
||||
|
||||
#if (_WIN32_WINNT < 0x0602)
|
||||
#if (FORCED_WINVER < 0x0602)
|
||||
CoUninitialize();
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -4,10 +4,9 @@
|
|||
#if defined (_WIN32)
|
||||
|
||||
// forced define Win7, delete this for using XAudio2 2.8
|
||||
#define WINVER 0x0601
|
||||
#define _WIN32_WINNT 0x0601
|
||||
#define FORCED_WINVER 0x0601
|
||||
|
||||
#if (_WIN32_WINNT >= 0x0602 /*_WIN32_WINNT_WIN8*/)
|
||||
#if (FORCED_WINVER >= 0x0602 /*_WIN32_WINNT_WIN8*/)
|
||||
#include <xaudio2.h>
|
||||
#pragma comment(lib,"xaudio2.lib")
|
||||
#else
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#pragma once
|
||||
#include "CPUInstrTable.h"
|
||||
#pragma warning( disable : 4800 )
|
||||
|
||||
class CPUDecoder
|
||||
{
|
||||
|
|
|
@ -117,6 +117,19 @@ std::shared_ptr<CPUThread> CPUThreadManager::GetThread(u32 id)
|
|||
return res;
|
||||
}
|
||||
|
||||
std::shared_ptr<CPUThread> CPUThreadManager::GetThread(u32 id, CPUThreadType type)
|
||||
{
|
||||
std::shared_ptr<CPUThread> res;
|
||||
|
||||
if (!id) return nullptr;
|
||||
|
||||
if (!Emu.GetIdManager().GetIDData(id, res)) return nullptr;
|
||||
|
||||
if (res->GetType() != type) return nullptr;
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
RawSPUThread* CPUThreadManager::GetRawSPUThread(u32 num)
|
||||
{
|
||||
if (num < sizeof(Memory.RawSPUMem) / sizeof(Memory.RawSPUMem[0]))
|
||||
|
|
|
@ -21,6 +21,7 @@ public:
|
|||
//std::vector<std::shared_ptr<CPUThread>>& GetThreads() { return m_threads; }
|
||||
s32 GetThreadNumById(CPUThreadType type, u32 id);
|
||||
std::shared_ptr<CPUThread> GetThread(u32 id);
|
||||
std::shared_ptr<CPUThread> GetThread(u32 id, CPUThreadType type);
|
||||
RawSPUThread* GetRawSPUThread(u32 num);
|
||||
|
||||
void Exec();
|
||||
|
|
|
@ -363,6 +363,7 @@ struct PPCdouble
|
|||
case _FPCLASS_PD: return FPR_PD;
|
||||
case _FPCLASS_PN: return FPR_PN;
|
||||
case _FPCLASS_PINF: return FPR_PINF;
|
||||
default: throw fmt::Format("PPCdouble::UpdateType() -> unknown fpclass (0x%04x).", fpc);
|
||||
}
|
||||
#else
|
||||
switch (fpc)
|
||||
|
@ -374,8 +375,6 @@ struct PPCdouble
|
|||
default: return std::signbit(_double) ? FPR_NN : FPR_PN;
|
||||
}
|
||||
#endif
|
||||
|
||||
throw fmt::Format("PPCdouble::UpdateType() -> unknown fpclass (0x%04x).", fpc);
|
||||
}
|
||||
|
||||
FPRType GetType() const
|
||||
|
|
|
@ -325,7 +325,7 @@ vfsDevice* VFS::GetDevice(const std::string& ps3_path, std::string& path) const
|
|||
|
||||
path = m_devices[max_i]->GetLocalPath();
|
||||
|
||||
for (u32 i = max_eq; i < ps3_path_blocks.size(); i++)
|
||||
for (size_t i = max_eq; i < ps3_path_blocks.size(); i++)
|
||||
{
|
||||
path += "/" + ps3_path_blocks[i];
|
||||
}
|
||||
|
@ -382,7 +382,7 @@ vfsDevice* VFS::GetDeviceLocal(const std::string& local_path, std::string& path)
|
|||
|
||||
path = m_devices[max_i]->GetPs3Path();
|
||||
|
||||
for (u32 i = max_eq; i < local_path_blocks.size(); i++)
|
||||
for (size_t i = max_eq; i < local_path_blocks.size(); i++)
|
||||
{
|
||||
path += "/" + local_path_blocks[i];
|
||||
}
|
||||
|
|
|
@ -68,8 +68,7 @@ public:
|
|||
}
|
||||
|
||||
iterator(const DirEntryInfo* data)
|
||||
: parent(parent)
|
||||
, data(data)
|
||||
: data(data)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -6,15 +6,15 @@ vfsStreamMemory::vfsStreamMemory() : vfsStream()
|
|||
{
|
||||
}
|
||||
|
||||
vfsStreamMemory::vfsStreamMemory(u64 addr, u64 size) : vfsStream()
|
||||
vfsStreamMemory::vfsStreamMemory(u32 addr, u32 size) : vfsStream()
|
||||
{
|
||||
Open(addr, size);
|
||||
}
|
||||
|
||||
void vfsStreamMemory::Open(u64 addr, u64 size)
|
||||
void vfsStreamMemory::Open(u32 addr, u32 size)
|
||||
{
|
||||
m_addr = addr;
|
||||
m_size = size ? size : ~0ULL;
|
||||
m_size = size ? size : 0x100000000ull - addr; // determine max possible size
|
||||
|
||||
vfsStream::Reset();
|
||||
}
|
||||
|
@ -26,24 +26,24 @@ u64 vfsStreamMemory::GetSize()
|
|||
|
||||
u64 vfsStreamMemory::Write(const void* src, u64 size)
|
||||
{
|
||||
if(Tell() + size > GetSize())
|
||||
assert(Tell() < m_size);
|
||||
if (Tell() + size > m_size)
|
||||
{
|
||||
size = GetSize() - Tell();
|
||||
size = m_size - Tell();
|
||||
}
|
||||
|
||||
memcpy(vm::get_ptr<void>(m_addr + Tell()), src, size);
|
||||
|
||||
memcpy(vm::get_ptr<void>(vm::cast(m_addr + Tell())), src, size);
|
||||
return vfsStream::Write(src, size);
|
||||
}
|
||||
|
||||
u64 vfsStreamMemory::Read(void* dst, u64 size)
|
||||
{
|
||||
assert(Tell() < GetSize());
|
||||
if (Tell() + size > GetSize())
|
||||
{
|
||||
size = GetSize() - Tell();
|
||||
}
|
||||
|
||||
memcpy(dst, vm::get_ptr<void>(m_addr + Tell()), size);
|
||||
|
||||
memcpy(dst, vm::get_ptr<void>(vm::cast(m_addr + Tell())), size);
|
||||
return vfsStream::Read(dst, size);
|
||||
}
|
||||
|
|
|
@ -3,14 +3,14 @@
|
|||
|
||||
struct vfsStreamMemory : public vfsStream
|
||||
{
|
||||
u64 m_addr;
|
||||
u32 m_addr;
|
||||
u64 m_size;
|
||||
|
||||
public:
|
||||
vfsStreamMemory();
|
||||
vfsStreamMemory(u64 addr, u64 size = 0);
|
||||
vfsStreamMemory(u32 addr, u32 size = 0);
|
||||
|
||||
void Open(u64 addr, u64 size = 0);
|
||||
void Open(u32 addr, u32 size = 0);
|
||||
|
||||
virtual u64 GetSize() override;
|
||||
|
||||
|
|
|
@ -495,9 +495,9 @@ void GLFragmentDecompilerThread::Task()
|
|||
case RSX_FP_OPCODE_NRM: SetDst("normalize($0)"); break;
|
||||
case RSX_FP_OPCODE_BEM: LOG_ERROR(RSX, "Unimplemented TEX_SRB instruction: BEM"); break;
|
||||
case RSX_FP_OPCODE_TEX: SetDst("texture($t, $0.xy)"); break;
|
||||
case RSX_FP_OPCODE_TEXBEM: LOG_ERROR(RSX, "Unimplemented TEX_SRB instruction: TEXBEM"); break;
|
||||
case RSX_FP_OPCODE_TXP: SetDst("textureProj($t, $0.xy, $1)"); break; //TODO: More testing (Sonic The Hedgehog (NPUB-30442/NPEB-00478) and The Simpsons Arcade Game (NPUB30563))
|
||||
case RSX_FP_OPCODE_TXPBEM: LOG_ERROR(RSX, "Unimplemented TEX_SRB instruction: TXPBEM"); break;
|
||||
case RSX_FP_OPCODE_TEXBEM: SetDst("texture($t, $0.xy, $1.x)"); break;
|
||||
case RSX_FP_OPCODE_TXP: SetDst("textureProj($t, $0.xy, $1.x)"); break; //TODO: More testing (Sonic The Hedgehog (NPUB-30442/NPEB-00478) and The Simpsons Arcade Game (NPUB30563))
|
||||
case RSX_FP_OPCODE_TXPBEM: SetDst("textureProj($t, $0.xy, $1.x)"); break;
|
||||
case RSX_FP_OPCODE_TXD: LOG_ERROR(RSX, "Unimplemented TEX_SRB instruction: TXD"); break;
|
||||
case RSX_FP_OPCODE_TXB: SetDst("texture($t, $0.xy, $1.x)"); break;
|
||||
case RSX_FP_OPCODE_TXL: SetDst("textureLod($t, $0.xy, $1.x)"); break;
|
||||
|
|
|
@ -289,19 +289,19 @@ u16 RSXVertexTexture::GetMipmap() const
|
|||
u8 RSXVertexTexture::GetWrapS() const
|
||||
{
|
||||
return 1;
|
||||
return ((methodRegisters[NV4097_SET_VERTEX_TEXTURE_ADDRESS + (m_index * 32)]) & 0xf);
|
||||
//return ((methodRegisters[NV4097_SET_VERTEX_TEXTURE_ADDRESS + (m_index * 32)]) & 0xf);
|
||||
}
|
||||
|
||||
u8 RSXVertexTexture::GetWrapT() const
|
||||
{
|
||||
return 1;
|
||||
return ((methodRegisters[NV4097_SET_VERTEX_TEXTURE_ADDRESS + (m_index * 32)] >> 8) & 0xf);
|
||||
//return ((methodRegisters[NV4097_SET_VERTEX_TEXTURE_ADDRESS + (m_index * 32)] >> 8) & 0xf);
|
||||
}
|
||||
|
||||
u8 RSXVertexTexture::GetWrapR() const
|
||||
{
|
||||
return 1;
|
||||
return ((methodRegisters[NV4097_SET_VERTEX_TEXTURE_ADDRESS + (m_index * 32)] >> 16) & 0xf);
|
||||
//return ((methodRegisters[NV4097_SET_VERTEX_TEXTURE_ADDRESS + (m_index * 32)] >> 16) & 0xf);
|
||||
}
|
||||
|
||||
u8 RSXVertexTexture::GetUnsignedRemap() const
|
||||
|
|
|
@ -542,14 +542,12 @@ int cellGcmSetSecondVFrequency(u32 freq)
|
|||
switch (freq)
|
||||
{
|
||||
case CELL_GCM_DISPLAY_FREQUENCY_59_94HZ:
|
||||
cellGcmSys->Todo("Unimplemented display frequency: 59.94Hz");
|
||||
Emu.GetGSManager().GetRender().m_frequency_mode = freq; cellGcmSys->Todo("Unimplemented display frequency: 59.94Hz"); break;
|
||||
case CELL_GCM_DISPLAY_FREQUENCY_SCANOUT:
|
||||
cellGcmSys->Todo("Unimplemented display frequency: Scanout");
|
||||
Emu.GetGSManager().GetRender().m_frequency_mode = freq; cellGcmSys->Todo("Unimplemented display frequency: Scanout"); break;
|
||||
case CELL_GCM_DISPLAY_FREQUENCY_DISABLE:
|
||||
Emu.GetGSManager().GetRender().m_frequency_mode = freq;
|
||||
break;
|
||||
|
||||
default: return CELL_EINVAL;
|
||||
Emu.GetGSManager().GetRender().m_frequency_mode = freq; cellGcmSys->Todo("Unimplemented display frequency: Disabled"); break;
|
||||
default: cellGcmSys->Error("Improper display frequency specified!"); return CELL_OK;
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
|
|
|
@ -11,17 +11,24 @@ extern Module *sys_io;
|
|||
int cellKbInit(u32 max_connect)
|
||||
{
|
||||
sys_io->Warning("cellKbInit(max_connect=%d)", max_connect);
|
||||
if(Emu.GetKeyboardManager().IsInited()) return CELL_KB_ERROR_ALREADY_INITIALIZED;
|
||||
if(max_connect > 7) return CELL_KB_ERROR_INVALID_PARAMETER;
|
||||
|
||||
if (Emu.GetKeyboardManager().IsInited())
|
||||
return CELL_KB_ERROR_ALREADY_INITIALIZED;
|
||||
if (max_connect > 7)
|
||||
return CELL_KB_ERROR_INVALID_PARAMETER;
|
||||
|
||||
Emu.GetKeyboardManager().Init(max_connect);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellKbEnd()
|
||||
{
|
||||
sys_io->Log("cellKbEnd()");
|
||||
if(!Emu.GetKeyboardManager().IsInited()) return CELL_KB_ERROR_UNINITIALIZED;
|
||||
|
||||
if (!Emu.GetKeyboardManager().IsInited())
|
||||
return CELL_KB_ERROR_UNINITIALIZED;
|
||||
|
||||
Emu.GetKeyboardManager().Close();
|
||||
return CELL_OK;
|
||||
}
|
||||
|
@ -29,8 +36,12 @@ int cellKbEnd()
|
|||
int cellKbClearBuf(u32 port_no)
|
||||
{
|
||||
sys_io->Log("cellKbClearBuf(port_no=%d)", port_no);
|
||||
if(!Emu.GetKeyboardManager().IsInited()) return CELL_KB_ERROR_UNINITIALIZED;
|
||||
if(port_no >= Emu.GetKeyboardManager().GetKeyboards().size()) return CELL_KB_ERROR_INVALID_PARAMETER;
|
||||
|
||||
if (!Emu.GetKeyboardManager().IsInited())
|
||||
return CELL_KB_ERROR_UNINITIALIZED;
|
||||
|
||||
if (port_no >= Emu.GetKeyboardManager().GetKeyboards().size())
|
||||
return CELL_KB_ERROR_INVALID_PARAMETER;
|
||||
|
||||
//?
|
||||
|
||||
|
@ -42,9 +53,7 @@ u16 cellKbCnvRawCode(u32 arrange, u32 mkey, u32 led, u16 rawcode)
|
|||
sys_io->Log("cellKbCnvRawCode(arrange=%d,mkey=%d,led=%d,rawcode=%d)", arrange, mkey, led, rawcode);
|
||||
|
||||
// CELL_KB_RAWDAT
|
||||
if ((rawcode >= 0x00 && rawcode <= 0x03) || rawcode == 0x29 || rawcode == 0x35 ||
|
||||
(rawcode >= 0x39 && rawcode <= 0x53) || rawcode == 0x65 || rawcode == 0x88 ||
|
||||
rawcode == 0x8A || rawcode == 0x8B)
|
||||
if (rawcode <= 0x03 || rawcode == 0x29 || rawcode == 0x35 || (rawcode >= 0x39 && rawcode <= 0x53) || rawcode == 0x65 || rawcode == 0x88 || rawcode == 0x8A || rawcode == 0x8B)
|
||||
{
|
||||
return rawcode | 0x8000;
|
||||
}
|
||||
|
@ -88,12 +97,15 @@ u16 cellKbCnvRawCode(u32 arrange, u32 mkey, u32 led, u16 rawcode)
|
|||
int cellKbGetInfo(vm::ptr<CellKbInfo> info)
|
||||
{
|
||||
sys_io->Log("cellKbGetInfo(info_addr=0x%x)", info.addr());
|
||||
if(!Emu.GetKeyboardManager().IsInited()) return CELL_KB_ERROR_UNINITIALIZED;
|
||||
|
||||
if (!Emu.GetKeyboardManager().IsInited())
|
||||
return CELL_KB_ERROR_UNINITIALIZED;
|
||||
|
||||
const KbInfo& current_info = Emu.GetKeyboardManager().GetInfo();
|
||||
info->max_connect = current_info.max_connect;
|
||||
info->now_connect = current_info.now_connect;
|
||||
info->info = current_info.info;
|
||||
|
||||
for (u32 i=0; i<CELL_KB_MAX_KEYBOARDS; i++)
|
||||
{
|
||||
info->status[i] = current_info.status[i];
|
||||
|
@ -107,13 +119,17 @@ int cellKbRead(u32 port_no, vm::ptr<CellKbData> data)
|
|||
sys_io->Log("cellKbRead(port_no=%d,info_addr=0x%x)", port_no, data.addr());
|
||||
|
||||
const std::vector<Keyboard>& keyboards = Emu.GetKeyboardManager().GetKeyboards();
|
||||
if(!Emu.GetKeyboardManager().IsInited()) return CELL_KB_ERROR_UNINITIALIZED;
|
||||
if(port_no >= keyboards.size()) return CELL_KB_ERROR_INVALID_PARAMETER;
|
||||
if (!Emu.GetKeyboardManager().IsInited())
|
||||
return CELL_KB_ERROR_UNINITIALIZED;
|
||||
|
||||
if (port_no >= keyboards.size())
|
||||
return CELL_KB_ERROR_INVALID_PARAMETER;
|
||||
|
||||
KbData& current_data = Emu.GetKeyboardManager().GetData(port_no);
|
||||
data->led = current_data.led;
|
||||
data->mkey = current_data.mkey;
|
||||
data->len = std::min((u32)current_data.len, CELL_KB_MAX_KEYCODES);
|
||||
|
||||
for (s32 i=0; i<current_data.len; i++)
|
||||
{
|
||||
data->keycode[i] = current_data.keycode[i];
|
||||
|
@ -127,7 +143,9 @@ int cellKbRead(u32 port_no, vm::ptr<CellKbData> data)
|
|||
int cellKbSetCodeType(u32 port_no, u32 type)
|
||||
{
|
||||
sys_io->Log("cellKbSetCodeType(port_no=%d,type=%d)", port_no, type);
|
||||
if(!Emu.GetKeyboardManager().IsInited()) return CELL_KB_ERROR_UNINITIALIZED;
|
||||
|
||||
if (!Emu.GetKeyboardManager().IsInited())
|
||||
return CELL_KB_ERROR_UNINITIALIZED;
|
||||
|
||||
KbConfig& current_config = Emu.GetKeyboardManager().GetConfig(port_no);
|
||||
current_config.code_type = type;
|
||||
|
@ -143,7 +161,9 @@ int cellKbSetLEDStatus(u32 port_no, u8 led)
|
|||
int cellKbSetReadMode(u32 port_no, u32 rmode)
|
||||
{
|
||||
sys_io->Log("cellKbSetReadMode(port_no=%d,rmode=%d)", port_no, rmode);
|
||||
if(!Emu.GetKeyboardManager().IsInited()) return CELL_KB_ERROR_UNINITIALIZED;
|
||||
|
||||
if (!Emu.GetKeyboardManager().IsInited())
|
||||
return CELL_KB_ERROR_UNINITIALIZED;
|
||||
|
||||
KbConfig& current_config = Emu.GetKeyboardManager().GetConfig(port_no);
|
||||
current_config.read_mode = rmode;
|
||||
|
@ -154,7 +174,9 @@ int cellKbSetReadMode(u32 port_no, u32 rmode)
|
|||
int cellKbGetConfiguration(u32 port_no, vm::ptr<CellKbConfig> config)
|
||||
{
|
||||
sys_io->Log("cellKbGetConfiguration(port_no=%d,config_addr=0x%x)", port_no, config.addr());
|
||||
if(!Emu.GetKeyboardManager().IsInited()) return CELL_KB_ERROR_UNINITIALIZED;
|
||||
|
||||
if (!Emu.GetKeyboardManager().IsInited())
|
||||
return CELL_KB_ERROR_UNINITIALIZED;
|
||||
|
||||
const KbConfig& current_config = Emu.GetKeyboardManager().GetConfig(port_no);
|
||||
config->arrange = current_config.arrange;
|
||||
|
|
|
@ -127,8 +127,8 @@ s32 cellMsgDialogOpen2(u32 type, vm::ptr<const char> msgString, vm::ptr<CellMsgD
|
|||
{
|
||||
switch (type & CELL_MSGDIALOG_TYPE_SE_TYPE)
|
||||
{
|
||||
case CELL_MSGDIALOG_TYPE_SE_TYPE_NORMAL: LOG_WARNING(TTY, "\n%s", msg.c_str()); break;
|
||||
case CELL_MSGDIALOG_TYPE_SE_TYPE_ERROR: LOG_ERROR(TTY, "\n%s", msg.c_str()); break;
|
||||
case CELL_MSGDIALOG_TYPE_SE_TYPE_NORMAL: LOG_WARNING(HLE, "%s", msg.c_str()); break;
|
||||
case CELL_MSGDIALOG_TYPE_SE_TYPE_ERROR: LOG_ERROR(HLE, "%s", msg.c_str()); break;
|
||||
}
|
||||
|
||||
switch (type & CELL_MSGDIALOG_TYPE_SE_MUTE) // TODO
|
||||
|
@ -264,7 +264,11 @@ s32 cellMsgDialogOpenErrorCode(u32 errorCode, vm::ptr<CellMsgDialogCallback> cal
|
|||
}
|
||||
|
||||
char errorCodeHex[12];
|
||||
#if __STDC_WANT_SECURE_LIB__ && !_WIN32_WCE
|
||||
sprintf_s(errorCodeHex, "\n(%08x)", errorCode);
|
||||
#else
|
||||
sprintf(errorCodeHex, "\n(%08x)", errorCode);
|
||||
#endif
|
||||
errorMessage.append(errorCodeHex);
|
||||
|
||||
u64 status;
|
||||
|
|
|
@ -1060,8 +1060,10 @@ s32 syncLFQueueGetPushPointer(vm::ptr<CellSyncLFQueue> queue, s32& pointer, u32
|
|||
res = CELL_SYNC_ERROR_AGAIN;
|
||||
if (!push.m_h7.data() || res)
|
||||
{
|
||||
// TODO: This condition is always true - wrong implementation?
|
||||
return res;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
else if (!useEventQueue)
|
||||
|
@ -1437,8 +1439,10 @@ s32 syncLFQueueGetPopPointer(vm::ptr<CellSyncLFQueue> queue, s32& pointer, u32 i
|
|||
res = CELL_SYNC_ERROR_AGAIN;
|
||||
if (!pop.m_h3.data() || res)
|
||||
{
|
||||
// TODO: This condition is always true - wrong implementation?
|
||||
return res;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
else if (!useEventQueue)
|
||||
|
|
|
@ -210,91 +210,91 @@ void CompilerELF::OnUpdate(wxCommandEvent& event)
|
|||
DoAnalyzeCode(false);
|
||||
|
||||
return;
|
||||
asm_list->Freeze();
|
||||
asm_list->SetStyle(0, asm_list->GetValue().Len(), wxTextAttr("Black"));
|
||||
//asm_list->Freeze();
|
||||
//asm_list->SetStyle(0, asm_list->GetValue().Len(), wxTextAttr("Black"));
|
||||
|
||||
/*
|
||||
for(u32 i=0; i<instr_count; ++i)
|
||||
{
|
||||
SetOpStyle(m_instructions[i].name, "Blue");
|
||||
}
|
||||
*/
|
||||
///*
|
||||
//for(u32 i=0; i<instr_count; ++i)
|
||||
//{
|
||||
// SetOpStyle(m_instructions[i].name, "Blue");
|
||||
//}
|
||||
//*/
|
||||
//
|
||||
//SetOpStyle(".int", "Blue");
|
||||
//SetOpStyle(".string", "Blue");
|
||||
//SetOpStyle(".strlen", "Blue");
|
||||
//SetOpStyle(".buf", "Blue");
|
||||
//SetOpStyle(".srl", "Blue");
|
||||
//SetOpStyle(".srr", "Blue");
|
||||
//SetOpStyle(".mul", "Blue");
|
||||
//SetOpStyle(".div", "Blue");
|
||||
//SetOpStyle(".add", "Blue");
|
||||
//SetOpStyle(".sub", "Blue");
|
||||
//SetOpStyle(".and", "Blue");
|
||||
//SetOpStyle(".or", "Blue");
|
||||
//SetOpStyle(".xor", "Blue");
|
||||
//SetOpStyle(".not", "Blue");
|
||||
//SetOpStyle(".nor", "Blue");
|
||||
|
||||
SetOpStyle(".int", "Blue");
|
||||
SetOpStyle(".string", "Blue");
|
||||
SetOpStyle(".strlen", "Blue");
|
||||
SetOpStyle(".buf", "Blue");
|
||||
SetOpStyle(".srl", "Blue");
|
||||
SetOpStyle(".srr", "Blue");
|
||||
SetOpStyle(".mul", "Blue");
|
||||
SetOpStyle(".div", "Blue");
|
||||
SetOpStyle(".add", "Blue");
|
||||
SetOpStyle(".sub", "Blue");
|
||||
SetOpStyle(".and", "Blue");
|
||||
SetOpStyle(".or", "Blue");
|
||||
SetOpStyle(".xor", "Blue");
|
||||
SetOpStyle(".not", "Blue");
|
||||
SetOpStyle(".nor", "Blue");
|
||||
//SetTextStyle("[", "Red");
|
||||
//SetTextStyle("]", "Red");
|
||||
//SetTextStyle(":", "Red");
|
||||
//SetTextStyle(",", "Red");
|
||||
|
||||
SetTextStyle("[", "Red");
|
||||
SetTextStyle("]", "Red");
|
||||
SetTextStyle(":", "Red");
|
||||
SetTextStyle(",", "Red");
|
||||
//for(int p=0; (p = asm_list->GetValue().find('#', p)) >= 0;)
|
||||
//{
|
||||
// const int from = p++;
|
||||
// p = asm_list->GetValue().find('\n', p);
|
||||
|
||||
for(int p=0; (p = asm_list->GetValue().find('#', p)) >= 0;)
|
||||
{
|
||||
const int from = p++;
|
||||
p = asm_list->GetValue().find('\n', p);
|
||||
// if(p < 0) p = asm_list->GetValue().Len();
|
||||
|
||||
if(p < 0) p = asm_list->GetValue().Len();
|
||||
// asm_list->SetStyle(from, p, wxTextAttr(0x009900));
|
||||
//}
|
||||
//
|
||||
//for(int p=0; (p = asm_list->GetValue().find('"', p)) >= 0;)
|
||||
//{
|
||||
// const int from = p++;
|
||||
// const int p1 = asm_list->GetValue().find('\n', p);
|
||||
|
||||
asm_list->SetStyle(from, p, wxTextAttr(0x009900));
|
||||
}
|
||||
// int p2 = p;
|
||||
// for(;;)
|
||||
// {
|
||||
// p2 = asm_list->GetValue().find('"', p2);
|
||||
// if(p2 == -1) break;
|
||||
|
||||
for(int p=0; (p = asm_list->GetValue().find('"', p)) >= 0;)
|
||||
{
|
||||
const int from = p++;
|
||||
const int p1 = asm_list->GetValue().find('\n', p);
|
||||
// if(asm_list->GetValue()[p2 - 1] == '\\')
|
||||
// {
|
||||
// if(p2 > 2 && asm_list->GetValue()[p2 - 2] == '\\') break;
|
||||
|
||||
int p2 = p;
|
||||
for(;;)
|
||||
{
|
||||
p2 = asm_list->GetValue().find('"', p2);
|
||||
if(p2 == -1) break;
|
||||
// p2++;
|
||||
// continue;
|
||||
// }
|
||||
// break;
|
||||
// }
|
||||
|
||||
if(asm_list->GetValue()[p2 - 1] == '\\')
|
||||
{
|
||||
if(p2 > 2 && asm_list->GetValue()[p2 - 2] == '\\') break;
|
||||
// if(p1 < 0 && p2 < 0)
|
||||
// {
|
||||
// p = asm_list->GetValue().Len();
|
||||
// }
|
||||
// else if(p1 >= 0 && p2 < 0)
|
||||
// {
|
||||
// p = p1;
|
||||
// }
|
||||
// else if(p2 >= 0 && p1 < 0)
|
||||
// {
|
||||
// p = p2 + 1;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// p = p1 > p2 ? p2 + 1 : p1;
|
||||
// }
|
||||
|
||||
p2++;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
// asm_list->SetStyle(from, p, wxTextAttr(0x000099));
|
||||
//}
|
||||
|
||||
if(p1 < 0 && p2 < 0)
|
||||
{
|
||||
p = asm_list->GetValue().Len();
|
||||
}
|
||||
else if(p1 >= 0 && p2 < 0)
|
||||
{
|
||||
p = p1;
|
||||
}
|
||||
else if(p2 >= 0 && p1 < 0)
|
||||
{
|
||||
p = p2 + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
p = p1 > p2 ? p2 + 1 : p1;
|
||||
}
|
||||
//asm_list->Thaw();
|
||||
|
||||
asm_list->SetStyle(from, p, wxTextAttr(0x000099));
|
||||
}
|
||||
|
||||
asm_list->Thaw();
|
||||
|
||||
UpdateScroll(true, wxVERTICAL);
|
||||
//UpdateScroll(true, wxVERTICAL);
|
||||
}
|
||||
|
||||
void CompilerELF::OnScroll(wxScrollWinEvent& event)
|
||||
|
|
|
@ -274,6 +274,7 @@
|
|||
<ClInclude Include="Emu\ARMv7\ARMv7Interpreter.h" />
|
||||
<ClInclude Include="Emu\ARMv7\ARMv7Opcodes.h" />
|
||||
<ClInclude Include="Emu\ARMv7\ARMv7Thread.h" />
|
||||
<ClInclude Include="Emu\ARMv7\Modules\sceLibKernel.h" />
|
||||
<ClInclude Include="Emu\ARMv7\PSVFuncList.h" />
|
||||
<ClInclude Include="Emu\Audio\AL\OpenALThread.h" />
|
||||
<ClInclude Include="Emu\Audio\AudioDumper.h" />
|
||||
|
|
|
@ -1291,5 +1291,8 @@
|
|||
<ClInclude Include="Emu\ARMv7\ARMv7Callback.h">
|
||||
<Filter>Emu\CPU\ARMv7</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\ARMv7\Modules\sceLibKernel.h">
|
||||
<Filter>Emu\CPU\ARMv7\Modules</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -14,6 +14,8 @@
|
|||
#endif
|
||||
|
||||
// This header should be frontend-agnostic, so don't assume wx includes everything
|
||||
#pragma warning( disable : 4800 )
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <cassert>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue