flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > VGA 640x480x16 GUI |
Author |
|
MegaCoder 12 Mar 2011, 15:50
Hi, I'm writing real mode operating system like that in VGA 640x480x16 draw the window, and graphical cursor?
PS. Desirable means of BIOS |
|||
12 Mar 2011, 15:50 |
|
MegaCoder 12 Mar 2011, 17:59
For example kolibriOS or even Windows NT supports VGA 640x480x16 ... Well for example in sheltered how to do this GUI
but without VESA ... only pure VGA, well, and color and are not as important enough 16 colors |
|||
12 Mar 2011, 17:59 |
|
roboman 12 Mar 2011, 18:45
I'm in the middle of doing some sprite and blitter stuff for a game. Some good stuff here (not mine): http://www.nondot.org/sabre/graphpro/ it's mode 13, but it's clear what every thing does and should be easy to convert over. It's not a true blitter or sprite, in that you need to double buffer and keep an 'undamaged' copy of the background some where in memory.
The main problem with any thing less then 256 colors (except text modes) is that each 8 bit byte is more then one dot on the screen, so your SetPixel / PutPixel has to read the graphics card memory, change only the part of the byte that needs to be changed and then write the new byte to the video memory. It's just more work and slower. I miss the Amiga with hardware sprites and a hardware blitter |
|||
12 Mar 2011, 18:45 |
|
MegaCoder 14 Mar 2011, 09:25
What are the functions of the BIOS draw Window? ah = 09H, 0aH, 13H int 10h? or another? show an example please. And how to display a graphical mouse cursor?
|
|||
14 Mar 2011, 09:25 |
|
JohnFound 14 Mar 2011, 10:10
BIOS does not provide window drawing functions, mouse cursors and graphical functions at all.
You have to do it yourself (by hand, manually, in your own code). The other solution is to use some third party graphic library. P.S. AFAIK, there are PutPixel and GetPixel, but the BIOS implementation is very, very slow. And you actually don't need pixel functions at all. Regards |
|||
14 Mar 2011, 10:10 |
|
MegaCoder 14 Mar 2011, 11:17
And if no BIOS then it should be directly into video memory to draw?
|
|||
14 Mar 2011, 11:17 |
|
MegaCoder 14 Mar 2011, 11:32
Are there any lessons to create a GUI in VGA or VESA? but only in real mode
|
|||
14 Mar 2011, 11:32 |
|
BOTOKILLER 14 Mar 2011, 12:09
yes, thats good question, I found this
http://forum.osdev.org/viewtopic.php?f=1&t=6988 there a few links on page, (I willcheck those out too) |
|||
14 Mar 2011, 12:09 |
|
edfed 14 Mar 2011, 12:10
just look the magic instructions there, for 1 bit per pixel only.
Code: BT [vgamem],pixeladress ;test a pixel BTC [vgamem],pixeladress ;complement a pixel BTR [vgamem],pixeladress ;reset a pixel BTS [vgamem],pixeladress ;set a pixel for 4 bits per pixels, use 4 of them, to set the corresponding color. then no need to read the video memory. but needs at least 4 instrucitons, or a simple 4 times loop for pixel write |
|||
14 Mar 2011, 12:10 |
|
MegaCoder 14 Mar 2011, 15:43
Are there any more tutorials for creating GUI or sources with a simple GUI?
|
|||
14 Mar 2011, 15:43 |
|
JohnFound 14 Mar 2011, 16:39
|
|||
14 Mar 2011, 16:39 |
|
MegaCoder 15 Mar 2011, 14:04
I can not understand how to draw a window just does not know where to start! Please show example how general can be to draw a window
|
|||
15 Mar 2011, 14:04 |
|
edfed 15 Mar 2011, 14:41
to draw a window, you need to draw the elements of the window.
a window is not an atom, it is an assembly of many elementary shapes. rectangle, frames, pictures, some lines, some text, some things and others. and all share a common data, the coordinates and color properties. that's a window. |
|||
15 Mar 2011, 14:41 |
|
MegaCoder 15 Mar 2011, 14:49
I wrote this code but I do not think that this is a GUI looks like:
Code: call gui_window call title_bar proc title_bar mov ah,6 mov al,0 mov bh,0110b mov ch,4 mov cl,6 mov dh,4 mov dl,42 int 10h ret endp proc gui_window mov ah,6 mov al,0 mov bh,1111b mov ch,4 mov cl,6 mov dh,20 mov dl,42 int 10h ret endp but it is a bios interrupts |
|||
15 Mar 2011, 14:49 |
|
edfed 15 Mar 2011, 15:21
click on my www to see what can be behind a gui in real mode.
or click here. because apparentlly, this server works only the night. http://board.flatassembler.net/topic.php?t=8645 |
|||
15 Mar 2011, 15:21 |
|
Dex4u 15 Mar 2011, 17:32
If you chose vesa in realmode you need to use bank switching, here is a example:
http://board.flatassembler.net/topic.php?t=10857 |
|||
15 Mar 2011, 17:32 |
|
MegaCoder 19 Mar 2011, 16:42
Thanks...
|
|||
19 Mar 2011, 16:42 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.