[prev in list] [next in list] [prev in thread] [next in thread] 

List:       qemu-devel
Subject:    Re: sb16 FreeBSD guest fix (was: Re: [Qemu-devel] qemu FreeBSD port
From:       malc <malc () pulsesoft ! com>
Date:       2004-10-25 19:12:07
Message-ID: Pine.LNX.4.55.0410252309570.1703 () home ! oyster ! ru
[Download RAW message or body]

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:malc@pulsesoft.com


_______________________________________________
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic