Stas Sergeev <s...@list.ru> writes:

> Hi, I wonder if it is possible to remove all the
> vgaemu trickery. Namely:
> - all vgaemu logic and hooks in cpuemu
> - all the vgaemu logic and hooks in a signal handler,
> which also includes instremu.c AFAIK
>
> I wonder if something trivial can work instead.
> And I mean _really_ trivial. :)
> For example:
> - the signal handler just records what page have
> faulted, and unprotects it.
> - all the subsequent writes to that page are uncaught,
> so they are fast, but without a screen update
> - the main dosemu loop later checks the list of the
> faulted pages, compares their content to their old
> copy stored elsewhere, and, for every mismatch,
> calls the vgaemu_write_xxx(), which would also update
> the backed-up copy.
> - maybe the port writes should then be delayed too,
> if the order of operations is important, but I don't think
> this is the case.
>
> I am certainly missing something here, but I still
> beleive we can have a clean code, without a vgaemu
> stuff spread all around. The recent cpuemu bugs were
> because of the missing vgaemu hooks, for instance.
> And having the entire instremu.c, just for that?
> There _must_ be some magic way to throw all the mess
> to the trash can. Or at least I hope so. :)

First vgaemu is one of the most important parts of dosemu.  Unless you
want to go back to requiring dosemu have raw access to a vga capable
display.

In the easy cases vgaemu should already be unprotecting the page and
going forward.

In the tricky cases you can setup xors against various levels of plains
and it is very tricky to do unless you emulate it.  These accesses
happen frequently enough that even taking a page fault each time one of
those instructions happen is too expensive.

So maybe there is some refactoring opportunities but precisely and
quickly emulating the weird vga, ega, and cga modes are a lot of what
make dosemu useful.  I would claim that vgaemu is at least if not more
important than cpuemu.

Eric


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov
_______________________________________________
Dosemu-devel mailing list
Dosemu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dosemu-devel

Reply via email to