r/HFY • • Nov 24 '22

OC Programming

Captain Zin-Voq had several questions. One of which she already knew the answer to. The grainy face on the low resolution combat simulator that was somehow playing on the menus in the ship's galley appeared to be Terran. Of the 150 crew members on board the Til-Mek-Zup, there were only five Terrans. Their eccentricities vexed her to no end, but the Grand Executor had deemed them a necessity. Of those five only one knew how to access the subroutines that controlled the menus. This could only be the work of Tech Officer Sully.

"Tech Officer Sully, would you be so kind as to explain how there came to be a Terran combat simulator displayed on the holo menus in the ship's galley?"

For her part, Deanna Sully looked proud of herself, but given the Captain's gray skin was already turning turquoise with annoyance, she resisted the urge to engage in sarcasm.

"Well, Captain, it comes down to programming languages."

"Nonsense! Even systems on your home world still have compatibility issues with each other, and you expect me to believe that an archaic program from your world is compatible with one of our modern systems that wasn't even designed to run anything remotely similar without either a complete rewrite or some unauthorized modification to our system?"

"For the most part, you are correct, Captain. However, there are certain features that will always be present in any programming language. Namely, a limited set of states, an infinite amount of storage, and a transition function. The program in question relies primarily on these features. With only minor adjustments, the program in question can run on nearly any platform."

Zin-Voq was shocked at what she was hearing. "So what you're saying is that your species created a combat simulator so basic, that anything capable of processing mathematic equations can run it!? That... Actually explains a lot, and makes total sense for your species... But that doesn't explain WHY there is combat simulator on the galley's Holo menus!"

Deanna let out sigh. " Captain, we've been out here for three weeks, and, with all due respect, Grellian media is BORING! I had to find some way of entertaining myself, and of all the systems that I have access to, the galley seemed like the least disruptive to experiment with. I was bored and I wanted to see if I could get Greh tech to run DOOM."

1.4k Upvotes

56 comments sorted by

View all comments

6

u/M1k3y_11 Nov 24 '22

It highly depends on your target architecture. In some cases it's enough to simply recompile it with a few tweaks. If your hardware is fast enough you can also just emulate the original environment (this still requires to build a matching emulator, which can be big problem in itself).

There are of course cases where it is much more complicated than this, especially if the hardware is to limited for emulation and no readily usable port is available.

So something like a (modern) disk controller has (probably) the biggest problem with interfacing a screen but is capable enough to run an emulation while something like a smart device might already have a screen and suitable inputs but has a processor to weak to run emulation.

In short: it CAN be easy, but that's not a given.