Windows
Hacking a Game From 2000 To Run On Windows 11
Let’s hack an obscure breakout clone from 2000 to work on Windows 11
*************************
Chad’s rewrite:
My bodged attempt to fix:
*************************
Become a member to get early access to videos –
☕ – I also have coffee | – ☕
Tools:
🐉 – Ghidra –
🐛 – x64dbg –
🔬 – CFF Explorer –
💭 All views are my own 💭
[ad_2]
source
Want early access to new videos and some behind the scenes content? Consider becoming a channel member https://www.youtube.com/channel/UCQvW_89l7f-hCMP1pzGm4xw/join
Black Friday 30% off 0xc0ffee – https://0xcoffee.com/discount/BLACK
Honestly, I hope I can find the hacked game somewhere online, and get it to run in a VM for my Linux system
So you just created your own version of wine.
Very simplistic and limited to just a few functions, but your application is just doing exactly the same thing wine is doing when running windows applications on linux.
And talking about wine, did you try to run that game using wine or dosbox? It might just work out of the box in the correct emulator.
How about hacking Windows 11 to make it run as Windows 7?
Why didn't you first try to run the binary in "Compatibility mode"? Maybe it would work then.
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.
did you try WINE ?
Seeing Magenta as the masking colour sure brings back a lot of memories. Lots of games also used a strong green as an alternative.
Should've used VMWare, they have proper DirectX emulation on the CPU and can run even modern games somewhat quick (DirectX11)
Your a fantastic engineer, can i ask if you know of a site that offers older cracked sodtware.
The thing that I think is kind of funny here is that this game runs perfectly under WINE. I feel like they should port WINE to Windows because I keep finding games that actually run for me on Linux yet refuse to run for people on Windows.
It would be far more interesting if you tracked down exactly what the fault was that prevented it running as is. Let it run in full screen exclusive mode.
Awesome video. I'm doing something similar for a game of the same era and took some of the same approaches 🙂 Here are some tips:
– Making the game work in windowed mode if it was not designed for it is actually pretty annoying, because the code assumes all coordinates are screen coordinates. Make it run in a fixed-size, borderless window that is always at (0, 0) first so that screen coordinates, window coordinates and client coordinates line up. This lets you run your tools and get more things working properly before you attempt to make it into an actual movable window.
– If you're not using exclusive mode, the primary surface will be in the color space and pixel format of your desktop, but in exclusive mode, the game can pick the format it wants. So the game won't look right unless you convert while copying from the off-screen to the primary surface.
– Windows isn't doing a good job at keeping DirectDraw working correctly on modern systems. Compatibility settings may help. There's an undocumented function exported from modern ddraw.dll called SetAppCompatData that can be useful. The Microsoft-provided debug symbols gives further hints of what each setting does.
– Rather than trying to make DirectDraw work on modern Windows, the simplest approach is to actually use a build of Wine for Windows! WineD3D provides a DirectDraw-compatible API that renders using OpenGL. This was originally made to run games on Linux, but since OpenGL is well-supported on Windows, and Wine is a very mature project, it is the best compatibility layer for these old games. Bonus points: using OpenGL, you'll have access to modern features from your GPU drivers like AI upscaling and frame generation.
– Even with WineD3D, you may still need to hook some functions to fix rendering issues. For example, you can hook CreateSurface and make sure to populate DDSURFACEDESC with the correct pixel formats, and WineD3D will do the conversions for you when copying between surfaces with different formats.
Stellar video mate love it 🫡 learned a lot about old windows 2d graphics rendering in just 10 condensed minutes 😀
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!
PLEASE make a udemy course, just 5-10 hours, teach basics that we see in your videos. Udemy for me also is a way to support you.
As someone who refuses to learn programming, I still understood some of these words!
The Old Windows game not running on New Windows anymore probably works on Linux with wine.
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?
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.