flat assembler
Message board for the users of flat assembler.
Index
> Windows > Graphics under Windows |
Author |
|
revolution 09 Nov 2010, 13:28
Windows does not allow user programs to access the hardware directly so you are correct in your assumption. You have to run a real mode OS, or at least something other than Windows, that allows direct writes to the video chip and the video memory.
|
|||
09 Nov 2010, 13:28 |
|
f0dder 09 Nov 2010, 17:37
If you're going to run under Windows, you need to play by the rules. There's not much sense in trying to "directly write to the hardware" anyway, unless your goal is to write a toy operating system.
If you just want some low-level graphics, use GDI, DirectX or OpenGL for setup, just enough code to get access to the framebuffer - then you can write to that from your glorious assembly code. |
|||
09 Nov 2010, 17:37 |
|
P3t3_Asm 09 Nov 2010, 23:04
Thanks heaps guys!
It looks like I'm forced to write a tiny simple OS-like host to do low-level graphics hardware programming. I'll take a look in the 'OS Construction' forum on how to proceed with this. And in the mean-time, (being a n00b) if I go down the other path of using DirectX under Windows, can someone please point me to assembly language + DirectX information/examples? Thanks. |
|||
09 Nov 2010, 23:04 |
|
pabloreda 09 Nov 2010, 23:05
I have a "framework" for use the graphics windows like the old school.
I teach asm with this framework too. http://code.google.com/p/reda4/source/browse/trunk/r4asm/r4fasm.asm write me if you like and need help about this |
|||
09 Nov 2010, 23:05 |
|
revolution 10 Nov 2010, 00:01
P3t3_Asm wrote: can someone please point me to assembly language + DirectX information/examples? |
|||
10 Nov 2010, 00:01 |
|
bitshifter 11 Nov 2010, 20:25
If you have XP or less, you can access BIOS to set vga modes.
Then read or write directly to video memory. Otherwise DX or GL is the common choices. I prefer GL since its easier to use. vga demo: http://board.flatassembler.net/topic.php?p=108398#108398 opengl demo: http://board.flatassembler.net/topic.php?t=9262&postdays=0&postorder=asc&start=0 |
|||
11 Nov 2010, 20:25 |
|
rocketsoft 12 Nov 2010, 21:56
I think it should be possible to write directly to the hardware screen buffer from within a windows application bur i have not figured out yet how
It would greatly speed up my graphics Maybe i would have to write my whole application as a driver, so i work at ring 0? |
|||
12 Nov 2010, 21:56 |
|
bitshifter 13 Nov 2010, 08:20
It is possible to write pmode vga driver pretty easily.
You just need to use port io and set the mode manually. I also think it will have to be a win32 console application or at least a gui application without wndclass/window/etc... |
|||
13 Nov 2010, 08:20 |
|
f0dder 13 Nov 2010, 10:06
rocketsoft wrote: I think it should be possible to write directly to the hardware screen buffer from within a windows application bur i have not figured out yet how rocketsoft wrote: It would greatly speed up my graphics rocketsoft wrote: Maybe i would have to write my whole application as a driver, so i work at ring 0? _________________ - carpe noctem |
|||
13 Nov 2010, 10:06 |
|
bitRAKE 14 Nov 2010, 03:56
People (SciTech) have written VESA Windows drivers like 10+ years ago, but in modern terms the video hardware often is as fast or faster than the CPU(s). The object should be to minimize data on the bus and let the video processor do it's thing.
I'm not saying the video card manufacturer is perfect - just that they have more information about the video card than anyone else and they don't feel like sharing. I have templates for DX8 thru DX11 which just display stuff on a surface. Also, there are plenty of good examples on the board using the hardware for more. Using GDI/D2D in Win7 is hardware accelerated! |
|||
14 Nov 2010, 03:56 |
|
edfed 14 Nov 2010, 15:02
use opengl
|
|||
14 Nov 2010, 15:02 |
|
f0dder 14 Nov 2010, 16:24
edfed wrote: use opengl I would think DirectX (in particular, some older DirectDraw) is the smarter move, since there's a greater likelihood of it being available across all Windows versions - and have less overhead (isn't the default Vista-and-later GL implementation implemented on-top of DirectX?). _________________ - carpe noctem |
|||
14 Nov 2010, 16:24 |
|
f0dder 14 Nov 2010, 16:27
bitRAKE wrote: Using GDI/D2D in Win7 is hardware accelerated! _________________ - carpe noctem |
|||
14 Nov 2010, 16:27 |
|
bitRAKE 14 Nov 2010, 17:06
Supporting hardware acceleration and having the hardware driver support that model are two different things. How much each video card manufacturer decided to support is all a blur to me, but I do remember it wasn't uniform. Direct2D is Win7+ specific. My point was that there are many ways to get to GPU acceleration presently - which don't require RE'ing the hardware. (Unless you find that kind of thing fun.)
I skipped Vista like last years flu and I like to pretend it doesn't exist. |
|||
14 Nov 2010, 17:06 |
|
f0dder 14 Nov 2010, 18:21
bitRAKE wrote: How much each video card manufacturer decided to support is all a blur to me bitRAKE wrote: My point was that there are many ways to get to GPU acceleration presently - which don't require RE'ing the hardware. (Unless you find that kind of thing fun.) bitRAKE wrote: I skipped Vista like last years flu and I like to pretend it doesn't exist. |
|||
14 Nov 2010, 18:21 |
|
seppe 20 May 2018, 10:58
I believe that WDDM is the low-level graphics driver to support all graphic cards.
Does anyone have some experience using WDDM from assembly? |
|||
20 May 2018, 10:58 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.