
Recompiling the Lost Vikings - ProfDreamer
https://ryiron.wordpress.com/2017/03/26/recompiling-the-lost-vikings/
======
bbrian
Cool! Back in 2001 I had the domain TheLostVikings.com

Wow, it's still on the ISP hosting. I haven't seen this in years:
[http://homepage.eircom.net/~lostvikings/](http://homepage.eircom.net/~lostvikings/)
The download links are broken but lots of animated gifs are still there.

~~~
PhasmaFelis
I miss the internet where you could find stuff like this.

~~~
guardian5x
This should prove, that you can still find stuff like this.

~~~
PhasmaFelis
There's old stuff still kicking around, but it's all 15-20 years old. Nobody
makes new personal homepages like this anymore.

------
PhasmaFelis
FYI, Blizzard has a modern-PC-friendly free download up, along with
Blackthorne, Rock'n'Roll Racing, and Diablo II (!):
[https://us.battle.net/account/download/?show=classic](https://us.battle.net/account/download/?show=classic)

~~~
saganus
I don't see D2 :(

Could it be that they have country-based restrictions?

~~~
vbezhenar
They are selling Diablo 2 and it's a relatively modern game supporting latest
Windows/macOS, you have to buy it and then you can download it.

~~~
saganus
Yeah, I thought it was too good to be true.

I mean, I do have my original D2 1.0 disc... but I'm not sure it works on
Windows 7 or not. I just thought this could be a re-release of sorts.

Now that I think of it... Blizzard is still patching D2 apparently. No reason
to give it away for free I guess.

"Diablo II v1.14b Patch Notes (April 7, 2016)"

[https://us.battle.net/forums/en/bnet/topic/20742964214](https://us.battle.net/forums/en/bnet/topic/20742964214)

~~~
bdsa
You can register your CD key with Battle.Net which puts Diablo II in your
"library" for download in fully-patched installer form. It was handy for a LAN
night with friends because sharing the installer around was easier and quicker
than swapping discs.

~~~
saganus
Aha!

This I did not know.

Thank!

------
niftich
Really neat project! The tools are released under CC-0 on Github.

The HN thread [1] on Part 1 went into discussion about how platform
differences and the prospect of more rapid iteration meant that several early
games were written with VMs. It's amusing that when we resurrect these games
today, we are often running a VM that emulates an old architecture that then
runs the original game's VM in turn.

[1]
[https://news.ycombinator.com/item?id=13694524](https://news.ycombinator.com/item?id=13694524)

~~~
0x0
But it also means that sometimes someone reimplements the actual VM! :)
[https://www.scummvm.org/](https://www.scummvm.org/)

------
mileycyrusXOXO
The Lost Vikings was a favorite of mine growing up. I remember jumping amd
yelling at the screen while playing it with my sister.

I have always had a passion to hack and mod anything and everything. I think
I'm going to make some time this weekend to see what I can do with The Lost
Vikings.

Thanks for sharing.

------
faragon
Looks like Game Maker (a tool for creating video games using scripting). Very
interesting stuff. Anyone knows if other ports of TLV, e.g. SNES, use the same
virtual machine?

~~~
pvg
One would think so but I went and checked. In a Lost Vikings SNES ROM image,
search for a sequence of VM opcodes. The turret program shown has a bit that
goes 97 00 01 00 9C 18 08 2F 00, doesn't seem to contain any addresses and is
long enough to not just appear at random. It shows up in the ROM image so it
looks like yes, the VM was used in the SNES version too.

~~~
ryiron
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.

~~~
pvg
The image seemed to be uncompressed, or at least, the relevant parts of it
were uncompressed. I'd guess they had to be much pickier how what and where to
compress, given the constraints of the system.

~~~
dyselon
Accessing the cart was as fast as accessing RAM, and you didn't have much RAM
to go around, so I imagine there just wasn't much advantage to it.

~~~
pvg
No, compression was used extensively. Just often hand-rolled and for specific
things. [https://multimedia.cx/eggs/nes-
compression/](https://multimedia.cx/eggs/nes-compression/) has a link to an
RLE implementation used in some Zelda game.

------
caf
The way each object is implemented in the VM reminds me a lot of the way you
wrote objects in ZZT
([https://en.wikipedia.org/wiki/ZZT](https://en.wikipedia.org/wiki/ZZT)).

------
willvarfar
> The Lost Vikings Virtual Machine however does not have a stack. It has a
> single temporary register, object fields and globals.

The technical term for this architecture is an "accumulator machine"?

------
forvelin
Thanks for good blog post, this just goes better and better.

I wonder what Blizzard thinks/would think of this effort ?

