Tại sao trò chơi cũ chạy quá nhanh trên máy tính hiện đại?

Mục lục:

Tại sao trò chơi cũ chạy quá nhanh trên máy tính hiện đại?
Tại sao trò chơi cũ chạy quá nhanh trên máy tính hiện đại?

Video: Tại sao trò chơi cũ chạy quá nhanh trên máy tính hiện đại?

Video: Tại sao trò chơi cũ chạy quá nhanh trên máy tính hiện đại?
Video: Đừng xài Win 10 hãy tải Linux về mà dùng - YouTube 2024, Tháng tư
Anonim
Image
Image

Nếu bạn đã từng cố gắng để có được một trò chơi máy tính cổ điển và chạy trên một hệ thống hiện đại, bạn có thể bị sốc vì cáchNhanh trò chơi chạy. Tại sao trò chơi cũ hết kiểm soát trên phần cứng hiện đại?

Trước đó, chúng tôi đã giới thiệu cho các bạn cách chạy phần mềm cũ trên các máy tính hiện đại; phiên câu hỏi và trả lời của hôm nay là một lời khen thú vị cho thấy một số phần mềm cũ (trò chơi cụ thể) dường như không hoạt động ngay khi bạn cố gắng chạy chúng trên phần cứng hiện đại.

Phiên Hỏi & Đáp hôm nay đến với chúng tôi theo lịch sự của SuperUser - một phân khu của Stack Exchange, một nhóm các trang web Hỏi & Đáp do cộng đồng điều hành.

Câu hỏi

Người đọc SuperUser TreyK muốn biết tại sao trò chơi máy tính cũ chạy nhanh trên phần cứng mới:

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?

Vậy câu chuyện là gì? Tại sao chính xác làm các sprites trong trò chơi cũ blaze trên màn hình để nhanh chóng các trò chơi trở nên không thể chơi được?

Câu trả lời

Người đóng góp SuperManer JourneymanGeek chia nhỏ nó:

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.

Nếu bạn tò mò về cách mã thực tế được triển khai trong các trò chơi máy tính ban đầu (và tại sao chúng thích nghi với hệ thống hiện đại kém mà không bị sandbox trong một số chương trình mô phỏng), chúng tôi cũng khuyên bạn nên xem xét sự phân tích dài nhưng thú vị này trong một câu trả lời SuperUser khác.

Có cái gì để thêm vào lời giải thích? Âm thanh trong các ý kiến. Bạn muốn đọc thêm câu trả lời từ những người dùng Stack Exchange có hiểu biết công nghệ khác? Xem toàn bộ chuỗi thảo luận tại đây.

Đề xuất: