Hacker News new | past | comments | ask | show | jobs | submit login
Modifying Microsoft Flight Simulator 4 to run on three immersive monitors (tinmith.net)
259 points by ywain on June 13, 2017 | hide | past | favorite | 70 comments

Nice work! I still have fond memories years ago of the first time I managed to get twin graphics cards working properly with FS so I could have the instrumentation on my PC screen and the outside world projected on the wall in my office in front of me.

Sigh, I still have drawers full of CDs of Flight Sim expansions etc. sitting around. Terribly sad that Microsoft canned the entire team and the project will not move forward any more, after so many decades. I still have really vivid memory of seeing FS1 run for the first time on an IBM PC monochromatic green screen - achieving the impossible even before graphic cards were a thing!

Yeah, I'm certain that lots of people bought FSX, so it always puzzled me that they didn't do anything about it as the years went by. Granted, FSX was truly crippled by terrible performance, and it really hasn't aged well. It doesn't even run all that well on today's hardware, more than a decade later.

That said, maybe DTG will do something with it.

The legend around Flight Simulator was always that there was one and exactly one reason why Microsoft sold it: because Bill Gates thought it was cool.

Gates stepped down from his day-to-day responsibilities at MS in June of 2008. The entire Flight Simulator team was laid off in January of 2009.

> The entire Flight Simulator team was laid off in January of 2009.

A fair number of them got positions elsewhere in the company, I ended up working with a few of them.

The story I was told about its cancellation are a bit more complex, but still nefarious.


Probably why the Excel team built a mini flight simulator right within the spreadsheet itself?!? :) [0]

[0] - https://www.youtube.com/watch?v=-gYb5GUs0dM

I remember that blowing our minds when we first saw it.

I miss all the Easter eggs in software. These days people just add the Konami code JS to their web site or app then pat themselves on the back for being original.

In the pre-win95 era, I think more MS programs had easter eggs than lacked them. Both solitare and minesweeper had cheat-codes (I used the latter to defeat my sister's high-score of 14s on small, getting a 2s. She was ufrious, erased all the high-scores and spent days getting her score back down to that).

I don't think Dovetail will do anything past act like a third party payware developer under the guise of Steam DLC. At least they took initial steps to fix the horribly unoptimized engine which runs pretty smooth other than still loving to crash in certain situations.

>and the project will not move forward any more, after so many decades.

Lockheed Martin licensed ESP from Microsoft and develops it as Prepar3D.

Graphic cards were definitely a thing back then... unless FS1 rendered to ANSI art?!

No, they were not. Flight Simulator 1 was released for PC in the early 1980s (see 1), and even earlier for Apple II. Consumer graphics cards were not widely adopted until quite a bit later.

[1] https://en.wikipedia.org/wiki/History_of_Microsoft_Flight_Si...

I'm sure this is just arguing about definitions, but the Color Graphics Adapter (CGA)[1] was a graphics card. I don't know what else you could call it.

[1] https://en.wikipedia.org/wiki/Color_Graphics_Adapter

I think the distinction you want is that CGA was a graphics card but later things that made graphics faster were graphics accelerators. These days a graphics output without at least some hardware acceleration is unthinkable.

IIRC the MDA was on a multifunction card. My first PC clone was a 286 with an HGA though, so can't say for sure.

Ok, that's fair. The CGA is technically a graphics card. I personally don't consider the true graphics card era to have started until VGA became a thing in the late 1980s.

A simple way to think about it is that IBM-PC monochrome never had addressable pixels like Apple et al monochrome did.

IBM's MDA cards didn't support direct pixel addressing, which is one of the reasons I had a Hercules Graphics Card (original from 1982).

I spent way too much time trying to get various games to work with SIMCGA. Not only did it cause a massive slowdown (single-digit fps - or worse - was common) as it copied writes to VGA addresses into Hercules address space, the conversion from (e.g.) 320x200@16 onto a display that only supported 720x348@1 created usually required dropping/doubling lines at non-integer ratios, skewing the aspect ratio, and other nasty hacks[1].

I was very happy, years later, when I finally upgrade to a Trident TVGA9000B.

[1] http://3.bp.blogspot.com/-To4gB6TtJJs/Uwa-qlr0_rI/AAAAAAAAA9...

No, I am pretty sure this was pre-CGA... I worked for an IBM dealer back then, shipping the original IBM PC.

I recall it being a BIG deal when FS ran on the old 80x25 green screen monitor. This was before even the Hercules display adapter that let you manipulate things at the pixel level. IIRC the Microsoft engineers were one of the first to do pixel level animation on essentially a text display system.

I may be remembering incorrectly, but I am fairly sure my recollection is right, as that was quite a defining moment in computing for me.

The original IBM PC from day 1 shipped with either a text-only monochome display adapter (MDA) or the color graphics adapter (CGA) with the corresponding monitor. So graphics cards were certainly a thing from the beginning.

Thanks for clearing that up. I seem to remember that we had MDA only versions coming through the workshop in the early days, but I believe that was because the CGA version (or the associated monitor) was quite a premium priced option here in Australia at the time - or perhaps they weren't readily available from the US?

Whichever the reason - I know that it was a while before we saw a CGA version come through.

You're right in that the original IBM PC shipped with optional CGA graphics.

Searching around I'm finding conflicting information on Flight Simulator 1's use of the black & white 640×200 CGA mode and support for a colour mode targeting NTSC composite output. Maybe the original release supported both?

A trick for finding memory locations of some variable is to take several memory dumps changing everything you can about the game state except the thing whose location you are looking for, so fly around a bit, change altitude, change all the control positions, then change the thing you want and take another memory dump.

Anything that changed in the final dump, but didn't change in any of the previous dumps is likely to be what you are looking for.

Back in the 90s I used to do this with a tool called "Desktop Hacker" on RISC OS. http://www.doggysoft.co.uk/dh/compr.html

There was also the series of "Action Replay" devices for doing this automatically in hardware. I still have an ISA one for PC.

And most emulators worth using also have this built in. Nice way to see the ending of that NES game you could never finish as a kid, thanks to it being "Nintendo hard"...

There was a great blog post a while back posted here (I think it was a blog post) about a guy who was a summer intern way back when for a company that published cheat code books and he job was to use a device similar to that or an Action Replay device to find them, record them, name them and move on.

Cool! I'll have to take a look at his DOSBox debugger.

I've been wanting to do the same thing, but with the 1993 Star Wars: X-Wing game. Eventually I want to build a cockpit with a wrap-around screen and a specialized control panel with switches and indicator lights.

A few years ago, I used Cheat Engine on the Windows version of the game. I figured out the memory locations of some of the variables like shield and laser levels, but then I moved on to other projects.

It would be great if Disney were to release a modern update or sequel with the configuration options I need for this. It's good that they did release the original games on GOG.com.

I probably spent months in front of FS4.... would have loved to have dual screen back then! It ran almost perfectly on a 286 machine... did so many transcontinental flights from San Francisco to New York. The graphics were bad, yet imagination made me feel like I was there.

I still crank up Jetfighter II in Dosbox when nostalgia grabs me.

To me the less detailed graphics are much more "readable" than the modern GPU powered stuff.

Imagination is why nobody complains about the graphics of back in the day. Or even games like Dwarf Fortress, UIs like Vim, etc. The hurdle is that getting into a game that take a step backwards in terms of graphics gets difficult.

This is very cool, but the perspective doesn't seem quite right. See the road as it crosses between monitors[1] in the first video for instance. Of course he's doing this whole thing with crazy multiple game instances so it's fair enough that it's not perfect.

Most games (even AAA titles) have even worse problems with multi-monitor setups, often just staying with a basic rectilinear projection that makes the siides super stretched out.[2] We could do with better camera projection support in games in general.

[1] http://i.imgur.com/RQA43aV.jpg [2] http://i.imgur.com/laY2f4w.jpg

Actually the projection is correct, but the camera is not exactly at the center of projection, so it appears that the lines are bent across the monitor edges. However, if you place your head at the exact center of projection, they look correct. I'm actually doing three separate projections, instead of just stretching one image across three displays. The GoPro field of view was not able to capture everything, so I had to pull it back a bit, and so its not perfect. A spherical camera would have done a better job here.

Ah of course! Thanks for that explanation. It already looked way closer to correct than most games can manage as well.

Man I'd love to try this. I played a lot of Flight Simulator 5.1 back in the day, which actually included the whole Flight Simulator 4 world as well - you could choose to load it in from one of the menus. The untextured terrain was so much harder to read though!

I remember you could do this with DOS Doom using the -left and -right parameters: you just needed three PC's that could run Doom AND a local area network. Quite expensive in 1993.

There was also a parameter to use stereophonic sound if your sound card supported it (mine didn't), so you tell which side monster sounds were coming from! Mind-blowing at the time.

Ah...I remember having a Guillemot MaxiSound 64 (no clue what version exactly...), and it did indeed feature incredible sound like that, but I wonder if that was later and I mix it up with Quake? Quick Google says the chip was released in 1994, so maybe, maybe not...

Awesome! Thats the great hacker spirit! May I ask how much time it took you to accomplish this?

It only took me a few days, maybe 20 hours total? ... I started this back in January but it took me a while to capture the videos and write it up since I've been reworking the physical frame to make the monitors fit closer.

1/4 of the time was spent running GDB trying to find the memory locations and work out the encoding scheme.

1/4 of the time was spent getting familiar with DOSBox, building on Ubuntu, and syncing the data around via UDP.

1/4 of the time was spent trying to automate the start up so I didn't need to press a hundred keys manually to configure all the displays each time I restarted it.

1/4 of the remaining time was capturing nice videos and writing it all up :)

I've done hacks like this before ... back in 2000 I worked on the team that built ARQuake but we had source code http://www.tinmith.net/arquake/

Really cool. So if there 3 separate instances running, how do they stay in sync? Surely these 18 bytes are not everything? So you feed the same input to all 3 instances at the same emulated time?

The left and right FS4 instances are paused at startup, while the front view is the master. The FS4 renderer seems happy to have the XYZ HPR values overwritten behind its back and it refreshes the display constantly with the latest values. So the gauges don't work on the left/right displays - ideally I'd get rid of them, but removing the instruments causes the left/right 3D view to not align with the front display any more.

I imagine with more studying of the memory locations, you could sync over the instruments too. Or if you really wanted to, you could just grab the video memory for the instruments on the master and blast that over the network too. Displays were so small back then that you could easily compress and send this.

Looking at the gauges on the side monitors, things like vertical speed read zero. I guess the programs running the side views are in a lookaround mode with the viewpoint being banged in manually by the network hack. Only the center view is the master actually simulating the flight.

This was linked on /r/programming and I thought it'd interest some people here, but I'm not the post's author. I wish I'd even have thought of trying to make a nearly 30 years old piece of software across multiple monitors!

Thanks for sharing my article here! I didn't realize how popular it would be! :)

Haha, thanks for writing it! :)

Really interesting idea of running separate instances and synchronizing them. I wonder if this could be done in legacy games to support VR - an instance for each eye - and each instance's game state and camera position synced except for slight horizontal offset for left eye vs right eye. Xwing VR!

You'd need to be able to offset the camera position per-instance, which I'm not sure the old X-Wing games can do. I mostly played Alliance, which I'm pretty certain cannot; it has several camera options, but I don't recall any that allow for arbitrary positioning. On the other hand, if you're interacting directly with the game's memory space rather than just its UI, that may not actually be an issue.

Assuming you can't reposition a camera, you could try offsetting the ship position on one of the instances, but then you'd probably have issues with the simulation states diverging - I suspect a big part of why it can be made to work with Flight Simulator is that the state of the aircraft itself is more or less the only thing that's actually being simulated, so you can manipulate it to a fare-thee-well without affecting anything else. Contrariwise, if TIE fighter shots hit the ship in your left-eye instance, but miss the ship in your right-, that'a a much harder problem to solve.

What a wonderful throwback! I still remember the big aircraft manual that came with my Flight Simulator package and spending so many hours reading through it just trying to figure out how to get the plane to take off. An excellent game and a great hack!

Speaking as someone who used to run triple screen gaming before switching my middle for a 34" ultrawide, that's truly awesome. Additional kudos for the C64 + 1541(?) floppy drive photobomb. :)

Haha, glad you noticed the C64 and 1541 :) That was my first computer :)

FS2 is also available for the C64: http://fshistory.simflight.com/fsvault/fs2-c64.htm

Another project, perhaps? :)

The C64 had such a tiny amount of memory, you could probably easily sync the entire state of the machine over the network :)

Nice. I started with the Vic 20, and eventually a tape deck, then progressed on to your setup. :)

When it was still "Sublogic" it was even more amazing.

It ran on the TRS-80 with 128x64 resolution:


I played FS4 a lot as a kid, but I don't remember there being a jumbo jet with the modified cockpit shown in one of the screenshots. Does anyone know what that is about, was that an add-on?

Yes, it was coming with the “Aircraft and Scenery Designer”.


Was there a full screen mode that didn't show the instruments? That would be nice for the side monitors. As much as I played it, I don't remember if that was an option.

Yes, you can hide the instruments. But then it changes the projection and then nothing lines up across the displays. You need to hide the instruments on all or none of the displays.

Perhaps you could add a fourth display below center for the instruments, and have the three mains just show out-the-cockpit views. The rendering method you're using seems like it would generalize that far, with the simulation running on the VM displaying the instrument panel, and the center head synced the same way the sides are now.

(Don't mind me, though - I'm just letting my old flight-sim bug live vicariously for a while through your extremely impressive setup...)

Unfortunately I don't have any more space below the center monitor to put another display :) or it gets in the way of the yoke. I tried to fit a smaller LCD display in there but it just got in the way and slowed X-Plane 11 down with an extra display to render.

Please can someone do this far the BBC Micro version of Elite?

This should be possible with any emulator for old school systems, like 286 with DOS, C64, Atari, etc. All you need is the ability in the game to "look left" and "look right" somehow, and tune the field of view for correct projection. If the game can't do that, then it might not be possible.

Also, the hacks in the blog post won't work as well for anything newer than DOS, like Windows games, since there is an OS in the way and writing over memory locations gets a lot harder. You would need to approach the problem differently.

this one time when you realize how a working solution can be cool 30 years after, even improved and still working to the benefit of humanity. do we need to rush with all new these paradigm shifts... maybe evolution of computing needs to take a breath and introspect on all 20th century achievements and improvements before reinventing the wheel.

Bro there's an option to use up to 6 monitors buried in the preferences, FS4 was used for some production simulators at the time, don't forget.

No I'm only joking, well done.

Excellent read! Thanks for posting this to HN.

why not use ms f sim X like the real flight simulators?

I built the set up in January to work with X-Plane 11, which I wrote up here: http://www.tinmith.net/wayne/blog/2017/01/immersive-flight-s...

But I wanted to see if it was possible get the original FS4 working on this, because it seemed quite impossible.

I see. For the challenge. Thanks for the answer!

that's so badass!

What a great hack!

Why bother modifying closed source code when you can just use FlightGear ?

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact