From owner-freebsd-hackers Mon Oct 26 20:02:47 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id UAA05483 for freebsd-hackers-outgoing; Mon, 26 Oct 1998 20:02:47 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from cheddar.netmonger.net (cheddar.netmonger.net [209.54.21.140]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id UAA05473 for ; Mon, 26 Oct 1998 20:02:45 -0800 (PST) (envelope-from chris@cheddar.netmonger.net) Received: (from chris@localhost) by cheddar.netmonger.net (8.8.8/8.8.8) id XAA09134; Mon, 26 Oct 1998 23:02:08 -0500 (EST) Message-ID: <19981026230208.A8159@netmonger.net> Date: Mon, 26 Oct 1998 23:02:08 -0500 From: Christopher Masto To: hackers@FreeBSD.ORG Subject: Some curiosity about syscons Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.91.1i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG The end of daylight time upon us, I have just finished writing my second Timex DataLink watch downloader. The first one was for X, 'cause I thought it was necessary, but it quickly became a pain to configure a second X session for the correct scanrate. Then I realized that VGA_80x30 is 60hz, and as luck would have it, nothing more than plain old text mode and IBM line-drawing characters is needed. Anyway.. I wasn't quite sure what the best approach would be, so I decided to see if I would just luck out and need no more than stdio and some cheating. It turns out, of course, that syscons doesn't simply put what you send it on the screen; it puts it into a buffer which is copied to the screen periodically, so I couldn't trivially make it work. Rather than back up and start over with a different approach, I added a tiny ioctl to syscons to call scrn_update(). With that and some fudging, I actually have the damned thing working. If anyone is still following this, and particularly if you Know From Experience, perhaps you can comment on some of these architectural issues. I need a 60Hz vertical refresh rate, and I need to be able to display 18 lines of text every frame. This needs to happen during the vertical retrace interval, as a single glitched frame will cause a failure. Ideally I would like the cursor not to be present, but it isn't actually a problem if I can make sure it is always at the top or bottom of the screen. The questions I'm considering are, more or less.. should this go in the kernel? Should I try to interact with syscons, or should I do whatever X does to get a console of my own? If I do that, do I need to program the VGA controller at a low level? It's tempting to just add a few flags to syscons so that I can say "don't touch this VC anymore, and let me write directly to it". I would like to have the freedom a screen saver has, without having to be a screen saver. What I have right now is a gross hack, although it's very small one. It sufficed to set my watch, and I may just ignore it for another six months, but then I'll want to rewrite it again. :-) Tomorrow I'll put the code somewhere, though I doubt many people want to patch their kernel for it. -- Christopher Masto Director of Operations S NetMonger Communications chris@netmonger.net info@netmonger.net SSS http://www.netmonger.net \_/ There won't be anything we won't say to people to try and convince them that our way is the way to go. - BILL GATES To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message