6 ms·
Recompiling the Lost Vikings
- forvelin 10y agoThanks for good blog post, this just goes better and better. I wonder what Blizzard thinks/would think of this effort ?
- niftich 10y agoReally 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 10y agoBut it also means that sometimes someone reimplements the actual VM! :) https://www.scummvm.org/ https://www.scummvm.org/
- faragon 10y agoLooks 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 10y agoOne 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 10y agoCool. 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 10y agoThe 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 10y agoAccessing 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 10y agoNo, 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.
- pvg 10y agoOh I bet it's because they ran the VM programs straight out of ROM. This is saves more than compressing and then wasting precious RAM on them. Not an issue on the PC.
- ryiron 10y agoIt 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 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.
- bbrian 10y agoCool! 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 10y agoI miss the internet where you could find stuff like this.
- guardian5x 10y agoThis should prove, that you can still find stuff like this.
- PhasmaFelis 10y agoThere's old stuff still kicking around, but it's all 15-20 years old. Nobody makes new personal homepages like this anymore.
- tawayway 10y agoHah, I haven't thought of Eircom hosting in a while.
- jyriand 10y agoToo bad visitor counter doesn't work. It's interesting how back in the day lot of sites had visitor counters displayed. Still wondering why this was done, possibly because this was the only way author could see the count of his visitors himself. Edit: typo.
- c3833174 10y agoWorks on every free host, uses few resources, no javascript, visible to everyone, nice addition to every personal website.
- caf 10y agoThe 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).
- PhasmaFelis 10y agoFYI, 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 10y agoI don't see D2 :( Could it be that they have country-based restrictions?
- vbezhenar 10y agoThey 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 10y agoYeah, 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 10y agoYou 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 10y agoAha! This I did not know. Thank!
- mileycyrusXOXO 10y agoThe 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.
- willvarfar 10y ago> 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"?