This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Emulate Windows Games?


Postby jont » Oct 16, 2002 @ 10:43am

7 random discussion-provoking reasons why DOS/8086 emulation is slow and complex (from painful experience):

- Every memory reference needs to be converted to an absolute address from a segment and offset.
- Most instructions use a mod r/m byte containing register and memory information, which must be spilt into 3 individual components, each of which must be interpreted.
- Most instructions have different opcodes for 8bit and 16bit operations.
- Some opcodes refer to further groups of instructions. The instruction to be executed depends on a value taken from the above mod r/m byte.
- Instructions may contain a segment override, changing the segment to which the following instruction refers.
- Most instructions modify the auxiliary flag, which is a bitch to calculate manually (please correct me if I'm wrong).
- Because the OS has no control whatsoever over memory management (in real mode at least), there's no way of knowing what random memory addresses have been written to at any given moment. I wouldn't want to be the person assigned to write a dynarec for this thing.

Other Reasons why DOS games run slowly under a DOS emulator

I would imagine that most console emulators get their speed from emulating the graphics hardware at a high level. For example, the Mode7 graphics in the SNES would be emulated using native code for the host processor that replicated the effect of the Mode7 hardware.

There is no custom graphics hardware in the PC (at least in earlier models) - every pixel must be plotted individually by the emulation.

The EGA is capable of some primitive "graphics accceleration", but is also one of the most ridiculously over-complex graphics chipsets in existence. It is also organized in bitplanes.

I suppose the VGA also contains some graphics acceleration as shown by the numerous Amiga-style copper demos that appeared in the early 90's. My point is that the arcane nature of this hardware means that it hinders emulation rather than making it easier.

Most CGA modes and VGA mode 13h can thankfully, regardless of their internal organisation, be emulated quite nicely due to their linear organisation of pixels in memory.
User avatar
jont
pm Member
 
Posts: 122
Joined: Jul 16, 2002 @ 5:12pm
Location: Leeds, England


Postby damian » Oct 16, 2002 @ 5:42pm

damian
pm Insider
 
Posts: 3960
Joined: Sep 3, 2002 @ 7:59pm
Location: Acton, MA (home), NYC (school)


Postby refractor » Oct 16, 2002 @ 6:59pm

User avatar
refractor
pm Insider
 
Posts: 2304
Joined: Feb 5, 2002 @ 1:12pm
Location: Luxembourg


Postby jadam1 » Oct 16, 2002 @ 10:55pm

use vRes :D

make an array of register values and problem solved.... kind of??$??? nah probally not, muh slower than actually using the main registers...
jadam1
 


Previous

Return to Windows Mobile


Sort


Forum Description

General Windows Mobile discussion for end-users. Hardware, software, etc. This is also the forum to post your product announcements and other news.

Moderators:

Dan East, sponge, Kevin Gelso, RICoder, Chris Edwards

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron