[Closed] Setting VESA/VBE Mode
Re: Setting VESA/VBE Mode
Good news:
Grub can finally make an iso of my OS
QEMU can boot that iso and even recognizes grub
Bad news:
Getting error you need to load the kernel first.
I really don't understand since my linker and kernel.c and kernel.asm are all compiled and connected
Grub can finally make an iso of my OS
QEMU can boot that iso and even recognizes grub
Bad news:
Getting error you need to load the kernel first.
I really don't understand since my linker and kernel.c and kernel.asm are all compiled and connected
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
Oh, I see !!!!!!
You forgot the boot instruction xDDDD
You forgot the boot instruction xDDDD
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
try this:
Code: Select all
menuentry "BasicOS" {
multiboot /kernel.bin
boot
}
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
I already have thatDeezRamChips wrote:try this:Code: Select all
menuentry "BasicOS" { multiboot /kernel.bin boot }
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
You said you had
Where is the boot instruction ?
it should be:
Code: Select all
echo set default=0 >> iso/boot/grub/grub.cfg
echo set timeout=0 >> iso/boot/grub/grub.cfg
echo menuentry "BasicOS" { >> iso/boot/grub/grub.cfg
echo set root='(hd96)' >> iso/boot/grub/grub.cfg
echo multiboot /boot/kernel.bin >> iso/boot/grub/grub.cfg
echo } >> iso/boot/grub/grub.cfg
it should be:
Code: Select all
echo set default=0 >> iso/boot/grub/grub.cfg
echo set timeout=0 >> iso/boot/grub/grub.cfg
echo menuentry "BasicOS" { >> iso/boot/grub/grub.cfg
echo multiboot /boot/kernel.bin >> iso/boot/grub/grub.cfg
echo boot >> iso/boot/grub/grub.cfg
echo } >> iso/boot/grub/grub.cfg
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
When I make my iso file from make file and then try to run it, it does not work, qemu says no bootable media
When I use terminal to make my iso and to start qemu it boots, but with error you need to load the kernel first
When I use terminal to make my iso and to start qemu it boots, but with error you need to load the kernel first
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
Could you give me a .zip file with all your os (your work directory)
I'll try to see what's wrong
I'll try to see what's wrong
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
Yes!
Fixed my makefile!
Fixed my makefile!
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
It's working ?
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
How did you get it to work ?
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
I just made another variable that servers as boot.iso location for qemu.DeezRamChips wrote:How did you get it to work ?
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
Weel greate !
Also, here is the working version of the VESA driver (fixed for all resolutions ^_^)
vesa.h
vesa.c
Also, here is the working version of the VESA driver (fixed for all resolutions ^_^)
vesa.h
Code: Select all
#ifndef __VESA_H__
#define __VESA_H__
#include <types.h>
extern void init(long addr, int pitch, int width, int height, char bpp, int xres, int yres);
extern void putPixel(int x, int y, int r, int g, int b);
#endif
Code: Select all
#include <vesa.h>
#include <types.h>
#include <io.h>
long fb_addr;
int fb_pitch;
int fb_width;
int fb_height;
char fb_bpp;
int fb_xres;
int fb_yres;
char* vram = (char*)0xB8000;
void init(long addr, int pitch, int width, int height, char bpp, int xres, int yres){
vram = (char*)addr;
fb_pitch = pitch;
fb_width = width;
fb_height = height;
fb_bpp = bpp;
fb_xres = xres;
fb_yres = yres;
}
void putPixel(int x, int y, int r, int g, int b){
unsigned where = x*(fb_width/fb_xres) + y*fb_width;
vram[where + 0] = b; // BLUE
vram[where + 1] = g; // GREEN
vram[where + 2] = r; // RED
vram[where + 3] = 0xFF; // ALPHA
}
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
I am fine with that, I already have my own way to drawing to the screen and making shapes etc.DeezRamChips wrote:Weel greate !
Also, here is the working version of the VESA driver (fixed for all resolutions ^_^)
vesa.hvesa.cCode: Select all
#ifndef __VESA_H__ #define __VESA_H__ #include <types.h> extern void init(long addr, int pitch, int width, int height, char bpp, int xres, int yres); extern void putPixel(int x, int y, int r, int g, int b); #endif
Code: Select all
#include <vesa.h> #include <types.h> #include <io.h> long fb_addr; int fb_pitch; int fb_width; int fb_height; char fb_bpp; int fb_xres; int fb_yres; char* vram = (char*)0xB8000; void init(long addr, int pitch, int width, int height, char bpp, int xres, int yres){ vram = (char*)addr; fb_pitch = pitch; fb_width = width; fb_height = height; fb_bpp = bpp; fb_xres = xres; fb_yres = yres; } void putPixel(int x, int y, int r, int g, int b){ unsigned where = x*(fb_width/fb_xres) + y*fb_width; vram[where + 0] = b; // BLUE vram[where + 1] = g; // GREEN vram[where + 2] = r; // RED vram[where + 3] = 0xFF; // ALPHA }
One of the main problems is my makefile, let me tweak it a bit. I doesn't work again.

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
I hate makefile, I prefer using scipts
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
And finally I fixed my makefile, this time for real.
So this is my problem:
So this is my problem:
- Attachments
-
- QEMU_010.png (6.6 KiB) Viewed 3972 times
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