Hacking An Obscure Game From 2000 To Run On Windows 11

Поділитися
Вставка
  • Опубліковано 6 січ 2025

КОМЕНТАРІ • 354

  • @nathanbaggs
    @nathanbaggs  Місяць тому +18

    Want early access to new videos and some behind the scenes content? Consider becoming a channel member ua-cam.com/channels/QvW_89l7f-hCMP1pzGm4xw.htmljoin
    I also have coffee - 0xcoffee.com

    • @ThePlayerOfGames
      @ThePlayerOfGames Місяць тому

      Thank you for your videos, they've certainly inspired me to watch many hours of ghidra tutorials

    • @teeteenine2222
      @teeteenine2222 Місяць тому +1

      so back in the day people would use certain colors to represent transparency like magenta or cyan so that might be why the balls has magenta around them

  • @markexclamation
    @markexclamation Місяць тому +232

    The value corresponding to magenta was often used as the masking value in old games. There is probably a function in ddraw to set this masking value to magenta so when the drawing operation occurs (the blit) it will not draw those pixels to the screen. Thats better than changing them to white I think.

    • @soviut303
      @soviut303 Місяць тому +53

      It has to do with the fact that unlike white or black, magenta is a really uncommon colour to be used in most game's graphics, so it makes an excellent colour to be used for 1-bit transparency.

    • @TheLukasDirector
      @TheLukasDirector Місяць тому +14

      Exactly. It's like how green is used on greenscreens. IIRC, MS Visual Studio also used to have magenta as the transparency color for .ico files and the like (in place of something like a checkerboard).

    • @alessandroceloria
      @alessandroceloria Місяць тому +8

      ​@@TheLukasDirector Windows itself also used it. I vividly remember exporting and editing sprites for taskbar elements from Windows XP's explorer.exe and transparency was encoded as magenta there as well! I don't remember if those were BMPs or ICOs but seems like a pretty consistent choice from Microsoft

    • @TheLukasDirector
      @TheLukasDirector Місяць тому +2

      @@alessandroceloria Interesting, never knew you could do that through Explorer. The VS version I last did this on was 2005 by the way, so definitely XP era.
      As for your taskbar sprites: standard Windows .bmps have no transparency AFAIK, so those ought to have been .icos.

    • @monad_tcp
      @monad_tcp 28 днів тому +1

      oh yes, the forbidden colour

  • @ExonerativeKoala
    @ExonerativeKoala Місяць тому +567

    ERROR_SUCCESS hits close to home

    • @KillerQ13
      @KillerQ13 Місяць тому +33

      Error: No error

    • @avramlevitter6150
      @avramlevitter6150 Місяць тому +10

      It's why I dislike the entire return-code paradigm. It's so easy to have this happen

    • @hubertnnn
      @hubertnnn Місяць тому +18

      Its a normal thing. Since you always have to return something and that something must be an error code, then what do you return if there is no error?
      Well, you return the error code of success.

    • @ChichaGad
      @ChichaGad Місяць тому +20

      Windows XP:
      _ X
      "Task failed successfully"
      [ OK ]

    • @sanphir3
      @sanphir3 Місяць тому +2

      I'm with you! ERROR_SUCCESS is taking me back 😂

  • @keckstreme
    @keckstreme Місяць тому +286

    OH MY GOD I was searching for this exact game for years! And I randomly stumbled upon it in a youtube video. This is a game I loved playing when I was little. After 13+ years I will be able to play it again!!!! Thanks Nathan!

    • @Mwapaca
      @Mwapaca Місяць тому +11

      We were playing it on a windows 98 computer with my brother, without internet it was almost the only things to do with roller coaster tycoon 2 and sim city 3000. Good times.

    • @FR4M3Sharma
      @FR4M3Sharma Місяць тому +2

      There's another fun game called Jardinains it's also a Brick Breaker and works on win10/11

    • @ChadDore
      @ChadDore Місяць тому +6

      I knew there had to be other people who liked this game. I remember trying out all the breakout clones I could find on the internet about 20 years ago and this one really stuck out.

    • @FR4M3Sharma
      @FR4M3Sharma Місяць тому +1

      @@ChadDore Hi Chad. How far are you into the reimplementation? What's the name of the project on github?

    • @ChadDore
      @ChadDore Місяць тому +3

      @@FR4M3Sharma I'm calling it "Paddles, Balls, Blocks and Walls" lol, I'm not sure if that was a good idea. Nathan put a link to it in the description under the video. I'm only about a week in, I started first in Python but then switched to Godot which I've really been wanting to learn anyway. I have a lot of things in the works for it. Will probably post a video about it later this evening. Hopefully I can do the original some justice!

  • @ChadDore
    @ChadDore Місяць тому +101

    Thanks Nathan! I bow to your greatness!

    • @nathanbaggs
      @nathanbaggs  Місяць тому +21

      Thanks for the fun challenge (:

  • @plusplusplus9837
    @plusplusplus9837 Місяць тому +10

    Awesome! I’m glad your leap of faith in running this outside of a VM was rewarded

  • @jtsiomb
    @jtsiomb Місяць тому +63

    The purple thing is the "colorkey" there should be a IDirectDrawSurface::SetColorKey call which sets which color should be skipped (be transparent) when blitting with source color key enabled. Using palettes is not "how direct draw works", it's how 256-color video modes work. Direct draw supports all available video modes supported by the hardware, including true color. And the fake 3D letters with the ball sprites is a classic demoeffect called "vectorballs".

    • @mopanda81
      @mopanda81 Місяць тому +1

      thanks for putting a name to it!

  • @micaiahstevens8840
    @micaiahstevens8840 Місяць тому +143

    As a fellow game developer, I don't want to go too overboard here. AS I really enjoy your presentations and the passion and amount of work it takes. I almost wish I had the time, and patience to do what you do.
    SOOO talking about Magenta, and it really sounds though as you missed a FUN time of EARLY game development. The color is a masking color that represents transparency. I think by overriding DirectX 3 you're missing its magic that is taking the mask OR them together or some such magic. Personally, I never understand the behind the scenes, or forget how it worked exactly. I never got a good working game back in the day.
    Anyways felt it was simple yet missed in your comments and confusion. I am SURE you are well familiar with the concepts just not seeing it in an image.
    Thanks for doing a GREAT job, this ia super useful skillset.

    • @pixelcatcher123
      @pixelcatcher123 Місяць тому

      i use 0xABCDEF to make something trans but yes i remember a game where u had a guildsign wich u can customize it with gimp or something and there was magenta to represent transparency but if i remember right it was a bmp

    • @renhoeknl
      @renhoeknl Місяць тому +24

      I used this method to get animated backgrounds in the early 90's I think. Change your background to a solid magenta, run a movie clip on repeat in a player and then minimizing the player. The videocard would then replace the magenta background with the movie.

    • @dddanmar
      @dddanmar Місяць тому +14

      +1 Magenta was the non PNG transparency layer in a lot of cases

    • @Sypaka
      @Sypaka Місяць тому +14

      Even Windows XP is guilty of that. They use AVI for the animation on the "copy files" dialogue. Guess the color.

    • @bradallen8909
      @bradallen8909 Місяць тому +3

      Anything involving DirectX is not “early” game development.

  • @qwert_au
    @qwert_au Місяць тому +11

    I know these videos are an insane amount of work, but I really do love watching them. They're very entertaining- coming from a non-programmer with an interest in the topic.
    I hope you keep doing them!

  • @LordHog
    @LordHog Місяць тому +1

    Your video found its way onto my feed, randomly. This was a very interesting deep dive in resolving execution issues encountered. Great content. Sub’d and will definitely need to check out the other videos on this channel

  • @_boux
    @_boux Місяць тому +41

    I was curious, so I downloaded the original Block 1.30 game (from the wayback machine link in the github page's readme). I'm on Linux and I heard that wine is really good with super old windows software. So I just double-clicked the exe and the game ran as-is. All the visual effects were intact (such as the particle explosion when hitting a brick). Pretty cool

    • @nathanbaggs
      @nathanbaggs  Місяць тому +19

      Interesting, maybe Linux is the best way to play Windows games. This was still a fun challenge though

    • @InnerEagle
      @InnerEagle Місяць тому +4

      @@nathanbaggs Considering there are many ways to do it, it's still fun to do it physically

    • @iliqiliev
      @iliqiliev Місяць тому +4

      Thank you, I was curious the whole time if Wine would have just run it and I'm happy that it did.

    • @Dewm_
      @Dewm_ Місяць тому

      ​@@nathanbaggs Despite WINE really being meant for operating systems other than Windows to run applications; windows itself is more than capable! Before I made the full time switch to Linux I actually enjoyed utilizing "WineD3D" for windows, and other various projects to run windows games in Vulkan for either better compatibility or improved CPU scheduling and frame times in some cases.

    • @Mario583a
      @Mario583a Місяць тому +1

      @@nathanbaggs From a comment of MichealMJD's video of [Run 16 Bit Programs on 64 Bit Windows]: If I recall. NTvdm never got a port to 64-bit since the CPU mode it relied on for fast 16-bit code execution gets disabled when a x86 processor is switched into long mode.
      WineVDM is likely translating 16-bit instruction calls to 32-bit and then passing that off to Windows

  • @rojovision
    @rojovision Місяць тому +15

    Yeah like you surmised, the magenta color is the placeholder for transparency because the data would have likely been loaded as RGB not RGBA at the time DirectX 3 was in use. I'm not sure graphics chips of the era could efficiently do transparency blending in the way it's done now, but I don't recall the details. Not super important, but It's a bit strange that a game from 2000 would be using DX3 since we were already at like version 8 or 9 by then. DX3 is from the Windows 95 era.

    • @phill6859
      @phill6859 Місяць тому +2

      Windows NT 4 was officially DX3. Windows 2000 shipped with DX7, and someone did take DX5 and DX6, I believe from a beta version of Windows 2000 when it was called NT5, and made it work with NT4.
      I used it in the late 90s, because I needed NT4 for stability. I suspect the developer of the game may have been using NT4 or wanted to support NT4

    • @hubertnnn
      @hubertnnn Місяць тому +5

      Its probably due to backwards compatibility.
      If you make a game in DX8 it will only run on Win 2000, if more than 50% of devices were still using 95, 98, or maybe even 3.11, then its better to use older libraries and make the game run on more devices, then limiting your market just to those who can afford the newest.

  • @cheese5742
    @cheese5742 Місяць тому +41

    There was this mmo i used to play that used magenta in its launcher for pixels that are supposed to not be drawn / be transparent, probably what is happening here too.

    • @hubertnnn
      @hubertnnn Місяць тому +2

      I wonder what was first, usage of magenta to define transparency in the bitmap, or showing magenta on screen when something cannot be correctly rendered.
      In both cases someone really hated magenta.

    • @nikkiofthevalley
      @nikkiofthevalley Місяць тому +4

      ​@@hubertnnnIt's more that 1, 0, 1 magenta is a color that is basically never used, so it can be used as a special indicator.

  • @orestes_io
    @orestes_io Місяць тому +8

    Insane skill level. I learn so much with every one of your videos. It's like a Sherlock Holmes case every time!

  • @tomysshadow
    @tomysshadow Місяць тому +10

    My guess is that the initial crash with editing the resource could be due to the NXCOMPAT flag. It's possible the game was compiled to use DEP but never tested on an OS that actually had it (like XP or later) so it crashes when it believes it should be able to edit that section. You then editing the permissions on the section to make it writable might have snowballed into the problem with LoadImage, which probably assumes the section is read only (though that's purely speculative.)
    If you see solid magenta (or occasionally blue, or bright green) as a background to the image, that is usually meant to serve as transparency (not white!) in an image format that would otherwise not support transparency. That was common in games of this era, it's like a green screen for sprites. It's magenta specifically because it's a pretty uncommon colour to use in the sprites themselves.

    • @nathanbaggs
      @nathanbaggs  Місяць тому +1

      Interesting insight! Yeah I assumed the magenta was for alpha, setting it to white was a quick and dirty way of making progress. I think other people have commented a more correct way of handling this

    • @tomysshadow
      @tomysshadow Місяць тому

      btw, I know you like investigating these issues for yourself - but dgVoodoo3 likely would fix any DirectDraw related problems. I think it has an option to force windowed as well. DxWnd could also be worth a shot trying first

    • @mari2.
      @mari2. Місяць тому +2

      It works fine on XP, guessing the NT 6.0 Overhaul with Vista broke it's rendering method.

  • @klokbaske
    @klokbaske Місяць тому +3

    "Somewhere in the last quarter of a century, something has changed!" - splendid analysis!

  • @themightiestofbooshes9443
    @themightiestofbooshes9443 Місяць тому +26

    you got a chuckle out of me when you said DirectX 3 was a "fine vintage"

    • @stolenlaptop
      @stolenlaptop Місяць тому

      I thought of 7 as a full bodied with hints of fruit.

    • @themightiestofbooshes9443
      @themightiestofbooshes9443 Місяць тому

      @@stolenlaptop I really enjoyed 9, but many would call it too overdeveloped; trying to be too many things all at once. I miss it.
      On that note, my favorite would have to be 11. It's a bit young, yes, but it has a lot of good flavor to it.

    • @Gameboygenius
      @Gameboygenius 10 днів тому

      DX5 and DX6 are the best vintage. But that's just, like, my opinion.

  • @Dewm_
    @Dewm_ Місяць тому

    I absolutely love your presentation here. It's calm, easy to follow along, and sprinkled with the right amount of humor where it counts! I absolutely love your step-by-step approach here, as it really gives an idea behind the kind of process such a task would have. Once I'm out of school I really gotta dig into properly understanding assembly, as I find the process of debugging like this to be extremely interesting and satisfying.

  • @tangocat73
    @tangocat73 Місяць тому +34

    Out of curiosity , I downloaded the game, and fiddled around a bit in Lutris under Linux Mint, using WINE. To my surprise, it worked, with sounds, controls and everything.
    It is funny that nowadays Linux plays vintage DOS and Windows 95/98 games better than modern Windows 11.

    • @berthold64
      @berthold64 Місяць тому +9

      still not using linux

    • @Mario583a
      @Mario583a Місяць тому +5

      "If I recall. NTvdm never got a port to 64-bit since the CPU mode it relied on for fast 16-bit code execution gets disabled when a x86 processor is switched into long mode.
      WineVDM is likely translating 16-bit instruction calls to 32-bit and then passing that off to Windows"

    • @shiro3146
      @shiro3146 Місяць тому

      @@Mario583a so.. i guess somehow wine able to translate that piece of codes into litterally diferent language altogether that Linux understands!?

    • @Gideon_Judges6
      @Gideon_Judges6 Місяць тому

      ​@Mario583a this. amd64 architecture can't run 16-bit real mode instructions anymore once you've transitioned to 64-bit mode. About 15 years ago I once wrote (on windows) a sort of emulator/VM that would run the 16-bit mode in a shared VM (kind of like how it does when you run 16-bit on 32-bit mode aka WoW, but I have to interpret/emulate the 16-bit ISA).I wanted it so you could run COM files which were all 16-bit. I got it sort of working but lost interest because for COM files I could get it to run right from the shell by setting the file type association, but I had no easy way to hook EXE files because those always tried to run in the default loader and there was no obvious way to hook or intercept that for 16-bit EXE.

    • @Veylon
      @Veylon 27 днів тому

      Makes me wish there was Wine for Windows sometimes.
      I do have pretty good luck emulating Windows 95 in DosBox, though.

  • @mads2k5
    @mads2k5 Місяць тому +17

    This NathanAI is crazy! You simply throw some emails at it and it gives you the best answers!

  • @ac15cr
    @ac15cr Місяць тому +72

    Chad coming in with a chad challenge

    • @nathanbaggs
      @nathanbaggs  Місяць тому +13

      And a fun challenge it was

  • @SpitfyaUK
    @SpitfyaUK Місяць тому +2

    Another awesome video Nathan. Keep up the great work! Been in love since I stumbled up on your early Worms one.

  • @jowadmax1921
    @jowadmax1921 Місяць тому +4

    Thank you Nathan for another awesome video.
    In the spirit of showcasing more tools to the audience, it might be interesting to find a way to incorporate Frida into one of your videos. Based on my understanding, it's a great tool for injecting, instrumenting, and prototyping live binary modifications. It would be cool to see it!

  • @jamesread11
    @jamesread11 Місяць тому +18

    I feel like a lot of the issues you had were self inflicted because you wanted to run in windowed view, could yoh not run full window with multi monitor and give the app one monitor and run debug on the other monitor and alt tab to it?
    Great work by the way your technical knowledge and ability blows my mind

    • @nathanbaggs
      @nathanbaggs  Місяць тому +17

      So I do have a second monitor, but the full screen mode also changes the resolution so alt+tab doesn't really work. I tried to show this but OBS didn't really like it so I guess it looks like I glossed over it a bit.
      I also wanted to make it windowed so Chad could easily run it whilst doing his port, without taking over the fullscreen

  • @kritikusi-666
    @kritikusi-666 Місяць тому +2

    my man here living on the edge testing random software outside virtualization haha. Kudos to you! Also this was fantastic peace.

  • @SJFrzrbrn
    @SJFrzrbrn 23 дні тому

    Most of my coding experience involves C / C++ for embedded stuff (microcontrollers PIC, ARM etc) and I must say, I know that I know a lot... but you have absolutely impressed and humbled me! I never for a second thought I couldn't learn more, but you have Sir are a wizard. I salute you.

  • @Patashu
    @Patashu Місяць тому +1

    Very nicely done. There are so many games like this that got left behind when the way computers offer graphics changed.

  • @Themoonisachees
    @Themoonisachees 17 днів тому

    when i was learning C in 2008-2009, we had a section on rendering that basically went "if you don't care about partial transparency, use magenta for fully transparent, instead of wrangling RGBA". all major graphics libs already had a "this color is actually 0 alpha" call to filter it out.

  • @sergdudk
    @sergdudk Місяць тому

    I love your content and sense of humor mate! thank you, please keep them coming 🙏

  • @eintim1980
    @eintim1980 Місяць тому +11

    Hey, instead of going through the struggle of inserting Shellcode to load your own dll into the programs entrypoint, you can also just modify the import table of the executable so windows loads the dll for you while loading the pe file. I personally prefer it as it's simpler and pretty much universal.

    • @Kirillow
      @Kirillow Місяць тому +2

      Thats what I'm saying. Just imbed the resource to the CFF executable and deep null zero will compress the render to the direct draw funtion setup.

    • @nathanbaggs
      @nathanbaggs  Місяць тому +1

      There's multiple ways of doing these things, this was just the one I decided to use. It's quite an organic process which I try to cover in the video. I initially patched the exe to just change the CreateWindowsEx flags and when that was too restrictive I just changed the patch to load a DLL

    • @hubertnnn
      @hubertnnn Місяць тому

      Would it be possible to just make a new executable that does only 2 things:
      1. Preloads your dll
      2. Calls main() function from the actual executable
      This would be an universal solution that will work on everything, and all you would have to change is the name of the exe file that you are calling main from .

    • @partoftheworlD
      @partoftheworlD Місяць тому

      @@hubertnnn it can be done even easier, create a new segment with patch inside an existing exe and replace OEP with patch function that passes control to the game after all the magic is done and after launching exe there will be something like call patch; jmp game_main;

    • @satibel
      @satibel 5 днів тому

      ​@@hubertnnn yeah, that's basically what I did when I made my notepad game engine, I have a launcher that runs the program then loads the dll into it.
      it would probably be pretty trivial to add a breakpoint on main and register the dll then start the program.
      edit : yup, don't even need breakpoints, use CREATE_SUSPENDED (0x4) in the CreateProcess call (for dwCreationFlags), and use ResumeThread when you're done loading.

  • @vladislavkaras491
    @vladislavkaras491 Місяць тому

    Darn... So much work to do this! Impressive!
    Thanks for the video!

  • @cdoty
    @cdoty День тому

    I'm sure you noticed it, but the stack trace listed the ddraw.dll as the location of the crash.
    Back in the day, there were articles about creating replacement DLLs to hook the function of either Direct Draw or Direct 3D. This was used to things like create an OpenGL renderer for DirectX only games.
    Yes, magenta was a standard color used for color keying images. It seems pretty uncommon in normal images. And, if you do need it, you can shift either the red or blue value down by 1.

  • @mariestarlight
    @mariestarlight Місяць тому +9

    I'd love to see you get Jezzball working on windows 11. I loved that game and the clones are missing features of the original.

    • @Patashu
      @Patashu Місяць тому

      For windows 3.1 era games running on modern windows, you can try something called 'winevdm'. It doesn't always work, but it let me play Castle of the Winds.

  • @Zetornator
    @Zetornator Місяць тому

    Man, thanks for sharing your steps and educating us on how you think on each error and line you come across, this whole debugging using IDA, Ghidra OR x64dbg should have been its own subject in CS...currently on my 3rd year and i already feel like i need to dedicate more time on such projects like yours.
    Personally i would Love to see more examples on how to debug/hack an old online game so you can re-enable their online feature like hosting, joining etc, (yes i remember the video on worms, its my favourite.)...i always wished i could try to go back in time and play was "Darkspore" so video by video you are giving me more and more hype to start debugging for the fun of it even though my schedule is full of assignments.💀

  • @Hectik17
    @Hectik17 Місяць тому +4

    Haha that art attack clip, what a throwback

  • @gamingcube939
    @gamingcube939 Місяць тому +1

    0:02
    Chad introduces himself and explains his issue with the Block game.
    0:28
    Nathan confirms that he finds Chad's question to be an interesting challenge.
    0:56
    Nathan starts the debugger and discovers the cause of the program's error.
    2:18
    Nathan hypothesizes that the game uses Direct Draw for rendering.
    3:54
    The creation of the Direct Draw object is discussed.
    9:46
    Nathan realizes that the game is designed to run in fullscreen mode, which poses a problem.
    10:38
    Nathan explains how the blit function works in copying graphical data.
    11:12
    The debugger reveals an error while trying to load the bitmap.
    12:34
    Nathan modifies the code to render the game correctly.
    14:30
    Chad happily informs Nathan that the game is now functioning on his machine as well.

  • @amshermansen
    @amshermansen Місяць тому +3

    Seeing Magenta as the masking colour sure brings back a lot of memories. Lots of games also used a strong green as an alternative.

    • @satibel
      @satibel 5 днів тому +1

      funnily pure green is the inverse of magenta. (green is 00FF00, magenta is FF00FF)

  • @SM-fo5rl
    @SM-fo5rl 25 днів тому

    No clue what you're talking about 99% of the time, but am always amazed by your wizardry!

  • @DrKaspertje
    @DrKaspertje Місяць тому +1

    Oh, now I understand how those mods for games used to work, where they gave you a tiny DLL with a name like d3dx9_26.dll. I always thought that was weird, because those DLLs were used for DirectX, but now I presume that was just a way to guarantee being able to run a bit of code in the memory space of the process, with very little effort from the end user, and they probably just passed through all the DirectX calls.

  • @4dxl
    @4dxl День тому

    I remember this game!! That's so cool! Amazing video

  • @creedolala6918
    @creedolala6918 27 днів тому

    After the flashing I chuckled and said to myself out loud "perfect", and then with perfect comedic timing it cuts to Nathan saying "perfect".

  • @KaziQTR
    @KaziQTR Місяць тому +3

    You can still use a VM. All you have to do is use a Linux dist. as a KVM host and do GPU passthrough (and any other device you want really) to be used by VM. I have been playing all my modern Steam and other platform games like this for years now. It's a regular VM like you can use snapshots or migrate. If you use hardware passthrough though you can't use live migration or sleep etc. Those are some of the downsides that I never use anyway. You can take away internet give or take things to/from VM. It's really neat.
    I guess the keywords to look for is KVM, GPU passthrough, Virtio. With these keywords you will see abundant information about VM with GPU passthrough.

    • @xanderplayz3446
      @xanderplayz3446 Місяць тому

      Or you know, use Hyper-V, or if you use Home, just upgrade to Pro and apply a *mass* amount of *grave* to the turkey.
      But yeah, KVM works insanely well. Even without GPU passthrough and proper drivers (I use SPICE qxl), I can get very good desktop performance on QEMU.

  • @aspzx
    @aspzx Місяць тому +7

    That fake 3D effect is actually pretty cool.

    • @Dr.MSC.W.Krueger
      @Dr.MSC.W.Krueger Місяць тому +1

      Trivial effect. We did this back in the mid 80s. 😂

  • @johanoern
    @johanoern Місяць тому

    Love these kind of videos 🎉🎉

  • @j.t.8023
    @j.t.8023 Місяць тому

    Most of the time i understand nothing but your Videos are very entertaining. :) keep Up the good Work.

  • @pascalmathieu9332
    @pascalmathieu9332 Місяць тому

    Hi
    I remember that magenta color was used to render transparency (No rgba was available, just rbg, so one color was reserved to set full transparency)
    For exemple, you can set your backgroud color of the desktop in magenta, and you can have your tv card rendering in place of the magenta on the desktop.
    You can use it in icones too, and I think in that case the first top left pixel set the transparency color.

  • @theladyfingers___
    @theladyfingers___ Місяць тому

    I dida little basic programming as a kid, and then became a bit of an Excel formula wiz, but watching this is like being flicked out of the boxing ring with your competitor's pinky. Amazing stuff!

  • @TheNorthernForge
    @TheNorthernForge Місяць тому

    I haven't studied any code since 10th grade, and that was Visual Basic, HTML and CSS. So I really struggled to follow along, but even with my limited understanding I found this really interesting and impressive.

  • @cheaterman49
    @cheaterman49 Місяць тому +2

    2:14 What, do you mean computer graphics have changed in 25 years? That's quite the shocker to me, I've seen the GTA VI trailers and it's literally the same as Quake 3!

    • @TheDudeAbidesYo
      @TheDudeAbidesYo Місяць тому

      You're joking right

    • @cheaterman49
      @cheaterman49 Місяць тому +2

      @@TheDudeAbidesYo What makes you think that? Maybe going back to Quake 3 wasn't enough, did you expect me to compare GTA VI trailer with Wolfenstein 3D? :-D

  • @petemc4190
    @petemc4190 Місяць тому

    "go full art attack" genuinely didn't think that one needed explaining and could just be casual chat

  • @pandeomonia
    @pandeomonia Місяць тому

    As a Java/managed language guy who only gets as deep as scaredly checking out his reflection during runtime, then screaming running away in terror, this was _fascinating_ for me.

  • @doemaeries
    @doemaeries Місяць тому

    Interesting fact regarding the magenta thing. I had a Sony Ericsson K800i back in the days. You could install some custom themes on it and they also used magenta for transparency

  • @lagaffe91
    @lagaffe91 18 днів тому

    Very educative ! Awesome video

  • @mo938
    @mo938 Місяць тому

    If I were even half as skilled at....... anything... as you are at programming, I’d be thrilled.
    You're awesome, Nathan!

    • @nathanbaggs
      @nathanbaggs  Місяць тому

      Just got to keep learning and improving (:

  • @daniel7875-g9n
    @daniel7875-g9n Місяць тому

    altough i dont understand of half whats going on, i really like your style of explaining. keep up and youll be big on yt soon !

  • @TeamUnpro
    @TeamUnpro 28 днів тому

    Hacking / modifying game code has become somewhat of an ~addiction~ -- er, a hobby of mine. I've used cheat engine to edit the running code in ram on all of my favorite games so I can get out of bounds; FFX, FFX2, NieR Automata, Bioshock Remastered, Fairy Fencer F, etc lol, The issue is you get so into it and you end up spending HOURS trying to do one simple thing
    But its SO SATISFYING

    • @TeamUnpro
      @TeamUnpro 28 днів тому

      Plus, it teaches assembly :3 I've learned a lot so far

  • @WareNetwork2000
    @WareNetwork2000 Місяць тому

    Sounds like a very fun Breakout clone. It reminds me of another old DirectX Breakout clone called DX-Ball which IIRC runs fine on Windows 11.

  • @MrR0b3rt
    @MrR0b3rt Місяць тому

    Actually proud of myself for understanding about 50% 🤣 I do feel I learn a lot from your videos, thanks! But it does make me feel old when talking about this era 😂😂😂

    • @nathanbaggs
      @nathanbaggs  Місяць тому +1

      Hopefully we can get that to 100% with some more videos (:

  • @vynxie
    @vynxie Місяць тому +3

    11:55 REACTOS MENTIONED 🥂🎉

  • @johnnysvensson
    @johnnysvensson Місяць тому

    Since it is rendering in indexed mode(8 bits with a palette) the magenta is most likely supposed to be the color key/signaling transparency.
    edit: seems like a good bunch of folks pointed this out already :)

  • @DrMattBug
    @DrMattBug Місяць тому

    I love the explanations of what you're doing. I'm not sure I'm the target audience, because my particular flavour dyslexic brain really struggles with abstract, symbolic representations, but it feels like a fun adventure to come along on :-)

  • @Kirillow
    @Kirillow Місяць тому +1

    Yeah man just blip it to the primary from the resource subsection string of the executable. The debugger will return extended zero function host. This undocumented function will compare the size of the image resource. To get the screen resolution index arrey you need to find the pallet code in the image data. All the colours will be correct if you blend the operation from the reboot. If it does not interpret this as the level data find the offset in the dll function and load the resource from the disc. Easy.

  • @Retrobitsandslots
    @Retrobitsandslots Місяць тому

    New subscriber to your feed. Love (and hate) the way you make it look so easy in places. I have started to have a look at reverse engineering some UK video fruit machine software I have as there are hints in the config files to make it run stand alone on a PC for testing rather than in the cabinet with all the coin and button handling hardware. It loads a sheel first and then has hooks from the game into the shell for the IO stuff. On one of your videos would you be able to post a list of all the tools you use? You do seem to fly through some of them and im worried im going to end up getting the wrong thing and make things harder for myself. I think whats going to be my stumbling block is using ghidra and getting it to link and debug the DLL files associated with the exe im trying to run on my set up. I cant see a video where you have had something similar to this (i mean using a 3rd party DLL that has no documentation rather than the windows ones)
    But thank you for the videos and giving me the encoragement to take the plunge myself. Im sure you would do whats going to take me weeks to probably fail at in a matter of hours.

  • @peasedustin
    @peasedustin Місяць тому

    loved this game and saw the thumbnail and went back in time!

  • @TechX18-d4h
    @TechX18-d4h Місяць тому +3

    tried the original game under wine 9.0 (since my main OS is Linux) and it works just fine. it is scaled 1:1 at the top left of the screen but otherwise playable!
    i wonder if wine just isnt as picky as windows in terms of the things mentioned in the video?

    • @Mario583a
      @Mario583a Місяць тому

      From a comment of MichealMJD's video of [Run 16 Bit Programs on 64 Bit Windows]: If I recall. NTvdm never got a port to 64-bit since the CPU mode it relied on for fast 16-bit code execution gets disabled when a x86 processor is switched into long mode.
      WineVDM is likely translating 16-bit instruction calls to 32-bit and then passing that off to Windows

  • @MegaMoto85
    @MegaMoto85 Місяць тому

    Disruptor is a original playstation game and a Doom clone. The files within the PS1 Iso are WAD's, just like Wad's in the doom folder, how much work would it be to port this game to windows with x-input support, and maybe better framerate? :D

  • @LAMGFGC
    @LAMGFGC 24 дні тому

    That first error reminds me that some games would look for some especific memory adresses that were not free on other languages versions of windows and crash

  • @nicoful86
    @nicoful86 Місяць тому

    This is amazing ❤

  • @TacoTuesdey
    @TacoTuesdey Місяць тому

    my favorite breakout was called DX BALL and it was great. you could create your own custom levels and everything.

  • @BobbyM-p2z
    @BobbyM-p2z Місяць тому +2

    Wonder if it might be easier to play it via wine on linux.

    • @nathanbaggs
      @nathanbaggs  Місяць тому +1

      Looking at the comments I believe this is the case

    • @maxpoulin64
      @maxpoulin64 Місяць тому

      I tried and it just works out of the box, but the window size is incorrect so you have to wrap it in gamescope but apart from that, runs perfectly.

    • @bradallen8909
      @bradallen8909 Місяць тому +1

      You do realise that WINE runs on many, many different operating systems? Not just Linsux.

  • @blakegriplingph
    @blakegriplingph Місяць тому

    Would it be more convenient to inject code using a readily available .ASI loader?
    Also, I have a very old game I wanted to patch so it reads from a different user directory rather than the install folder. Maybe this is worth investigating?

  • @Winsane
    @Winsane Місяць тому

    This sounds like something DxWnd might be helpful for. It has been fixing things like this for decades and the developer is still at it.

  • @Melechtna
    @Melechtna Місяць тому

    I can actually shed some insight into the magenta thing. I don't know the SPECIFIC reason why, but, in the late 80s, early 90s, magenta was just the color used for transparency, pure and simple. Some games would change the default color for transparency, but given real transparency was basically not a thing back then, you had to basically mask out a color, and that shade of magenta was just...how it was done.

  • @johnhudson9167
    @johnhudson9167 Місяць тому +1

    I’m guessing that the pink is maybe a reserved colour. When I use to program tv boxes (e.g. Sky) back in the early 2000s, we used #ff00ff to indicate transparency (i.e. show the video playing underneath).

  • @FooneTuring
    @FooneTuring Місяць тому

    Very nice! It's like a UA-cam of one of my game hacking threads, but way more entertaining.

  • @antpalmer5856
    @antpalmer5856 Місяць тому

    This is absolutely stellar! Ive been meaning to learn game RE techniques but have zero clue where to start, especially when it comes to using Ghidra and sifting through windows API docs. How do you learn any of this?

  • @joopie46614
    @joopie46614 Місяць тому +1

    Great video! Always love seeing a fellow low-level programmer and reverse engineering in one video trying to poke at and fix random obscure things and problems

  • @Aeduo
    @Aeduo Місяць тому

    I'm sure this was mostly an academic exercise but, would using directdraw or other DLLs from wine or reactOS have gotten this working?
    Also considering how much work is necessary to NOT have a program able to draw all over the screen, it kinda explains all the odd little desktop critter applications in win 3.x.

  • @darktherapy
    @darktherapy Місяць тому

    To me this sounds like “the game knows where its rendering by knowing here it’s not rendering..”

  • @MrRecorder1
    @MrRecorder1 Місяць тому

    Oh... Nathan Braggs in my feed! I had an idea, maybe for something that maybe is interesting: The San Andreas "Hot Coffee Mod". How did it actually work? I have no idea until today, if it was an actual mod or just disabling some flag in some cebsored-out code. Felt like the latter, but I do not know actually...

    • @CrAzYpotpie
      @CrAzYpotpie Місяць тому +2

      It is documented in countless places online and UA-cam. It is official content that Rockstar developed and cut, but parts of were leftover in the first release builds of the game.

  • @threeMetreJim
    @threeMetreJim Місяць тому

    Sounds like it might have been a fault in the bitmap image header that worked before, but has since been fixed and now stops things working. Something about not adhering exactly to the header specifications.

  • @charlesnathansmith
    @charlesnathansmith Місяць тому

    I've never heard 0x50 pronounced "ox-50", but now I'll never unsee it again

  • @karbinunit
    @karbinunit Місяць тому +2

    Used Wine 9, on my Debian Linux with Cinnamon desktop, no problem, runs nicely, FPS 80 (see that in the bottom right) but sound is missing. Can see the folder there are no wav files present. Cant read the text files, as in Japanese? Can see some information, talking about the wav files.
    :)

    • @zxcvb_bvcxz
      @zxcvb_bvcxz Місяць тому

      it's a second download from the page you downloaded the game from.

  • @drastically143
    @drastically143 Місяць тому

    Still don't understand everything, but your work is mesmerizing!

  • @webfischi
    @webfischi Місяць тому +1

    So I have to email to get a game I love fixed? Or do I have to be a member? I'll try it anyway...

  •  29 днів тому

    Oh I wanted to know more about the 3d effect in 2d! But very cool video!

  • @zap0xfce2
    @zap0xfce2 Місяць тому

    OMG pink backlight glow! Make it more pink and brighter xD

  • @piecaruso97
    @piecaruso97 Місяць тому

    the mgenta as a placeholder flr transparecy was actually an old programming trick from the dos days

  • @cougar-town
    @cougar-town Місяць тому

    So essentially just gotta patch the window display mode or something for the application for it to run properly? or is there more to it?

  • @MinkSquared
    @MinkSquared Місяць тому

    This and jardinains were genuinely my favourite childhood games

    • @tybaltsbutters
      @tybaltsbutters Місяць тому

      jardinains, gun metal and little fighter were my favourites. i still play the steam edition of jardinains time to time.

  • @soundspark
    @soundspark Місяць тому

    Not only does user32.dll differ between Windows versions, but being a basic system file it can be changed during updates.

  • @ruben_balea
    @ruben_balea Місяць тому

    Does anyone know where Windows/DirectX stores the names of executables that need special handling?
    The executable of "Commandos - Behind the Enemy lines" was unsurprisingly called "commandos" except in the original version of the game in Spanish (Pyro Studios was a Spanish company) where it was called "comandos" with a single "m" which is the correct way to write it in Spanish.
    The thing is that in any modern version of Windows if the executable is called "commandos" it works correctly, but if it is called "comandos" it shows an error message that DirectX 5 is not found. It's enough to rename the file but I would like to know where they hid the name of the executable.
    So I assume that when a new version of DirectX broke compatibility with this game they added a patch to make DirectX do something differently when the executable that calls DirectX is called "commandos"
    There are more games that won't run if renamed and whatever DirectX does with such apps is not available via the Windows compatibility options.

  • @morwar_
    @morwar_ Місяць тому

    That was amazing.
    I don't know if you answered this before, but would you know if games overlays such as steam, nvidia or discord are implemented by hooking functions?
    It would be interesting to know how they do it.

  • @j7ndominica051
    @j7ndominica051 29 днів тому

    That felt like a fix with a hammer. He didn't check if the game would work on a normal, old computer anymore. The transparent background might be important to allow the sprites to overlap during some instances..

  • @jacquesb5248
    @jacquesb5248 Місяць тому

    man you do some good work, very interesting

  • @philreed1605
    @philreed1605 Місяць тому

    I didn’t keep up with most of that but I enjoyed the journey. Question, could you have used a second monitor for the debug tools and kept the game running full screen?

  • @test-rj2vl
    @test-rj2vl Місяць тому

    Just out of curiosity, do you have VMware? Since they made VMware workstation free now you might give it a try to see if you still get the same error as in 1:47. I just recently made a discovery that GTA Vice City runs with nice playable frame rate inside VMware which made me think that they might have better graphics support. Because you never know what you get from the internet and if you help enough people then the question is not if but when you get malware. For VMware there is also a GPU passthrough so so if you really need you might even be able install real graphics driver instead of VMware tools although for me GTA VC run fine with just VMware tools installed.

  • @joe-skeen
    @joe-skeen Місяць тому +1

    I legit just finished getting together a DosBox-X setup that can run any Windows 9x programs as if it was a standalone program on the modern host operating system

    • @electrowizard2000
      @electrowizard2000 Місяць тому

      Share with the class please! Sounds awesome

    • @joe-skeen
      @joe-skeen Місяць тому

      @electrowizard2000 I posted it on my GitHub

  • @nollem
    @nollem Місяць тому

    all the times we couldn't get our arcade roms working or diablo2 on windows 7, this guy was laughing into his crystal ball

  • @renhoeknl
    @renhoeknl Місяць тому

    Complete noob here, but would it not be easier to create a custom ddraw.dll, drop it in the local game directory and pass all calls to the real ddraw? Then only customizing those calls where needed?

    • @tomysshadow
      @tomysshadow Місяць тому

      This is a real strategy, it's called a Proxy DLL, and yes personally speaking this would be my preferred method as it's a bit more elegant IMO. But hooking works too

    • @nathanbaggs
      @nathanbaggs  Місяць тому +1

      I still needed to hook CreateWindowEx etc to make it windowed, so once I set up all the hooking chuff for that it seemed easier to continue down that parh

    • @renhoeknl
      @renhoeknl Місяць тому

      @nathanbaggs Again, complete noob here, enjoyed the video, just asking out of interest. Instead of making the game windowed, would it have worked to leave it full screen and use things like the debugger on a second monitor?