pritamzope / OS

Writing & Making Operating System and Kernel parts so simple like Hello World Programs, Starting from writing Bootloaders, Hello World Kernel, GDT, IDT, Terminal, Keyboard/Mouse, Memory Manager, HDD ATA R/W, VGA/VESA Graphics
http://createyourownos.blogspot.com
663 stars 103 forks source link

Output more colors in the VGA palette #17

Closed SleepMod closed 3 years ago

SleepMod commented 3 years ago

I have taken a look on the code "VGA/kernel_c/Simple/vga.h" and its what i was looking for graphics design, but i see they are predefined 16 colors when the resolution is 320x200 (known as 13h mode), so, i changed the color output and making changes up to 0 - 256 colors palette, instead of using the vga.h colors. But the colors are not displayed. How do i implement them, or its set up in mode AL = 0Dh, instead of AL = 13h?

pritamzope commented 3 years ago

https://github.com/pritamzope/OS/tree/master/VGA/kernel_c/Colors

well you can assign numbers till 64 for different colors, the names provided in vga.h file are standard as available since DOS. check above link code, if you can find other ways to add more colors.