Re: low level graphics



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


dave frost wrote:
Ive found a lot of material on the net about asm progrmaming in mode
13h, but its all in dos, a lot like this:

;Change the video mode to 13h
xor ah, ah
mov al, 13h
int 10h

;Prepare for writing to the video buffer
mov di, 0a000h
mov es, di
xor di, di

Now im sure this would compile under linux, but i expect id get a seg
fault or something due to the video memory not being in my process
memory space, correct ?

Correct.

Those assembly snippets are usually written for a "naked PC" running
MSDOS, where userspace programs have direct access to all the hardware.
In Linux (and even in any Windows based on NT, including 2K and XP)
userspace programs don't get such access and this sort of coding would
fail.

which means i would write a kernel driver
correct ?

Not necessarily. The kernel already has the smarts to let a properly
coded user program get at the video system. It just doesn't let user
programs get at the bare metal. You can
- - use X verbs to talk to an X server which will take care of the
lowest level display
management (this include OpenGL to get at the real low level), or
- - use a library like the svgalib to permit your program access to
primative
drawing actions on a VGA display

also im interested in how the video memory is laid out in
other modes, so i could do say 1280x1024 in the 18M colours etc.

You /really/ don't want to know that. Actually, video memory doesn't
change between Linux and Windows (it's a hardware thing, after all),
only access to it changes. You /really/ want to stick with the
available tools rather than trying to go off on your own (at least,
with the level of knowledge you have at the moment).

But, /if/ you do want to persist, get a good book on video hardware for
the PC (one that discusses the inner workings of video memory, GPUs,
etc) and read it. If you are kernel-hacker enough, you should be able
to put together a video-interface driver that does what you are looking
for.

Im quite keen to do some of this sort of progranmming so if anyone can
give me some pointers that would be great.

Start small and simple.
Don't proceed until you understand what you've done already.
Build towards your goal, rather than trying to jump directly to it.
Learn what the available tools are (OpenGL, X, svgalib, etc)
Learn hardware
Learn kernel development
Learn driver development

That's all I can think of for now

HTH
- --
Lew Pitcher

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32) - WinPT 0.11.12

iD8DBQFE61SUagVFX4UWr64RAhyKAJ40WnTq5UGv7Gm+MDgEzf7OtDk6pgCfSsOX
zajjG8uz9GrMmNWQr7zKnZg=
=W8/Y
-----END PGP SIGNATURE-----

.



Relevant Pages

  • Direct video memory access in GForth - HowTo???
    ... have not been able to find out how to access the VGA video memory ... In GForth, I haven't seen anything that appears to allow a Selector ... VSelector # ax mov ...
    (comp.lang.forth)
  • How to convert mov to dpg?
    ... How to convert MOV to DPG with Leawo MOV to DPG Video Converter? ...
    (microsoft.public.windowsxp.video)
  • Re: How to edit a .MOV file on Windows?
    ... I have a Kodak digital camera which also records short video clips. ... videos are stored in a Quicktime format by the camera. ... My Nikon camera uses the *.mov format also. ...
    (rec.video.desktop)
  • Re: Converting Video with Rad Video Tools
    ... Here's a copy of my raw database notes about converting MOV files to ... those in addition to Rad Video Tools converting to AVI. ... MOV to AVI ... codecs to decode the audio and video inside the MOV, ...
    (microsoft.public.windowsxp.moviemaker)
  • Re: MOV wont play with Quicktime....can I play with Media Player?
    ... and tried it with a MOV file- it worked! ... camera put the video files in MPG or WMV format to start with? ... latest version of Quicktime and Windows Media Player.) ...
    (microsoft.public.windowsmedia)