Split framebuffer stride into stride and depth

Stride is now U16, depth is U16, and stores the bits per pixel of the
buffer.
This commit is contained in:
2026-09-06 17:37:49 +01:00
parent 1ba70f10cd
commit 4801520424
+12 -10
View File
@@ -5,24 +5,26 @@ pub const MAGIC_VALUE_LONG = 0xb301534c ; U32 Full 32 bits of the magic value
pub const MAGIC_ADDRESS = 0x0e ; U16 Location of the low 16 bits of magic value
pub const MAGIC_VALUE = 0x534c ; U16 Low 16 bits of the magic value
; If not double buffering these point to the same buffer
; If double buffering they must the same size
; If not double buffering these point to the same buffer
; If double buffering they must the same size
pub const FB_DISPLAY_PTR = 0x10 ; U32 Currently displayed buffer
pub const FB_DISPLAY_STRIDE = 0x14 ; U32 Bytes in each row of the displayed buffer
pub const FB_DISPLAY_STRIDE = 0x14 ; U16 Bytes in each row of the displayed buffer
pub const FB_DISPLAY_DEPTH = 0x16 ; U16 Bits per pixel of the display buffer
pub const FB_DRAW_PTR = 0x18 ; U32 Draw to this buffer
pub const FB_DRAW_STRIDE = 0x1c ; U32 Bytes in each row of the draw buffer
pub const FB_DRAW_STRIDE = 0x1c ; U16 Bytes in each row of the draw buffer == FB_DISPLAY_STRIDE
pub const FB_DRAW_DEPTH = 0x1e ; U16 Bits per pixel of the draw buffer == FB_DISPLAY_DEPTH
pub const FB_SIZE_BYTE = 0x20 ; U32 In bytes
pub const FB_WIDTH_PX = 0x24 ; U16 Width of screen in pixels
pub const FB_HEIGHT_PX = 0x26 ; U16 Height of screen in pixels
; Log2 of width in pixels, e.g.
; * 10 => 1024 * 768
; * 8 => 256 * 192
; Log2 of width in pixels, e.g.
; * 10 => 1024 * 768
; * 8 => 256 * 192
pub const FB_LOG_WIDTH = 0x28 ; U8
pub const FB_LOG_STRIDE = 0x29 ; U8 Log2 of FB_xxx_STRIDE in bytes
pub const FB_BYTES_PER_PIXEL = 0x2a ; U8 Specialisations should hardcode this
; Log2 of bytes per pixel
; * 0 => 8 bits per pixel
; * 2 => 32 bits per pixel
; Log2 of bytes per pixel
; * 0 => 8 bits per pixel
; * 2 => 32 bits per pixel
pub const FB_LOG_BPP = 0x2b ; U8 Specialisations should hardcode this