From owner-freebsd-stable@FreeBSD.ORG Thu Jun 30 12:06:35 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87F181065672; Thu, 30 Jun 2011 12:06:35 +0000 (UTC) (envelope-from vmagerya@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id D7B8D8FC17; Thu, 30 Jun 2011 12:06:34 +0000 (UTC) Received: by bwa20 with SMTP id 20so2576311bwa.13 for ; Thu, 30 Jun 2011 05:06:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=ApbmueIqT/KDAA7SCw19tv3udanLVaSDAbmWRmfdQgk=; b=pGamJThGmmZ1LMcNTtnEatzHtBcyAg4uW8eEvE9p/NKHSMPtLs5OXB5ginX96o3ewz B61LOU/06IXFTfrL3yWeVZGd25zpu0SqW5e4fCkFfQvMnFPOz9Y7yvf2dV1oX+LK5GFf ZL1n9T4yJdU1oyEepUcav3Qs6/nKihqkz8En8= Received: by 10.204.177.141 with SMTP id bi13mr1837485bkb.203.1309434251597; Thu, 30 Jun 2011 04:44:11 -0700 (PDT) Received: from [172.29.1.142] (altimet-gw.cs2.dp.wnet.ua [217.20.178.249]) by mx.google.com with ESMTPS id c13sm2024339bkc.2.2011.06.30.04.44.10 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 30 Jun 2011 04:44:10 -0700 (PDT) Message-ID: <4E0C62B8.5090802@gmail.com> Date: Thu, 30 Jun 2011 14:49:12 +0300 From: Vitaly Magerya User-Agent: Thunderbird MIME-Version: 1.0 To: Antony Mawer References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org, freebsd-stable@freebsd.org Subject: Re: kern/143370: splash_txt ASCII splash screen module X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Jun 2011 12:06:35 -0000 Antony Mawer wrote: > Not sure if this is the right place to post it -- about 6 years ago I > put together a module which displays an ASCII splash screen on boot > (rather than the graphical splash_pcx and splash_bmp modules). As a user, I think this is rather cool; at least it is more useful for me than bmp/pcx splash modules, as I don't want to load vesa. Hm... Can you center the image if the display size is other than 80x25? Or try to temporarily change the video mode? It looks a bit misplaced in 80x50. Also, this would be 2x as cool if you could animate the splash. For example, if the supplied bitmap is 80x50, you could treat that as 2 frames, and cycle through them periodically (I assume that splash modules work the same way as saved modules do: the main function is called a few times per second, so you can update the screen there). BTW, in txt_init you currently check for data_size <= 0; you should also check for data_size < BIN_IMAGE_WIDTH * BIN_IMAGE_HEIGHT * 2, since if the bitmap is smaller, you'll draw garbage on the screen. > I have uploaded two sample boot splash screens at > http://www.mawer.org/freebsd/freebsd1.bin and > http://www.mawer.org/freebsd/freebsd2.bin . The files can be produced > using TheDraw and saving in its Binary file format, which consists of > a sequence of 2 byte pairs. The first byte in a pair is the character > to draw on the screen, and the second is the colour/display attributes > to draw the character with. As a side note, these images can also be made from video buffer dumps that vidcontrol produces like this: vidcontrol -p < /dev/ttyv0 | tail -c +13 > screenshot.bin (Substitute ttyv0 for the tty you want to take a picture of; the tty should be in 80x25 mode).