Hello, I have MM8-OS written in c and assembly with it's own bootloader, it was original in VGA text mode but I have been making the switch to VBE (VESA) graphics mode. I have got a VBE.h for passing VBE mode information, graphics.c and .h for a simple graphics library, and a font.c and .h for the 8-BIT font. However, when I make and run it, it has an odd blue single line with odd red pixels periodically along it. I have no clue where this originates from but when I comment out the draw functions in kernel's main.c, the thing still persisted. I do not know how to resolve this as I am very new to OS Dev.
Links: https://github.com/MrMagoo8888/MM8-OS
Thank you,
MrMagoo8888
Graphics mode switch VBE 'Artifacts'
-
MrMagoo8888
- Posts: 1
- Joined: Thu Sep 25, 2025 2:00 pm
- Demindiro
- Member

- Posts: 165
- Joined: Fri Jun 11, 2021 6:02 am
- Libera.chat IRC: demindiro
- Location: Belgium
- Contact:
Re: Graphics mode switch VBE 'Artifacts'
My hunch: you're accidentally using the framebuffer as regular memory.
The screenshot shows bright-red and dark-blue colors. Assuming BGRX8888 mode:
The screenshot shows bright-red and dark-blue colors. Assuming BGRX8888 mode:
- bright-red might be caused by pointer values. You appear to link your kernel at 0x00100000, which if split up is B = 0, G = 0, R = 0x10
- dark-blue might be caused by small integer values, e.g. 3 -> B = 3, G = 0, R = 0
- Demindiro
- Member

- Posts: 165
- Joined: Fri Jun 11, 2021 6:02 am
- Libera.chat IRC: demindiro
- Location: Belgium
- Contact:
Re: Graphics mode switch VBE 'Artifacts'
Unrelated to the question, but I happened to notice:
That's wrong and UB in C as it is unaligned. It needs to be 0x10000.
You also have no guard page. I highly recommend you set one up. Can easily be done with something like (adapt as necessary):and
EDIT: That address looks very familiar.
Code: Select all
; Set up the stack. We'll place it right before the kernel's code at 0x100000
mov esp, 0x9FFFF
You also have no guard page. I highly recommend you set one up. Can easily be done with something like (adapt as necessary):
Code: Select all
PHDRS {
...
stack PT_LOAD FLAGS(6);
}
SECTIONS {
...
. = ALIGN(0x1000);
. += 0x1000;
.stack : { *(.stack) } :stack =0
}
Code: Select all
.section .stack, "a", @nobits
stack: .zero 1 << 12
stack_end:
-
Octocontrabass
- Member

- Posts: 6249
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Graphics mode switch VBE 'Artifacts'
You told it not to clear the video memory, so you're seeing whatever was in the video memory before the mode switch. The blue lines are text (I see "SeaBIOS (version 1.16.3-debian-1.16.3-2)" at the top left) and the odd red pixels are the font.MrMagoo8888 wrote: ↑Thu Nov 06, 2025 1:55 pmHowever, when I make and run it, it has an odd blue single line with odd red pixels periodically along it.