The MASM Forum

General => The Campus => Topic started by: alex-rudenkiy on August 26, 2016, 03:28:19 AM

Title: Computer graphics in assembly without the use of api different systems
Post by: alex-rudenkiy on August 26, 2016, 03:28:19 AM
Please tell me where to best get started with computer graphics in assembly without the use of the operating system. I read a lot of articles in interenete but examples of graphics programming  tends to processors 80186, 8086, 8088, etc. but those CPU cycles are outdated and no longer relevant strong point compared with the i5, i7. So this is how the "right", in accordance with the new technologies to work with graphics, well let there be no image, well, though, would be a pixel?
Title: Re: Computer graphics in assembly without the use of api different systems
Post by: Zen on August 26, 2016, 04:32:26 AM
Hi ALEX-RUDENKIY,
Quote...without the use of the operating system,...
This is NOT possible. I suspect that you just mis-stated your objective.
As MASM assembly programmers, all of our executable source code is dependent on two items: 
Graphics APIs for Windows are typically:  Windows Graphics Device Interface (GDI), MSDN (https://msdn.microsoft.com/en-us/library/windows/desktop/dd145203(v=vs.85).aspx), or, DirectX Graphics and Gaming, MSDN (https://msdn.microsoft.com/en-us/library/windows/desktop/ee663274(v=vs.85).aspx)
Title: Re: Computer graphics in assembly without the use of api different systems
Post by: Vortex on August 26, 2016, 04:56:30 AM
Hello Alex,

Better to start with some good tutorials :

http://win32assembly.programminghorizon.com/tutorials.html

http://www.winprog.org/tutorial/
Title: Re: Computer graphics in assembly without the use of api different systems
Post by: FORTRANS on August 26, 2016, 05:44:12 AM
Hi,

Quote from: alex-rudenkiy on August 26, 2016, 03:28:19 AM
Please tell me where to best get started with computer graphics in assembly without the use of the operating system.

   As the others state, this is not really practical.  However, if you
really want to, you will want to write a boot loader.  Search the 16-bit
sub-forum and look at the usenet alt.os.development group.  Maybe
the 16-bit sub-forum on the old MASM Forum as well.  An interesting
exercise, but not really useful?

Cheers,

Steve N.
Title: Re: Computer graphics in assembly without the use of api different systems
Post by: alex-rudenkiy on August 26, 2016, 06:46:12 AM
Well, for example, I want to make the operating system is not the console GUI and such a modern and do not know how to work through the graphics card or some sort of video buffer.
Title: Re: Computer graphics in assembly without the use of api different systems
Post by: rrr314159 on August 26, 2016, 07:14:55 AM
Sure, it can be done, but I don't know how. First learn about boot loaders, so you can get the machine working without windows. There are sites dedicated to writing your own OS, check them out.

BTW this sort of thing could be considered related to hacker software, which is not allowed here. But there do exist sites with that sort of knowledge.
Title: Re: Computer graphics in assembly without the use of api different systems
Post by: FORTRANS on August 27, 2016, 04:31:34 AM
Hi,

   If what you want is direct access to a video card, you may want
to install DOS and boot that up.  MS-DOS, or its clones FreeDOS or
DR-DOS, is a real mode operating system.  As such there is no
restriction on accessing hardware.  So access to a video card would
be the same as with no operating system.  (Mostly.)

   And you would then have access to editors, a file system, and
an environment to run an assembler.  Much less work than writing
your own boot loader and program environment.  Less education
perhaps.

HTH,

Steve N.
Title: Re: Computer graphics in assembly without the use of api different systems
Post by: K_F on August 27, 2016, 06:20:42 AM
Sounds like you're starting with the old DOS coding scheme .. (btw.. the 186 never made it to the PC AFAIK).
If you want to re-invent the wheel, create you own OS.. by all means.. but you will disappear into obscurity of umpteen failures.. asap.

You can still do the same DOS stuff with video cards as they basically still support legacy code.
To go beyond basic legacy support you'll have to contact AMD, Nvidia for gpu card tech data... If you get this right.. I'll pay you for the information  :lol:
This will be your dead end... but Good Luck anyway.
:t
Title: Re: Computer graphics in assembly without the use of api different systems
Post by: alex-rudenkiy on August 27, 2016, 06:27:30 AM
You have something I have to offer access to the video card from dos? But I want to make an operating system with a graphical interface, though primitive in xp 98, but do not know how. I thought that it is necessary to contact the video card through which a driver, but remembered that, for example when installing win 10, a graphical representation of a very beautiful and without any driver, but it is not clear what would have posted the source code 10, just do it would be good  :biggrin:
Title: Re: Computer graphics in assembly without the use of api different systems
Post by: FORTRANS on August 27, 2016, 10:55:48 PM
Hi,

Quote from: alex-rudenkiy on August 27, 2016, 06:27:30 AM
But I want to make an operating system with a graphical interface,

   There is a current thread in alt.os.development, "FYSOS:  The
Graphical User Interface" commenting on a book of the same name.
The book is on adding a GUI to a small operating system.  Another
book by that author discusses writing a small operating system.

Regards,

Steve N.
Title: Re: Computer graphics in assembly without the use of api different systems
Post by: mabdelouahab on August 28, 2016, 07:25:46 AM
Without a driver card? I think you need to build it yourself.
Quote from: alex-rudenkiy on August 27, 2016, 06:27:30 AM
You have something I have to offer access to the video card from dos? But I want to make an operating system with a graphical interface, though primitive in xp 98, but do not know how. I thought that it is necessary to contact the video card through which a driver, but remembered that, for example when installing win 10, a graphical representation of a very beautiful and without any driver, but it is not clear what would have posted the source code 10, just do it would be good  :biggrin:
I don't have information about Windows 10, but before that Microsoft uses standard vga graphic adapter (Hardware Default) That  uses the  VESA BIOS

Maybe this is helpful:

Graphics display resolution (https://en.wikipedia.org/wiki/Graphics_display_resolution#UXGA_.281600x1200.29)
Computer display standard (https://en.wikipedia.org/wiki/Computer_display_standard)

and

Int 10h (http://www.ctyme.com/intr/int-10.htm)
Video (http://www.ctyme.com/intr/cat-046.htm)
Title: Re: Computer graphics in assembly without the use of api different systems
Post by: raymond on August 30, 2016, 08:55:42 AM
If you want to program the video card yourself, you will have to do it in DOS mode and hope that your video card can operate according to the VESA standard designed some 30 years ago. You can find an example of an old program which still runs smoothly on my systems under Win10 (but in DOS mode) in one of my previous posts
http://masm32.com/board/index.php?topic=5290.0
Title: Re: Computer graphics in assembly without the use of api different systems
Post by: mabdelouahab on August 30, 2016, 05:51:19 PM
Quote from: raymond on August 30, 2016, 08:55:42 AM
If you want to program the video card yourself, you will have to do it in DOS mode and hope that your video card can operate according to the VESA standard designed some 30 years ago. You can find an example of an old program which still runs smoothly on my systems under Win10 (but in DOS mode) in one of my previous posts
http://masm32.com/board/index.php?topic=5290.0

raymond, That guy says "Please tell me where to best get started with computer graphics in assembly without the use of the operating system" (http://www.en.kolobok.us/smiles/remake/rtfm.gif)
It can use VESA without DOS system, From the first departure at bootloader


[BITS 16] 
[ORG 0x7C00]     

MOV AX, 0x4F02 ; Change video mode
MOV BX, 0x122; VESA video mode (VBE 2.0+): x:1600; y:1200,Color:65536
INT 0x10
...
Title: Re: Computer graphics in assembly without the use of api different systems
Post by: MichaelW on August 31, 2016, 10:31:32 PM
For direct access, the easiest graphics to use are those supported by the VGA hardware and VGA BIOS.
While some of the available video modes can be difficult to program, mode 13h is easy and straightforward. Try the search engines, even today you should be able to find many sites with information.