defano / wyldcard

A clone of Apple's HyperCard and HyperTalk scripting language.
https://github.com/defano/wyldcard/wiki
MIT License
122 stars 11 forks source link

Importing issues #100

Open ooper-zz opened 2 years ago

ooper-zz commented 2 years ago

There are several issues that makes it difficult to import, in particular, I suspect that some of the following problems may be related to decompressing stack files in emulation (I'm using SheepShaver). Te couple of stacks I was able to get without compression had script issues but came through --see "Testable Stacks" issue. As far as I can tell many stack files appear corrupted after decompressing in the SheepShaver using standard decompressing applications of the day.

NOTE: I think that importing key stacks is important, but at this point I'm moving on.

defano commented 2 years ago

I'm curious what's going on here. If you have a chance, attach a corrupted stack to this issue.

ooper-zz commented 2 years ago

@defano, Hey! So here are some of the ones I found. Not sure why, but most of them were decompressed in the appropriate applications running in the SheepShaver emulator, which I've been using for a while quite successfully. corrupted-stacks.zip

The common theme is zero-value on fields, including 'LIST', checksum, and majorVersion. You can get past the latter by using the format field (which might be better, but not required on uncorrupted files) instead. See attached pict: Screen Shot 2022-05-24 at 6 15 17 PM

source: if (block instanceof StackBlock) { String formatName = ((StackBlock) block).getFormat().name(); char formatVersion = formatName.charAt(formatName.lastIndexOf('_') + 1); if (formatVersion < 2) { throw new UnsupportedVersionException(block, "Cannot import stacks from HyperCard 1.x. Please use the \"Convert Stack...\" command in HyperCard 2.x to update this stack."); }