All of lore.kernel.org
 help / color / mirror / Atom feed
From: Clarence Dang <clarencedang@yahoo.com>
To: linux-msdos@vger.kernel.org
Subject: PC speaker in DOSEMU CVS
Date: Sat, 3 Dec 2005 19:42:11 +1100	[thread overview]
Message-ID: <200512031942.14404.clarencedang@yahoo.com> (raw)


Hi,

Just an update:

1. In Fedora Core, if you want the PC speaker to work:

* in xdosemu
* in dosemu with $_speaker = "emulated"
* in bash and ViM (those annoying beeps), you need:

    modprobe pcspkr

2. dosemu with $_speaker = "native" was fixed by Stas in CVS at approximately 
2005-11-27 11:51 UTC.  Just for the record, before this fix:

The port server forks a copy of the port handling tables at extra_port_init() 
time.  At that point, port 0x61 has not been registered.  The port server 
believes that 0x61 is an invalid port.

Later, 0x61 is registered by the main DOSEMU process into its separate copy of 
the port handling tables.

DOSEMU traps an 0x61 port speaker access and calls std_port_{inb,outb}.  This 
calls the port server, with the intention that the port server will call 
std_port_{inb,outb} in its process, which will invoke port_real_{inb,outb}.  
Unfortunately, the port server with an out-of-date set of port handling 
tables will call port_not_avail_{inb,outb} instead of std_port_{inb,outb}.

The moral of the story is that port handlers that eventually access real ports 
must be initialised before extra_port_init().  This should be audited:

port_register_handler('8254 Timer0',40-40)
port_register_handler('8254 Timer1',41-41)
port_register_handler('8254 Timer2',42-42)
port_register_handler('8254 Ctrl02',43-43)
port_register_handler('PCI Emulated Config',cf8-cff)
port_register_handler('std port io',a000-a0ff)
port_register_handler('8042 Keyboard data',60-60)
port_register_handler('8042 Keyboard command',64-64)
port_register_handler('Keyboard controller port B',61-61)
starting port server - nothing below this can access real ports
port_register_handler('CMOS RAM',70-71)
port_register_handler('8259 PIC0',20-21)
port_register_handler('8259 PIC1',a0-a1)
port_register_handler('Parallel printer',378-37a)
port_register_handler('Parallel printer',278-27a)
port_register_handler('Parallel printer',3bc-3be)
port_register_handler('DMA - XT Controller',0-f)
port_register_handler('DMA - XT Pages',81-87)
port_register_handler('DMA - AT Controller',c0-de)
port_register_handler('DMA - AT Pages',89-8f)
port_register_handler('Floppy Drive',3f0-3f7)
port_register_handler('SB Emulation',220-233)
port_register_handler('Adlib (+ Advanced) Emulation',388-38b)
port_register_handler('Midi Emulation',330-331)

             reply	other threads:[~2005-12-03  8:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-03  8:42 Clarence Dang [this message]
2005-12-10  0:35 ` Compiling needs SDL Alain
2005-12-10  6:32   ` Rick Knight

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200512031942.14404.clarencedang@yahoo.com \
    --to=clarencedang@yahoo.com \
    --cc=linux-msdos@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.