Glad you got it to work then, all the legacy code still left must make
it hard to change anything without breaking something else.



On Thu, Apr 12, 2012 at 8:24 AM, Stas Sergeev <s...@list.ru> wrote:
> Hello.
>
> I needed to run some commercial DOS-based multitasking
> environment recently, which doesn't work under dosbox.
> It implements the memory context switching by the use of
> EMS. dosemu doesn't support this, but it was easy to implement,
> so the patch is attached.
> There is still a problem with this patch that I'd like to address
> to make sure the multitasker will work reliably.
> It defeats the meaning of IS_GENERIC_LOWMEM_ADDR().
> In the patch I just removed it entirely to make things a go,
> otherwise the multitasker just crashes here and there, but
> my concern is that it will crash sooner or later again, because,
> with the 0-based conv memory, dosemu will attempt to write
> to zero page.
> I can see the following solutions to this:
> 1. Make IS_GENERIC_LOWMEM_ADDR() end at 0x40000,
> rather than at 0xa0000. This will work because in my patch
> I made it so the addresses below 0x40000 are never mappable,
> but who knows if some other multitasker will require also this.
> 2. Introduce the lowmem_alias maintained by mapping.c.
> Actually, when I introduced lowmem_base, the intention was
> only to provide it to the different "mappers", like EMS/HMA/DPMI.
> Only much later someone started to use it as an alias for zero-page,
> but maybe this should not have been done.
> 3. Make a fully functional dosaddr_to_unixaddr(), not just
> a quick hack it currently is. It should use the proper reverse-mapping
> maintained by mapping.c, instead of relying on a "map_char".
>
> I think the most "correct" approach is 3, while the simplest is 1.
> I personally wouldn't go for 2, but the changelog suggests that
> 2 was attempted at times already.
> Then, if this is fixed, I think all the uses of LOWMEM() should
> be killed, except those intended initially: for the use by the mappers.
> No one, except "mappers", should use LOWMEM(). Fortunately,
> the uses of LOWMEM() are already very few in the code.
>
> I cannot understand what lowmemp() does. It seems to take the
> dos pointer, but, for the "side-mapped" areas, it returns that
> pointer directly, both without adjusting it to mem_base, and
> without looking up the mapping source. How does this work?
>
> My patch also touches dosdebug: that's a hack too, but
> otherwise dosdebug just randomly exits for me. What's the
> use of searching for 1 in the read buffer?
>
> Also, there seems to be the e_invalidate() calls spread around
> the code. I haven't added them to my patch because I don't
> think its the right thing to do, but again, this may introduce
> the instability. We already have the macros to access the DOS
> memory, so why was it necessary to litter with the e_invalidate()
> calls, forcing everyone to include "cpu-emu.h"?
>
> But the good thing is that the aforementioned multitasker
> works under (patched) dosemu even on x86_64. I am surprised
> with how mature the CPU emulator is; it was barely usable
> the last time I looked. :) I think KVM also has the CPU emulator
> builtin. Was this considered as the speedup?
>
> ------------------------------------------------------------------------------
> For Developers, A Lot Can Happen In A Second.
> Boundary is the first to Know...and Tell You.
> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
> http://p.sf.net/sfu/Boundary-d2dvs2
> _______________________________________________
> Dosemu-devel mailing list
> Dosemu-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dosemu-devel
>

------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Dosemu-devel mailing list
Dosemu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dosemu-devel

Reply via email to