vita-nuova / bounties

Repository to start bounties for new Vita projects. (Discord Server: https://discord.gg/PyCaBx9 )
115 stars 3 forks source link

Native Resolution for PSP games on PSVITA. [$2,500] #5

Open Epsilon1033 opened 5 years ago

Epsilon1033 commented 5 years ago

As the title says, Native resolution for PSP games. (960x544). PSP games are limited to half the vita's native resolution, so they don't exactly look great. The feasibility has already been discussed on reddit so it is certainly possible; its just alot of work.

From reddit (/u/MrColdBird):

"Technically a GE chain hook and a vita-sided port of the PPSSPP renderer would already be enough to get "perfect" PSP emulation with upgraded visuals."

"Let the MIPS processor do the whole PSP work... And tunnel out the GE render chain into VitaOS via kermit, then render it there."

"The GE chain and all registers for buffer transfer are well documented in several PSP developer wikis as well as the PPSSPP sourcecode."

Same goes for kermit on Vita and it's message structures. All it takes is someone that can be assed to put the pieces together."

--- There is a **[$2,500 open bounty](https://app.bountysource.com/issues/78071014-native-resolution-for-psp-games-on-psvita?utm_campaign=plugin&utm_content=tracker%2F144821204&utm_medium=issues&utm_source=github)** on this issue. Add to the bounty at [Bountysource](https://app.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F144821204&utm_medium=issues&utm_source=github).
robots commented 5 years ago

For less technical audience I'll add description of Vita's hardware:

All PSP games run natively on PSP hardware with ME(media engine) hardware being emulated by Vita's cpu.

Goal of this project is to emulate GE and redirect the drawing to Vita's GPU.

robots commented 5 years ago

I have started working on this. But do not expect very fast development. This issue is very complicated one in terms of "time". As said in the description everything is documented - but its not only about documentation, its also about understanding and putting pieces together.

So the roadmap is something like this:

  1. patch PSP's sceGe module to redirect Texture memory/DrawList memory to shared Vita memory instead of GE's private memory
  2. port PPSSPP's GE implementation to Vita - this step will not include scaling for sake of simplicity
  3. add scaling to GE implementation once 2. works correctly.

Point 2. is the hardest one here, as some games are timing dependant and it will be tricky to get it right. PPSSPP contains lot of fixes for this, but Vita+ePSP is a bit different in this matter - 2 separate CPUs.

and-war commented 5 years ago

Would this then upscale PSX/PS1 games played on PSVita too? would be great to see them rendered in Higher deff (960x544).

Rinnegatamante commented 5 years ago

Technically this could be possible by running PSX games through POPS via PSPEMU i think.

1mpl0de commented 5 years ago

hey @robots how is it coming along? any progress?

robots commented 5 years ago

I have had busy time with work + vacation + busy month ahead of me.

As soon as i have something worth seeing I will create repo on github to track the changes. So far i have started with adrenaline: making patch for the sceGe module, defining interface between vita and psp, and now i am working on porting GPU statemachine and drawing from ppsspp to vita.

I will probably make it standalone test-app, to test whether it can display anything before integrating it into pspemu.

robots commented 5 years ago

BTW: to better understand how sceGe works, I had to improve uofw's sceGe implementation:

https://github.com/uofw/uofw/pull/58

My implementation will use same displaylist management. I have changed accesses to hardware and replaced them with request in similar fashion as Adrenaline does it:

https://github.com/TheOfficialFloW/Adrenaline/blob/master/cef/systemctrl/adrenaline.c#L55

I have not yet settled on decision whether this will be new module, or runtime patch to original sceGe. Runtime patch "could" be turned off, when original Ge is to be used.

devnoname120 commented 5 years ago

Super excited that uOFW was useful for something :)

GamerzHell9137 commented 4 years ago

@robots Would there be any possibilities to get a fast forward options for PSP games just like Adrenaline has right now with PSX games?

robots commented 4 years ago

I don't really know. I have not researched it. Native resolution is enough work already :-)

ghost commented 4 years ago

This will make the XMB at the native resolution too?

I'm a xmb modder in the ps3 scene and wanted to port it to psp xmb, but i only have a ps vita and it while porting the things are pixelated due to the strecht of the psvita screen, so it will be running at native too?

Fershock commented 4 years ago

Any advance?

robots commented 4 years ago

Right now this project is on hold as some other high priority project in my life is nearing very tough decision - either it works or not and 3 years of R&D are trashed. Have patience please :-)

and-war commented 4 years ago

These things take time, would be amazing to head PSP support too, playing PSPs games in hi-res and faster let's just wait and give robots time

orestisns commented 4 years ago

Hi @robots Any progress ?

Fershock commented 4 years ago

I think this is one of the most ambitious and interesting projects on the PSVita scene. I hope it can be finished

Invictaz commented 4 years ago

I think we need more developers than 1 to finish it this year.

Nacho-exe commented 4 years ago

not to say i have much experience with creating vita hacks, but didnt TheFloW achieve this with the gta psp titles running at the vitas native resolution? I'd assume you could reverse engineer those hacks to work with other psp titles weather it be required to make a new hack for each game or a universal one most likely for adrenaline. also another idea is to convert psp titles into ps vita format, therefore making the psp (now technically vita) titles essentially bypassing the psp cpu + gpu and using the vita ones? im probably fantasizing about how it could be possible but to me this seems the best option.

Mar2ck commented 4 years ago

TheFlow's method was just changing the game's internal resolution and reducing the color so it would fit in the psp's vram. It still uses the psp's GPU so its still limited to what a PSP can render. What robots is doing is moving the rendering from the internal psp to the vita so it can be rendered using the Vita's more powerful hardware so it would work with way more games and would be full color.

You can't simply convert PSP games to vita format either unfortunately. PSP is MIPS, Vita is ARM. You'd need the source code of PSP games to recompile them as Vita games

Fershock commented 4 years ago

not to say i have much experience with creating vita hacks, but didnt TheFloW achieve this with the gta psp titles running at the vitas native resolution? I'd assume you could reverse engineer those hacks to work with other psp titles weather it be required to make a new hack for each game or a universal one most likely for adrenaline. also another idea is to convert psp titles into ps vita format, therefore making the psp (now technically vita) titles essentially bypassing the psp cpu + gpu and using the vita ones? im probably fantasizing about how it could be possible but to me this seems the best option.

Could you help in the project? I think the more people working on this project the better

Fershock commented 4 years ago

TheFlow's method was just changing the game's internal resolution and reducing the color so it would fit in the psp's vram. It still uses the psp's GPU so its still limited to what a PSP can render. What robots is doing is moving the rendering from the internal psp to the vita so it can be rendered using the Vita's more powerful hardware so it would work with way more games and would be full color

Do you know if @robots could progress or the project is paused right now?

Nacho-exe commented 4 years ago

Could you help in the project? I think the more people working on this project the better

if someone gave me a crash course with everything i needed to know then id be happy to help, i have wayy too much free time on my hand to not put my 2 cents in the ring. But again the issue is i dont know enough about how the vita works to be much of a contributor.

robots commented 4 years ago

Crash course is understanding how psp's gpu works. There is almost no documentation.

MY work is paused for now, it needs to get lighter at work, too much work with new POS system as laws changed recently. But i still want to make this work :-) dont worry !

Nacho-exe commented 4 years ago

But i still want to make this work :-) dont worry !

let me know if theres any way myself, or anyone else here can help with anything. Im sure we would all love to help out

smokingblaze commented 4 years ago

Best of luck to the project!

robots commented 4 years ago

i have restarted work on this thing :-) It will take some time to load all the information back to head, and put them into code, please be patient

cfeviper commented 4 years ago

is this also gonna make ps1 games look better when using adrenaline

devnoname120 commented 4 years ago

is this also gonna make ps1 games look better when using adrenaline

https://github.com/vita-nuova/bounties/issues/5#issuecomment-525238119

cfeviper commented 4 years ago

is this also gonna make ps1 games look better when using adrenaline

#5 (comment)

is it already possible then to play psx games at a higher resolution

Fershock commented 4 years ago

i have restarted work on this thing :-) It will take some time to load all the information back to head, and put them into code, please be patient

Good luck!!

darkskyVN commented 4 years ago

How long this project will take to compelete?

AceCuba commented 4 years ago

did you need any betatester ?

Fershock commented 4 years ago

Hey @robots , how's your progress going? :)

Invictaz commented 4 years ago

I think Robots won't reply because it takes a lot more work than a month to complete this. We might check back at the end of summer, or maybe the end of the year 2020.

tommapar commented 4 years ago

Hey, sorry if what I'm saying is pretty ignorant, but wouldn't it be theoretically easy to maybe port PPSSPP to the Vita? I mean it's already on Android, and works pretty great,

If I'm not mistaken most Android phones use ARM CPUs as well. Wouldn't it be easier to do it from that angle instead of translating every hardware call from scratch? I mean allegedly, Sony made it easy to make Android Vita ports.

robots commented 4 years ago

Hi, Sorry to reply so late. I am afraid i dont have any free time to work on this project. I thought after christmas the time at work will be little more loose. But its not happening. I can't find a way to allocate time to this project. Again sorry for that.

Mar2ck commented 4 years ago

@tommapar The point of this is to port just the graphics portion of PPSSPP to vita because theres no point emulating the psp's cpu when the vita already has one inside

Mar2ck commented 4 years ago

@robots Thank you for your work! Would it be possible to publish what you've managed to do so far?

tommapar commented 4 years ago

@Mar2ck Ok I think I get it. @robots Aww man, that sucks. Still, thanks for your contributions and godspeed in your other endeavors :)

Fershock commented 4 years ago

No problem @robots , it is normal to have problems to combine job with this. What you could ask for is development assistance. I would propose to create a Reddit post in both vitapiracy and vitahacks to see if anyone is interested in participating in the project.

polyjitter commented 4 years ago

@robots completely understand where you are coming from with the job issues, hope things get better for you from here on out.

It would benefit everyone greatly, however, if you were to potentially post your current work and findings in some format for others to be able to continue and benefit from, as is the benefits of opening source.

It sounds like you'd gotten quite far with your work and research, and I fear if the community has to start completely from scratch again, this may never be achieved!

L0v3daddy commented 4 years ago

Hope someone can keep up the project from where @robots left. The GTA games look much better in native res and I can imagine a buch of games that would look just like Vita games with the upres (ghost of sparta and peace walker come to mind).

Invictaz commented 4 years ago

@L0v3daddy With all due respect but the plan for this was already suggested earlier:

  1. patch PSP's sceGe module to redirect Texture memory/DrawList memory to shared Vita memory instead of GE's private memory
  2. port PPSSPP's GE implementation to Vita - this step will not include scaling for sake of simplicity
  3. add scaling to GE implementation once 2. works correctly.

So we can work on step one, if we have the knowledge from Vita3K. I suggest we set up a separate Github for this.

bezza191 commented 4 years ago

@Invictaz If a new git is set up for going in this direction, could you please drop details in here (assuming @robots and @Epsilon1033 are ok with this) as I am looking to follow progress, as im sure others are also

L0v3daddy commented 4 years ago

@Invictaz right, that was clarified a while ago, I only mentioned Robots because he seemed to be the only one that was actively working on the project (at least from the perspective of a bystander).

Invictaz commented 4 years ago

I won't set it up since I'm not a coder myself

L0v3daddy commented 4 years ago

I wonder if this bounty can get high enough to interest someone like The Flow...

AlJoelson commented 4 years ago

I wonder if this bounty can get high enough to interest someone like The Flow...

It is a heck of a lot of money at this point!

IridescentRose commented 4 years ago

I'd be interested, but I don't have a Vita, nor the time with multiple projects. However, I am a PSP developer and kinda interested. Based on the data we have, couldn't we just stream GPU opcodes directly to a buffer in Vita memory and then implement an API based on that? That way you basically intercept the output to the GPU and just implement that (which you could do in PPSSPP or just roll-your-own) since the GPU opcodes are better documented: http://hitmen.c02.at/files/yapspd/psp_doc/chap11.html#sec11. If one did just write an interpreter on the Vita, then you wouldn't need the step 3 of scaling, since you'll use GXM anyways and draw and scale things similarly.

Tl;Dr:

1.) Divert GPU opcodes to vita memory (take the outgoing bus and push it to adrenaline) instead of dumping GE RAM 2.) Interpret GPU opcodes to GXM commands

L0v3daddy commented 4 years ago

Looking forward to see what other developers have to say to that possibility, since I'm just an enthusiast. Just out og curiosity, don't you know any other psp developer that may be interested?