Miksi vanhoja pelejä ajaa aivan liian nopeasti nykyaikaisilla tietokoneilla?

Sisällysluettelo:

Miksi vanhoja pelejä ajaa aivan liian nopeasti nykyaikaisilla tietokoneilla?
Miksi vanhoja pelejä ajaa aivan liian nopeasti nykyaikaisilla tietokoneilla?

Video: Miksi vanhoja pelejä ajaa aivan liian nopeasti nykyaikaisilla tietokoneilla?

Video: Miksi vanhoja pelejä ajaa aivan liian nopeasti nykyaikaisilla tietokoneilla?
Video: The Box of Will Quest Part 1: 1 Million Subscriber Special SuperHeroKids SHK Comic in Real Life - YouTube 2024, Huhtikuu
Anonim
Image
Image

Jos olet koskaan yrittänyt saada vintage-tietokonepeliä ylös ja käynnissä nykyaikaisessa järjestelmässä, olet todennäköisesti järkyttynyt siitä, mitennopeasti peli juoksi. Miksi vanhat pelit loppuvat nykyaikaisilla laitteilla?

Aiemmin tänään näytimme, kuinka vanhempia ohjelmia käytetään vanhoissa tietokoneissa; tämän päivän kysymys- ja vastausistunto on mukava kohteliaisuus, joka kaivaa siihen, miksi jotkut vanhemmat ohjelmistot (erityisesti pelit) eivät näytä toimivan oikein, kun yrität käyttää niitä moderneilla laitteistoilla.

Tämän päivän kysymys- ja vastausistunto tulee meihin SuperUserin hyväksi - Stack Exchangein alaosasto, joka on yhteisöllinen Q & A-sivustojen ryhmittely.

Kysymys

SuperUser-lukija TreyK haluaa tietää, miksi vanhoja tietokonepelejä ajetaan hulluina nopeasti uudella laitteistolla:

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?

Joten mikä on tarina? Miksi täsmälliset versiot vanhoissa peleissä puhaltavat näytöllä niin nopeasti, että peli ei ole soitettavissa?

Vastaus

SuperUser-avustaja JourneymanGeek rikkoo sen:

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.

Jos olet utelias, miten todellinen koodi on pantu täytäntöön varhaisissa tietokonepeleissä (ja miksi he sopeutuvat niin huonosti nykyaikaisiin järjestelmiin ilman hiekkalaatikkoa jonkinlaisessa emulaatioohjelmassa), suosittelemme myös tarkistamaan tämän pitkällisen mutta mielenkiintoisen erittelyn prosessin toisessa SuperUser-vastauksessa.

Onko jokin asia lisättävä selitykseen? Kuulkaa kommentit. Haluatko lukea lisää vastauksia muilta tech-tajuilta Stack Exchange-käyttäjiltä? Katso koko keskusteluketju täältä.

Suositeltava: