3 ms·
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 vir
by faragon 10y ago
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 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.