0.0.2d: Added BGA support, graphics!
This commit is contained in:
@ -36,12 +36,13 @@ typedef struct {
|
||||
uint32_t p_align;
|
||||
} Elf32_Phdr;
|
||||
|
||||
//typedef int (*elf_entry_t)(int, char**);
|
||||
typedef int (*elf_entry_t)(void);
|
||||
|
||||
typedef struct {
|
||||
elf_entry_t entry_point;
|
||||
} elf_executable_t;
|
||||
|
||||
elf_executable_t* load_elf32(void* elf_data);
|
||||
int load_elf32(void* elf_data, elf_executable_t** ptr);
|
||||
|
||||
#endif
|
||||
|
||||
26
include/drivers/graphics/vga.h
Normal file
26
include/drivers/graphics/vga.h
Normal file
@ -0,0 +1,26 @@
|
||||
#ifndef _VGA_GRAPHICS_H
|
||||
#define _VGA_GRAPHICS_H
|
||||
|
||||
#include <types.h>
|
||||
|
||||
struct bga_framebuffer
|
||||
{
|
||||
volatile uint8_t* addr;
|
||||
|
||||
uint32_t width;
|
||||
uint32_t height;
|
||||
|
||||
uint32_t pitch; /* bytes per scanline */
|
||||
uint32_t bpp;
|
||||
};
|
||||
|
||||
|
||||
void bga_defaults(void);
|
||||
void bga_set_video_mode(uint32_t width, uint32_t height, uint32_t bit_depth);
|
||||
|
||||
void bga_putpixel(uint32_t x, uint32_t y, uint32_t color);
|
||||
|
||||
|
||||
void bga_drawline(int x0, int y0, int x1, int y1, uint32_t color);
|
||||
|
||||
#endif
|
||||
@ -44,4 +44,6 @@ int32_t ide_write48(uint8_t drive, uint64_t lba, uint8_t sector_count, const voi
|
||||
int32_t read_sector(uint64_t lba, void* buffer);
|
||||
int32_t write_sector(uint64_t lba, const void* buffer);
|
||||
|
||||
int get_sector_size(uint8_t drive);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user