-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Included initial OrbisOS / R10XX headers
- Loading branch information
Showing
29 changed files
with
250 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,10 @@ keys.xml | |
|
||
# Logs | ||
*.log | ||
|
||
# IDA Pro | ||
*.id0 | ||
*.id1 | ||
*.id2 | ||
*.nam | ||
*.til |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/** | ||
* (c) 2014-2016 Alexandro Sanchez Bach. All rights reserved. | ||
* Released under GPL v2 license. Read LICENSE for more details. | ||
*/ | ||
|
||
#include "r10xx.h" | ||
|
||
namespace gpu { | ||
namespace r10xx { | ||
|
||
R10XX::R10XX(std::shared_ptr<gfx::IBackend> graphics) { | ||
} | ||
|
||
gfx::Texture* R10XX::getFrontBuffer() { | ||
return nullptr; | ||
} | ||
|
||
} // namespace r10xx | ||
} // namespace gpu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/** | ||
* (c) 2014-2016 Alexandro Sanchez Bach. All rights reserved. | ||
* Released under GPL v2 license. Read LICENSE for more details. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include "nucleus/gpu/gpu.h" | ||
|
||
#include <memory> | ||
|
||
namespace gpu { | ||
namespace r10xx { | ||
|
||
class R10XX : public GPU { | ||
public: | ||
R10XX(std::shared_ptr<gfx::IBackend> graphics); | ||
|
||
virtual gfx::Texture* getFrontBuffer() override; | ||
}; | ||
|
||
} // namespace r10xx | ||
} // namespace gpu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,8 @@ | |
namespace core { | ||
|
||
enum Platform { | ||
PLATFORM_UNKNOWN = 0, | ||
|
||
PLATFORM_PS3, | ||
PLATFORM_PS4, | ||
PLATFORM_PSP, | ||
|
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/** | ||
* (c) 2014-2016 Alexandro Sanchez Bach. All rights reserved. | ||
* Released under GPL v2 license. Read LICENSE for more details. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include "nucleus/common.h" | ||
|
||
#ifdef NUCLEUS_PLATFORM_PS3 | ||
#include "nucleus/system/scei/cellos/lv1.h" | ||
#include "nucleus/system/scei/cellos/lv2.h" | ||
#endif | ||
#ifdef NUCLEUS_PLATFORM_PS4 | ||
#include "nucleus/system/scei/orbisos/orbisos.h" | ||
#endif | ||
|
||
namespace sys { | ||
|
||
// Shorthands | ||
#ifdef NUCLEUS_PLATFORM_PS3 | ||
using LV2 = sys::LV2; | ||
#endif | ||
#ifdef NUCLEUS_PLATFORM_PS4 | ||
using OrbisOS = sys::scei::orbis::OrbisOS; | ||
#endif | ||
|
||
} // namespace sys |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
1495301
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OrbisOS eh?... Seems ambitious! I understand this is just a foundation, but do you have bigger plans?
1495301
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@theoldsport, Just trying to get PS4 userland emulation à la WINE working. :-)
My main goal is still the PS3, but since all filesystem/graphics/system/etc. libraries are platform-agnostic, even working on the PS4 would result in improvements in backends that the PS3 related frontends use.
1495301
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AlexAltea, Oh that's interesting, I had no idea the libraries were platform-agnostic.
I've heard the WINE-esque route would be the most practical. Not quite orthodox, but very cool! What do you consider the toughest challenge at this stage? (concerning PS3 or PS4 emulation)
1495301
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@theoldsport,
Reverse engineering the kernel and system libraries (takes really a long time), or writing the frontend of the binary translator (it's really easy to do something wrong). But that's just annoying/tiring and not really as "tough" as writing the backends of some of those platform-agnostic libraries, particularly the compilers in /cpu and the backends in /graphics.
Yeah, going for low-level emulation will be extremely difficult for a long time. So the only choice at the moment is whether doing userland emulation with or without recompiling x86_64 binaries. For now just loading the binaries without recompiling like WINE does should be enough for testing, If it succeeds of course I'll write a x86_64 frontend.
1495301
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Considering that PS4 is based on x86-64 AMD "Jaguar", you could think it is a simple matter to run it on our "beloved" intel PC, hence mentioning WINE. Good idea, but I see two issues:
1495301
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hlide, Oh, I didn't know about flinux, I'll have a look into that, thank you! Yes, I intended to swap FS and GS while loading the ELF/PRX files.
Concerning custom instructions (or stuff like
syscall
), I would just patch them with jumps to equivalent code. If that's not possible due to lack of bytes in the original instruction, then I would trap the illegal instruction exception [1] and run equivalent code in the handler.[1] http://blog.ghettoha.xxx/executing-bsd-elfs-in-windows/
1495301
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AlexAltea swapping FS and GS won't do:
EDIT: good link ! but I'm still unsure it is safe to write fsbase because windows keeps FS for 32-bit threads running on 64-bit windows.
1495301
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I read the two methods related to FS hack. They look very interesting. I guess they may work as long as there is no attempt to call a function of a 32-bit library inside a 64-bit program.