mirror of
https://github.com/Tom-on64/kern.git
synced 2026-11-03 18:22:22 +00:00
Added setup retry and removed config.asm because i won't use it
This commit is contained in:
@@ -1,7 +0,0 @@
|
|||||||
;;;
|
|
||||||
;;; Kern build configuration
|
|
||||||
;;;
|
|
||||||
|
|
||||||
;; Force 1920x1080 32bpp resolution (will skip prompt on boot)
|
|
||||||
; %define FORCE_RESOLUTION
|
|
||||||
|
|
||||||
+6
-12
@@ -1,8 +1,6 @@
|
|||||||
[bits 16]
|
[bits 16]
|
||||||
[org 0x7e00]
|
[org 0x7e00]
|
||||||
|
|
||||||
%include "src/config.asm"
|
|
||||||
|
|
||||||
%define KERNEL_LOC 0x1000
|
%define KERNEL_LOC 0x1000
|
||||||
%define VIDMEM 0xb800
|
%define VIDMEM 0xb800
|
||||||
|
|
||||||
@@ -185,10 +183,12 @@ vbeSetup:
|
|||||||
jmp .findMode
|
jmp .findMode
|
||||||
|
|
||||||
.endOfModes:
|
.endOfModes:
|
||||||
mov si, modeNotFoundErr
|
mov ax, 0x03
|
||||||
|
int 0x10 ; Clear screen
|
||||||
|
mov si, gfxModeNotFoundErr
|
||||||
call print
|
call print
|
||||||
cli
|
mov word [width], 0 ; Unset values
|
||||||
hlt
|
jmp inputGfx
|
||||||
|
|
||||||
error:
|
error:
|
||||||
mov si, vbeErr
|
mov si, vbeErr
|
||||||
@@ -344,13 +344,13 @@ protected_start:
|
|||||||
driveNum: db 0
|
driveNum: db 0
|
||||||
|
|
||||||
vbeErr: db "VBE Error!", 0
|
vbeErr: db "VBE Error!", 0
|
||||||
modeNotFoundErr: db "VBE Mode not found!", 0
|
|
||||||
acpiFuncErr: db "ACPI Function not supported!", 0
|
acpiFuncErr: db "ACPI Function not supported!", 0
|
||||||
|
|
||||||
gfxChooseMsg: db "Please enter desired values" ; No NULL terminator, we want to print gfxWidthMsg right after anyway
|
gfxChooseMsg: db "Please enter desired values" ; No NULL terminator, we want to print gfxWidthMsg right after anyway
|
||||||
gfxWidthMsg: db 0x0a, 0x0d, "Width: ", 0
|
gfxWidthMsg: db 0x0a, 0x0d, "Width: ", 0
|
||||||
gfxHeightMsg: db 0x0a, 0x0d, "Height: ", 0
|
gfxHeightMsg: db 0x0a, 0x0d, "Height: ", 0
|
||||||
gfxBppMsg: db 0x0a, 0x0d, "Bits Per Pixel: ", 0
|
gfxBppMsg: db 0x0a, 0x0d, "Bits Per Pixel: ", 0
|
||||||
|
gfxModeNotFoundErr: db "Mode not found! ", 0
|
||||||
|
|
||||||
;; GDT
|
;; GDT
|
||||||
GDT:
|
GDT:
|
||||||
@@ -382,15 +382,9 @@ CODE_SEG equ GDT.codeDescriptor - GDT.start
|
|||||||
DATA_SEG equ GDT.dataDescriptor - GDT.start
|
DATA_SEG equ GDT.dataDescriptor - GDT.start
|
||||||
|
|
||||||
;; VBE Stuff
|
;; VBE Stuff
|
||||||
%ifdef FORCE_RESOLUTION
|
|
||||||
width: dw 1920
|
|
||||||
height: dw 1080
|
|
||||||
bpp: db 32
|
|
||||||
%else
|
|
||||||
width: dw 0
|
width: dw 0
|
||||||
height: dw 0
|
height: dw 0
|
||||||
bpp: db 0
|
bpp: db 0
|
||||||
%endif
|
|
||||||
|
|
||||||
offset: dw 0
|
offset: dw 0
|
||||||
_segment: dw 0 ; segment is a keyword
|
_segment: dw 0 ; segment is a keyword
|
||||||
|
|||||||
Reference in New Issue
Block a user