Mode X
My son has been struggling to memorize his math facts (addition, subtraction, and multiplication tables) at school. He is obsessed with hockey – so I took a couple of nights last week and hacked together a simple math quiz JavaScript to help him practice. After answering one-hundred problems, he earns three minutes of ice time (you need a keyboard to play). It was a fun diversion from work – and it reminded me how/why I ended up getting into computers in the first place – games.
But not just any games. I grew up in the golden age of side-scrollers, and I idolized Apogee games¹. Apogee published games such as Commander Keen, Duke Nukem, and Secret Agent. Apogee would typically split the games into three parts and publish the first part free on the Bulletin Board Systems. If you liked it, you could mail in a money order to get parts two and three. In theory, it is a great system – but the cross-boarder part made it a bit too difficult for a young kid from Canada to navigate – so I only ever got to play the first part of the games.
By the time Apogee and Epic were publishing these side-scrollers, I had moved beyond coding in BASIC and Pascal and started teaching myself C. However, I could never produce anything that could scroll smoothly using Borland’s Graphis Library. That is until I discovered Mode X.
In a July 1991 issue of Dr. Dobb’s Journal (that I somehow managed to get a copy of in rural Ontario – thanks Dad!), Michael Abrash wrote about an alternative graphics mode for IBM VGA graphics hardware he coined Mode X. Mode X was a variant of VGA Mode 13h that had five significant advantages that Abrash highlighted:
It took me a long time to dig in and understand how to make use of Mode X – but I eventually managed to get my side-scrolling engine to work and wrote a bunch of corresponding tools (tile editors, sprite animators, level designers, etc.) About the only thing I never really did was write and release a proper game on my engine - it turned out my passion was for building the tools and not the games.
The world mostly moved on from side-scrollers, with games like Doom and Quake totally dominating the PC market. But I still love the simplicity of hopping from platform to platform in a two-dimensional world!
Recommended by LinkedIn
Did you ever code for Mode X? Share my love for two-dimensional platform games? I would love to hear your thoughts in the comments section below.
Be Happy!
Like this post? Please consider sharing, checking out my other articles, and subscribing to my weekly Flegg’s Follies newsletter for more articles on software engineering and careers in tech.
Footnotes:
Please note that the opinions stated here are my own, not those of my company.
I coded an x86 assembly graphics library against that mode. Sadly I didn't know about the page flipping feature and spent an insane (and apparently pointless) amount of time trying to unsuccessfully eliminate tearing 🤪 This is what happens we you don't have Stackoverflow...
Mode X was great! Wrote my own graphics library in a mix of Pascal & assembly!