I have implemented basic font rendering as it runs in a graphical mode.
Up until now, I have been using video mode 13h. However, I need something much larger and with more colors, so for testing I am using mode 117h (detecting supported modes is not the main focus right now, I assume that 117h is).
However, I am having trouble with accessing the whole screen; as it is, I have about 32 lines accessible at address A0000h. Using the 10h interrupt with ax=4F05h and bx=0000, setting dx to the window index does shift everything down once in the kernel. However, I need to access the whole screen while in protected mode, and I can't use BIOS interrupts. So I tried both while still in real mode and after switching into protected mode to write to the VGA register 0Dh on port 3D5h, to no success.
This is how my code for video modes looks like so far:
Code: Select all
; Switch to mode 117h
mov ax, $4F02
mov bx, $0117
int $10
; Switching to window 1 (working)
mov ax, $4F05
mov bx, $0000
mov dx, $0001
int $10
; Should do the same? (seemingly does nothing)
mov dx, $03D4 ; also tried with $03B4
mov al, $0D
out dx, al
inc dx
mov al, $01
out dx, al
I have tried searching about this online and on the forum, to no avail. Am I misunderstanding something?
Also, techhelpmanual.com (which is where I first read about how to change the window) also mentions that the window can be changed with the function specified in the mode info structure, which I have not attempted to call yet; how do I pass arguments to it and would it still work after switching to protected mode?
(The OS is ran inside of QEmu, and is using Fasm for the assembler)
TLDR; Once in protected mode, how does one switch the bank index with SVGA modes with multiple banks?
Any help would be greatly appreciated.
