5 ms·
Finding the Lost Vikings – Reversing a Virtual Machine
- sandusk 10y agothatsdersd
- caf 10y agoI spent most of a Sydney-Vancouver flight rediscovering this game on the seatback IFE (AirCanada used to have a SNES emulator of some sort in their setup).
- douche 10y agoIt's really kind of cool how many of these old games were built on top of their own custom vms. Of course there is the Infocom Z-machine, going way back, that made porting between all the different microcomputers of that era somewhat easier. Another interesting writeup of this kind of an architecture is for Another World [1]. Along those lines, I wonder in the case of The Lost Vikings, how much of the game code was able to be reused between the different platforms it was released on (SNES, Genesis, PC, maybe Mac, I don't remember?) [1] http://fabiensanglard.net/anotherWorld_code_review/index.php http://fabiensanglard.net/anotherWorld_code_review/index.php
- digi_owl 10y agoI suspect the mix of CPUs in use back then had an impact. After all, you had the 6502, Z80, 68000, and various x86 generation all bouncing around (the 486 was introduced in 1989, this game was released in 1993). The Sega Genesis/Mega Drive for example had both a 68000 and a Z80 inside it, while the SNES used a 6502 clone.
- vertex-four 10y agoThe Mega Drive's Z80 was essentially just powerful enough to play music and sounds - it couldn't really be used for much else, leaving the 68k to focus on gameplay and manipulating the sprite-based Video Display Processor.
- boomlinde 10y agoOnly relatively speaking. The MD runs the games of the previous generation (Master System) natively on the Z80. The hardware of the MD, including the VDP and audio, is basically a superset of that of the MS.
- vertex-four 10y agoWhile true, people expected better audio out of the Genesis than the Master System, which involved more processing power.
- khedoros1 10y ago> while the SNES used a 6502 clone The NES used a 6502 clone, with a few minor changes (no BCD mode, I think some changes to interrupts, addition of sound-generation hardware). The SNES used a 65c816 clone, from the same family of chips.
- pjmlp 10y agoSo many hours wasted playing this game! :) Thanks for the article.
- Peaker 10y agoWhy did they write their own VM? Was it sort of a write-once, run everywhere thing? So they can reuse the game code on various platforms?
- groby_b 10y agoHaving written games back in that time, I can at least tell you why I wrote my own VM: You get a custom language/compiler, which makes iteration time significantly faster than recompiling your game yet again, for yet another tiny tweak. Or, worse, writing every bit of your game in assembly. (Worse in the sense of time consumed. In the sense of fun had, the VM approach takes some of that away ;)
- ryiron 10y agoThis is the impression I get from reversing it: the virtual machine mostly assists quickly porting to other platforms. I previously reversed another game engine called Comprehend (for 1980s text/graphical adventure games) which also had a VM. I ended up talking with one of the original developers, who said that portability was a major reason. Their company wrote the original Apple 2 implementation, and then contracted development for the other platforms out, so they just provided specs for the VM. The Lost Vikings development may have been similar. In the Lost Vikings the VM implementation was almost certainly written in assembler. There are various tricks used in the binary which I don't think compilers of the day were capable of. The other parts of the game also appear to have probably been written in assembler, which I think is interesting since it was developed quite late in the DOS era.
- ekianjo 10y agoanother world used a similar technique.
- corysama 10y agohttp://fabiensanglard.net/anotherWorld_code_review/ http://fabiensanglard.net/anotherWorld_code_review/
- 10y ago
- owlninja 10y agoCool article and great game! Here is a video of someone doing a speedrun using two controllers at once: https://www.youtube.com/watch?v=5LkoTGv2z6E https://www.youtube.com/watch?v=5LkoTGv2z6E
- JustSomeNobody 10y agoLooks like Joel Spolsky in the second row behind the gamer (after he moves).
- _halgari 10y agoFun fact: The Lost Vikings was created by Silicon Synapse. They were later renamed "Blizzard Entertainment" and went on to make Warcraft/Starcraft. The Vikings are now featured in Blizzard's game Heroes of the Storm: http://us.battle.net/heroes/en/heroes/the-lost-vikings/ http://us.battle.net/heroes/en/heroes/the-lost-vikings/
- mtnygard 10y ago"The Lost Viking" also appears as a game-in-a-game. It's an arcade console in the bar on the Hyperion. It is a playable 2D scrolling shooter that features a Viking (the SC2 unit) shooting through waves of pattern based enemies.
- PhasmaFelis 10y agoAnd you can download the original for free, along with a couple of other Blizzard classics: https://us.battle.net/account/download/?show=classic https://us.battle.net/account/download/?show=classic
- csense 10y agoWhoa, this is awesome!
- jeff_harris 10y agoGreat writeup!
- ryiron 10y agoThanks to whoever posted this, and glad that people are enjoying a little bit of DOS games nostalgia. The tools I've developed (also linked in the blog post) are all public domain if anybody wants to play around with them: https://github.com/RyanMallon/TheLostVikingsTools https://github.com/RyanMallon/TheLostVikingsTools
- ayuvar 10y agoThis kind of closes the loop on an interview I read a long time ago in a magazine. When Blizzard went to make the Mac (System 7) port of Warcraft 1, the guys that were interviewed about it mentioned that the port was relatively easy because the game code was relatively insulated from the OS and all they had to do was update the OS-side code and keep the game logic running in "a thread." (their words) Probably this virtual machine model was continued at least to Warcraft 1, which makes a lot of sense for a shop that was used to doing console ports of their PC titles at the time.