(Replying to PARENT post)

I wonder how common were full game VMs in the 90s. For a game older than myself, wouldn't a VM layer incur a great performance penalty on PCs from that time?
πŸ‘€burglinsπŸ•‘2yπŸ”Ό0πŸ—¨οΈ0

(Replying to PARENT post)

It was far more important to have the same software work on Amiga, x86 (DOS), Mac and the whole slew of different machines than came and went.

Today we have fewer machines than the great explosive growth of the 80s.

Consider that most 'software' today is JavaScript interpreted by the Web Browser. It's not like those portability concerns didn't exist in the 80s, if anything, it was harder because you had to make your own interpreter back then.

---------

Many (maybe most?) video games seem to have been written in a VM, at least before Doom / high performance 3d graphics.

I think console games were in C/Assembly for performance.

But 'computer' games at that time was before the standard IBM PC or at least, before the PC won and Microsoft achieved dominance. When you didn't know if Amiga, PC98, IBM PC, Mac, or others would win it only made sense to write a VM.

SCUMM (Monkey Island and many others) comes to mind.

πŸ‘€dragontamerπŸ•‘2yπŸ”Ό0πŸ—¨οΈ0

(Replying to PARENT post)

Yes, but you weren't doing things like _Elite_ in these sorts of special-purpose VMs. Aside from the portability issue (extremely important when platforms had the lifespan of mayflies back then as Moore's law blazed along full speed), VMs also got you compression. A full compiled binary might be exorbitantly expensive in disk/tape space, not to mention RAM. But a very small VM could make a custom-tailored language to interpret on the fly, and save a ton of space where you needed to sweat every kilobyte. (Think about the different in size between `print "Hello world!"` and the default compiled binary.) It didn't matter how fast your text adventure ran if it couldn't fit in X kb of space.
πŸ‘€gwernπŸ•‘2yπŸ”Ό0πŸ—¨οΈ0

(Replying to PARENT post)

During the heyday of assembly language, VMs were common in business software as well. It made porting to different types of systems easier in a time when standards-compliant C-language compilers targeting a variety of systems did not yet exist or were very expensive.
πŸ‘€ashleynπŸ•‘2yπŸ”Ό0πŸ—¨οΈ0

(Replying to PARENT post)

The trick to these earlier VMs, from the Infocom Z-Machine and Wizardry's interpreted Pascal code, through SCUMM, Sierra AGI and SCI, Another World, the Horrorsoft games, etc., is that they recognized that the games they were making were primarily going to be "content-delivery mechanisms": lots of text and graphical assets, driven by relatively simple computations: the authoring constraint is only related to the hardware in terms of I/O and data compression. So the code that was being run by the interpreter was mostly run-once "initialize the scene" and then some animation timers.

The opposing idea is represented more by arcade gaming, and later, stuff like Doom and Quake: The game is relatively intimate with the hardware in what it simulates, while the kind of definition that makes up a scene is more on the order of "put a monster here and a health pickup there", which aligns it towards being map data, instead of scripted logic.

πŸ‘€syntheweaveπŸ•‘2yπŸ”Ό0πŸ—¨οΈ0

(Replying to PARENT post)

Depends on what you consider 'full game VM'. Adventure games from Infocom ran all game code on a VM, and so did the graphical adventures from Sierra and LucasArts. The latter two used some native graphics primitives of course.
πŸ‘€bzzztπŸ•‘2yπŸ”Ό0πŸ—¨οΈ0

(Replying to PARENT post)

I don't know any more full game examples, but...

Earthbound (SNES, 1994) contains TWO complete scripting systems, one for the dialog system (which is occasionally used for things it shouldn't be; most of shop logic is in it), and one for scripting sprite movement. The dialog script is actually quite impressive and easy to use; I'd consider implementing a similar system even in a modern RPG. The sprite movement script is trash, significantly harder to work with than games that use raw assembly. Apparently that movement script system was actually a common in-house library at HAL, dating back to the NES era, but I don't know too much about that history.

Also most of the game's assembly was actually compiled from C, which was almost unheard of for console games at the time.

πŸ‘€jtolmarπŸ•‘2yπŸ”Ό0πŸ—¨οΈ0

(Replying to PARENT post)

Well the idea of a vm wasnt to foreign if my reading of computing history is right. Consider that java launched in 1993 or 94 and its big claim to fame was its portability between systems, and that was because of the jvm, or java virtual machine.

I don’t think virtual machines and emulation are that new of a thing. Virtualizing x86 at full speed on consumer hardware has been a thing for, what, 15 to 20 years? And sure that requires special processor features, but remember that systems that came before that that would need to be emulated had even less computational demands. Iirc, a widely used pos software from the 80s has been running in emulation on pos hardware that far exceeds its requirements for the last 25 years, at least.

Also, my understanding is that lots of crucial government and business software runs on many layers of virtualization.

And my last recollection from what I’ve gathered is that, really until around the mid 90s a lot of operating systems made until then were pretty much hypervisors that ran programs that were virtual machines themselves. Multitasking was simply being able to route hardware resources to a given program, which was sorta its own environment.

πŸ‘€7speterπŸ•‘2yπŸ”Ό0πŸ—¨οΈ0

(Replying to PARENT post)

Memory was often the constraint on low-end computers "back in the day", so code density was a reason to have a VM. This is why Wozniak shipped a VM in the Apple II's ROM.

https://archive.org/details/byte-magazine-1977-11/page/n147/...

πŸ‘€andrewfπŸ•‘2yπŸ”Ό0πŸ—¨οΈ0

(Replying to PARENT post)

VM already existed since PL/0 which is the prototype of Pascal. It is also known as P-code and to.be honest it is fine. Especially when you can leverage JIT which trades memory space for gains in speed.
πŸ‘€stevefan1999πŸ•‘2yπŸ”Ό0πŸ—¨οΈ0

(Replying to PARENT post)

"older than myself"

#rightinthefeels

πŸ‘€thepawn1πŸ•‘2yπŸ”Ό0πŸ—¨οΈ0