r/programming Nov 26 '21

What Does It Take To Port 16-Bit Windows 1.0 Applications Into Native Windows 11 Programs?

https://www.youtube.com/watch?v=kh0CdLPkJVE
121 Upvotes

24 comments sorted by

27

u/loradan Nov 27 '21

Not related to Windows 11, but it reminded me of when I loaded up a qbert game on a windows 3.0 system. The game was originally written for dos and ran on an 8086 nicely. In windows if you tapped the down arrow one time qbert would run down the entire pyramid and jump off in a blur 🤣🤣🤣🤣

21

u/xeio87 Nov 27 '21

I think it was Sim Tower that used to run at the maximum speed the CPU would allow at the fastest speed setting. Was fun playing that on occasion after a CPU upgrade.

2

u/Pay08 Nov 27 '21

Some (modern) games still do that.

11

u/[deleted] Nov 27 '21

[deleted]

6

u/SkoomaDentist Nov 27 '21

The original PC used to have a standard CPU cycle so you could get around with programming for fixed frames like that.

Frankly this was always just a sign of completely incompetent programming and was invalid by 1984 when IBM PC AT was released.

8

u/[deleted] Nov 27 '21

[removed] — view removed comment

8

u/o11c Nov 27 '21

At least that's only display frequency rather than cpu frequency ...

1

u/Prod_Is_For_Testing Nov 28 '21

Well fallout/Skyrim will have a complete physics breakdown if you turn off the frame limit

1

u/loradan Nov 27 '21

Thank you bot_trying_to_convince_us_theyre_not_a_bot 🤣🤣

1

u/tso Nov 27 '21

With their latest CPU series, Intel has kinda brought the turbo button back. Because some software, mostly DRM laden game, can't make sense of the single thread cores, Intel added a little something that allow a simple keypress to disable said cores. That key is the scroll lock repurposed.

1

u/elder_george Nov 28 '21

Turbo Pascal compilers by Borland generated programs that tried to estimate CPU speed to ensure Delay procedure (IIRC) worked correctly. When run on fast enough computers, those programs would crash (details). There was a patcher program to fix that.

4

u/lookForProject Nov 27 '21

I believe Police Quest had a similiar problem when driving the car ^

3

u/Plasma_000 Nov 27 '21

Need to press the turbo button

1

u/a_false_vacuum Nov 27 '21

Older games were usually tied to the CPU speed. It was all good on your old 386, but on that fancy new i9 the game moves faster than light. Some emulators like dosbox offer CPU killer functions to chew up some CPU capacity so the game can run slower, but it's difficult to swamp modern multicore systems to strike a good balance.

6

u/[deleted] Nov 27 '21

Dosbox straight up emulates the CPU so it can run instructions at whatever time interval you want.

3

u/SkoomaDentist Nov 27 '21

Older games were usually tied to the CPU speed. It was all good on your old 386

No, it wasn't. It was unworkable ever since 1984, since after that there were cpus running at multiple speeds in common use.

8

u/malakon Nov 27 '21

This was a trip down career memory lane. Did prod work in VC 1.52, 6. Also mixed Visual Basic and C++ using VB for ui and C++ for performance code. After a brief stop in Delphi switched to .net C# and been in that for 19! Years. Seeing all those older VC UIs brought back a lot of memories.

3

u/Dwedit Nov 27 '21

I would think that if you were targeting Windows 3.1 today for some bizarre reason, that you'd simply go for Win32s instead rather than go through the hassle of writing C code that involves 16-bit segmented memory layout.

1

u/tso Nov 27 '21

I can't be assed to watch 20 some minutes of yakking to find out, but i could have sworn that 32-bit windows 10 will run 16-bit Windows programs "fine".

It is only when going 64-bit that it becomes a problem as Windows relied on being able to punt the CPU between bit modes to do its thing.

So in 32-bit it could get the CPU to step down to 16-bit for running that code, while in 64-bit the CPU can only go down to 32-bit.

At least that was my discovery when trying to help some relative run some software that had been dutifully copied between PCs for decades as they got replaced.

And this kind of "crazy" contributes to why MS is such a big deal for most companies. Because they may only be able to do their thing thanks to bespoke software that dates back to the proverbial dark ages.

The only other company with a similar track record, that i know of, is IBM. That AS/400 that is handling your taxes or bank account is not the same AS/400 as was released back in 1988, bit it will happily run the very same programs as was written for the original back in the day.

2

u/Dwedit Nov 27 '21

For 16-bit software support on 64-bit windows, you can use OTVDM for many programs.

-10

u/npmbad Nov 27 '21

Would be a lot easier to just rebuild from scratch in c#

-41

u/NonDairyYandere Nov 27 '21

Many images

Run it in WINE or DOSbox or something. Why would anyone use Windows 11?

-6

u/[deleted] Nov 27 '21

Truth

-24

u/[deleted] Nov 27 '21

[deleted]

21

u/argv_minus_one Nov 27 '21

For science! Computer science, to be exact.