Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.msdos.programmer > #1375

Re: detecting emulation or console windows

From "James Harris" <james.harris.1@gmail.com>
Newsgroups alt.os.development, comp.os.msdos.programmer, alt.lang.asm
Subject Re: detecting emulation or console windows
Date 2014-06-01 22:48 +0100
Organization A noiseless patient Spider
Message-ID <lmg72o$5rb$1@dont-email.me> (permalink)
References <op.xgqwuvss6zenlw@localhost> <lmdqcl$1oj$1@rumours.uwaterloo.ca> <op.xgq3g0ya6zenlw@localhost> <op.xgq5q0ms6zenlw@localhost>

Cross-posted to 3 groups.

Show all headers | View raw


"Rod Pemberton" <dont_use_email@xnothavet.cqm> wrote in message 
news:op.xgq5q0ms6zenlw@localhost...

...

> It seems dosemu doesn't provide the PS/2 A20 bit, and doesn't toggle
> keyboard A20 bit when A20 is enabled.  No real machine fails that.

Are you sure? Take a look at the A20 Controls section in

  http://aodfaq.wikispaces.com/machine+characteristics

In the table check the first "K bits" column. It shows the effects of 
enabling A20 by the KBC. Note that bit 1 (which is the A20 control) changes 
from 0 to 1 correctly on some machines but not all. The Aopen and the Asus 
were both found to leave that bit as 0 even after being told to set it to 1. 
A20 was enabled but the effect was not evident in the bit.

> Only really old machines are missing the PS/2 A20 bit.
>
> DOSBox emulates both PS/2 and keyboard A20, but it doesn't do it
> correctly!  Each A20 bit, keyboard and PS/2, operate independently
> of each other.  I.e., if you turn keyboard A20 on, and then PS/2 A20 on,
> you must turn *both* off to disable A20.  DOSBOX treats them as a
> single A20 on/off instead of the two separate A20 enable/disables,
> on real machines which have both bits.
>
> So, if you've got 16-bit, A20 differences can be used to detect
> those two emulators.

Don't go there! Many machines don't really have the old keyboard hardware 
any more but emulate it in firmware. Accesses to KBC ports, for example, 
trap to emulation routines. Thus you could see the things you are testing 
not just with emulator programs but also when running on bare metal.

> So, maybe, if I search around a bit more, I'll come up with something
> consistent.  Unfortunately, this is still rather specialized, and I
> can't test A20 after the DPMI app enters PM.  I.e., I can't test A20
> in my C code.  So, it'd need to be a custom binary with a modified
> 16-bit startup, which I'm definately not going to do.
>
> But, I've got a bit of hope now that some solution exists!  Their
> emulation isn't perfect.

Nor are machines!

James

Back to comp.os.msdos.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

detecting emulation or console windows "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-05-31 18:31 -0400
  Re: detecting emulation or console windows Ross Ridge <rridge@csclub.uwaterloo.ca> - 2014-05-31 19:59 -0400
    Re: detecting emulation or console windows "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-05-31 20:54 -0400
      Re: detecting emulation or console windows "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-05-31 21:43 -0400
        Re: detecting emulation or console windows "James Harris" <james.harris.1@gmail.com> - 2014-06-01 22:48 +0100
          Re: detecting emulation or console windows "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-06-02 00:46 -0400
            Re: detecting emulation or console windows "James Harris" <james.harris.1@gmail.com> - 2014-06-02 06:15 +0100
              Re: detecting emulation or console windows "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-06-02 03:21 -0400
                Re: detecting emulation or console windows "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-06-02 03:32 -0400
                Re: detecting emulation or console windows "James Harris" <james.harris.1@gmail.com> - 2014-06-02 09:51 +0100
                Re: detecting emulation or console windows "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-06-02 09:27 -0400
                Re: detecting emulation or console windows "James Harris" <james.harris.1@gmail.com> - 2014-06-02 17:05 +0100
                Re: detecting emulation or console windows "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-06-02 19:25 -0400
                Re: detecting emulation or console windows "James Harris" <james.harris.1@gmail.com> - 2014-06-04 07:55 +0100
                Re: detecting emulation or console windows "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-06-04 03:20 -0400
      Re: detecting emulation or console windows Ross Ridge <rridge@csclub.uwaterloo.ca> - 2014-06-01 14:03 -0400
        Re: detecting emulation or console windows "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-06-02 00:53 -0400
          Re: detecting emulation or console windows Ross Ridge <rridge@csclub.uwaterloo.ca> - 2014-06-02 15:55 -0400
            Re: detecting emulation or console windows "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-06-02 19:27 -0400
              Re: detecting emulation or console windows Ross Ridge <rridge@csclub.uwaterloo.ca> - 2014-06-03 17:00 -0400
  Re: detecting emulation or console windows Sjouke Burry <burrynulnulfour@ppllaanneett.nnll> - 2014-06-01 06:25 +0200
    Re: detecting emulation or console windows "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-06-01 02:50 -0400
  Re: detecting emulation or console windows "James Harris" <james.harris.1@gmail.com> - 2014-06-01 07:53 +0100
    Re: detecting emulation or console windows "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-06-01 04:53 -0400
      Re: detecting emulation or console windows "James Harris" <james.harris.1@gmail.com> - 2014-06-01 20:57 +0100
        Re: detecting emulation or console windows "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-06-02 00:48 -0400
      Re: detecting emulation or console windows "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-06-02 03:20 -0400
  Re: detecting emulation or console windows JJ <duh@nah.meh> - 2014-06-02 03:43 +0700
    Re: detecting emulation or console windows "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-06-02 00:34 -0400
    Re: detecting emulation or console windows "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-06-03 07:06 -0400
      Re: detecting emulation or console windows JJ <duh@nah.meh> - 2014-06-03 20:25 +0700
  Re: detecting emulation or console windows "wolfgang kern" <nowhere@never.at> - 2014-06-03 20:52 +0200
  Re: detecting emulation or console windows "James Harris" <james.harris.1@gmail.com> - 2014-06-03 22:59 +0100
    Re: detecting emulation or console windows CN <qmbmnp3799@pacbell.net> - 2014-06-03 18:39 -0700
      Re: detecting emulation or console windows "James Harris" <james.harris.1@gmail.com> - 2014-06-04 07:06 +0100
        Re: detecting emulation or console windows "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-06-04 03:07 -0400
          Re: detecting emulation or console windows "James Harris" <james.harris.1@gmail.com> - 2014-06-04 09:16 +0100
  Re: detecting emulation or console windows "James Harris" <james.harris.1@gmail.com> - 2014-06-03 23:00 +0100
  Re: detecting emulation or console windows "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-06-10 17:37 -0400
    Re: detecting emulation or console windows Wildman <best_lay@yahoo.com> - 2014-06-11 00:37 +0000
      Re: detecting emulation or console windows "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-07-27 12:11 -0400

csiph-web