diff options
author | Freya Murphy <freya@freyacat.org> | 2024-02-03 00:50:07 -0500 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2024-02-03 00:53:58 -0500 |
commit | 90a6065691beee52bf5309916fba98f7580d27be (patch) | |
tree | 0b5375d20c189f62d394c473d371f7bf7f1d3fc5 /include | |
parent | improved debugger, refactored (diff) | |
download | corn-90a6065691beee52bf5309916fba98f7580d27be.tar.gz corn-90a6065691beee52bf5309916fba98f7580d27be.tar.bz2 corn-90a6065691beee52bf5309916fba98f7580d27be.zip |
refactor, new arch dirs, (wip) page alloc on write, hsv screen (convert to userspace later), other fixes
Diffstat (limited to 'include')
-rw-r--r-- | include/bochs.h | 11 | ||||
-rw-r--r-- | include/fb.h | 5 | ||||
-rw-r--r-- | include/screen.h | 13 | ||||
-rw-r--r-- | include/shim.h | 15 |
4 files changed, 32 insertions, 12 deletions
diff --git a/include/bochs.h b/include/bochs.h new file mode 100644 index 0000000..4aa933e --- /dev/null +++ b/include/bochs.h @@ -0,0 +1,11 @@ +#pragma once + +#include <stdint.h> +#include <stdint.h> + +/** + * Loads the framebuffer + * @param width - the width of the screen + * @param height - the height of the screen + */ +uint32_t *bochs_init(uint16_t w, uint16_t h, uint8_t b); diff --git a/include/fb.h b/include/fb.h deleted file mode 100644 index 2c5ea13..0000000 --- a/include/fb.h +++ /dev/null @@ -1,5 +0,0 @@ -#pragma once - -#include <stdint.h> - -int fb_init(uint16_t res_x, uint16_t res_y); diff --git a/include/screen.h b/include/screen.h new file mode 100644 index 0000000..296be31 --- /dev/null +++ b/include/screen.h @@ -0,0 +1,13 @@ +#pragma once + +#include <shim.h> + +/** + * Initalizes the screen and framebuffer + */ +void screen_init(void); + +/** + * Redraws the screen + */ +void screen_redraw(void); diff --git a/include/shim.h b/include/shim.h index 498de92..e445765 100644 --- a/include/shim.h +++ b/include/shim.h @@ -15,16 +15,17 @@ struct memory_map { struct memory_segment entries[MMAP_MAX_ENTRY]; }; -//struct framebuffer { -// uint64_t addr; -// uint32_t pitch; -// uint32_t width; -// uint32_t height; -// uint8_t bit_depth; -//}; +struct framebuffer { + uint64_t addr; + uint32_t pitch; + uint32_t width; + uint32_t height; + uint8_t bit_depth; +}; struct boot_info { struct memory_map map; + struct framebuffer fb; void *symbol_table; void *acpi_table; char cmdline[CMDLINE_MAX]; |