Linear buffers in VESA screen modes
Is there a plan for how to access the linear framebuffer in VESA video modes? So far as I can tell, the current[1] VESA code doesn't support enabling the linear framebuffer access at all, even though "vidcontrol -i mode" is happy to tell you the details of the buffers that you can't get access to! [1] actually, I'm working in -stable, but at a quick glance the -current code is the same in this area. I have used the following hack to make it work for my purposes: % cvs diff -c vesa.c Index: vesa.c === RCS file: /repository/src/sys/i386/isa/vesa.c,v retrieving revision 1.15.2.5 diff -c -r1.15.2.5 vesa.c *** vesa.c 1999/04/16 15:58:21 1.15.2.5 --- vesa.c 1999/07/24 23:26:21 *** *** 777,783 } #endif /* 0 */ ! if (vesa_bios_set_mode(mode)) return 1; #if VESA_DEBUG > 0 --- 777,784 } #endif /* 0 */ ! /* If mode has a linear buffer, enable use of it*/ ! if (vesa_bios_set_mode(info.vi_buffer ? (mode | 0x4000) : mode)) return 1; #if VESA_DEBUG > 0 This currently does the right thing (at least on my hardware) because all the modes that syscons supports for character I/O don't have a linear mapping and hence those modes get set for windowed access as before. However, it's probably not the proper solution. The application for which I need this is to support capture from the bktr driver onto the screen (ie. so that you can watch TV without X). With the above hack and a small (100-line) program it works very nicely - far tidier than installing X just for this purpose on some embedded systems where I need this capability. To Unsubscribe: send mail to majord...@freebsd.org with "unsubscribe freebsd-hackers" in the body of the message
Linear buffers in VESA screen modes
Is there a plan for how to access the linear framebuffer in VESA video modes? So far as I can tell, the current[1] VESA code doesn't support enabling the linear framebuffer access at all, even though "vidcontrol -i mode" is happy to tell you the details of the buffers that you can't get access to! [1] actually, I'm working in -stable, but at a quick glance the -current code is the same in this area. I have used the following hack to make it work for my purposes: % cvs diff -c vesa.c Index: vesa.c === RCS file: /repository/src/sys/i386/isa/vesa.c,v retrieving revision 1.15.2.5 diff -c -r1.15.2.5 vesa.c *** vesa.c 1999/04/16 15:58:21 1.15.2.5 --- vesa.c 1999/07/24 23:26:21 *** *** 777,783 } #endif /* 0 */ ! if (vesa_bios_set_mode(mode)) return 1; #if VESA_DEBUG > 0 --- 777,784 } #endif /* 0 */ ! /* If mode has a linear buffer, enable use of it*/ ! if (vesa_bios_set_mode(info.vi_buffer ? (mode | 0x4000) : mode)) return 1; #if VESA_DEBUG > 0 This currently does the right thing (at least on my hardware) because all the modes that syscons supports for character I/O don't have a linear mapping and hence those modes get set for windowed access as before. However, it's probably not the proper solution. The application for which I need this is to support capture from the bktr driver onto the screen (ie. so that you can watch TV without X). With the above hack and a small (100-line) program it works very nicely - far tidier than installing X just for this purpose on some embedded systems where I need this capability. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Linear buffers in VESA screen modes
>Is there a plan for how to access the linear framebuffer in VESA video >modes? So far as I can tell, the current[1] VESA code doesn't support >enabling the linear framebuffer access at all, even though "vidcontrol -i >mode" is happy to tell you the details of the buffers that you can't get >access to! > >[1] actually, I'm working in -stable, but at a quick glance the -current >code is the same in this area. Actually -CURRENT sets up the linear framebuffer if available. >I have used the following hack to make it work for my purposes: [...] The vesa module in -CURRENT does basically the same as your patch. Kazu To Unsubscribe: send mail to majord...@freebsd.org with "unsubscribe freebsd-hackers" in the body of the message
Re: Linear buffers in VESA screen modes
Andrew Gordon writes: > The application for which I need this is to support capture from the bktr > driver onto the screen (ie. so that you can watch TV without X). With the > above hack and a small (100-line) program it works very nicely - far > tidier than installing X just for this purpose on some embedded systems > where I need this capability. Might one persuade you to release that 100-line program? :) DES -- Dag-Erling Smorgrav - d...@flood.ping.uio.no To Unsubscribe: send mail to majord...@freebsd.org with "unsubscribe freebsd-hackers" in the body of the message
Re: Linear buffers in VESA screen modes
On 28 Jul 1999, Dag-Erling Smorgrav wrote: > Andrew Gordon writes: > > The application for which I need this is to support capture from the bktr > > driver onto the screen (ie. so that you can watch TV without X). With the > > above hack and a small (100-line) program it works very nicely - far > > tidier than installing X just for this purpose on some embedded systems > > where I need this capability. > > Might one persuade you to release that 100-line program? :) Sure. It's rather crude at present, but I've put it up at: http://www.arg1.demon.co.uk/vesatv.c To Unsubscribe: send mail to majord...@freebsd.org with "unsubscribe freebsd-hackers" in the body of the message
Re: Linear buffers in VESA screen modes
On 29-Jul-99 Andrew Gordon wrote: > On 28 Jul 1999, Dag-Erling Smorgrav wrote: > >> Andrew Gordon writes: >> > The application for which I need this is to support capture from the bktr >> > driver onto the screen (ie. so that you can watch TV without X). With the >> > above hack and a small (100-line) program it works very nicely - far >> > tidier than installing X just for this purpose on some embedded systems >> > where I need this capability. >> >> Might one persuade you to release that 100-line program? :) > > Sure. It's rather crude at present, but I've put it up at: > > http://www.arg1.demon.co.uk/vesatv.c My wincast tv card seemed to work w/o your patch to vesa.c. Although I don't think it set the resolution right. I need to get to somewhere that I can get to more than just static though. :) Once I do, I may try and add some support for changing channels and what not, if you don't mind. --- John Baldwin -- http://members.freedomnet.com/~jbaldwin/ PGP Key: http://members.freedomnet.com/~jbaldwin/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.freebsd.org To Unsubscribe: send mail to majord...@freebsd.org with "unsubscribe freebsd-hackers" in the body of the message
Re: Linear buffers in VESA screen modes
On Wed, 28 Jul 1999, John Baldwin wrote: > On 29-Jul-99 Andrew Gordon wrote: > > > > Sure. It's rather crude at present, but I've put it up at: > > > > http://www.arg1.demon.co.uk/vesatv.c > > My wincast tv card seemed to work w/o your patch to vesa.c. Although I don't > think it set the resolution right. I need to get to somewhere that I can get > to more than just static though. :) Are you running -current? It was pointed out to me that -current already contains code equivalent to my patch for -stable (I must have been blind when I looked at the cvs diff and didn't see it). On your 'resolution' problem, did you change it for NTSC? My code is hard-wired for PAL and the WEUROPE channel set on the tuner - changes for NTSC should be obvious. > Once I do, I may try and add some support for changing channels and what not, > if you don't mind. Do whatever you like! To Unsubscribe: send mail to majord...@freebsd.org with "unsubscribe freebsd-hackers" in the body of the message
Re: Linear buffers in VESA screen modes
On 29-Jul-99 Andrew Gordon wrote: > On Wed, 28 Jul 1999, John Baldwin wrote: >> On 29-Jul-99 Andrew Gordon wrote: >> > >> > Sure. It's rather crude at present, but I've put it up at: >> > >> > http://www.arg1.demon.co.uk/vesatv.c >> >> My wincast tv card seemed to work w/o your patch to vesa.c. Although I >> don't >> think it set the resolution right. I need to get to somewhere that I can >> get >> to more than just static though. :) > > Are you running -current? It was pointed out to me that -current already > contains code equivalent to my patch for -stable (I must have been blind > when I looked at the cvs diff and didn't see it). # uname -a FreeBSD john.baldwin.cx 3.2-STABLE FreeBSD 3.2-STABLE #3: Thu Jul 1 21:08:59 EDT 1999 r...@john.baldwin.cx:/usr/source/src/sys/compile/JOHN i386 > On your 'resolution' problem, did you change it for NTSC? My code is > hard-wired for PAL and the WEUROPE channel set on the tuner - changes > for NTSC should be obvious. Nope. :) That helped a lot. However, it seems to be displaying 640x400 in a 640x480 window. Ahh.. I found the problem, my mode 0x112 is 32bpp instead of 24bpp. A little quick hacking fixed that. Works perfect! >> Once I do, I may try and add some support for changing channels and what >> not, >> if you don't mind. > > Do whatever you like! It looks like I'll also be adding code to auto-detect the color depth and adjust accordingly. --- John Baldwin -- http://members.freedomnet.com/~jbaldwin/ PGP Key: http://members.freedomnet.com/~jbaldwin/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.freebsd.org To Unsubscribe: send mail to majord...@freebsd.org with "unsubscribe freebsd-hackers" in the body of the message
Re: Linear buffers in VESA screen modes
On Thu, 29 Jul 1999, John Baldwin wrote: > > On 29-Jul-99 Andrew Gordon wrote: > > On Wed, 28 Jul 1999, John Baldwin wrote: > >> On 29-Jul-99 Andrew Gordon wrote: > >> > > >> > Sure. It's rather crude at present, but I've put it up at: > >> > > >> > http://www.arg1.demon.co.uk/vesatv.c > >> > >> My wincast tv card seemed to work w/o your patch to vesa.c. Although I > >> don't > >> think it set the resolution right. I need to get to somewhere that I can > >> get > >> to more than just static though. :) > > > > Are you running -current? It was pointed out to me that -current already > > contains code equivalent to my patch for -stable (I must have been blind > > when I looked at the cvs diff and didn't see it). > > # uname -a > FreeBSD john.baldwin.cx 3.2-STABLE FreeBSD 3.2-STABLE #3: Thu Jul 1 21:08:59 > EDT 1999 r...@john.baldwin.cx:/usr/source/src/sys/compile/JOHN i386 Maybe your hardware has the windowed and linear buffer access modes active simultaneously, rather than needing to be switched by the BIOS. To Unsubscribe: send mail to majord...@freebsd.org with "unsubscribe freebsd-hackers" in the body of the message
Re: Linear buffers in VESA screen modes
On 29-Jul-99 Andrew Gordon wrote: >> # uname -a >> FreeBSD john.baldwin.cx 3.2-STABLE FreeBSD 3.2-STABLE #3: Thu Jul 1 >> 21:08:59 >> EDT 1999 r...@john.baldwin.cx:/usr/source/src/sys/compile/JOHN i386 > > Maybe your hardware has the windowed and linear buffer access modes active > simultaneously, rather than needing to be switched by the BIOS. I dunno, it's a run of the mill Matrox G200 AGP card. --- John Baldwin -- http://members.freedomnet.com/~jbaldwin/ PGP Key: http://members.freedomnet.com/~jbaldwin/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.freebsd.org To Unsubscribe: send mail to majord...@freebsd.org with "unsubscribe freebsd-hackers" in the body of the message
Re: Linear buffers in VESA screen modes
>Is there a plan for how to access the linear framebuffer in VESA video >modes? So far as I can tell, the current[1] VESA code doesn't support >enabling the linear framebuffer access at all, even though "vidcontrol -i >mode" is happy to tell you the details of the buffers that you can't get >access to! > >[1] actually, I'm working in -stable, but at a quick glance the -current >code is the same in this area. Actually -CURRENT sets up the linear framebuffer if available. >I have used the following hack to make it work for my purposes: [...] The vesa module in -CURRENT does basically the same as your patch. Kazu To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Linear buffers in VESA screen modes
Andrew Gordon <[EMAIL PROTECTED]> writes: > The application for which I need this is to support capture from the bktr > driver onto the screen (ie. so that you can watch TV without X). With the > above hack and a small (100-line) program it works very nicely - far > tidier than installing X just for this purpose on some embedded systems > where I need this capability. Might one persuade you to release that 100-line program? :) DES -- Dag-Erling Smorgrav - [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Linear buffers in VESA screen modes
On 28 Jul 1999, Dag-Erling Smorgrav wrote: > Andrew Gordon <[EMAIL PROTECTED]> writes: > > The application for which I need this is to support capture from the bktr > > driver onto the screen (ie. so that you can watch TV without X). With the > > above hack and a small (100-line) program it works very nicely - far > > tidier than installing X just for this purpose on some embedded systems > > where I need this capability. > > Might one persuade you to release that 100-line program? :) Sure. It's rather crude at present, but I've put it up at: http://www.arg1.demon.co.uk/vesatv.c To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Linear buffers in VESA screen modes
On 29-Jul-99 Andrew Gordon wrote: > On 28 Jul 1999, Dag-Erling Smorgrav wrote: > >> Andrew Gordon <[EMAIL PROTECTED]> writes: >> > The application for which I need this is to support capture from the bktr >> > driver onto the screen (ie. so that you can watch TV without X). With the >> > above hack and a small (100-line) program it works very nicely - far >> > tidier than installing X just for this purpose on some embedded systems >> > where I need this capability. >> >> Might one persuade you to release that 100-line program? :) > > Sure. It's rather crude at present, but I've put it up at: > > http://www.arg1.demon.co.uk/vesatv.c My wincast tv card seemed to work w/o your patch to vesa.c. Although I don't think it set the resolution right. I need to get to somewhere that I can get to more than just static though. :) Once I do, I may try and add some support for changing channels and what not, if you don't mind. --- John Baldwin <[EMAIL PROTECTED]> -- http://members.freedomnet.com/~jbaldwin/ PGP Key: http://members.freedomnet.com/~jbaldwin/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.freebsd.org To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Linear buffers in VESA screen modes
On Wed, 28 Jul 1999, John Baldwin wrote: > On 29-Jul-99 Andrew Gordon wrote: > > > > Sure. It's rather crude at present, but I've put it up at: > > > > http://www.arg1.demon.co.uk/vesatv.c > > My wincast tv card seemed to work w/o your patch to vesa.c. Although I don't > think it set the resolution right. I need to get to somewhere that I can get > to more than just static though. :) Are you running -current? It was pointed out to me that -current already contains code equivalent to my patch for -stable (I must have been blind when I looked at the cvs diff and didn't see it). On your 'resolution' problem, did you change it for NTSC? My code is hard-wired for PAL and the WEUROPE channel set on the tuner - changes for NTSC should be obvious. > Once I do, I may try and add some support for changing channels and what not, > if you don't mind. Do whatever you like! To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Linear buffers in VESA screen modes
On 29-Jul-99 Andrew Gordon wrote: > On Wed, 28 Jul 1999, John Baldwin wrote: >> On 29-Jul-99 Andrew Gordon wrote: >> > >> > Sure. It's rather crude at present, but I've put it up at: >> > >> > http://www.arg1.demon.co.uk/vesatv.c >> >> My wincast tv card seemed to work w/o your patch to vesa.c. Although I >> don't >> think it set the resolution right. I need to get to somewhere that I can >> get >> to more than just static though. :) > > Are you running -current? It was pointed out to me that -current already > contains code equivalent to my patch for -stable (I must have been blind > when I looked at the cvs diff and didn't see it). # uname -a FreeBSD john.baldwin.cx 3.2-STABLE FreeBSD 3.2-STABLE #3: Thu Jul 1 21:08:59 EDT 1999 [EMAIL PROTECTED]:/usr/source/src/sys/compile/JOHN i386 > On your 'resolution' problem, did you change it for NTSC? My code is > hard-wired for PAL and the WEUROPE channel set on the tuner - changes > for NTSC should be obvious. Nope. :) That helped a lot. However, it seems to be displaying 640x400 in a 640x480 window. Ahh.. I found the problem, my mode 0x112 is 32bpp instead of 24bpp. A little quick hacking fixed that. Works perfect! >> Once I do, I may try and add some support for changing channels and what >> not, >> if you don't mind. > > Do whatever you like! It looks like I'll also be adding code to auto-detect the color depth and adjust accordingly. --- John Baldwin <[EMAIL PROTECTED]> -- http://members.freedomnet.com/~jbaldwin/ PGP Key: http://members.freedomnet.com/~jbaldwin/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.freebsd.org To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Linear buffers in VESA screen modes
On Thu, 29 Jul 1999, John Baldwin wrote: > > On 29-Jul-99 Andrew Gordon wrote: > > On Wed, 28 Jul 1999, John Baldwin wrote: > >> On 29-Jul-99 Andrew Gordon wrote: > >> > > >> > Sure. It's rather crude at present, but I've put it up at: > >> > > >> > http://www.arg1.demon.co.uk/vesatv.c > >> > >> My wincast tv card seemed to work w/o your patch to vesa.c. Although I > >> don't > >> think it set the resolution right. I need to get to somewhere that I can > >> get > >> to more than just static though. :) > > > > Are you running -current? It was pointed out to me that -current already > > contains code equivalent to my patch for -stable (I must have been blind > > when I looked at the cvs diff and didn't see it). > > # uname -a > FreeBSD john.baldwin.cx 3.2-STABLE FreeBSD 3.2-STABLE #3: Thu Jul 1 21:08:59 > EDT 1999 [EMAIL PROTECTED]:/usr/source/src/sys/compile/JOHN i386 Maybe your hardware has the windowed and linear buffer access modes active simultaneously, rather than needing to be switched by the BIOS. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Linear buffers in VESA screen modes
On 29-Jul-99 Andrew Gordon wrote: >> # uname -a >> FreeBSD john.baldwin.cx 3.2-STABLE FreeBSD 3.2-STABLE #3: Thu Jul 1 >> 21:08:59 >> EDT 1999 [EMAIL PROTECTED]:/usr/source/src/sys/compile/JOHN i386 > > Maybe your hardware has the windowed and linear buffer access modes active > simultaneously, rather than needing to be switched by the BIOS. I dunno, it's a run of the mill Matrox G200 AGP card. --- John Baldwin <[EMAIL PROTECTED]> -- http://members.freedomnet.com/~jbaldwin/ PGP Key: http://members.freedomnet.com/~jbaldwin/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.freebsd.org To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message