flat assembler
Message board for the users of flat assembler.
Index
> Main > Universal Graphic Interface |
Author |
|
DJ Mauretto 04 Apr 2009, 13:59
For Dos it's a VGA standard mode (13h)
For windows without API you cannot control directly the video For Linux i don't know anyway for dos you must set the video mode in this way: Code: mov ax,0013h int 6dh then you can write pixel at base address A000h in this way: Code: mov bx,0a000h mov al,09h ; blu mov cx,320*200 mov es,bx xor di,di cld rep stosb ; fill the screen with blu _________________ Nil Volentibus Arduum |
|||
04 Apr 2009, 13:59 |
|
batment 04 Apr 2009, 14:25
In windows you mean Win API?
|
|||
04 Apr 2009, 14:25 |
|
DJ Mauretto 04 Apr 2009, 14:28
Yes, if you don't want use any library and make low level
video programming ,it's possible only under dos or real mode with VGA standard ( your 320*200 256 is vga standard mode) _________________ Nil Volentibus Arduum |
|||
04 Apr 2009, 14:28 |
|
Goplat 04 Apr 2009, 16:57
DJ Mauretto wrote:
|
|||
04 Apr 2009, 16:57 |
|
DJ Mauretto 04 Apr 2009, 17:45
OOPS
Sorry i'm a beginner _________________ Nil Volentibus Arduum |
|||
04 Apr 2009, 17:45 |
|
buzzkill 04 Apr 2009, 19:37
AFAIK for linux it's the same as for windows: you can't access video memory directly. I think all modern (ie multi-user, multi-tasking) OSes are the same in that respect: one single process can't (and won't) be allowed to directly manipulate the video memory.
|
|||
04 Apr 2009, 19:37 |
|
bitshifter 05 Apr 2009, 03:14
Mode 0x13 (320x200x256) can be tweaked into mode X (320x240x256) by unchaining the video memory array and setting up some vga registers.
Advantages of mode 0x13: Memory is aligned by 'byte' boundary hence 256 colors. 1 byte per pixel. This makes for easy scan line rendering, but only one pixel at a time. Because of this we can easily convert xy to linear address. Code: index = y * 320 + x or... index = (y << 6) + (y << 8) + x Disadvantages of mode 0x13: Only one page of 64k video memory is used, the rest is wasted. The aspect ratio does not make for square pixels. Advantages of mode X: Four planes of unchained video memory can be used, with little wasted. The aspect ration is 1:1 which gives us perfectly square pixels. Horizontal pixel operations can be done by writing 4 pixels at a time. Thus scanline rendering can be done extremely fast. Disavantages of mode X: By unchaining the array it makes for slow single pixel operations. Index is a bit harder to calculate when we have 4 planes of memory. If you are just learning, go ahead and get used to mode 0x13. When you feel you are ready then do some research on mode X. I warn you, mode X is no easy task to setup, but well worth it later when you start to fill polygons and such. Code: |
|||
05 Apr 2009, 03:14 |
|
DOS386 05 Apr 2009, 03:20
Quote: I need to work in 320*200, 256 colors video mode both on windows, linux and dos, diserably without any ready library such as OpenGL or SDL. In what direction I have to search? DOS : INT $10 AX=$13 http://www.ctyme.com/intr/rb-0069.htm http://board.flatassembler.net/topic.php?t=9147 Win32: http://board.flatassembler.net/topic.php?t=9174 You can brew a dual-mode EXE for DOS + Win32, but not (reasonably) for DOS + Lniux. |
|||
05 Apr 2009, 03:20 |
|
rugxulo 14 Apr 2009, 20:11
DOS386 wrote:
The closest I've ever seen was Josh Vanderhoof's Cross ELF linker tool (DOS, Win32, Linux) w/ 3D raytracing example. |
|||
14 Apr 2009, 20:11 |
|
vid 14 Apr 2009, 20:31
Can you explain why you don't want to use libraries? I think that for almost any scenario, SDL would be perfect match, extremely simple to use, and very lightweight.
|
|||
14 Apr 2009, 20:31 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.