惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

腾讯CDC
博客园 - Franky
MyScale Blog
MyScale Blog
L
LangChain Blog
Martin Fowler
Martin Fowler
Recent Announcements
Recent Announcements
Stack Overflow Blog
Stack Overflow Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 司徒正美
量子位
A
About on SuperTechFans
C
Check Point Blog
大猫的无限游戏
大猫的无限游戏
Last Week in AI
Last Week in AI
小众软件
小众软件
Apple Machine Learning Research
Apple Machine Learning Research
I
InfoQ
V
Visual Studio Blog
Vercel News
Vercel News
B
Blog
爱范儿
爱范儿
aimingoo的专栏
aimingoo的专栏
U
Unit 42

The Old New Thing

Why do Microsoft job levels start in the high 50's instead of starting at a sane number like 1? - The Old New Thing Why didn't Read­Directory­ChangesW provide a way to correlate the two sides of a rename operation? - The Old New Thing How can I remove the Close button from my window caption? - The Old New Thing Why is the x86 undefined instruction called ud2? Why 2? - The Old New Thing What algorithm did Windows XP use to choose your initial user picture? - The Old New Thing A sample use of the winstart.bat file in Windows 95 - The Old New Thing Why don't we allow stacks to be sparse, instead of forcing them to be contiguous? - The Old New Thing What happens if you change a window class's GCL_CB­WND­EXTRA? - The Old New Thing The case of the progress callback that never got called when progress happened - The Old New Thing The perils of binding to value types in XAML - The Old New Thing Microspeak: Funded / unfunded - The Old New Thing AWE does not require PAE, though PAE makes it much more useful - The Old New Thing On forcing all derived classes to implement a specific non-virtual method, part 2 - The Old New Thing On forcing all derived classes to implement a specific non-virtual method, part 1 - The Old New Thing In the product end game, every change carries significant risk, episode 2 - The Old New Thing Comparing the two holograms on the Windows 95 box - The Old New Thing Reducing C++ template bloat by factoring out the type-dependent portions of the function, practical exam - The Old New Thing Reducing C++ template bloat by factoring out the type-dependent portions of the function - The Old New Thing On wrapping a callable in a lambda that just calls it with the same parameters - The Old New Thing Why did the Microsoft Entertainment Pack for Windows have a special sticker announcing that it also had Tetris? - The Old New Thing How do functions like alloca allocate memory from the stack? - The Old New Thing How do functions like alloca allocate memory from the stack? - The Old New Thing Forcing an ARM64X executable to run as a specific architecture - The Old New Thing A little helper class for managing LPPROC_THREAD_ATTRIBUTE_LISTs - The Old New Thing The comments that go into code versus those that go into the pull request description - The Old New Thing The little-known winstart.bat batch file - The Old New Thing How can I perform a Copy­File&shy in unbuffered mode? - The Old New Thing Creating a fake agile wrapper that is technically agile but is not useful outside its home apartment, part 5 - The Old New Thing Creating a fake agile wrapper that is technically agile but is not useful outside its home apartment, part 4 - The Old New Thing Creating a fake agile wrapper that is technically agile but is not useful outside its home apartment, part 3 - The Old New Thing
Why didn't the Windows Entertainment Pack just run the MS...
Raymond Chen · 2026-08-25 · via The Old New Thing

I mentioned a little while ago that Tony Krueger reverse-engineered the MS-DOS verison of Chip’s Challenge and then reimplemented it in Windows. Somebody asked, “Why did he have to do that? Why not just run the MS-DOS version inside an emulator?”

This is sort of like asking why they didn’t use the Space Shuttle to rescue the Apollo 13 astronauts.

The system requirements for the Windows Entertainment Pack was an 80286 processor or better, Hercules, EGA, or VGA graphics card, a mouse, Windows 3.0, and 1MB of memory. The system requirements for th MS-DOS version of Chip’s Challenge was 512KB of RAM. So you have to fit all of Windows and the emulator into that 1MB of memory. Maybe you’re really parsimonious and you can squeeze Windows into 256KB of memory, and the RAM for the emulated system is 512KB, and 64KB for the emulated video card. That leaves you 192KB of RAM to write your emulator.

The target CPU for Windows 3.0 was the 80286, which does not have support for virtualization. So you’ll have to write an instruction-level CPU emulator. This sounds hard, but that’s probably the easiest part. You also need to emulate all the hardware: The keyboard controller, the timer chip, the interrupt controller, the video card, the hard drive, and whatever other stuff the program needs. The trickiest part is probably emulating the passage of time properly, because games in particular and I/O devices in general are often coded using timing loops, where the code knows that executing a specific number of instructions takes a specific amount of time, so it can, say, issue a command to the PC speaker, perform exactly 150 cycles of game logic, and then come back to issue the next command to the speaker at exactly the right moment. Or issue an I/O command to the hard drive I/O port to start moving the read head, and then wait exactly 300 cycles, and then issue another I/O command to stop moving the read head, and expect the head to be exactly at a particular track.

And you have to do all this precise timing while co-operatively multitasking against other Windows applications that are running.

Oh, and in 1990, your premium desktop PC was running a 486DX-33. A budget PC would be running an 80286 at around 10 MHz. The DOSBox emulated CPU equivalency table says that emulating an 80286 at only 6 MHz would require a Pentium Pro 200 MHz processor. This is a processor that wouldn’t be invented for another five years. The DOSBox project itself didn’t begin until 2000. PC emulation wasn’t really a thing back in 1990. The processors of the day weren’t powerful enough to do it well, and the engineering experience with x86 emulation was not there.

Even if you managed to transport back in time with better hardware and an additional 30 years of software development experience and get the game running inside an MS-DOS emulator, the emulated experience is horrible. After all, you didn’t port the game to Windows. You’re just running it in an emulator. The graphics will be MS-DOS graphics, and they won’t resize when the user resizes the game window. The inputs will be keyboard-based, even though Windows has a mouse. The original MS-DOS version didn’t have a way to save your game. It just gave you a level code once you completed a level, and you can enter that code later to jump back to the level you were on when you quit. Running the program in an emulator means that you can’t add features, like a “High scores” list, or a proper “Save game” function that remembers not just the level you were on but also your total score up to that point.

The Windows version of Chip’s Challenge had to be a port to Windows, not just running the game inside an emulator.

Related reading: Running old programs in a virtual machine doesn’t necessarily create a good user experience.

Bonus chatter: Why did Tony have to reverse-engineer the MS-DOS version anyway?

My understanding is that the reverse-engineering was primarily focused on figuring out how the puzzle levels were encoded in the data files. The game play itself could be reverse-engineered largely by observation.

Yeah, but that doesn’t answer the question. Why reverse-engineer it? Why not just have the vendor tell you what the format is?

Tony set about porting Chip’s Challenge to Windows before the licensing agreement was signed. He was secretly working on the project before the lawyers said it was okay to start. Therefore, he had to rely only on his own wits. And that meant reverse-engineering the file format, because he legally couldn’t yet ask for it.

Related reading: Another example of starting a project before the licensing agreement is signed.

Category

Topics

Author

Raymond Chen

Raymond has been involved in the evolution of Windows for more than 30 years. In 2003, he began a Web site known as The Old New Thing which has grown in popularity far beyond his wildest imagination, a development which still gives him the heebie-jeebies. The Web site spawned a book, coincidentally also titled The Old New Thing (Addison Wesley 2007). He occasionally appears on the Windows Dev Docs Twitter account to tell stories which convey no useful information.