[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sb16 FreeBSD guest fix (was: Re: [Qemu-devel] qemu FreeBSD port upda
From: |
malc |
Subject: |
Re: sb16 FreeBSD guest fix (was: Re: [Qemu-devel] qemu FreeBSD port update, unbreaking RELENG_5 and -current) |
Date: |
Mon, 25 Oct 2004 23:12:07 +0400 (MSD) |
On Mon, 25 Oct 2004, Juergen Lock wrote:
> >...
> > I have a patch which provides SB16 device on FreeBSD.
> > On FreeBSD, sb16(sbc) driver finds it like following
> > process.
> >
> > out(0x226, 3);
> > (100 micro sec busy loop)
> > out(0x226, 0);
> > while( in(0x22e) & 0x80 ) {
> > (20 micro sec busy loop / MAX 1000 repeat)
> > }
> > if( in(0x22a) == 0xaa ) {
> > FOUND!
> > } else {
> > NOT FOUND!
> > }
> >
> > So I changed (val == 1) to (val & 1), do you think so?
> >
> Maybe better do ((1 == val) || (3 == val)), to avoid false positives?
> Fabrice? And does anyone know what bit 1 is supposed to be doing?
> (i.e. why is the FreeBSD probe using 3 and not 1?)
>
> Other than that it looks good to me, but then i'm no sb16 expert.
> (actually i must say i haven't played with qemu sound emulation at
> all yet, thats why i didn't notice this problem...)
All the documentation i have seen only refers to 1 as a magic value,
then again some old games do pretty weird tricks in initialization
phase. I wonder if it's possible to look at CVS logs for this file
(FreeBSD, i gather, was developed with CVS since dawn of times) figure
out who put this line there and ask him?
--
mailto:address@hidden