Initial Alloy implementation.

This is a regression in functionality and performance, but a much better
foundation for the future of the project (I think). It can run basic
apps under an SSA interpreter but doesn't support some of the features
required to do real 360 apps yet.
This commit is contained in:
Ben Vanik
2013-12-06 22:57:16 -08:00
parent 68b8737a58
commit fdb6a5cfa3
215 changed files with 20167 additions and 16704 deletions

View File

@@ -25,7 +25,7 @@ namespace xam {
SHIM_CALL XamContentGetLicenseMask_shim(
xe_ppc_state_t* ppc_state, XamState* state) {
PPCContext* ppc_state, XamState* state) {
uint32_t unk0_ptr = SHIM_GET_ARG_32(0);
uint32_t unk1_ptr = SHIM_GET_ARG_32(1);

View File

@@ -26,7 +26,7 @@ namespace xam {
SHIM_CALL XGetAVPack_shim(
xe_ppc_state_t* ppc_state, XamState* state) {
PPCContext* ppc_state, XamState* state) {
// DWORD
// Not sure what the values are for this, but 6 is VGA.
// Other likely values are 3/4/8 for HDMI or something.
@@ -37,7 +37,7 @@ SHIM_CALL XGetAVPack_shim(
SHIM_CALL XGetGameRegion_shim(
xe_ppc_state_t* ppc_state, XamState* state) {
PPCContext* ppc_state, XamState* state) {
XELOGD("XGetGameRegion()");
SHIM_SET_RETURN(XEX_REGION_ALL);
@@ -45,7 +45,7 @@ SHIM_CALL XGetGameRegion_shim(
SHIM_CALL XGetLanguage_shim(
xe_ppc_state_t* ppc_state, XamState* state) {
PPCContext* ppc_state, XamState* state) {
XELOGD("XGetLanguage()");
uint32_t desired_language = X_LANGUAGE_ENGLISH;

View File

@@ -29,7 +29,7 @@ namespace xam {
// http://msdn.microsoft.com/en-us/library/windows/desktop/microsoft.directx_sdk.reference.xinputgetcapabilities(v=vs.85).aspx
SHIM_CALL XamInputGetCapabilities_shim(
xe_ppc_state_t* ppc_state, XamState* state) {
PPCContext* ppc_state, XamState* state) {
uint32_t user_index = SHIM_GET_ARG_32(0);
uint32_t flags = SHIM_GET_ARG_32(1);
uint32_t caps_ptr = SHIM_GET_ARG_32(2);
@@ -58,7 +58,7 @@ SHIM_CALL XamInputGetCapabilities_shim(
// http://msdn.microsoft.com/en-us/library/windows/desktop/microsoft.directx_sdk.reference.xinputgetstate(v=vs.85).aspx
SHIM_CALL XamInputGetState_shim(
xe_ppc_state_t* ppc_state, XamState* state) {
PPCContext* ppc_state, XamState* state) {
uint32_t user_index = SHIM_GET_ARG_32(0);
uint32_t state_ptr = SHIM_GET_ARG_32(1);
@@ -85,7 +85,7 @@ SHIM_CALL XamInputGetState_shim(
// http://msdn.microsoft.com/en-us/library/windows/desktop/microsoft.directx_sdk.reference.xinputsetstate(v=vs.85).aspx
SHIM_CALL XamInputSetState_shim(
xe_ppc_state_t* ppc_state, XamState* state) {
PPCContext* ppc_state, XamState* state) {
uint32_t user_index = SHIM_GET_ARG_32(0);
uint32_t vibration_ptr = SHIM_GET_ARG_32(1);

View File

@@ -25,7 +25,7 @@ namespace xam {
SHIM_CALL NetDll_XNetStartup_shim(
xe_ppc_state_t* ppc_state, XamState* state) {
PPCContext* ppc_state, XamState* state) {
uint32_t one = SHIM_GET_ARG_32(0);
uint32_t params_ptr = SHIM_GET_ARG_32(1);
@@ -39,7 +39,7 @@ SHIM_CALL NetDll_XNetStartup_shim(
SHIM_CALL NetDll_WSAStartup_shim(
xe_ppc_state_t* ppc_state, XamState* state) {
PPCContext* ppc_state, XamState* state) {
uint32_t one = SHIM_GET_ARG_32(0);
uint32_t version = SHIM_GET_ARG_16(1);
uint32_t data_ptr = SHIM_GET_ARG_32(2);

View File

@@ -23,11 +23,9 @@ namespace {
XamState::XamState(Emulator* emulator) :
emulator_(emulator) {
memory_ = xe_memory_retain(emulator->memory());
export_resolver_ = emulator->export_resolver();
emulator_(emulator), memory_(emulator->memory()),
export_resolver_(emulator->export_resolver()) {
}
XamState::~XamState() {
xe_memory_release(memory_);
}

View File

@@ -28,11 +28,11 @@ public:
~XamState();
Emulator* emulator() const { return emulator_; }
xe_memory_ref memory() const { return memory_; }
Memory* memory() const { return memory_; }
private:
Emulator* emulator_;
xe_memory_ref memory_;
Memory* memory_;
ExportResolver* export_resolver_;
};

View File

@@ -25,7 +25,7 @@ namespace xam {
SHIM_CALL XamUserGetXUID_shim(
xe_ppc_state_t* ppc_state, XamState* state) {
PPCContext* ppc_state, XamState* state) {
uint32_t user_index = SHIM_GET_ARG_32(0);
uint32_t xuid_ptr = SHIM_GET_ARG_32(1);
@@ -43,7 +43,7 @@ SHIM_CALL XamUserGetXUID_shim(
SHIM_CALL XamUserGetSigninState_shim(
xe_ppc_state_t* ppc_state, XamState* state) {
PPCContext* ppc_state, XamState* state) {
uint32_t user_index = SHIM_GET_ARG_32(0);
XELOGD(

View File

@@ -27,7 +27,7 @@ namespace xam {
SHIM_CALL XGetVideoMode_shim(
xe_ppc_state_t* ppc_state, XamState* state) {
PPCContext* ppc_state, XamState* state) {
xe::kernel::xboxkrnl::X_VIDEO_MODE *video_mode = (xe::kernel::xboxkrnl::X_VIDEO_MODE*)SHIM_MEM_ADDR(SHIM_GET_ARG_32(0));
xeVdQueryVideoMode(video_mode, true);
}