7 ms·
Sierra’s Macintosh Timebomb (2021)
- tpmx 4y agoRelated but completely different: All MS-DOS programs built with Turbo/Borland Pascal stopped working on ~200+ MHz Pentium CPUs because of a sleep calibration loop that ended up going too fast and causing a divide by zero in the runtime library: http://www.pcmicro.com/elebbs/faq/rte200.html http://www.pcmicro.com/elebbs/faq/rte200.html
- TazeTSchnitzel 4y agoI read somewhere that Windows 95 has several such loops that have to patched to get it to run on modern CPUs.
- benjaminpv 4y agoYep, you still see it come up nowadays with people running it under virtualization. https://www.os2museum.com/wp/those-win9x-crashes-on-fast-machines/ https://www.os2museum.com/wp/those-win9x-crashes-on-fast-mac...
- cf100clunk 4y agoAnother 68000 system time related bug but completely different problem (former Apollo/Domain sysadmin here, which I became at one company because I was already doing their Unix sysadmin job. We had to periodically reset the system clocks on those): ''The bug apparently results from the high 32 bits of the clock data type being declared as a 31 bit value instead of 32 bit in the pascal include files. The reason for this is lost to history, but early pascal compilers may have had problems with 32 bit unsigned numbers, possibly because the early Motorola 68000 processor chips didn't have 32 bit unsigned multiply operations.'' https://jim.rees.org/apollo-archive/date-bug https://jim.rees.org/apollo-archive/date-bug
- tpmx 4y agoDo I understand this correctly - it was a 31-bit version of the 32-bit Y2K38 problem?
- xxpor 4y agoThe year 2038 problem is a 31 bit problem: time_t is signed (in POSIX).
- tpmx 4y agoSo, was it a 30-bit problem?
- KMag 4y agoIt looks like maybe Apollo/Domain systems use an epoch of 1929-10-14 instead of 1970-01-01. Maybe that's the birthday of one of the early developers (or their spouse). There's nothing particularly magical about the Unix epoch.
- toast0 4y ago> There's nothing particularly magical about the Unix epoch. It's the beginning of time, everything before is Omphalos; even the Omphalos conjecture itself; Unix is meta like that.
- owl57 4y ago> There's nothing particularly magical about the Unix epoch. When you have to debug the same event reported in five different timezones, and then see some ugly 13-digit numbers and immediately know that's milliseconds since a certain globally-coherent moment… That moment definitely starts to feel magic.
- cf100clunk 4y ago> 1929-10-14 Hmmm, about 2 weeks before the Wall Street Crash of 1929, so I doubt it refers specifically to that.
- TonyTrapp 4y agoUp to this day I find it fascinating that the runtime error number just so perfectly coincides with the approximate speed at which the error will happen.
- nottorp 4y agoOhh I was there on my first programming job, still a student :) I think we recompiled the RTL and then distributed new binaries with the working RTL.
- the_af 4y agoOne early videogame that got this right was Alley Cat... in '83! The x86 version, coded in assembly language, works at the right speed regardless of CPU speed. MobyGames has this to say [1]: > "Alley Cat was one of the few games of the 1980s that was programmed with full attention to different PC speeds. It's an early, old game--yet it runs perfectly on any machine. The reason it runs on any computer today is, upon loading, the first thing it performs is a mathematical routine to determine the speed of your processor, and as of 2003 we've yet to build an Intel PC too fast to play it." I had a lot of fun with this game back in the day, when I got my first PC, an XT clone (with Hercules graphics card and "amber" monochrome CRT!). ---- [1] https://www.mobygames.com/game/alley-cat https://www.mobygames.com/game/alley-cat
- tpmx 4y agoI had a lot of fun with Alley Cat, Sopwith Camel, digger (https://digger.org/ https://digger.org/), GW-Basic and Turbo Pascal 3.0 or so when my computer finally got upgraded from a ZX81 (I got it in 1984 as a handmedown from a relative) to an Amstrad PC1512 in 1988 (thanks, supportive parents). The British truly ruled the low-end computer market in Europe back then.
- the_af 4y agoLots of love for GW Basic here! It was my first "true" programming language. I started with C64 BASIC but it was too limited to do actual interesting things, at least while not resorting to the cheat of PEEK and POKE.
- astrange 4y agoThat seems like it'd break if your CPU speed changed during runtime, which it could due to power saving, or being AMP instead of SMP, etc…
- KerrAvon 4y agoAbsolutely. None of that would have been a concern back in 1983, though. And it still won't be as badly broken as every other game released in 1983.
- dylan604 4y agoI was too young to know/understand the hows and whys, but I do remember having a couple of programs that you had to disable the turbo button on the front of the computer for them to run. I always thought it silly to have a button to intentionally slow down the computer, but yet it absolutely was required.
- TillE 4y ago> Future games with newer interpreters shipped with this same code instead of simply checking for overflow. That's the real punchline here, but well, game development has always been a mess. Automated testing of any kind is still rare, as far as I know.
- Someone 4y agoIt’s unlikely automated testing would have caught this first time round. The bug fix probably should have fixed this ‘for good’, but that shouldn’t require a test, either.
- deleted 4y ago[deleted]
- smm11 4y agoI can't get Aldus Pagemaker to run on my Watch either.
- recursive 4y agoWhat have you tried?
- ajross 4y agoThe "real" bug here is Motorola's. Having instructions that fail silently (vs. trapping, as DIVU actually does if the divisor is zero!) is just outrageous. For clarity, because the article takes too long to get there: DIVU has a 32 bit dividend, but a 16 bit divisor and a 16 bit result. So if you try to divide e.g. 0x20000 by 2, the result should be 0x10000, which doesn't fit in the output register. So... the CPU sets the overflow flag but otherwise does nothing! I'm not quite old enough to have been writing assembly for the 68k, but I've heard this issue before. This was surely not the only footgun situation with DIVU in the market.
- jdwithit 4y agoThat may be a better choice, but it wouldn't have prevented the bug from the article, would it? Because at the time of release, the date didn't overflow. And after their goofy "subtract 5,000 days" fix, it didn't overflow either. The only change would be the user experiencing a crash vs a hang.
- pm215 4y agoI would disagree. At the assembly level, as long as the instruction documents what it does in the oddball cases, it's up to you the programmer to use it correctly. Some CISC CPUs trap on errors like divide-by-zero; RISC instruction sets usually make the choice to define some specific behaviour. (For example on Arm, division by zero will always return a 0 result, and will not trap.) Taking an exception is an expensive business, and if the programmer wasn't expecting it then the result will be no better (program crashes, instead of program hangs).
- kevin_thibedeau 4y ago> on Arm, division by zero will always return a 0 result, and will not trap. Cortex-M and -R have support for div-by-0 faults but it's disabled by default.
- manv1 4y agoIf it's documented it's not a bug, it's behavior. The developer should check for overflow before using the value. If this assembly is compiler generated then it's probably classifiable as a compiler bug.
- nebulous1 4y agoI remember Sierra games frequently developing timing issues as PCs got faster. They never seemed to get that one down.
- chrisdfrey 4y agoA lot of their game logic times based on "game cycles" instead of something proper like counting seconds. ScummVM runs a lot of old Sierra games; it applies some patches to game scripts to fix these issues and also throttles some stuff to make it run at a proper speed on modern hardware.
- guessbest 4y agoComputer software was incapable of the completely of modern languages and practices because stack overflow didn't exist. Until windows came along with a time api based on datetime most games just used CPU clock cycles like you identified. CPU speed is the ultimate time api.
- acomjean 4y agoThe only use of the "turbo" button on some PCs in the 90s I found was to slow the machine down for the few older games that didn't have code to deal with the various speeds.
- toast0 4y agoThat's it's intended use. It's more of an anti-turbo, but you can run in compat or fast modes. And some of them had a sweet MHz display that was just set with jumpers so you could put BS and wow your friends.
- guessbest 4y agoI knew a computer reseller through my father and the turbo button was just a glowing button on the front a user could turn on or off without affected the CPU speed. In other words it became a marketing gimmick and I suspect more often than not it was not functional in any way except to give the user the idea that their 386SX was in TURBO mode.
- mypalmike 4y ago"according to numberwang" Gotta love a subtle Mitchell and Webb reference.
- deleted 4y ago[deleted]
- pedrow 4y agoAlso Blade Runner reference
- BoardsOfCanada 4y agoSo wait, you can just skip the division and look at when Time changes since that already is in seconds?
- lostlogin 4y agoIt took me way too long to realise that this related to the company, not the OS version. I even played those games. Coffee time.
- deleted 4y ago[deleted]
- deleted 4y ago[deleted]
- daneel_w 4y agoThat application icon logo... "JUST DRAW ANYTHING, DUDE, THE MASTER DISK IS OFF TO THE DUPLICATOR IN 4 MINUTES!!!"
- deleted 4y ago[deleted]
- BuckyBeaver 4y agoDid I miss it, or did they neglect to say what "SCI" stands for?
- egypturnash 4y agoSCI was Sierra On-Line's third language for writing adventure games. According to the ScummVM wiki, the name stood for both "Script Code Interpreter" and "Sierra's Creative Interpreter". It was preceded by ADL (Adventure Development Language, which did simple text adventures with graphics) and AGI (Adventure Game Interpreter, which did the same sort of thing as SCI, but lower resolution.) https://wiki.scummvm.org/index.php?title=Sierra https://wiki.scummvm.org/index.php?title=Sierra if you want more details.
- account42 4y agoSo in other words, Sierra's equivalent to Lucas Arts' SCUMM - the namesake for ScummVM.
- BuckyBeaver 4y agoThanks for the info!