Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Xbox port not possible now?
11-17-2015, 10:42 AM
Post: #1
Xbox port not possible now?
Hi! I am HCF, a developer of the original Xbox scene. I have followed your excellent work, and I also followed this old thread (related to the possibility of making an Xbox port) during much time:

forums.ppsspp.org/showthread.php?tid=2406

I remember that in the development section, in those days the Xbox was marked as "possible but slow", so around a year ago, I tried to start a proof of concept. I was discouraged because this was a titanic task, due to some obstacles that were pointed in that thread... and also due to the fact that PPSSPP has been developed using a huge amount of C++11 code! Unfortunately, in Xbox development we can only use old compilers (like VS2003) without C++11 support, so lots of changes are needed to compile your code in our compilers (we must translate everything to "classical C++").

After a couple of weeks of work, I had ported and compiled only around 15% of the code, so I thought that this could be made, but with months or even years of work. Due to my little free time, I finally halted the project Sad

Recently, I missed this thing and I came back, discovering some nice surprises (some work has been made in DirectX!) but when I thought that these were good news, I saw that in the Development section the Xbox has been changed to "NOT POSSIBLE" (due to lack of RAM).

I would like to ask the reason of this change, because in the future maybe some developers of the Xbox scene can take a look to PPSSPP again. I mean, maybe the RAM requirements have increased in modern versions of PPSSPP? If this is the "only" problem, we could use a solution that we have already used in several Xbox ports (like the MAME, PSX or Atari Jaguar emulators): porting an OLD version (with less requirements) and after that add to that version the changes that make it more compatible without wasting more resources. This gives us a "partial" but acceptable emulation in most cases.

On the other hand, if the Xbox port has been changed to "NOT POSSIBLE" for other reason, it would be very nice to know it. As I have said, the port would be a titanic task, so if you have seen any new thing that Xbox developers would need to know, it would be very nice if you could share with us here.

Don't be afraid of using technical language. I read in the original thread that some people thought that there aren't expert programmers in the Xbox scene, but I can tell you that this is not true: there are still very talented people.

Finally, let me tell you that the Xbox is a bit more powerful than people imagine, due to one important thing: the Xbox has a processor of 733 MHZ... but it doesn't have any kind of operating system or multitask. In other words: when we are executing an emulator, we have the full 733 MHz dedicated to that emulator. This makes that the Xbox can be faster than other machines with the same or even better CPUs, like the Wii or some old Android machines.

If you could tell us the reason of this change, it would be very appreciated.

Thank you very much, and congratulations for your amazing work!
Find all posts by this user
Quote this message in a reply
11-17-2015, 11:09 AM (This post was last modified: 11-17-2015 11:09 AM by Henrik.)
Post: #2
RE: Xbox port not possible now?
It probably still is possible to get it running, mostly changed it because I don't believe it's worth the work for anyone. RAM will be a really serious problem, just the PSP RAM will eat 32MB of the 64MB available, and you need 8-16 MB for a decent JIT cache, and you need space for a texture cache as well, probably at least 4-8MB. Then you need some space for the emulator itself. It will be an extremely tight squeeze and lots of work. Then, all you get is a 733MHz 32-bit x86 CPU. Emulating a 333Mhz PSP CPU _and_ interpreting GPU instructions will just not be possible at full speed so only some games will be able to run full speed. Forget the big ones like GTA.

Get a Shield TV if you want to play on your TV Smile
Find all posts by this user
Quote this message in a reply
11-17-2015, 11:47 AM
Post: #3
RE: Xbox port not possible now?
Thanks for your feedback! I know that, if ever done, it would be a long task and the main part of the games won't be playable. The port process would be more a matter of entertainment (for fun, not for trying to get a decent emulator). And in any case, it's clear that 3D games won't work (like in our Nintendo DS emulator, that plays well in several 2D games, but is painfully slow in 3D ones).

Thank you very much! If I ever come back to the C++11 nightmare to try to port PPSSPP again, I will let you know. Wink

In the meanwhile, I hope to see more of your awesome work with this incredible emulator Smile
Find all posts by this user
Quote this message in a reply
11-18-2015, 05:09 AM
Post: #4
RE: Xbox port not possible now?
Personally, I'd suggest trying to backport STL features (for some things) rather than redoing PPSSPP not to use said features.

That being said, we've gradually gained more and more C++11 features, so the farther back you go, the less there will be. But also the less compatibility.

Does ffmpeg compile for the Xbox?

-[Unknown]
Find all posts by this user
Quote this message in a reply
11-18-2015, 08:40 AM
Post: #5
RE: Xbox port not possible now?
@[Unknown], thank you very much for your suggestion. I guess that it would be very important to choose the right PPSSPP version to start. I mean (as the port is going to be a matter of months) it is important to select the old PPSSPP version that uses less C++11 features, but has a decent compatibility as far as 2D games is related (we can forget about 3D, because 3D games won't work well!).

Furthermore: all the resources spent in 3D emulation can probably be ignored (if we are able to find them in the sources). That would make emulation faster, as we are going to focus in 2D games (MINIS and so on...). I am not over-optimistic, and I know that an Xbox port should only focus in 2D games...

If anyone can give some feedback about these points (stuff related to 3D that can be ignored, and old version that can be used as a start point) it would be very useful.

As far as I know, ffmpeg was ported to Xbox more than 10 years ago, as it was used in Xbox applications like "Xbox Media Player" or "Xbox Media Center"... so I guess that ffmpeg is not a problem.
Find all posts by this user
Quote this message in a reply
11-23-2015, 03:10 AM
Post: #6
RE: Xbox port not possible now?
Well, it would really depend on what the Xbox graphics bottleneck on. Some 2D games are actually horrible stories for modern OpenGL emulation, for example, because they use tricks or lots of draw calls to render. For example, doubled blending modes, copies between VRAM and RAM, and alpha test / stencil testing trickery.

Also, you might be surprised - many games will use 3D rendering even for 2D graphics. There are games where lighting or etc. is used - in 2D - just to make a button show visibly highlighted. It might be hard to remove any 3D-specific rendering code and retain any hope of compatibility.

That being said, definitely get rid of anything under GPU/Software/. That's the software renderer, so it can just be stubbed out.

Okay - note that if you want background music to work, a *recent* version of ffmpeg will be needed. ATRAC3+ (used by a very large percentage of PSP games) is only supported in recent released versions, and with a patch by that. This is thanks to wonderful work by Maxim Poliakovski.

Well, we used more C++ after switching to 2013:
https://github.com/hrydgard/ppsspp/pull/5371

So thereabouts would I suppose be a good place, maybe. That being said, there's been a lot of improvements since then. That was back around v0.9.9.1.

-[Unknown]
Find all posts by this user
Quote this message in a reply
11-23-2015, 04:41 PM
Post: #7
RE: Xbox port not possible now?
Thank you very much for all that information, [Unknown] ! Smile
Find all posts by this user
Quote this message in a reply
11-23-2015, 07:59 PM
Post: #8
RE: Xbox port not possible now?
(11-17-2015 11:09 AM)Henrik Wrote:  It probably still is possible to get it running, mostly changed it because I don't believe it's worth the work for anyone. RAM will be a really serious problem, just the PSP RAM will eat 32MB of the 64MB available, and you need 8-16 MB for a decent JIT cache, and you need space for a texture cache as well, probably at least 4-8MB. Then you need some space for the emulator itself. It will be an extremely tight squeeze and lots of work. Then, all you get is a 733MHz 32-bit x86 CPU. Emulating a 333Mhz PSP CPU _and_ interpreting GPU instructions will just not be possible at full speed so only some games will be able to run full speed. Forget the big ones like GTA.

Get a Shield TV if you want to play on your TV Smile

I can't help it but wonder how it would run on my 1,4Ghz/128MB RAM modded XBOX. I guess just a bit better, though other emulators work quite alot better.
Find all posts by this user
Quote this message in a reply
11-26-2015, 09:40 AM
Post: #9
RE: Xbox port not possible now?
(11-23-2015 07:59 PM)VIRGIN KLM Wrote:  I can't help it but wonder how it would run on my 1,4Ghz/128MB RAM modded XBOX. I guess just a bit better, though other emulators work quite alot better.

Some emulators like the ports of Desmume (a Nintendo DS emulator) work really much better in a "Trusty" Xbox like yours. I'm sure that a port of PPSSPP would certainly take advantage of the extra CPU power... and also 128 MB RAM will help a lot to make the emulator fit in memory.

Yes, Trusty owners can be a good encouragement to start this port! Smile
Find all posts by this user
Quote this message in a reply
11-26-2015, 02:37 PM
Post: #10
RE: Xbox port not possible now?
(11-26-2015 09:40 AM)hcfcoder Wrote:  
(11-23-2015 07:59 PM)VIRGIN KLM Wrote:  I can't help it but wonder how it would run on my 1,4Ghz/128MB RAM modded XBOX. I guess just a bit better, though other emulators work quite alot better.

Some emulators like the ports of Desmume (a Nintendo DS emulator) work really much better in a "Trusty" Xbox like yours. I'm sure that a port of PPSSPP would certainly take advantage of the extra CPU power... and also 128 MB RAM will help a lot to make the emulator fit in memory.

Yes, Trusty owners can be a good encouragement to start this port! Smile

Not worthy. I mean how many people have modded their console like mine? Let alone that it will be a hell to debug. I mean I have a Galaxy Tab 3 10.1 which is an Android x86 device with 1GB of RAM which is by faaar superior than XBOX hardware, even the modded one, and while the results have been getting better and better is not really a device you enjoy playing any games on it, the hardware is too weak.
Find all posts by this user
Quote this message in a reply
11-27-2015, 12:37 PM
Post: #11
RE: Xbox port not possible now?
(11-26-2015 02:37 PM)VIRGIN KLM Wrote:  Not worthy. I mean how many people have modded their console like mine? Let alone that it will be a hell to debug. I mean I have a Galaxy Tab 3 10.1 which is an Android x86 device with 1GB of RAM which is by faaar superior than XBOX hardware, even the modded one, and while the results have been getting better and better is not really a device you enjoy playing any games on it, the hardware is too weak.

It's true, there are not much people with modified consoles. In fact I don't own one of them. It's obvious that an hypothetical port would have to be made by matter of curiosity or fun, not hoping to achieve full-speed playing...
Find all posts by this user
Quote this message in a reply
09-27-2016, 03:12 PM
Post: #12
RE: Xbox port not possible now?
Hi! Well, after months of work and hundreds of "auto", "override", "enum class" and other C++11 obstacles, I have finally made my proof of concept, porting an ancient version of PPSSPP (0.6.1) to the original Xbox. The goal of this proof is seeing if the Xbox can handle this marvelous emulator (even in a partial way) and if so, I will obviously update the port to the latest core.

Now I must take a decission, and I would like to hear your opinions, because having the proper information can save me from more months of work. The thing is that now I have the core of the 0.6.1 emulator properly running in Xbox, but without graphics and sound. My next step is adding graphics, and as OpenGL is not supported in Xbox, I am going to use the Direct3D branch. My first approach was taking all the GPU code from the last PPSSPP version and try to adapt it to the old 0.6.1 core (as far as I have seen, it is feasible to do it). I was planning to do this because I thought that Direct3D was not supported in PPSSPP until the year 2014 or so (it was announced here: http://forums.ppsspp.org/showthread.php?pid=93880), while the core that I am working on, is from 2013.

But... I have seen that the 0.6.1 core HAS a GPU/Direct3D subfolder. Does this GPU backend work, although basically? Or maybe it was a "work in progress" and it didn't work at all until it was announced in 2014?

I know that asking things about a release made in 2013 is terrible, but I hope that you understand that this has been a huge work (that may end in nowhere), and porting the GPU will probably need more months, so if you could point me to the right direction with your experience and save me some work, it would be very nice. The doubt that I have is if it is worth to port the Direct3D backend that the old 0.6.1 version had... or if I must port the last GPU backend and adapt it to the 0.6.1 core because the 0.6.1 one didn't work at all.

Thank you very much in advance for any information that could be useful, and of course thank you very much for your great work in PPSSPP!! Smile
Find all posts by this user
Quote this message in a reply
09-27-2016, 10:36 PM (This post was last modified: 09-27-2016 10:36 PM by [Unknown].)
Post: #13
RE: Xbox port not possible now?
For some clarity:

Xbox 360 was the initial motivation for the Direct3D 9 code, which then got ported over to Windows. The earlier version had more bugs (on all platforms) and was not compatible with Windows. The latest version hasn't been tested on Xbox 360 and probably no longer works due to some mistake somewhere, but who knows.

See here for some perhaps relevant info:

https://github.com/hrydgard/ppsspp/pull/4716

Ced2911's code probably still works, and you might just need to enable the Direct3D 9 backend. It should at least display *something*.

I know there were plenty of bugs in it - as well as plenty of bugs in OpenGL back then. The latest code has a TON of fixes compared to 2013, surely. But if you're just looking for a proof of concept, using what's in 0.6.1 might be doable.

-[Unknown]
Find all posts by this user
Quote this message in a reply
09-29-2016, 10:54 AM
Post: #14
RE: Xbox port not possible now?
Thank you very much for the information. I will keep you updated if I manage to make it work Smile
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: