Fixes for real hardware
This commit is contained in:
parent
234fb64999
commit
c2a95c96d5
|
@ -65,31 +65,31 @@ load:
|
||||||
mov [DAPACK.count], cx
|
mov [DAPACK.count], cx
|
||||||
mov [DAPACK.seg], dx
|
mov [DAPACK.seg], dx
|
||||||
|
|
||||||
; mov si, loading
|
mov si, loading
|
||||||
; call print
|
call print
|
||||||
|
|
||||||
; mov bx, [DAPACK.addr]
|
mov bx, [DAPACK.addr]
|
||||||
; call print_num
|
call print_num
|
||||||
|
|
||||||
; mov al, '#'
|
mov al, '#'
|
||||||
; call print_char
|
call print_char
|
||||||
;
|
|
||||||
; mov bx, [DAPACK.count]
|
mov bx, [DAPACK.count]
|
||||||
; call print_num
|
call print_num
|
||||||
;
|
|
||||||
; mov al, ' '
|
mov al, ' '
|
||||||
; call print_char
|
call print_char
|
||||||
;
|
|
||||||
; mov bx, [DAPACK.seg]
|
mov bx, [DAPACK.seg]
|
||||||
; call print_num
|
call print_num
|
||||||
;
|
|
||||||
; mov al, ':'
|
mov al, ':'
|
||||||
; call print_char
|
call print_char
|
||||||
;
|
|
||||||
; mov bx, [DAPACK.buf]
|
mov bx, [DAPACK.buf]
|
||||||
; call print_num
|
call print_num
|
||||||
;
|
|
||||||
; call print_line
|
call print_line
|
||||||
|
|
||||||
mov dl, [disk]
|
mov dl, [disk]
|
||||||
mov si, DAPACK
|
mov si, DAPACK
|
||||||
|
|
|
@ -14,7 +14,7 @@ startup:
|
||||||
; buffersize in multiple of sectors (512 Bytes)
|
; buffersize in multiple of sectors (512 Bytes)
|
||||||
; min 1
|
; min 1
|
||||||
; max (0x70000 - startup_end) / 512
|
; max (0x70000 - startup_end) / 512
|
||||||
buffer_size_sectors equ 1
|
buffer_size_sectors equ 512
|
||||||
; buffer size in Bytes
|
; buffer size in Bytes
|
||||||
buffer_size_bytes equ buffer_size_sectors * 512
|
buffer_size_bytes equ buffer_size_sectors * 512
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ kernel_base equ 0x100000
|
||||||
|
|
||||||
; populating buffer
|
; populating buffer
|
||||||
mov cx, buffer_size_sectors
|
mov cx, buffer_size_sectors
|
||||||
mov bx, startup_end
|
mov bx, kernel_file
|
||||||
mov dx, 0x0
|
mov dx, 0x0
|
||||||
|
|
||||||
push ax
|
push ax
|
||||||
|
@ -42,7 +42,7 @@ kernel_base equ 0x100000
|
||||||
call unreal
|
call unreal
|
||||||
pop ax
|
pop ax
|
||||||
|
|
||||||
mov esi, startup_end
|
mov esi, kernel_file
|
||||||
mov ecx, buffer_size_bytes / 4
|
mov ecx, buffer_size_bytes / 4
|
||||||
a32 rep movsd
|
a32 rep movsd
|
||||||
|
|
||||||
|
@ -57,14 +57,14 @@ kernel_base equ 0x100000
|
||||||
test cx, cx
|
test cx, cx
|
||||||
jz finished_loading ; if cx = 0 => skip
|
jz finished_loading ; if cx = 0 => skip
|
||||||
|
|
||||||
mov bx, startup_end
|
mov bx, kernel_file
|
||||||
mov dx, 0x0
|
mov dx, 0x0
|
||||||
call load
|
call load
|
||||||
|
|
||||||
; moving remnants of kernel
|
; moving remnants of kernel
|
||||||
call unreal
|
call unreal
|
||||||
|
|
||||||
mov esi, startup_end
|
mov esi, kernel_file
|
||||||
mov ecx, (kernel_file.length_sectors % buffer_size_bytes) / 4
|
mov ecx, (kernel_file.length_sectors % buffer_size_bytes) / 4
|
||||||
a32 rep movsd
|
a32 rep movsd
|
||||||
finished_loading:
|
finished_loading:
|
||||||
|
|
|
@ -183,8 +183,8 @@ vesa:
|
||||||
.minx dw 640
|
.minx dw 640
|
||||||
.miny dw 480
|
.miny dw 480
|
||||||
.required:
|
.required:
|
||||||
.requiredx dw 1024 ;USE THESE WITH CAUTION
|
.requiredx dw 0 ;1024 ;USE THESE WITH CAUTION
|
||||||
.requiredy dw 768
|
.requiredy dw 0 ;768
|
||||||
.requiredmode dw 0
|
.requiredmode dw 0
|
||||||
|
|
||||||
.noedidmsg db "EDID not supported.",10,13,0
|
.noedidmsg db "EDID not supported.",10,13,0
|
||||||
|
|
Loading…
Reference in a new issue