Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
intacowetrust

PsyDoom 0.8.3 - PSX Doom port (reverse engineered) for PC

Recommended Posts

On 9/21/2020 at 3:41 AM, intacowetrust said:

 

Interesting - looked like the GEC Master Edition added support for that unused sprite. I can add support to PsyDoom for it too, will make a note.

IIRC there was some sort of conflict with the original DoomEd number for it and so it was moved to 90 to still be usable.

Share this post


Link to post
On 9/22/2020 at 6:08 PM, Dark Pulse said:

IIRC there was some sort of conflict with the original DoomEd number for it and so it was moved to 90 to still be usable.

 

Thanks for the context! I will make sure to have PsyDoom be compatible with this GEC addition.

Share this post


Link to post
On dimanche 20 septembre 2020 at 4:37 PM, Impboy4 said:

 that's amazing, but imho having upbeat music in levels for a game that's more on the creepy factor would not work.

Reminds me of how some people criticized BTSX for having "non-Doomy" music.

 

Why couldn't one make an upbeat mod for PSX Doom?

Share this post


Link to post

One could, it's just hard to say how well-received it would be. I think Doom, especially with PSX aesthetics, works best with darker scores. A different approach to mapping/art direction could make an upbeat soundtrack more appropriate. 

Share this post


Link to post

Got a no-frills VST plugin together which can replicate the reverb effects of the SPU. Check it out:

 

 

It's pretty much just a wrapper around standalone SPU code which will be in the next release of PsyDoom. Next job will be to provide a similar VST for a sample based instrument, which accurately models SPU voices. Once that is done it'll be possible to pretty accurately produce music or recreate existing tracks in a modern DAW.

 

Here's the download for this reverb VST and the source code if you are curious:

https://github.com/BodbDearg/PlayStation1Vsts/releases/tag/releases%2Fpsxreverb_1.0.0

https://github.com/BodbDearg/PlayStation1Vsts

 

It's in a separate repository to PsyDoom because I didn't want to bloat the main PsyDoom repository too much.

Share this post


Link to post
18 hours ago, intacowetrust said:

Next job will be to provide a similar VST for a sample based instrument, which accurately models SPU voices.

What's the general plan for handling samples in the instrument? I'm assuming something along the lines of "one sample per VST instance" for the sake of simplicity/easier instrument data management, though I wonder about CPU usage with multiple instances.

 

Also, is there a conversion tool for .WAV > .VAG?

Share this post


Link to post
20 hours ago, Lollie said:

What's the general plan for handling samples in the instrument? I'm assuming something along the lines of "one sample per VST instance" for the sake of simplicity/easier instrument data management, though I wonder about CPU usage with multiple instances.

 

Yeah I'll be doing pretty much what you say to keep things clean & simple. Not too worried about CPU usage TBH, I haven't profiled in a while but last time I checked I remember the sound processing was a very small part of the overhead in PsyDoom. The PlayStation's SPU is relatively simple to emulate so a modern CPU should be more than capable of handling many instances of such an instrument.

 

20 hours ago, Lollie said:

Also, is there a conversion tool for .WAV > .VAG?

 

There is indeed, and for the opposite conversion too. I haven't released a pre-built binary for this tool yet (will do this later) but the source for it can be found here if people want to build locally for now:

https://github.com/BodbDearg/PsyDoom/blob/master/tools/audio/vag_tool/VagTool.cpp

 

Most of the library code that does the heavy lifting of the conversion is in the following folder:

https://github.com/BodbDearg/PsyDoom/tree/master/tools/audio/audio_tools_common

 

To compile 'VagTool', you must first get it added into your CMake generated project by enabling the 'PSYDOOM_INCLUDE_AUDIO_TOOLS' flag - it's not included by default.

Share this post


Link to post

Hi intacowetrust, any further progress, are we were likely to see any updated builds before Christmas? - keeping an eye out for the proper saves feature ;-)

Share this post


Link to post
On 11/3/2020 at 12:08 PM, francis247uk said:

Hi intacowetrust, any further progress, are we were likely to see any updated builds before Christmas? - keeping an eye out for the proper saves feature ;-)

 

Hey @francis247uk, not to worry I have not forgotten this project! I've been going through an extremely busy period at work and also had a house move which unfortunately did not leave much time for anything else. I've also been doing the audio tooling work that I wanted to do (now almost complete) so after that I should be getting back to regular PsyDoom stuff.

 

Hoping to get some time over the holidays to make progress but unclear when the next build might be, will most likely be in the new year. Saves are on the agenda of course but not until a much later build along with networking improvements, since the tasks are related.

Share this post


Link to post

I've been playing with the VSTs and audio tools, getting a feel for the process. Here's a first take at some loosely-inspired Doom drone.

 

 

(God, soundcloud embeds are huge by default, lol.)

 

This is all just the VSTs, using self-made samples. The 28-sample block limitation in VAG samples is its own little bit of hell, it takes some serious work to create clean loops that fit its limitations. The simple Sine tone was ironically the hardest sample to craft into a clean loop. I haven't figured out how to convert MIDI to JSON with the converter tools yet, but I also need to build the latest versions of the tools.

 

It's unfortunate that these VSTs are VST3. There isn't a single tracker out there with native VST3 support (yet), so I had to use Kushview Element as a VST3-to-VST2 wrapper. I'm going to assume that building VST2 versions of these plug-ins isn't as simple as hitting a big red "Export as VST2" button, but it'd definitely make them more accessible.

Edited by Lollie

Share this post


Link to post
On 11/5/2020 at 4:40 AM, Lollie said:

I've been playing with the VSTs and audio tools, getting a feel for the process. Here's a first take at some loosely-inspired Doom drone.

 

 

Nice track! I think this could work well in-game, especially for a base themed level. At some point I plan on documenting the process for music creation in more detail while running through it to make something myself. In the meantime however if you have any questions feel free to ask, the Williams module file format is definitely a little awkward to work with...

 

Also something that might be of interest - I have converted the entire PSX Doom and Final Doom soundtrack to FLStudio format here:

https://github.com/BodbDearg/PsyDoom/tree/master/extras/psxdoom_music_flstudio

 

I'm going to do a video showing the tracks playing back in that DAW shortly. This document detailing some of the peculiarities I faced when converting the tracks might also be helpful for performing the opposite process:

https://github.com/BodbDearg/PsyDoom/blob/master/extras/psxdoom_music_flstudio/About These.md

 

On 11/5/2020 at 4:40 AM, Lollie said:

The 28-sample block limitation in VAG samples is its own little bit of hell, it takes some serious work to create clean loops that fit its limitations. The simple Sine tone was ironically the hardest sample to craft into a clean loop.

 

Yeah this is tricky alright, a lot of it is trial and error to find a 28 sample aligned loop point that works well. Silencing the loop start/end region can help but sometimes that can cause problems as well.

 

On 11/5/2020 at 4:40 AM, Lollie said:

It's unfortunate that these VSTs are VST3. There isn't a single tracker out there with native VST3 support (yet), so I had to use Kushview Element as a VST3-to-VST2 wrapper.

 

You can thank Steinberg for this I'm afraid. I would have liked to have done VST2 given its near universal support but unfortunately Steinberg no longer allow anyone to download the VST2 SDK and are pretty militant about stamping out VST2 stuff on the internet. A lot of folks in the audio development space are not happy with their approach... They could have just provided the SDK as a legacy download, recommended VST3 instead and offered zero support. For this reason I went with VST3 instead of 2.

Share this post


Link to post

And here's what I've been working on recently, the entire PSX Doom soundtrack converted to FL Studio and using the VST instruments I've created which replicate the PS1 SPU:

 

 

 

Share this post


Link to post

Wickedddd, awesome work porting those songs. Fun to have those in a format where they can be easily explored and manipulated.

 

3 hours ago, intacowetrust said:

Yeah this is tricky alright, a lot of it is trial and error to find a 28 sample aligned loop point that works well. Silencing the loop start/end region can help but sometimes that can cause problems as well.

The calculator was my best friend in this process, lol. Find a perfect loop, and divide its duration (in samples) by 28 to see how close you are to getting a perfectly sized loop. Round the resulting number to the nearest decimal, then multiply back up by 28 to get the actual length that you need. And then futz around with your sample until you get that perfect loop length!

 

Also, if anyone out there is like me and has clung to an audio editor that cannot set loop points: LoopAuditioneer helped a ton. It has a tool for visually viewing loop points as you set them, which was extremely helpful for double-checking results.

 

3 hours ago, intacowetrust said:

You can thank Steinberg for this I'm afraid. I would have liked to have done VST2 given its near universal support but unfortunately Steinberg no longer allow anyone to download the VST2 SDK and are pretty militant about stamping out VST2 stuff on the internet.

Ahaa.. I misread and didn't realize that iPlug2 was only the framework, not the SDK. That explains it. 😅 Oh well, I have access to Ableton, I might just have to swallow the bullet and use it for detail work. The biggest issue that I ran into while trying to work in Renoise was that I couldn't control pitchbend via automation — but I think that was a problem with using Kushview Element as a wrapper, and not the VST itself.

Share this post


Link to post
On 11/5/2020 at 12:51 AM, intacowetrust said:

 

Hey @francis247uk, not to worry I have not forgotten this project! I've been going through an extremely busy period at work and also had a house move which unfortunately did not leave much time for anything else. I've also been doing the audio tooling work that I wanted to do (now almost complete) so after that I should be getting back to regular PsyDoom stuff.

 

Hoping to get some time over the holidays to make progress but unclear when the next build might be, will most likely be in the new year. Saves are on the agenda of course but not until a much later build along with networking improvements, since the tasks are related.

 

Super great to hear @intacowetrust thankyou - hope the house move went ok!

 

Edited by francis247uk

Share this post


Link to post

I'd definitely like to try my hand at tinkering with some new music.

 

Any possibility of maybe getting samples ripped from Doom 64/Quake 64/Quake 2 N64 and being able to reimport those into PSX Doom? That'd allow us to have a lot more potential flavors and samples to play around with - good for if we do make some original maps :)

 

(Also opens up the possibility of us eventually expanding Doom 64's audio in the same way since Erick is getting that pretty thoroughly documented and decompiled.)

Share this post


Link to post
5 hours ago, Dark Pulse said:

Any possibility of maybe getting samples ripped from Doom 64/Quake 64/Quake 2 N64 and being able to reimport those into PSX Doom? That'd allow us to have a lot more potential flavors and samples to play around with - good for if we do make some original maps :)

 

If those games have been reversed then anything is possible. It sounds like @Erick194 has been making really impressive progress with Doom 64 so it's probably only a matter of time before it becomes a possibility for that game. Not sure about the other titles and what formats they use, perhaps some stuff is common between them or perhaps not. There may also be other indirect ways of ripping the samples that don't involve reverse engineering the entire game, such as dumping the contents of sound ram in an emulator which supports it. I don't know what N64 emulators support that (if any) but it's certainly a technique which can be used for PSX.

 

Edit: oh I see the N64 had a unified memory architecture and no dedicated sound ram. Disregard that comment then.

Edited by intacowetrust

Share this post


Link to post

I tried the networking feature with my brother a while back, and it worked perfectly fine! We played through Knee-Deep in co-op. Unfortunately we couldn't keep going because of time issues, but we had no problems with lag or desyncs or anything noticeable actually!

Share this post


Link to post
12 hours ago, intacowetrust said:

 

If those games have been reversed then anything is possible. It sounds like @Erick194 has been making really impressive progress with Doom 64 so it's probably only a matter of time before it becomes a possibility for that game. Not sure about the other titles and what formats they use, perhaps some stuff is common between them or perhaps not. There may also be other indirect ways of ripping the samples that don't involve reverse engineering the entire game, such as dumping the contents of sound ram in an emulator which supports it. I don't know what N64 emulators support that (if any) but it's certainly a technique which can be used for PSX.

 

Edit: oh I see the N64 had a unified memory architecture and no dedicated sound ram. Disregard that comment then.

N64 was actually the first console to have a unified memory architecture, yes. :)

 

Theoretically it should be fairly simple as a result, though well, I ain't the tech guy (at least, not when it comes to reversing games), so I'd leave that to guys like you and Erick to explain how easy or hard that'd be in reality. :P

Share this post


Link to post
On 11/7/2020 at 11:23 PM, Dark Pulse said:

I'd definitely like to try my hand at tinkering with some new music.

 

Any possibility of maybe getting samples ripped from Doom 64/Quake 64/Quake 2 N64 and being able to reimport those into PSX Doom? That'd allow us to have a lot more potential flavors and samples to play around with - good for if we do make some original maps :)

 

(Also opens up the possibility of us eventually expanding Doom 64's audio in the same way since Erick is getting that pretty thoroughly documented and decompiled.)


The Doom 64 and Quake 64 samples have been ripped. Particularly EX will rip them into a soundfont. Recently the Quake 64 ones have been ripped here too: 


Polyphone soundfont editor can be used to put those soundfonts into a set of wavs. But Quake 2 hasn't been ripped yet (as far as I know). It uses a different sound system since it wasn't in the Midway / Williams porting lineage.

Share this post


Link to post
On 11/8/2020 at 7:39 AM, CoTeCiO said:

I tried the networking feature with my brother a while back, and it worked perfectly fine! We played through Knee-Deep in co-op. Unfortunately we couldn't keep going because of time issues, but we had no problems with lag or desyncs or anything noticeable actually!

 

That's great to hear, thanks for sharing your experience! It is super sensitive to lag but if you're on a LAN with a good connection then it should be fine. Internet play in general though is going to need some form of client side prediction implemented to work well.

Share this post


Link to post

I'm trying to map my PlayStation Classic controller using the generic gamepad bindings, but nothing registers when I run the game.

 

Here's a snippet of what's in my control_bindings.ini file:

Action_Use = Gamepad Button2
Action_Attack = Gamepad Button1
Action_Respawn = Gamepad Button1, Gamepad Button2, Gamepad Button3, Gamepad Button4, Gamepad Button5, Gamepad Button6, Gamepad Button7, Gamepad Button8
Modifier_Run = Gamepad Button4
Modifier_Strafe = Gamepad Button3
...
Menu_Ok = Gamepad Button1, Gamepad Button2, Gamepad Button3, Gamepad Button4
Menu_Back = Gamepad Button9
Menu_Start = Gamepad Button10

 

EDIT: This is using the latest dev build.

Share this post


Link to post
4 hours ago, fenderc01 said:

I'm trying to map my PlayStation Classic controller using the generic gamepad bindings, but nothing registers when I run the game.

 

Hey @fenderc01 thanks for checking out that new feature! Do you know if the PSC controller registers properly as a device in the OS or works with any other program, like emulators? I've seen reports of some people having issues getting that controller working in Windows and for others it seems to work just fine - very strange:

 

https://www.reddit.com/r/PlaystationClassic/comments/c07aku/classic_controller_not_working_on_windows_10_pc/

https://www.reddit.com/r/PlaystationClassic/comments/a3cdmb/trying_playstation_classic_controller_on_a_pc_and/

 

If the answer is "yes" and it works just fine in other programs then I might need to pickup one on ebay to investigate what is going on.

Share this post


Link to post
6 hours ago, intacowetrust said:

 

Hey @fenderc01 thanks for checking out that new feature! Do you know if the PSC controller registers properly as a device in the OS or works with any other program, like emulators? I've seen reports of some people having issues getting that controller working in Windows and for others it seems to work just fine - very strange:

 

https://www.reddit.com/r/PlaystationClassic/comments/c07aku/classic_controller_not_working_on_windows_10_pc/

https://www.reddit.com/r/PlaystationClassic/comments/a3cdmb/trying_playstation_classic_controller_on_a_pc_and/

 

If the answer is "yes" and it works just fine in other programs then I might need to pickup one on ebay to investigate what is going on.

 

I just tried it in RetroArch and it works fine.

Share this post


Link to post
3 hours ago, fenderc01 said:

I just tried it in RetroArch and it works fine.

 

Thanks for confirming, will grab one on ebay and see what is happening...

 

1 hour ago, EtherBot said:

Has anyone else been having trouble with the game blacking out if you alt-tab away and back into it? 

 

Strange, I have not seen this occurring. Are you running windowed or fullscreen? What GPU and OS are you using? Do you by any chance see the error "Failed to lock the framebuffer texture for writing!" being displayed?

Share this post


Link to post
3 hours ago, intacowetrust said:

Are you running windowed or fullscreen? What GPU and OS are you using?

Fullscreen mode. I'm using an intel hd gpu on Windows. Actually here are my specs by themselves:

 

Quote

Intel Core i3-4160
Intel HD Graphics 4400
8 gigabytes RAM

 

3 hours ago, intacowetrust said:

Do you by any chance see the error "Failed to lock the framebuffer texture for writing!" being displayed?

I don't see any errors at all, unless I'm not looking in the right place. For what it's worth, the entire screen turns black when you return to the window (although inputs still register and sounds are still active). So if the error would display in-game I obviously wouldn't be able to see it. There are no pop-ups or anything, though.

 

Also I've noticed some other irregularities with sprites, of which I'm not certain whether they've been reported before (or even if theyre possibly present in the Playstation original version).


(Open spoiler to show, images included)

Spoiler

 

20201201235322_1.jpg.a27781957884bd60b385c30c0e47a319.jpg20201201235314_1.jpg.47ad2e4bd66b640a6c687b8a2d68277e.jpg

 

They seem to get totally cut off. I was taken a bit off guard by this, especially when it started happening to enemies. I think it has something to do with either varying ceiling heights or varying light levels which the entity is on the threshold of, relative to player position?

 

20201202000011_1.jpg.7bcbc55bd1a401cc05be434b8f5d984f.jpg20201202000019_1.jpg.4f265f1b8056d258a2942b0b9ed2a458.jpg

 

Here's a pretty striking example with a cacodemon. You can see it ceases to exist along the border of the darker sector. However once the player leaves the darker sector and enters the lighter one, the cacodemon is fully restored.

 

20201202000021_1.jpg.2fe1c71f50e6a4020ac09ba8f19b0e22.jpg

 

 

Share this post


Link to post
8 minutes ago, EtherBot said:

Also I've noticed some other irregularities with sprites, of which I'm not certain whether they've been reported before (or even if theyre possibly present in the Playstation original version).


(Open spoiler to show, images included)

  Hide contents

 

20201201235322_1.jpg.a27781957884bd60b385c30c0e47a319.jpg20201201235314_1.jpg.47ad2e4bd66b640a6c687b8a2d68277e.jpg

 

They seem to get totally cut off. I was taken a bit off guard by this, especially when it started happening to enemies. I think it has something to do with either varying ceiling heights or varying light levels which the entity is on the threshold of, relative to player position?

 

20201202000011_1.jpg.7bcbc55bd1a401cc05be434b8f5d984f.jpg20201202000019_1.jpg.4f265f1b8056d258a2942b0b9ed2a458.jpg

 

Here's a pretty striking example with a cacodemon. You can see it ceases to exist along the border of the darker sector. However once the player leaves the darker sector and enters the lighter one, the cacodemon is fully restored.

 

20201202000021_1.jpg.2fe1c71f50e6a4020ac09ba8f19b0e22.jpg

 

 

This is all in the original PSX version too. Pretty sure it has to do with the PS1 essentially having no Z-Buffer, so when stuff gets drawn in the "wrong" way, it's simply clipped.

Share this post


Link to post
Just now, Dark Pulse said:

This is all in the original PSX version too. Pretty sure it has to do with the PS1 essentially having no Z-Buffer, so when stuff gets drawn in the "wrong" way, it's simply clipped.

Wow bizarre, do you (or anyone I guess) know if this was a bug with other console ports at the time? Like the n64 version especially, 3do, etc. I never knew the PSX version had this bug, it's fairly significant, I feel like.

 

(also w.r.t. the screen blacking out, I can also confirm that this bug does not occur if I switch it to windowed mode. I wonder how a borderless windowed mode would fair? Unless the fullscreen mode is already that)

Share this post


Link to post
35 minutes ago, EtherBot said:

I don't see any errors at all, unless I'm not looking in the right place. For what it's worth, the entire screen turns black when you return to the window (although inputs still register and sounds are still active). So if the error would display in-game I obviously wouldn't be able to see it. There are no pop-ups or anything, though.

 

Thanks for confirming. The framebuffer error would display as a regular Windows popup/dialog if it was triggered and the game would be pulled out of fullscreen mode to display it and the game window removed. It sounds like the game is not running into any errors when this happens for you and it's just continuing along as though everything is fine... I suspect this might be some sort of driver issue which is not visible at all to PsyDoom.

 

40 minutes ago, EtherBot said:

Also I've noticed some other irregularities with sprites, of which I'm not certain whether they've been reported before (or even if theyre possibly present in the Playstation original version).

 

Yeah as @Dark Pulse mentioned these are quirks/limitations which are present in the original renderer, which PsyDoom faithfully recreates. They are caused by the way sprites are rendered and ordered with respect to the rest of the world, which is handled very uniquely for the PSX version. It would take a new renderer to fix, which is something I plan to look at soon to achieve higher resolutions and hardware acceleration...

 

32 minutes ago, EtherBot said:

Wow bizarre, do you (or anyone I guess) know if this was a bug with other console ports at the time? Like the n64 version especially, 3do, etc. I never knew the PSX version had this bug, it's fairly significant, I feel like.

 

I believe the N64 version is rendering in a very modern way, using the z-buffer and sorting the sprites back to front - thus does not suffer from this problem. @Erick194can maybe correct me if I'm wrong though, I haven't gone through the code yet in great detail.

 

The 3DO version approaches rendering very similarly to the PC original (part of the reason why the game ran poorly on the 3DO) and hence does not suffer from the problem either. Same with the Jag version. I think this might be a unique peculiarity to PSX Doom...

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×