[Closed] Setting VESA/VBE Mode
- DeezRamChips
- Member
- Posts: 132
- Joined: Fri Apr 08, 2016 5:03 am
- Location: atapio.cpp - why won't you work :(
- Contact:
Re: Setting VESA/VBE Mode
I meant plotting a pixel
My github page: https://github.com/AlexandreRouma
Meme-deving since 420 Bc !
YouTube: https://www.youtube.com/channel/UCyJnOD ... C8Y7pccc6A
Twitter: https://twitter.com/WhatsTheGeekYT
Meme-deving since 420 Bc !
YouTube: https://www.youtube.com/channel/UCyJnOD ... C8Y7pccc6A
Twitter: https://twitter.com/WhatsTheGeekYT
- DeezRamChips
- Member
- Posts: 132
- Joined: Fri Apr 08, 2016 5:03 am
- Location: atapio.cpp - why won't you work :(
- Contact:
Re: Setting VESA/VBE Mode
At the right position.
Look what happens:
Look what happens:
My github page: https://github.com/AlexandreRouma
Meme-deving since 420 Bc !
YouTube: https://www.youtube.com/channel/UCyJnOD ... C8Y7pccc6A
Twitter: https://twitter.com/WhatsTheGeekYT
Meme-deving since 420 Bc !
YouTube: https://www.youtube.com/channel/UCyJnOD ... C8Y7pccc6A
Twitter: https://twitter.com/WhatsTheGeekYT
Re: Setting VESA/VBE Mode
lol, is that a bug?DeezRamChips wrote:At the right position.
Look what happens:
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
- DeezRamChips
- Member
- Posts: 132
- Joined: Fri Apr 08, 2016 5:03 am
- Location: atapio.cpp - why won't you work :(
- Contact:
Re: Setting VESA/VBE Mode
Well, when you ask grub setting a video mode it can't handle, it set's it to the highest resolution mode possible (wich is 1600x1200x32)
here is a list of the standard GRUB video modes:
http://pierre.baudu.in/other/grub.vga.modes.html
here is a list of the standard GRUB video modes:
http://pierre.baudu.in/other/grub.vga.modes.html
My github page: https://github.com/AlexandreRouma
Meme-deving since 420 Bc !
YouTube: https://www.youtube.com/channel/UCyJnOD ... C8Y7pccc6A
Twitter: https://twitter.com/WhatsTheGeekYT
Meme-deving since 420 Bc !
YouTube: https://www.youtube.com/channel/UCyJnOD ... C8Y7pccc6A
Twitter: https://twitter.com/WhatsTheGeekYT
Re: Setting VESA/VBE Mode
Yeah I see, I set my mode to 1280x768x32 and it works fine.DeezRamChips wrote:Well, when you ask grub setting a video mode it can't handle, it set's it to the highest resolution mode possible (wich is 1600x1200x32)
here is a list of the standard GRUB video modes:
http://pierre.baudu.in/other/grub.vga.modes.html
By the way, how do you fill you init function. Do you save ebx to a special struct and then call init with those struct values or what?
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
Re: Setting VESA/VBE Mode
Maybe you can use some kind of instant messaging application instead of using the forum as a chatroom?
My blog: http://www.rivencove.com/
Re: Setting VESA/VBE Mode
That is a very good idea.dseller wrote:Maybe you can use some kind of instant messaging application instead of using the forum as a chatroom?
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
- DeezRamChips
- Member
- Posts: 132
- Joined: Fri Apr 08, 2016 5:03 am
- Location: atapio.cpp - why won't you work :(
- Contact:
Re: Setting VESA/VBE Mode
in my loader:
in my file types.h, I have the multibootheader structure:
and in my kernel, I have:
Simple ^_^
Code: Select all
push ebx ; push the multiboot header
push eax ; push the magic numba !
call kstart ; call kernel
Code: Select all
struct boot_info {
uint32 flags;
uint32 mem_lower;
uint32 mem_upper;
uint32 boot_device;
uint32 cmdline;
uint32 mods_count;
uint32 mods_addr;
uint32 num;
uint32 size;
uint32 addr;
uint32 shndx;
uint32 mmap_length;
uint32 mmap_addr;
uint32 drives_length;
uint32 drives_addr;
uint32 config_table;
uint32 boot_loader_name;
uint32 apm_table;
uint32 vbe_control_info;
uint32 vbe_mode_info;
uint16 vbe_mode;
uint16 vbe_interface_seg;
uint16 vbe_interface_off;
uint16 vbe_interface_len;
uint64 framebuffer_addr;
uint32 framebuffer_pitch;
uint32 framebuffer_width;
uint32 framebuffer_height;
uint8 framebuffer_bpp;
uint8 framebuffer_type;
union
{
struct
{
uint32 framebuffer_palette_addr;
uint16 framebuffer_palette_num_colors;
};
struct
{
uint8 framebuffer_red_field_position;
uint8 framebuffer_red_mask_size;
uint8 framebuffer_green_field_position;
uint8 framebuffer_green_mask_size;
uint8 framebuffer_blue_field_position;
uint8 framebuffer_blue_mask_size;
};
};
};
Code: Select all
struct boot_info *boot_information;
void kstart(int eax_magic, struct boot_info *mboot){
boot_information = mboot;
if(eax_magic!=0x2BADB002)
{
panic(itoa(eax_magic));
}
else{
init(mboot->framebuffer_addr, mboot->framebuffer_pitch, mboot->framebuffer_width, mboot->framebuffer_height, mboot->framebuffer_bpp, 1024, 768);
}
main();
}
My github page: https://github.com/AlexandreRouma
Meme-deving since 420 Bc !
YouTube: https://www.youtube.com/channel/UCyJnOD ... C8Y7pccc6A
Twitter: https://twitter.com/WhatsTheGeekYT
Meme-deving since 420 Bc !
YouTube: https://www.youtube.com/channel/UCyJnOD ... C8Y7pccc6A
Twitter: https://twitter.com/WhatsTheGeekYT
- DeezRamChips
- Member
- Posts: 132
- Joined: Fri Apr 08, 2016 5:03 am
- Location: atapio.cpp - why won't you work :(
- Contact:
Re: Setting VESA/VBE Mode
It's easyier to post the code here than in a app like skype
My github page: https://github.com/AlexandreRouma
Meme-deving since 420 Bc !
YouTube: https://www.youtube.com/channel/UCyJnOD ... C8Y7pccc6A
Twitter: https://twitter.com/WhatsTheGeekYT
Meme-deving since 420 Bc !
YouTube: https://www.youtube.com/channel/UCyJnOD ... C8Y7pccc6A
Twitter: https://twitter.com/WhatsTheGeekYT
Re: Setting VESA/VBE Mode
Very similar structure, please lets use inbox instead of this topic.DeezRamChips wrote:in my loader:in my file types.h, I have the multibootheader structure:Code: Select all
push ebx ; push the multiboot header push eax ; push the magic numba ! call kstart ; call kernel
and in my kernel, I have:Code: Select all
struct boot_info { uint32 flags; uint32 mem_lower; uint32 mem_upper; uint32 boot_device; uint32 cmdline; uint32 mods_count; uint32 mods_addr; uint32 num; uint32 size; uint32 addr; uint32 shndx; uint32 mmap_length; uint32 mmap_addr; uint32 drives_length; uint32 drives_addr; uint32 config_table; uint32 boot_loader_name; uint32 apm_table; uint32 vbe_control_info; uint32 vbe_mode_info; uint16 vbe_mode; uint16 vbe_interface_seg; uint16 vbe_interface_off; uint16 vbe_interface_len; uint64 framebuffer_addr; uint32 framebuffer_pitch; uint32 framebuffer_width; uint32 framebuffer_height; uint8 framebuffer_bpp; uint8 framebuffer_type; union { struct { uint32 framebuffer_palette_addr; uint16 framebuffer_palette_num_colors; }; struct { uint8 framebuffer_red_field_position; uint8 framebuffer_red_mask_size; uint8 framebuffer_green_field_position; uint8 framebuffer_green_mask_size; uint8 framebuffer_blue_field_position; uint8 framebuffer_blue_mask_size; }; }; };
Simple ^_^Code: Select all
struct boot_info *boot_information; void kstart(int eax_magic, struct boot_info *mboot){ boot_information = mboot; if(eax_magic!=0x2BADB002) { panic(itoa(eax_magic)); } else{ init(mboot->framebuffer_addr, mboot->framebuffer_pitch, mboot->framebuffer_width, mboot->framebuffer_height, mboot->framebuffer_bpp, 1024, 768); } main(); }
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
-
- Member
- Posts: 501
- Joined: Wed Jun 17, 2015 9:40 am
- Libera.chat IRC: glauxosdever
- Location: Athens, Greece
Re: Setting VESA/VBE Mode
Hi,
Please do some research before posting.
And do not post every 2 minutes.
Regards,
glauxosdever
Please do some research before posting.
And do not post every 2 minutes.
Regards,
glauxosdever
Last edited by glauxosdever on Tue Oct 18, 2016 1:19 pm, edited 1 time in total.
Re: Setting VESA/VBE Mode
This might be true. But you are annoying the rest of the forum users by doing so.DeezRamChips wrote:It's easyier to post the code here than in a app like skype
I also hope that you will learn that the easiest route is not necessarily the best.
My blog: http://www.rivencove.com/
Re: Setting VESA/VBE Mode
We are using private messenger so please guys stop. This topic is [CLOSED]dseller wrote:This might be true. But you are annoying the rest of the forum users by doing so.DeezRamChips wrote:It's easyier to post the code here than in a app like skype
I also hope that you will learn that the easiest route is not necessarily the best.
Admins can you please mark this topic as closed/answered?
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
Re: Setting VESA/VBE Mode
thehardcoreOS, I see from your Makefile that you are not using a cross-compiler. If that's still the case, you might want to read these wiki articles:
http://wiki.osdev.org/Bare_Bones
http://wiki.osdev.org/GCC_Cross-Compiler
http://wiki.osdev.org/Why_do_I_need_a_Cross_Compiler%3F
http://wiki.osdev.org/Bare_Bones
http://wiki.osdev.org/GCC_Cross-Compiler
http://wiki.osdev.org/Why_do_I_need_a_Cross_Compiler%3F
Re: Setting VESA/VBE Mode
Hey sortie, I am not using gcc cross-compiler because it refused to build, I was getting some strange errors while building it...sortie wrote:thehardcoreOS, I see from your Makefile that you are not using a cross-compiler. If that's still the case, you might want to read these wiki articles:
http://wiki.osdev.org/Bare_Bones
http://wiki.osdev.org/GCC_Cross-Compiler
http://wiki.osdev.org/Why_do_I_need_a_Cross_Compiler%3F
It is a real pain to make it work since you need to manually move and install all those binutils.
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader