kern/143370: splash_txt ASCII splash screen module
vmagerya at gmail.com
Thu Jun 30 12:06:35 UTC 2011
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
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).
More information about the freebsd-stable