The MASM Forum Archive 2004 to 2012

Miscellaneous Forums => Miscellaneous Projects => Topic started by: pabloreda on January 24, 2007, 02:46:53 PM

Title: basic graphics asm
Post by: pabloreda on January 24, 2007, 02:46:53 PM
Hi,

I work in a new lang for programing, free, of course, called R4
The first stage is complete, in gcc+SDL I have a compiler/interpreter and a graphics library (in c) , you can see in www.reda4.org (http://www.reda4.org)
I work in the compiler to ASM and I need  a basic framework for windows and DexOs www.dex4u.com (http://www.dex4u.com)  first 
I need fullscreen en 1024x768x32 with direct access to video memory (for make the graphics library in R4 too)
for win I try some examples in russian for use directx in fasm, but not is too clear.
any suggestions ?

thanks !!

Pablo
Title: Re: basic graphics asm
Post by: stanhebben on January 24, 2007, 04:02:04 PM
I don't think you actually *can* have direct access to video ram in windows. However, you can easily set the resolution to 1024x768, 32bpp and create a window to cover the whole screen. Then fill the window with whatever you want to display.
Title: Re: basic graphics asm
Post by: pabloreda on January 24, 2007, 04:54:17 PM
ok, I need write in linear memory and copy to video memory (flip) or whatever who work fastest
Title: Re: basic graphics asm
Post by: stanhebben on January 24, 2007, 06:04:48 PM
You could create a buffer the size of the screen (which also the size of your window), work on that, then copy it to the screen with SetDIBitsToDevice. That's how I usually do it.
Title: Re: basic graphics asm
Post by: u on January 25, 2007, 05:14:56 PM
Use my DirectDraw engine's code to see how to get access to a fullscreen video-buffer to: lock,unlock,swap  :)
http://www.ultranos.com/asm_old/ILIX.zip

Depending on drivers and videocards, you can't safely assume you can use 32-bpp or 24-bpp screen. Usually the vcard will support only one of the formats. But all VGAs support 16bpp in 565 format, so that was my reason to force ILIX into 16bpp-only.

Concentrate on IlixStartFrame() and IlixEndFrame();
Title: Re: basic graphics asm
Post by: pabloreda on January 25, 2007, 06:04:58 PM
Thanks a lot ultrano... :U

I try the sDraw too and the example2 of assembler not see the start in

NVidiar Gforce MX440
DirectX 9.0c
Win98