1
0
Fork 0
forked from AbleOS/ableos
ableos/sysdata/programs/svga_driver/src/main.hb

29 lines
608 B
Plaintext
Raw Normal View History

2024-09-18 03:38:49 -05:00
device := @use("device.hb")
2024-09-14 03:51:57 -05:00
pci := @use("../../../libraries/pci/src/lib.hb")
stn := @use("../../../libraries/stn/src/lib.hb");
.{string, memory, buffer, log} := stn
2024-09-18 03:38:49 -05:00
reg := @use("reg.hb")
2024-09-14 03:51:57 -05:00
PCI_VENDOR_ID_VMWARE := 0x15AD
PCI_DEVICE_ID_VMWARE_SVGA2 := 0x405
2024-09-14 04:05:40 -05:00
write_reg := fn(index: u32, value: u32): void {
}
SVGA_disable := fn(): void {
write_reg(reg.SVGA_REG_ENABLE, 0)
2024-09-14 03:51:57 -05:00
return
}
main := fn(): int {
2024-09-19 14:40:10 -05:00
svga_dev := device.svga_device()
2024-09-16 20:45:00 -05:00
2024-09-19 14:40:10 -05:00
device.setup_device(&svga_dev)
device.setup_framebuffer(&svga_dev)
2024-09-16 20:45:00 -05:00
2024-09-19 14:40:10 -05:00
device.clear_screen(&svga_dev, 0xFF)
2024-09-14 03:51:57 -05:00
2024-09-19 14:40:10 -05:00
device.draw_pixel(&svga_dev, 100, 100, 0xFF0000)
2024-09-14 03:51:57 -05:00
return 0
}