schellingb / dosbox-pure

DOSBox Pure is a new fork of DOSBox built for RetroArch/Libretro aiming for simplicity and ease of use.
GNU General Public License v2.0
755 stars 61 forks source link

Major slowdown in Alone in the Dark games. #48

Closed SkyHighGam3r closed 9 months ago

SkyHighGam3r commented 3 years ago

When loading up Alone in the Dark games (using {REDACTED} (Admin: removed reference to piracy)) the speed of the game is incredibly slow. I've been able to speed these up by adjusting the "Emulated performance" option in core options (I'm using RetroArch, not sure if that's a given or not) A user at libretro forums advised I post that here though.

schellingb commented 3 years ago

Thanks for reporting this.

Yeah, sadly AITD is one of the games that don't work well with the default "AUTO" performance mode of DOSBox. AUTO basically keeps the performance of a fast Intel 80286 processor unless the game indicates it is a "modern" DOS game (meaning it requests the CPU to run in protected mode, often indicated by the game booting with DOS4GW) which then causes DOSBox to run as fast as possible. Many older DOS games were not able to adjust to various CPU speeds so for older games (made before 1990) it makes the most sense to keep the performance low. AITD appears to DOSBox like it is a non-modern game so it ends up running poorly by default. I don't know if there is much I can do.

Maybe a lazy solution would be to try detect the year in the loaded content name, and if it's (1993) or higher just run MAX and irregardless if the game appears modern or not.

SkyHighGam3r commented 3 years ago

I tried setting the games to max, but then everything ran way too fast. After that I tried setting it to match the year of the game's release, but that wasn't right either. Eventually I pulled up a video of the game playing online, timed some arbitrary sound mark (like the thunder when the armadillo spins) and tried to replicate that. Ended up landing on an option that was prior to AitD's release, which actually kind of makes sense I suppose.

schellingb commented 3 years ago

Thanks for looking into this. Are you playing the first AitD? I tried with 2 and it seemed to not run faster than intended even at MAX.

Keep in mind the options I offer with the CPU names and years is just an estimation. DOSBox emulation doesn't simulate Mhz like that as far as I understand so it's just an reference besides having just that raw "cycles per second" number that means nothing to most people.

Maybe we can come up with a sensible default cycles settings based on the game's year. So if a game like "Alone in the Dark 2 (1993)(I-Motion, Inc.) [Action, Adventure].zip" is booted it would chose a cycles per second that is more adequate to 1993 instead of DOSBox's default 3000 (which is clearly too low for AitD).

Tasosgemah commented 3 years ago

Runs well for me if i choose the 386 CPU option.

schellingb commented 2 years ago

Now in version 0.23 I've added the cycle selected for non-protected mode games based on the release year. For games that have auto mapped gamepad controls I've added the release year to the database. If the game is not in the database, it scans the content path for a year. Alone in the Dark 1 and 2 now run great on the core default options!