HNHacker News
TopNewBestAskShowJobs

ryiron

4 karma · joined February 21, 2017

submissionscomments
ryiron··on Recompiling the Lost Vikings
Cool. Is the data not compressed in the SNES ROMs or were you reading the data directly from memory? In the DOS version the DATA.DAT file contains a bunch of chunks, most of which (including the vm programs) are compressed using an LZSS type compression.
ryiron··on Recompiling the Lost Vikings
It seems likely that they would as the purpose of the virtual machine seems to be to make porting to other systems easier. If you can extract the data files from the SNES version (or another port) then it is possible that the pack_tool (from https://github.com/RyanMallon/TheLostVikingsTools) will be able to extract the chunks containing the virtual machine programs. The format of the virtual machine programs might be a bit different. For example the load/store instructions for globals in DS may not be directly portable to other architectures (at the very least I would expect global offsets to be different). The rest of the vm design appears to be fairly portable though.
ryiron··on Finding the Lost Vikings – Reversing a Virtual Machine
Thanks 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
ryiron··on Finding the Lost Vikings – Reversing a Virtual Machine
This 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.