Let's talk about Microsoft Flight Simulator! The very first one. The OG.

This is what you see when you boot the game:

The game uses VRAM as scratch space when initializing the game, so we get some pretty garbage on the screen. This has been reported as an emulator bug on more than one occasion.

Butwhy.jpg? Well, consider that this game supported the original IBM PC, which at the time was being sold in configurations with an anemic 64K of RAM.

Having an extra 16K of scratch space was a considerable bonus.

It's free real estate!

Another fun thing about the game, is that it only runs on an 8088 CPU.

The reason has to do with some obscure behavior surrounding divide-by-0 (or underflow) exceptions.

On the 8088, a division by 0 is a "type 0 interrupt" and the interrupt handler returns to the address of the next instruction.

On the 286+ CPUs, a divide by 0 is a CPU exception, and the exception handler returns the address of the faulting instruction.

You see, Flight Simulator divides by 0 on every frame, perhaps because the author hated their math teacher.

It doesn't matter because the code continues after Interrupt 0, and carries on.

On the 286, the exception returns back to the same DIV instruction, which faults again, looping forever.

Flight Simulator used to be one of the titles that companies would use to advertise full IBM PC compatibility. It's also a good emulator test.

Flight Simulator's black and white graphics hold a surprising twist. You see, similar to the Apple II, the CGA was really designed for composite color output.

We're used to its infamously ugly 4 color palette, but when connected to a TV or composite monitor, 16 rather pleasant colors were possible.

This is possible because the high resolution mode of the CGA happens to have a pixel width 1/4th of the NTSC color carrier.

By adjusting the patterns of dots, we can, in effect, shift the phase of the color interpreted by the display.

4 pixels = 2^4 = 16 colors.

Microsoft didn't really write Flight Simulator, of course.

Like most things they were initially famous for, they paid someone else for it.

Bruce Artwick originally developed Flight Simulator for the Apple II, and its 6502 CPU. Microsoft wanted something to show off the PC's capabilities, and cut a deal with him to port it to the 8088.

@gloriouscow I was recently playing around with Artwick's company's backport to other platforms, Flight Simulator II (specifically the Atari 8-bit version):

https://mmcirvin.dreamwidth.org/511330.html

Captcha Check

@mattmcirvin Very cool!
@gloriouscow The Atari ST version (which had a bunch of new features) was actually the one I played the most back in the day, but my ST emulator is not working well at the moment.
@gloriouscow the Atari ST and Amiga versions of FSII had a lot of new features that only got to MSFS for IBM compatibles in version 3 (the Learjet, the window based UI, the chase camera, a new San Francisco map). But I think they were developed on Microsoft's dime too, but it was for the one and only release of MSFS for Macintosh!
@gloriouscow (this being in one of the intermittent eras when Microsoft was leaning into Mac development)

@gloriouscow Hmm, the Wikipedia article on that Mac release gives a slightly more complicated story:

https://en.wikipedia.org/wiki/Microsoft_Flight_Simulator_(1986_video_game)

Those 16-bit versions with all the new features started with the Amiga Corporation, not yet acquired by Commodore, requesting an FSII port for the Amiga. Amiga got bought, Artwick suspended development; then Microsoft jumped in and commissioned it as Microsoft Flight Simulator for the Mac. Then subLogic finished the Amiga and Atari ST ports with the new features (they are essentially 100% identical to one another).

And there never was another version of MSFS for Mac, sadly.

Microsoft Flight Simulator (1986 video game) - Wikipedia

@gloriouscow just like microsoft adventure and ms-dos, turns out companies just buying other people's work and making it their own isn't a new thing...
@mjdxp @gloriouscow Oh Microsoft didn't pay for Adventure, they just outright stole it: https://www.filfre.net/2011/07/microsoft-adventure/
Β» Microsoft Adventure The Digital Antiquarian

@Kroc @mjdxp @gloriouscow

"Perhaps the closest to moral in this lot was the management of Tandy, who were so unimaginative and so out of touch with their competitors that they couldn’t really be bothered to actively try to wrong them."

LOLOLZZZZ

@gloriouscow my memory said they bought it from Sublogic, but checking wikipedia I see that Sublogic == Bruce Artwick anyway, so that tracks. Sublogic branding was on other platforms, I goess

@gloriouscow A little bit more complicated. What is MS Flight Simulator was indeed made for the IBM PC. Later Artwick published trough SubLogic ports to Apple ][, and other platforms, as Flight Simulator II. Artwick's first Flight Simulator was a more crude simulation (yet awesome!) released two years before, indeed for the ][.

https://en.wikipedia.org/wiki/Flight_Simulator_(1980_video_game)

Flight Simulator (1980 video game) - Wikipedia

@gloriouscow what the

Literally Never Twice the Same Color. Intentionally.

@clacke

The IBM PC was designed around NSTC!

The system's main crystal, 14.3181818Mhz, is 4 times the NTSC color clock of 3.579545Mhz. Divide that crystal by 3 and you get the PC's weird 4.77Mhz CPU speed.

The CPU was rated for 5Mhz operation. They made it 5% slower so they could manufacture the CGA card without its own clock crystal.

Ingenious, or cheapskate?

@gloriouscow @shmouflon CGA mention! πŸπŸŽ‰ also that is such a dope hack