Hi Bart,

On Tue, 9 May 2000, Bart Oldeman wrote:

> On Mon, 8 May 2000, Steffen Winterfeldt wrote:
> 
> > my changes to David's patch are available (or should shortly be) from
> > 
> >   ftp://ftp.suse.com/pub/people/snwint/dosemu/dosemu-1.0.0-pl4.diff
> > 
> > The patch is against a plain dosemu 1.0.0.
> 
> I got it. After more testing I found some more issues and ideas:
> 
> 1. Some emulated int 0x10 routines try to write to the video memory and
> get a page fault. This causes "strange" hangups. For instance:

Yes, the int10 code interacts not perfectly with the vgaemu; I'll look
into it.

> 2. Emulation using a limited modr/m decode table should avoid long case
> statements and still catch a lot of different cases, something like:
> 
>         case 0x86:   /* Instruction is 26 86 .. : xchg byte */          
>         if (cp[2]<0x40 && (cp[2] & 7 != 6)) { 
>           mem = mems[cp[2] & 7];
>           reg = regs[(cp[2] & 0x38) >> 3];
>             memptr = U_CHAR(x86->es_base + (*mem & 0xffff));
>             uc = Logical_VGA_read(memptr);
>             Logical_VGA_write(memptr, (unsigned char)(*reg));
>             (unsigned char)(*reg) = uc;
>             return 3;
>         }
>  
> 
> regs = {&(x86->al),&(x86->cl), ... }
> mems = {&(x86->bx+x86->si) , ... }
> 
> I'll volunteer do this kind of stuff and would welcome any suggestions.

Yes, it was an evil hack, but I just wanted to see how far I can get with
the emulation. I'll release a new patch later today which will have more
bugfixes and cleanups.

If you want to complete the emulation code, please wait for my new patch.


Steffen

Reply via email to