diasurgical / devilutionX

Diablo build for modern operating systems
Other
8.1k stars 796 forks source link

[Feature Request]: Playstation 3 build #6912

Closed jagiella closed 10 months ago

jagiella commented 10 months ago

Feature Type

Other (please specify)

Describe

I would love to play this on my PlayStation 3. Did you ever consider porting it to the PS3. Seeing that even the 3DS and PS Vita got a port performance seems not to be the reason for skipping the PS3.

DakkJaniels commented 10 months ago

The reason is no one is working on it. Feel free to do so.

AJenbo commented 10 months ago

I worked on a PS2 port (because I found a PS2 so I can test), it seams to be just at the limit of what is required to run the game at full quality. So yeah the PS3 is likely very capable of running the game. Since it's possible to run Linux on the PS3 it may well be fairly straight forward, if there is a recent distribution. And if there is a viable tool chain it might also be possible to make one for the PS OS.

But without a system on hand or a very faithful emulation working on such a port isn't feasible. For that reason I am closing this issue. Anyone is of cause more then welcome to contribute such a port, but having an issue open for it isn't of much use.

If anyone needs help in making a PS3 port, feel free to make a comment or jump on Discord.

jagiella commented 9 months ago

@DakkJaniels Thank you for your warm welcome :smile:

@AJenbo Thank you for your explanation.

Actually, I possess a PS3 and I was just curious, if some development was in the pipeline. In respect to getting involved in developement, I have no experience at all with the PS3 toolchain and think there are lots of people much better suited for the job.

On the other hand, I did some mini projects or rather toy demos on the GBA and Sega Genesis / Megadrive. And especially for the Megadrive I would be interested in creating a port. Though, I don't know, if that would be achievable at all looking at the poor hardware specs (Motorola 68k) compared to the lower end systems already officially supported by devilutionX. But hey, there is the Amiga port running on exactly the same chip. So there might be a chance.

AJenbo commented 9 months ago

GBA and Sega Genesis / Megadrive all have ram in the KBs, a full version of Diablo requires 32MB. So unless you are talking old school port where it's basically a different but similar game then I don't think it will be possible.

The playstation managed to get it running on just over 2MB by reducing image, animation and image quality, and splitting the game up in to 3 separate programs that where swapped depending on what you where doing. The Sega Saturn has similar specs to that, but doing so would be a significant effort.

I think the Sega Dreamcast is the oldest console that could viably run a full version of the game.

MBeijer commented 9 months ago

Also, the Amiga port requires an accelerator (beefier CPU, 68060 or FPGA/emulated equivalent or better) with extra fast ram to even be playable. It does not work on a classic unexpanded stock Amiga, and will never work either.

On Mon, Feb 12, 2024 at 10:26 AM Anders Jenbo @.***> wrote:

GBA and Sega Genesis / Megadrive all have ram in the KBs, a full version of Diablo requires 32MB. So unless you are talking old school port where it's basically a different but similar game then I don't think it will be possible.

The playstation managed to get it running on just over 2MB by reducing image, animation and image quality, and splitting the game up in to 3 separate programs that where swapped depending on what you where doing. The Sega Saturn has similar specs to that, but doing so would be a significant effort.

I think the Sega Dreamcast is the oldest console that could viably run a full version of the game.

— Reply to this email directly, view it on GitHub https://github.com/diasurgical/devilutionX/issues/6912#issuecomment-1938303870, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACC5VBOUBYXB27RFIAWJ7JLYTHN3TAVCNFSM6AAAAABCMIMQVGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZYGMYDGOBXGA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

jagiella commented 9 months ago

@AJenbo

GBA and Sega Genesis / Megadrive all have ram in the KBs, a full version of Diablo requires 32MB. So unless you are talking old school port where it's basically a different but similar game then I don't think it will be possible.

The playstation managed to get it running on just over 2MB by reducing image, animation and image quality, and splitting the game up in to 3 separate programs that where swapped depending on what you where doing. The Sega Saturn has similar specs to that, but doing so would be a significant effort.

I think the Sega Dreamcast is the oldest console that could viably run a full version of the game.

Yeah, I was thinking about a retro port where everything related to graphics, sound and the whole map generation parts would need to be boiled down a lot to squeeze it into the max cartridge size of ~10mb and the RAM (64kb) / VRAM (64kb). E.g. half the screen resolution (320x240 for PAL game), reduced number of assets per tile type etc.

While keeping the code for stats, items, player / monster physics. So basically it would play the same, just look more ugly :smile:

Blizzard themselves made a gameboy prototype, which was even more ambitious :laughing:

@MBeijer

Also, the Amiga port requires an accelerator (beefier CPU, 68060 or FPGA/emulated equivalent or better) with extra fast ram to even be playable. It does not work on a classic unexpanded stock Amiga, and will never work either.

If you want 1:1 port of the original game or even boiling down on graphics etc? What is the main raison / bottleneck in your opinion making it to be impossible ?

MBeijer commented 9 months ago
  1. Amiga has planar graphics, not chunky graphics. Chunky 2 planar conversion takes a lot of cpu power
  2. Unexpanded Amiga's has between 512KB to 2MB of memory to use, and this memory isn't exactly fast
  3. The most widely used Amiga was the Amiga 500, which had a 68000 clocked at 7MHz (same as megadrive), just not enough cpu power. Considering the 68040 is roughly equivalent to i486, and the original PC game required a 60MHz pentium. Do I need to say more?

The Amigas strengths come from offloading work to the custom chips, to be able to do this with Diablo, it would require a lot of recoding of the engine. And even then, it would be very optimistic having a game like Diablo running on the stock configuration. And at that point is it even a port anymore?

On Mon, Feb 12, 2024 at 11:25 AM jagiella @.***> wrote:

GBA and Sega Genesis / Megadrive all have ram in the KBs, a full version of Diablo requires 32MB. So unless you are talking old school port where it's basically a different but similar game then I don't think it will be possible.

The playstation managed to get it running on just over 2MB by reducing image, animation and image quality, and splitting the game up in to 3 separate programs that where swapped depending on what you where doing. The Sega Saturn has similar specs to that, but doing so would be a significant effort.

I think the Sega Dreamcast is the oldest console that could viably run a full version of the game.

Yeah, I was thinking about a retro port where everything related to graphics, sound and the whole map generation parts would need to be boiled down a lot to squeeze it into the max cartridge size of ~10mb and the RAM (64kb) / VRAM (64kb). E.g. half the screen resolution (320x240 for PAL game), reduced number of assets per tile type etc.

While keeping the code for stats, items, player / monster physics. So basically it would play the same, just look more ugly 😄

Blizzard themselves made a gameboy prototype, which was even more ambitious 😆

Also, the Amiga port requires an accelerator (beefier CPU, 68060 or FPGA/emulated equivalent or better) with extra fast ram to even be playable. It does not work on a classic unexpanded stock Amiga, and will never work either.

If you want 1:1 port of the original game or even boiling down on graphics etc? What is the main raison / bottleneck in your opinion making it to be impossible ?

— Reply to this email directly, view it on GitHub https://github.com/diasurgical/devilutionX/issues/6912#issuecomment-1938401669, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACC5VBIWLX4YSCAOVWUXX6TYTHUZDAVCNFSM6AAAAABCMIMQVGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZYGQYDCNRWHE . You are receiving this because you commented.Message ID: @.***>

MBeijer commented 9 months ago

The stock m68k would probably not even have the appropriate power for just the enemy AI.

Message ID: @.***>

MBeijer commented 9 months ago

The gameboy prototype probably never went past the prototype stage for a reason, and probably shared none of the code base with the original game.

AJenbo commented 9 months ago

@MBeijer by the way did you see that we found out that the issue with GCC 13 was simply an optimization bug? https://github.com/diasurgical/devilutionX/pull/6873

I haven't merged the fix as I was unable to test and verify that we disabled the specific one that causes the issue. If you have some time would you be willing to do so and possibly identify the line which is breaking in the function?

  1. Amiga has planar graphics, not chunky graphics. Chunky 2 planar conversion takes a lot of cpu power

P.s. Do you have a link to an article that explains the concept?

MBeijer commented 9 months ago

Alright, good to know.

https://oldwww.nvg.ntnu.no/amiga/amigafaq/AmigaFAQ_16.html

AJenbo commented 9 months ago

Thanks, I don't think I understand how the colors actually stored from reading that, but I do understand why it could be expensive to do the conversion... and I have no idea where we could change things to make it less taxing.

MBeijer commented 9 months ago

To benefit from this, even the sprite images would have to be planar. It would require a lot of tedious work.

Which is why an expanded Amiga that has RTG (Re-Targetable Graphics, which is chunky graphics) is needed to play DevilutionX.

AJenbo commented 9 months ago

To benefit from this, even the sprite images would have to be planar. It would require a lot of tedious work.

Yeah I would imagine, probably we could convert them while loading (we already do some reprocessing of the data on load), but it sounds like it more or less needs a dedicated rendering path as well.

jagiella commented 9 months ago

Wouldn't it make more sense to preprocess all the assets once for the target plattform (i.e. chunky to planar for the amiga) and create plattform specific MPQ files? That way the (unnecessarily) repetitive data transformation is avoided permanently.

PS: Or introduce a caching mechanims which allows platform specific intermediate conversion output to be stored and used in following runs. Emulators like Cemu and Yuzu are doing that for graphic shaders.

AJenbo commented 9 months ago

We can't distribute the MPQ so each user would need to learn how to run this tool on there data before they would be able to run the game.

There is also a big size difference between shader programs and textures. The cache size might be significant, especially if you where trying to run on something that most people only had floppies for.

In any case thinking about how to performance optimize the load process at a point where we don't even have any of it implemented is premature optimization. Currently the conversion is happening on every frame, doing that once during the level load probably won't increase the load time significantly. You are might be trading 50ms of load time for 5ms of render time (because not every asset is on screen at all time). In that case creating another tool for the user to learn to install things, or eating up 250mb of there hard-disk might not be a good choice.

The official MacOS 9 (also big endian system) version also did data conversion during loading and kept the MPQ the same.

MBeijer commented 9 months ago

I mean an unexpanded Amiga only has floppy storage, with only 800KB size disks. Getting DevilutionX to run on an unexpanded Amiga is moot. Not worth the effort. If you have expanded your Amiga to have a hard drive, you likely have a CPU that can do the full screen chunky2planar conversion OR have a RTG capable card, so there's no reason to do any of this.

Megadrive would not have the power to run any sort of port either. You're better off rewriting Diablo from scratch for any of these platforms for the game to even be playable.

jagiella commented 9 months ago

We can't distribute the MPQ so each user would need to learn how to run this tool on there data before they would be able to run the game.

It does not necessarily need to be a seperate tool. It could be done by the main executable on first run as part of an asset import process. OpenRA is doing it that way and it feels very guided and straight forward.

There is also a big size difference between shader programs and textures. The cache size might be significant, especially if you where trying to run on something that most people only had floppies for.

In any case thinking about how to performance optimize the load process at a point where we don't even have any of it implemented is premature optimization. Currently the conversion is happening on every frame, doing that once during the level load probably won't increase the load time significantly. You are might be trading 50ms of load time for 5ms of render time (because not every asset is on screen at all time). In that case creating another tool for the user to learn to install things, or eating up 250mb of there hard-disk might not be a good choice.

I completely understand and agree to the disc size argument. Redunant data on harddrives should of cause be avoided. On the other hand, I am asking myself: How can one achieve working with the original MPQs, if your target system is limited in disk space or even to floppy sized media? How would you do on a Megadrive with max. 10MB of total size? :laughing:

MBeijer commented 9 months ago

That is the point I've been trying to get across, you don't.

MBeijer commented 9 months ago

The game's resources are too heavy. The game's logic is too heavy.

Being realistic, there is a cut-off point where porting is no longer viable. Amiga was only possible because the userbase expanded on the dead system long after the demise of Commodore. New expansions to breathe new life into the old computer are still made today. That's the only reason why Amiga has a port to begin with.

AJenbo commented 9 months ago

On the other hand, I am asking myself: How can one achieve working with the original MPQs, if your target system is limited in disk space or even to floppy sized media?

Maybe some sort of ROM format could be used :cd:

How would you do on a Megadrive with max. 10MB of total size? 😆

Megadrive won't be able to run the full game so yeah it will need preprocesing the data, and not by the main exec either :D We do have something like that for some extra pressured systems, but in general we would like to avoid it if not reasonably needed.

As for running the original logic, the level alone will take about 70kb ram. This alone will exhaust the Megadrive and we still haven't initialized the monsters, players, items, or object.

The GBA gets more of a chance with 288KB RAM, by my calculations we are at 135KB once we have initialized the essential core parts, but we still have to fit the game logic and a bunch of things that I didn't consider so that's still going to be a tight fit. Good luck I suppose :)