Add BootImage to second DisplayBuffer during boot
This commit is contained in:
@@ -31,10 +31,17 @@ namespace JabyEngine {
|
||||
GPU_IO::GP0 = GPU_IO::Command::DrawAreaBottomRight((x + Display::Width), (y + Display::Height));
|
||||
}
|
||||
|
||||
static void quick_fill_fast(const Color24& color, const PositionU16& pos, const SizeU16& size) {
|
||||
static void copy_vram_to_vram(const AreaU16& dst, const PositionU16& src) {
|
||||
GPU_IO::GP0 = GPU_IO::Command::VRAM2VRAM_Blitting();
|
||||
GPU_IO::GP0 = GPU_IO::Command::TopLeftPosition(src.x, src.y);
|
||||
GPU_IO::GP0 = GPU_IO::Command::TopLeftPosition(dst.position.x, dst.position.y);
|
||||
GPU_IO::GP0 = GPU_IO::Command::WidthHeight(dst.size.width, dst.size.height);
|
||||
}
|
||||
|
||||
static void quick_fill_fast(const Color24& color, const AreaU16& area) {
|
||||
GPU_IO::GP0 = GPU_IO::Command::QuickFill(color);
|
||||
GPU_IO::GP0 = GPU_IO::Command::TopLeftPosition(pos.x, pos.y);
|
||||
GPU_IO::GP0 = GPU_IO::Command::WidthHeight(size.width, size.height);
|
||||
GPU_IO::GP0 = GPU_IO::Command::TopLeftPosition(area.position.x, area.position.y);
|
||||
GPU_IO::GP0 = GPU_IO::Command::WidthHeight(area.size.width, area.size.height);
|
||||
}
|
||||
|
||||
static void reset_cmd_buffer() {
|
||||
|
@@ -58,6 +58,9 @@ namespace JabyEngine {
|
||||
auto state = FileProcessor::create(&__boot_loader_end, SimpleTIM(32, 0, 0, 0));
|
||||
state.process(bytes_ready);
|
||||
|
||||
// Duplicate DisplayBuffer content
|
||||
internal::copy_vram_to_vram({PositionU16(0, Display::Height), SizeU16(Display::Width, Display::Height)}, PositionU16(0, 0));
|
||||
|
||||
Display::enable();
|
||||
}
|
||||
|
||||
@@ -67,7 +70,7 @@ namespace JabyEngine {
|
||||
internal::Display::exchange_buffer_and_display();
|
||||
|
||||
GPU::internal::wait_ready_for_CMD();
|
||||
GPU::internal::quick_fill_fast(Color24::Black(), PositionU16(32, 0), SizeU16(Display::Width, Display::Height));
|
||||
GPU::internal::quick_fill_fast(Color24::Black(), {PositionU16(32, 0), SizeU16(Display::Width, Display::Height)});
|
||||
|
||||
__syscall_EnterCriticalSection();
|
||||
__syscall_SysEnqIntRP(VblankIrq, &::JabyEngine::GPU::internal::callback);
|
||||
|
Reference in New Issue
Block a user