From owner-freebsd-hackers Mon Nov 2 17:57:19 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA17792 for freebsd-hackers-outgoing; Mon, 2 Nov 1998 17:57:19 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from outmail.utsunomiya-u.ac.jp (outmail.utsunomiya-u.ac.jp [160.12.196.3]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA17781 for ; Mon, 2 Nov 1998 17:57:14 -0800 (PST) (envelope-from yokota@zodiac.mech.utsunomiya-u.ac.jp) Received: from zodiac.mech.utsunomiya-u.ac.jp (IDENT:mycqlgrlaXw7DEOW616XzYM92GAsqxeP@zodiac.mech.utsunomiya-u.ac.jp [160.12.42.1]) by outmail.utsunomiya-u.ac.jp (8.9.1/8.9.1) with ESMTP id KAA32032; Tue, 3 Nov 1998 10:56:58 +0900 (JST) Received: from zodiac.mech.utsunomiya-u.ac.jp (zodiac.mech.utsunomiya-u.ac.jp [160.12.42.1]) by zodiac.mech.utsunomiya-u.ac.jp (8.7.6+2.6Wbeta7/3.4W/zodiac-May96) with ESMTP id KAA00792; Tue, 3 Nov 1998 10:58:22 +0900 (JST) Message-Id: <199811030158.KAA00792@zodiac.mech.utsunomiya-u.ac.jp> To: Christopher Masto cc: hackers@FreeBSD.ORG, yokota@zodiac.mech.utsunomiya-u.ac.jp Subject: Re: Some curiosity about syscons In-reply-to: Your message of "Sun, 01 Nov 1998 12:36:10 EST." <19981101123610.A7850@netmonger.net> References: <19981026230208.A8159@netmonger.net> <199811011131.UAA15844@zodiac.mech.utsunomiya-u.ac.jp> <19981101123610.A7850@netmonger.net> Date: Tue, 03 Nov 1998 10:58:21 +0900 From: Kazutaka YOKOTA Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >Doesn't the screen saver only get run periodically? Hmm.. > >Anyway, I have something which works a lot more reliably than my >original call-scrn_update()-excessively hack. Of course, this is >about four hacks in one. [...] I have one suggestion for your scheme. After setting up the 80x30 text mode, call ioctl(0, KDSETMODE, KD_GRAPHICS); This will tell syscons that the program wants to take full control of video hardware and syscons will not touch video hardware or update screen for this vty. Note that this ioctl command will not actually put your video card in one of graphics modes, nor change the state of video card in any way. It is a simple declaration by the user-land program that the program wants full control of the video card. This ioctl is originally meant for graphics programs (i.e. X server) which need to manipulate video hardware directly. The important thing is that syscons will stay away from the video hardware once this ioctl is called. So, your program can do whatever it wants to the video card. Before quitting the program, call ioctl(0, KDSETMODE, KD_TEXT); then, switch back to the 80x25 text mode (or whatever). Kazu >#define WAIT_RETRACE { while (inb(0x3DA) & 0x08); \ > while (!(inb(0x3DA) & 0x08)); } > >u_short *vmem; >unsigned char font[16*256], oldfont[16*256]; > >[...] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message