Conversation
Edited 16 hours ago

Porting Willows TWIN (A Win16/Win32 emulator that started in 1993) to modern-ish Linux. Making some progress, but I saw an error from that probably very few people have seen!

Yer outta memory, duuuude!

4
1
0

In case you were worried, and I know you were, the TWIN port does already run the Laffer Utilities!

(mostly)

1
0
0

There is actually (somewhat) of a point to this whole exercise. cannot run the laffer utilities at all.

This should actually bring some 16bit Windows apps "back".

Now whether or not this is a DESIRED OUTCOME is an issue that I will leave to philosophers.

3
0
0

@hp at least it has actual error trapping and doesn't just do a runtime error barf.

1
0
0

@avatastic you'll be less impressed to know that the reason it thinks it's out of memory is because TWIN allocates handles sequentially, they always go up, by the time this code runs TWIN's counter is at 0x4100 ish.

SKI.EXE then, to generate a 1 for CreateBitmap, does mov AL, 1 assuming AH is 0 because on windows the handles are lower, so it always IS 0.

So it then tries to create a bitmap with 0x4101 planes instead of 1.

Nice that it errors, not so nice that it uses uninitialized memory.

1
0
0

@hp well, that was the style at the time...

1
0
0

@avatastic oh yeah, I'm dreading what other "fun" things I'll find. I'm hoping to eventually be able to run Myst. But that might be a pipe dream.

But surely, skifree...

0
0
0

Important update. It... kinda runs now?

Very helpful assertion...

1
0
0

@bshanks does wine actually still care about these win16 APIs? I wouldn't at all mind making some PRs later, now that I'm slowing learning more about win16 than I ever wanted to know.

Win16 stuff has just regressed in wine for so long now that I just assumed it wasn't being maintained any longer.

0
0
0

@hp you were so preoccupied with whether or not you could, you didn't stop to think if you should?

1
0
0

@h5e the code exists, this is my only path towards laffer utilities on IRIX, what else is a poor nerdling to do?!

0
0
0

These days whenever somebody runs out of memory they have to consider whether AI is to blame. But it sounds like it is not to blame for this one.

0
1
0
@hp Relatable.
0
0
1

Important update. This was NOT a TWIN bug after all. This is a hiDPI problem.

Ski free has a free list of 100 actors, and normally this is more than enough, but! if you have a several thousand pixel tall play area a single screen can get those up...

Such a lack of foresight. ๐Ÿ˜›

0
0
0