Resident Evil 2 will say goodbye to deprecated tech

As those following my recent twitter updates may have noticed, I’ve been rewriting a huge deal of code recently. So what does this translate to? Find out after the jump.

Like the title implies, I’ve been migrating Resident Evil 2 to more modern graphical and audio technology: I got XAudio2 in one corner for the sound and DirectX9 for the graphics. Long story short, it will not depend anymore on deprecated or non-working pre-Windows XP modules.

Here’s a list of what DirectX9 does compared to DirectDraw.

  • It provides native support to modern GPUs, instead of relying on some sort of hardware-software mixed emulation, effectively making rendering lightweight and more precise in general.
  • It allows to rewrite the whole rendering code in a manner closer to the original PlayStation sorted list approach, which removes the need of hacks used for approximated depth simulation. In other words, on PC it’s currently using a real z-buffer for depth while it’s internally emulating the PSX transformation engine (the GTE) and uses draw lists in order to keep everything in place.
  • Blending for texture mapping has been greatly revamped to support what the PlayStation was capable of. To give an example of the more advanced alpha blending used, here’s the player shadow (left original, right new one):The trick used on PlayStation with shadows was a grey texture that renders in reverse colors and subtracts what’s underneath it. The original PC blending approximates that by reversing the texture color in software and simply draws it as semi-transparent, while the new one can effectively produce subtractive blending and achieves the original intended effect. This applies to other effects, such as smoke clouds, water, etc.
  • It finally allows us to implement HD texture packs such as RE2 SHDP with very little effort or extra steps.

And now for sound with XAudio2, which replaces DirectSound:

  • In terms of raw power, the biggest advantage of XAudio2 is that it makes non-trivial tasks, such as looping music, completely painless. This will be used to fix a number of details that don’t quite match with the original sound, like a bunch of BGM tracks which can’t loop seamlessly by repeating the whole song.
  • The worst thing about the original engine is that it relied heavily on msacm (aka Windows Multimedia), a sorta deprecated Windows module responsible for codecs and other things. This module would be used to decompress and resample the game’s ADPCM audio. The problem with msacm is that it seems to fail in some scenarios for unknown reasons since it just won’t boot sometimes on Windows 8. This module was completely removed and replaced with a custom ADPCM decompressor and ffmpeg for resampling.
  • Native support for OGG decoding with ffmpeg and support for vanilla OGG with sound files that only have one sample (voices and BGMs). This used to be a little hacky before, since it would override the mmi modules (Windows Multimedia RIFF wave parser) and generated intermediate data, but now it’s entirely working with straight data feeding the XAudio2 driver, so it’s faster, uses less memory, and works even on audio files not intended for mods.
  • It removes the need to use sound quality settings, since stereo 44KHz sound is nowadays the most common audio format and isn’t that CPU intensive to process.

All this stuff will be coming to version 1.1.0 of RE2 Classic REbirth. Yes, I’m skipping 1.0.9 as this is technically a major milestone. Also, most of the code being used for this rewrite will be recycled on the first Resident Evil as well.

50 opinions on “Resident Evil 2 will say goodbye to deprecated tech”

  1. That’s VERY exciting news, kudos for everything you’re achieving! With all those technical improvements and the possibility to use SHDP’s backgrounds, we’re really close to being able to play the ultimate version of RE2.

    There’s something I wonder, could the EX Files from the N64 version be implemented into the PC version in any way? (whether it is by scattering them throughout the game like in the N64 version or by adding extra “pages” to the files the PC version already has)

    1. It’s halted right now because I hate it. Whatever new piece of rendering code done into this gets transferred over to RE3 when I decide to resume working on it eventually.

      1. Cool news for RE2 and also RE1. This Classic REbirth project is the coolest thing.

        Auch! for the “I hate it”, RE3 is actually my favorite Lol. Anyway I know you have good reason cause the game is a “satanic mess”. Hopefully RE3CR will get Tactical reload

      2. if the issues are wobbly vertex animations
        You should take a look at quake 2’s high poly packs for weapons
        but then i don’t know if RE2 and 3 started to use bones over vertex

        1. The issue is completely different. I already have a solution for that, but it requires a rewrite of some of the algorithms that generate polygon data. It’s already fixed for non-rigged models.

          1. It is possible to replace the models with better ones?

            it would be interesting to see community made assets for it

  2. Very excited for this update.
    Also would it be possible to add the ability to skip the realtime cutscenes?

    And have you ever looked at the pc port of resident evil survivor, I have read that it is terrible, so I was wondering if it can be salvaged in any way or if its better to just stick with the psx version.

    1. Cutscene skin is planned, but I’m too lazy to figure out some of the more complex cases. I’ll work on it again at some point with the assistance of MeganGrass. As for the PC port of Survivor, it’s plays so much like a bootleg I’m not gonna touch it.

      1. I see, Its a shame that the pc port is such a mess.

        I have also read that you are working on recreating the DC arrange mode for RE1, is this something you are actively working on or something you plan on doing later. Also do you think its possible to recreate the saturn battle game for a definitive version of RE1

        1. Was working on that just for fun, RE1 barely allows to inject new features correctly. Battle game is definitively possible.

  3. Awesome. Meanwhile, capcom continues to do nothing to preserve these games and expects us to buy those shitty remakes.

    1. Well, they probably don’t even have anymore the sources of these ports, so imagine this on their business perspective. However, I wouldn’t mind if they decided to recycle my stuff and release it officially on GoG.

  4. Thanks for your work Gemini! Will the 1.1.0 patch be in a similar form as previous patches? Or does this level of code re-write need a new executable or anything?

        1. Yeah, I’m not a fan of overcomplicated patching methods. I like my stuff being as simple as possible and compact if it’s the case.

  5. I personally prefer OpenAL over XAudio2, especially with it’s superior support for 3D audio.
    With 3D audio support, you could have the Nintendo 64 soundtrack which was in Dolby Surround.

    1. Also, will RE1: Classic REbirth get a similar update?
      And will this tech be used for the upcoming RE3 Classic REbirth?

    2. OpenAL also has support for advanced EFX effects.
      OpenAL Soft is free and open source and would be great for Classic REbirth.
      And in my opinion, much better than XAudio2.
      It would also have superior HRTF support.

      1. Here’s the reason why I don’t want OpenAL: it’s not a Windows component in any version, while XAudio2 is standard in Windows 10 (and can be added with a simple DLL to 7, 8, and 8.1). As for the advanced features it provides, they are pretty much useless considering RE2 uses spatial audio based on left/right channels, no real 3D involved whatsoever. Anything more complex than panning would go wasted on those samples.

        As for RE1 and 2, yeah, they will receive the same treatment in some capacity.

  6. So are HD background texture packs like Resident evil 2/3 seamless HD possible with this or is it still a ways off?

    1. Okay after re-reading the post it seems i totally skipped over the part about it being now possible. Disregard and this is great news! you are a legend Gemini.

  7. So having this on dx9 does that mean we have a lot more possibilities with different resolutions. including different ratios or are you just not gonna allows us to play it in 16/9. I understand if you don’t like it and don’t get me wrong we all appreciate the work you have done for these games, they are amazing. but most tvs are 16/9 and and majority of people don’t really care about stretched pixels on a game that is like over 20 years old, it doesn’t affect the gameplay.

    1. I’m not implementing stretched 16:9 because it looks pretty ugly, but there are ways to force it via Reshade. There’s a shader that can expand the image in all directions.

      1. I tried to use that but it does noting unless its in dx9 is there another way? Also how come when I go into the ini page and change the aspect ratio it does nothing? Then when I look back at the ini it has reverted to default? Is there a setting that is stopping me from changing the x and y size? It may look worse in your opinion but I find black bars on the left and right breaks immersion and considering they are ps1 graphics doesn’t really make too much of a difference they are still early 3d polygons, For me you have giving me a perfect version or re 1 and 2 the only thing is left the option to chose aspect ratio/resolution.

      2. Dolphin-esque upscaling would be interesting but intensive I would imagine on DX9. I always upscale to 4k fullscreen 4:3 aspect ratio (with black bars).

  8. Also you should consider live streaming when you are working on these ports, I’m sure you would get a bunch of subs, just look at kaze he does it full time.

  9. Could you give us the option to change the “tactical reload” and “automatic aim target change” hotkeys? In most Resident Evil games, tactical reloading is done by Aiming + pressing the Run button, while in Classic REbirth it is set to Aim + Map button. Also, in the Playstation and Gamecube the automatic target change was done by Aiming + pressing L1/LB, while in Sourcenext it is done by Aiming + pressing the Run button. It would be very appreciated if an option to change those hotkeys was made

  10. I don’t know if it is possible to add support for the Chinese language. Now if you add Chinese directly, the game directly displays garbled characters.

    1. I’ll try. Some of those effects require a shader to deal with objects that have semi-transparent sections.

      1. To my knowledge this is the only instance which this kind of error occurs. Do you think, for these old games can we benefit anything from graphic driver panel settings? Anything we should or shouldn’t tinkering with?

        1. The thing with these objects is that they render technically as semi-transparent, but have palette data that inhibits the transparency on some colors, making them effectively blend only partially. Doing that on fixed-pipeline is pretty much impossible because it requires 2 passes, but it’s hard to detect these special cases.

  11. Now if only we can get the stairs from RE3, then this would be the best RE2 of all time. And 16:9 Aspect ratio support, I know you had said no but I say if there’s a technical issue that breaks the game in some way (like how I saw playing RE2 in the Dolphin emulator where the character and the shadow doesn’t line up, which I think could be just the emulator) i’ll live with some character width inconsistency. I bet your tired of reading that, and i’m sorry for that and possibly wasting someone’s time, I’m just saying is all.

  12. Hey Gemini, d00d, and everyone else.
    First of all, let me congratulate you all with the hippie new ear (FINALLY the #CURSED2020 is OGRE), I hope that you all are in good health and going to take the Sputnik-V shot soon (if you haven’t already), stay safe and well. Now for my question to Gemini in particular and into the air in overall: guys, is there any possibility that, maybe, at some point in the upcoming future (not necessarily near, but anyway), you might also tackle/do the “REbirth” treatment projects for both the Parasite Eve and Parasite Eve II (especially so for the second one, since it’s much more of a typical tank-control kind of a game than the outright J-RPG that is the first one), at some point? I know/fully understand that, at the current time being, neither the Parasite Eve nor Parasite Eve II were ever ported to PC thus far, so it could hinder any attempts at editing/modding them (at least until an emulator appears which will fully be able to inject AI-enhanced HD textures/videos into original PSOne images), but, still…is there a chance (even if very slight, even if nearly impossible) that you might be able to work with these two great games?

    Tanks in advance for any potential answers provided. I hope you all only the best, people. There shan’t be “DHN’s demise 2.0”.

      1. Heh, well…I guess that either the first one, or the second one, or both of them at the same time, will need to have the “Steam/GOG PC rejuvenation” treatment akin to the one the very first original Guilty Gear had not-so-long-ago.
        Oh well. I guess the only thing we can do is just sit and wait, then. Beggars can’t be choosers, lul. One day…

        Original Guilty Gear stayed strictly a PSOne exclusive (PS 3’s GARBAGE emulation doesn’t count) for roughly 22 years, yet it was eventually released on PC nonetheless…I’m not that young anymore as to wait another 10+ years (…I’m still waiting/hoping on that Little Princess+1 translation to be finished/released someday, ya know…wew), but…oh well.

  13. Hi Gemini. MOds are not working anymore for Resident Evil 2 Classic Rebirth. They were in the install folder, and working BEFORE the last update. What should I do to reenable them? Files are 1) High Quality sound.7z; 2) RE2 Real Survivor.7z and 3) Realistic Resident Evil 2 Test MOD.7z – And I used them in the past. Now when I start the RE 2.exe it goes to the game without the option to select any MOD. This isn’t happening with RE (1996) classic rebirth, where we can choose the MODs.

    1. This problem has been fixed. I reinstalled the whole game and discovered what caused this issue.

      Nothing specific, only the fact I renamed the original 7z files.


      The original filenames are:

      – mod_realsurvivor_crypto.7z
      – mod_test.7z
      – mod_vorbis.1.7z

      The 3 were downloaded again from here.

      In this order.

      I then renamed as I said before to:

      RE2 Real Survivor.7z
      Realistic Resident Evil 2 Test MOD.7z
      High Quality sound.7z

      Somehow this breaks the possibility to use any of these MODs. All 3 became inacessible and invisible to RE 2 Classic Rebirth. So that’s the reason why it was going directly to the game, ignoring any MOD. Mental note: not to rename the 7z files.

  14. Hey Gemini, I just wanna say thank you for your work on RE1 and 2. Your patch is the best way to play those masterpieces, so I really appreciate it. Looking forward to RE3 whenever that finishes!

Leave a Reply to Raiken Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.