From 0af4758a452539e08842770a919629d9fc8d48f3 Mon Sep 17 00:00:00 2001 From: able Date: Fri, 3 Nov 2023 08:25:31 -0500 Subject: [PATCH] beop --- kernel/src/arch/x86_64/graphics.rs | 1 + .../holeybytes/limine_framebuffer_driver.rhai | 23 +++++++++++-------- repbuild/holeybytes/vfs_test.rhai | 8 ------- 3 files changed, 14 insertions(+), 18 deletions(-) diff --git a/kernel/src/arch/x86_64/graphics.rs b/kernel/src/arch/x86_64/graphics.rs index adb7c4da6..2f36627f0 100644 --- a/kernel/src/arch/x86_64/graphics.rs +++ b/kernel/src/arch/x86_64/graphics.rs @@ -18,6 +18,7 @@ pub static DISPLAY: Lazy> = Lazy::new(|| { disp.set_attribute("width", fb1.width); disp.set_attribute("height", fb1.height); disp.set_attribute("bits per pixel", fb1.bpp); + disp.set_attribute("pitch", fb1.pitch); // disp.set_attribute("fb ptr", fb1.address.as_ptr().unwrap()); dt.devices.insert("Displays".to_string(), alloc::vec![disp]); } diff --git a/repbuild/holeybytes/limine_framebuffer_driver.rhai b/repbuild/holeybytes/limine_framebuffer_driver.rhai index a90153307..040aab22e 100644 --- a/repbuild/holeybytes/limine_framebuffer_driver.rhai +++ b/repbuild/holeybytes/limine_framebuffer_driver.rhai @@ -7,17 +7,20 @@ import "repbuild/hblib/std" as std; // Define main fn main(){ std::Info("Starting the limine framebuffer driver."); - - li8(r1, 0x7); - li8(r2, 0); - li64(r3, 1000); - - label("start"); - // store from a register to a local address + // Color + li64(r1, 0xffffffff); + // iterator + li32(r2, 0); + // count + li64(r3, 12); + // Label here + let start = label(); + // Write to the memory st(r1, r2, 0xFFFF8000C0000000, 1); - // addi64(r2, r2, 1); - - jltu(r2, r3, "start"); + // Increment + addi64(r2, r2, 1); + // std::Info("abc"); + jltu(r2, r3, start); // Terminate execution. tx(); diff --git a/repbuild/holeybytes/vfs_test.rhai b/repbuild/holeybytes/vfs_test.rhai index 2883f384a..22663bff9 100644 --- a/repbuild/holeybytes/vfs_test.rhai +++ b/repbuild/holeybytes/vfs_test.rhai @@ -11,14 +11,6 @@ fn main(){ std::ipc_send(2, str, str.len); std::ipc_recv(2); - li8(r1, 0x7); - li8(r2, 0); - li64(r3, 128821000); - - let start = label(); - st(r1, r2, 0xFFFF8000C0000000, 1); - addi64(r2, r2, 1); - jltu(r2, r3, start); std::Info("VFS Test done!"); // un();