Perché i vecchi giochi scorrono troppo velocemente sui computer moderni?

Sommario:

Perché i vecchi giochi scorrono troppo velocemente sui computer moderni?
Perché i vecchi giochi scorrono troppo velocemente sui computer moderni?

Video: Perché i vecchi giochi scorrono troppo velocemente sui computer moderni?

Video: Perché i vecchi giochi scorrono troppo velocemente sui computer moderni?
Video: JAWS & Outlook - Scopri tutti i trucchi di accessibilità per Outlook - YouTube 2024, Marzo
Anonim
Image
Image

Se hai mai provato a far funzionare un gioco per computer vintage su un sistema moderno, probabilmente sei rimasto scioccato da comeveloce il gioco è finito. Perché i vecchi giochi sono fuori controllo su hardware moderno?

Oggi abbiamo mostrato come eseguire software obsoleti su computer moderni; la sessione di domande e risposte di oggi è un bel complimento che spiega perché alcuni vecchi software (in particolare i giochi) non sembrano funzionare correttamente quando si tenta di eseguirli su hardware moderno.

La sessione di domande e risposte di oggi ci viene fornita per gentile concessione di SuperUser, una suddivisione di Stack Exchange, un raggruppamento di domande e risposte basato sulla comunità.

La domanda

Lettore SuperUser TreyK vuole sapere perché i vecchi giochi per computer vanno pazzamente veloci sul nuovo hardware:

I’ve got a few old programs I pulled off an early 90s-era Windows computer and tried to run them on a relatively modern computer. Interestingly enough, they ran at a blazing fast speed – no, not the 60 frames per second kind of fast, rather the oh-my-god-the-character-is-walking-at-the-speed-of-sound kind of fast. I would press an arrow key and the character’s sprite would zip across the screen much faster than normal. Time progression in the game was happening much faster than it should. There are even programs made to slow down your CPU so that these games are actually playable.

I’ve heard that this is related to the game depending on CPU cycles, or something like that. My questions are:

  • Why do older games do this, and how did they get away with it?
  • How do newer games not do this and run independently of the CPU frequency?

Allora, qual è la storia? Perché esattamente gli sprite nei vecchi giochi divampano sullo schermo così velocemente che il gioco diventa ingiocabile?

La risposta

Il collaboratore di SuperUser JourneymanGeek lo analizza:

I believe they assumed the system clock would run at a specific rate, and tied in their internal timers to that clock rate. Most of these games probably ran on DOS, and were real mode (with complete, direct hardware access) and assumed you were running a iirc 4.77 MHz system for PCs and whatever standard processor that model ran for other systems like the Amiga.

They also took clever shortcuts based on those assumptions including saving a tiny bit of resources by not writing internal timing loops inside the program. They also took up as much processor power as they could – which was a decent idea in the days of slow, often passively cooled chips!

Initially one way to get around differing processor speed was the good old Turbo button (which slowed your system down). Modern applications are in protected mode and the OS tends to manage resources – they wouldn’t allow a DOS application (which is running in NTVDM on a 32-bit system anyway) to use up all of the processor in many cases. In short, OSes have gotten smarter, as have APIs.

Heavily based off this guide on Oldskool PC where logic and memory failed me – it’s a great read, and probably goes more in depth into the “why”.

Stuff like CPUkiller use up as many resources as possible to “slow” down your system, which is inefficient. You’d be better off using DOSBox to manage the clock speed your application sees.

Se sei curioso di sapere come il codice è stato implementato nei primi giochi per computer (e perché si adattano così male ai sistemi moderni senza essere sandbox in una sorta di programma di emulazione), ti suggeriamo anche di dare un'occhiata a questa lunga ma interessante ripartizione di elaborare in un'altra risposta SuperUser.

Hai qualcosa da aggiungere alla spiegazione? Sound off nei commenti. Vuoi leggere più risposte dagli altri utenti di Stack Exchange esperti di tecnologia? Controlla la discussione completa qui.

Consigliato: