As mentioned previously on-list, OpenBIOS currently contains two consoles - a C based console and a Forth based console. The Forth based console is currently broken, but is more feature complete than the C console, whilst also being more portable across different architectures.
This patchset performs the following functions:
- Fix various bugs in the Forth console - Optimise performance using low-level C graphics routines - Add simple IEEE1275-like initialisers for TCX and VGA graphics - Switch TCX and VGA drivers over to use the new console using the standard is-install word
Once this patchset is committed, a further patchset will follow to remove all of the duplicate C console code, remove packages/video.c and unify the console input/routines into libopenbios.
Changes since v1: - Rebase onto SVN trunk - Various minor bugfixes/tidy-ups - Fix CSI n;mH and CSI n;mf as reported by Blue Swirl - Implementation of remaining missing fb8-* defer words: fb8-insert-lines fb8-insert-characters fb8-delete-characters
Mark Cave-Ayland (20): display.fs: Fix up default-font word. display.fs: Fix fb8-delete-lines within the inbuilt Forth terminal emulator. terminal.fs: Fix linefeeds on the bottom line of the Forth console. terminal.fs: Fix backspace sequence in Forth terminal. video: Create new video_common.c file for shared video primitive routines. video_common.c: Move primitive graphic operations into libopenbios/video_common.c. pci: Modify PCI display devices so that open and close words are not created automatically during initialisation. video: Create tcx.fs and vga.fs to simulate Fcode video initialisation code. display.fs: pass the colour depth and line bytes to the Forth terminal routines. video_common.c: create low-level video_mask_blit() function. video_common.c: create low-level video_invert_rect() function. display.fs: Fix fb8 routines to work with bit depths > 8. video_common.c: create low-level video_fill_rect() function. display.fs: optimise scrolling by copying/deleting multiple scanlines at once. display.fs: Add vertical font-spacing as per the existing C console implementation. terminal.fs: handle all cursor positioning within the terminal package. terminal.fs: Fix CSI n;mH and CSI n;mf control sequences. display.fs: add implementation of fb8-insert-lines. display.fs: add implementation of fb8-insert-characters and fb8-delete-characters. video: switch VGA and TCX drivers over to Forth console using is-install.
openbios-devel/arch/sparc32/console.c | 12 - openbios-devel/arch/sparc32/openbios.c | 2 +- openbios-devel/drivers/build.xml | 2 + openbios-devel/drivers/pci.c | 14 +- openbios-devel/drivers/pci.h | 1 + openbios-devel/drivers/sbus.c | 2 + openbios-devel/drivers/tcx.fs | 13 + openbios-devel/drivers/vga.fs | 13 + openbios-devel/drivers/vga_vbe.c | 2 +- openbios-devel/forth/device/display.fs | 228 +++++++------- openbios-devel/forth/device/font.fs | 4 + openbios-devel/forth/device/terminal.fs | 67 +++- openbios-devel/include/libopenbios/video.h | 24 ++ openbios-devel/include/packages/video.h | 6 +- openbios-devel/libopenbios/build.xml | 1 + openbios-devel/libopenbios/console_common.c | 1 + openbios-devel/libopenbios/video_common.c | 446 +++++++++++++++++++++++++++ openbios-devel/packages/video.c | 279 +---------------- 18 files changed, 700 insertions(+), 417 deletions(-) create mode 100644 openbios-devel/drivers/tcx.fs create mode 100644 openbios-devel/drivers/vga.fs create mode 100644 openbios-devel/include/libopenbios/video.h create mode 100644 openbios-devel/libopenbios/video_common.c