Re: ERROR: BUG: dosemu touched the protected video memory!!!

Bart Oldeman
2004-01-25T14:14:26Z

On Sat, 24 Jan 2004, Julius Schwartzenberg wrote:

> Bart Oldeman schreef:
>
> >Were you talking about duke nukem 3d or some earlier duke?
> >
> >
> It still doesn't work with version 1.2.0 :(
> You can download the Duke Nukem I was talking about here btw:
> ftp://ftp.3drealms.com/share/1duke.zip

yep, I downloaded that one. Seems to work fine for me though...
When would it happen?

I just did
xdosemu
cd duke
dn1
press "s" from main menu
press "space" twice
duke can walk left and right
which Linux kernel version are you running on? Distribution?

Can you also look up the value of eip in the dump and compare it to
bin/dosemu.map (you get this file when compiled from source code), and
give the full ~/.dosemu/boot.log contents?

Bart

(BTW Duke had a graphics glitch for me which was fixed in CVS but not in
-stable yet: but this as far as I can see should not be the cause for the
crash.
Fix:

--- src/env/video/vgaemu.c.~1.4.2.2.~ Sat Jan 17 21:59:10 2004
+++ src/env/video/vgaemu.c Sun Jan 25 13:58:51 2004
@@ -2307,7 +2307,7 @@
* Set visible text page.
*
* `vga.display_start' is set to `page' * `page_size'.
- * In graphics modes to 'page' * 'page_size' * 8 (quick workaround, FIXME!)
+ * In graphics modes the page_size is determined from memory/vga settings
*
* arguments:
* page - Number of the text page.
@@ -2320,7 +2320,13 @@
int vga_emu_set_text_page(unsigned page, unsigned page_size)
{
if(vga.mode_class != TEXT) {
- page_size *= 8;
+ page_size = vga.scan_len * vga.height;
+ if (page_size != 0) {
+ page_size = vga.mem.bank_pages * 4096 / page_size;
+ if (page_size != 0) {
+ page_size = vga.mem.bank_pages * 4096 / page_size;
+ }
+ }
}

if((page + 1) * page_size > vga.mem.size) {