News for hackers. Stuff that matters.
Re:Recompiling the Lost Vikings by pvg on Wednesday March 29, 2017 @08:22PM (#13991886)
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.
Re:Recompiling the Lost Vikings by ryiron on Wednesday March 29, 2017 @08:34PM (#13991933)
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.
Re:Recompiling the Lost Vikings by pvg on Wednesday March 29, 2017 @08:50PM (#13991992)
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.
Re:Recompiling the Lost Vikings by dyselon on Thursday March 30, 2017 @01:17PM (#13997165)
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.
Re:Recompiling the Lost Vikings by pvg on Thursday March 30, 2017 @02:14PM (#13997609)
No, compression was used extensively. Just often hand-rolled and for specific things. https://multimedia.cx/eggs/nes-compression/ has a link to an RLE implementation used in some Zelda game.
Re:Recompiling the Lost Vikings by pvg on Thursday March 30, 2017 @08:20PM (#14000210)
Oh 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.