Date: Mon, 26 Oct 1998 23:02:08 -0500 From: Christopher Masto <chris@netmonger.net> To: hackers@FreeBSD.ORG Subject: Some curiosity about syscons Message-ID: <19981026230208.A8159@netmonger.net>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19981026230208.A8159>