Emulator Debugging: Area 5150's Lake Effect

https://news.ycombinator.com/rss Hits: 9
Summary

Yes, it does, but I have a dirty little secret I need to confess to the world. Despite all the accolades MartyPC has received about being super-accurate, it needed a special, Area5150 specific hack in order to run the final two cycle-counted effects, "Wibble" and "Lake." "Wibble" is the scene with Charlie Chaplin, the green fellow and the elephant. "Lake" is the final end credits scene with the water effect and the PCM audio player. In other words, I cheated.It haven't actually tried that hard to keep it hidden, as you can see if you are watching the console while MartyPC runs:Okay, maybe I'm being a bit hard on myself. Title-specific hacks are nothing new to the world of emulation. Historically, many famous emulators have relied on title patches to work around bugs or inaccuracies to get games to play. As emulators have improved in accuracy and research has uncovered more details about how systems work, gradually these title hacks became less necessary. In my defense, MartyPC has always ran the effect itself cycle-accurately once the effect actually starts - it's just starting the effect in the first place that is the real trick. In this article I'll show you why, and what I did to fix it.Part of what makes Area5150 (and 8088MPH before it) so mind-blowing, is not necessarily that it does any effects new to the demoscene, but that it does them on the IBM CGA, something never previously thought possible. The IBM CGA adapter was a very limited device. It was ill-suited for games, and one of the reasons why was a lack of a vsync interrupt. Other computer systems and most video game consoles have some sort of interrupt that triggers either per frame or multiple times per frame, to signal a running program or game that the CRT's raster was in some known position on screen. This would be useful for example if you didn't want to draw or erase things in video memory while the screen was scanning out - doing so would lead to flicker, or in the CGA's worst case, visual artifa...

First seen: 2025-05-19 09:54

Last seen: 2025-05-19 17:55