This commit is intended to accompany a new release of the Ultibo core installer, a number of the new features are not usable without the installer update so if you are wanting to take advantage of them please ensure you also download and install the latest Ultibo core installer.
List of changes:
- Add completed Crt unit in the rtl-console package
- Add new QEMU Versatile PB target with specific boot and platform modules
- Add driver for ARM PrimeCell PL110 Color LCD Controller
- Add driver for ARM PrimeCell PL011 UART
- Fix ARMV7SetTimerCompare/ARMV8SetTimerCompare missing 'assembler nostackframe' from definition
- Fix ARMv7SystemCall/ARMv8SystemCall incorrect definition
- Fix RPi2FramebufferSetBacklight/RPi3FramebufferSetBacklight incorrect memory allocation
- Fix FramebufferConsoleClose failing if framebuffer already released
- Fix BCM2708/9/10FramebufferRelease not resetting properties
- Fix framebuffer default methods not checking Framebuffer.Address
- Add new FramebufferDeviceGetOffset/FramebufferDeviceSetOffset functions to support virtual width and height
- Update BCM2708/9/10FramebufferAllocate to support separate virtual and physical sizes
- Add new FramebufferDeviceWaitSync function to support waiting on vertical sync
- Update buildrtl.pp project file to add new files
- Complete the Dos unit to support rtl-console and fv packages
- Add new FramebufferDeviceGetPalette/FramebufferDeviceSetPalette functions to support 8-bit color depths
- Add BCM2708/9/10FramebufferGet/SetPalette functions to implement the new APIs
- Fix SPI_CS_NONE defined as LongWord instead of Word
- Fix BCM2708/9/10SPI0SetClockRate function not checking the core clock rate before calculating the divisor
- Fix SysRandomize to be more random by using the tick count as well as the clock
- Enable and complete the rtl-console package for video, keyboard and mouse support
- Enable the Free Vision (fv) package for text mode windowing
- Add new ultibounits package to begin a collection of contributed units with uBitmap and uScreenshot units as first items
- Add Default8x9 and Default8x16 fonts to support Free Vision package
- Add experimental ARM 64-bit (AARCH64) support with specific platform module and targets for RPI3B and QEMUVPB
- Add new ConsoleDevicePutText and ConsoleWindowOutput functions to support putting blocks of text onto the screen in a single call
- Add new ConsoleWindowGetProperties function to retrieve information about a console window
- Add FramebufferConsolePutText and HD44780ConsolePutText to support the new console API
- Add CursorSetDefault function to Platform unit to show a 'classic' mouse pointer arrow
QEMU machine emulation support
Ultibo core now supports the QEMU machine emulator as a specific target when creating or building a project. The emulation supported is the Versatile Platform Baseboard (Versatile PB) and currently includes support for all of the core functionality including Boot, Memory, Threads, Interrupts, Exceptions and the full Free Pascal RTL as well as standard features like Console, Logging and Devices. Currently the only drivers included are for the framebuffer device (PL110) and the serial UART (PL011) so many other devices are not yet available, for example there is no keyboard, mouse, network, USB or filesystem support available yet but more drivers will be added over coming releases.
Both FPC and Lazarus have been updated to include QEMU Versatile PB (QEMUVPB) as a target, Lazarus also inlcudes a QEMU project type and some examples now have a QEMU version as well.
The Ultibo core installation now includes a very minimal installation of QEMU and a new tool (the QEMU Launcher) has been added under Tools, Run in QEMU ... in the Lazarus menu to allow launching an Ultibo image directly in QEMU without needing to configure any parameters.
Future work will further enhance this support and will include additional drivers as well as support for debugging using QEMU.
Free Vision support
The Free Vision (fv) package has been enabled for Ultibo core in this release and allows creating text mode interfaces with full windowing, keyboard and mouse support. Free Vision is an open source clone of the popular Turbo Vision library that was used for many applications in the era of Turbo Pascal and Turbo C.
As part of this release a new 'TextEditor' example has been added which is a modified version of the Free Vision test application from Free Pascal, the example shows the use of many Free Vision elements and also creates a fully working multi window text editor.
Framebuffer support for virtual width and height
In response to requests from some Ultibo members it was decided to add support for virtual width and height values in the framebuffer API. This allows a framebuffer to be allocated with, for example, a virtual height of twice the physical height which can be used to create two pages to provide animation capabilities.
Using multiple pages within a framebuffer is a common technique and to demonstrate what is possible a new example called 'BouncingBoxes' has been added. This example is ported from the excellent series of articles published by Raspberry Compote entitled Low-level Graphics on Raspberry Pi.
Try out the example, but beware the bouncing boxes are very hypnotic!
New ultibounits package
This release includes a new 'ultibounits' package under \source\packages\ultibounits as a place to include the growing collection of contributed and useful utility units. So far we've only added two which are uBitmap and uScreenshot that provide easy to use functions for drawing or saving a bitmap image to or from the Ultibo console screen. We'll be going through the forum and picking out other useful items that have been shared to continue expanding this collection.
ARM 64-bit support (Experimental only)
Both FPC and Lazarus have been updated to include ARM 64-bit (AARCH64) as a target when building Ultibo projects and the necessary toolchain and components are also included with the latest installation. At this stage the 64-bit support in the Ultibo RTL itself is only experimental and it is not possible to compile a working project other than a very rudimentry QEMU example which prints some characters to the serial port.
Adding all of the required components means that future updates to the Ultibo RTL can progressively enable support for 64-bit applications without needing to also update the FPC and Lazarus installations. If you are interested in exploring 64-bit development in Ultibo please post in the forum to find out more about the current status and how to use the available options to assist with getting a working run time library.
For details of how to apply the latest source to your Ultibo core installation and rebuild your run time library see the wiki page Building from Source or watch the Building the RTL video on YouTube.