Re: low level graphics



HI Lew,

That was one of the most useful responses iv had. In short, im a curious sort and just want to fiddle with the silicone :-) svgalib isnt an answer for me, ive written an X client and found the event interface horrid and the api generally not nice. I have written a few small kernel modules in the past so could hit the books again.

Thanks for the help, can you suggest any particularly useful books ? ill do an amazon/etc search but if there are some you know are good id like to know.

cheers
Dave

Lew Pitcher wrote:
-----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

  • Re: Vic-20 inside a single FPGA
    ... semi-forgotten hardware tricks of video game and home computer hardware ... various audio, video and storage functionality. ... 1-5 Brief History of Home Video Game Systems ... 6-2 Character-Based Systems and User Defined Graphics ...
    (comp.sys.cbm)
  • Re: Linux, X, ld, gcc, linking, shared libraries and stuff
    ... >> because, originally, video cards / system RAM could NOT afford to have ... > GL actually "copies" everything, but it's done by the graphics card, so ... > anyway if it's not hardware accelerated. ... installed the proper driver, then it zooms around the screen... ...
    (alt.lang.asm)
  • Re: Analog Video to DVD Overall Process/Questions?
    ... it) the digitization being done either via a hardware encoder in the device, ... -Pinnacle Dazzle Digital Video Creator 150 USB device ... It's also related to whether the audio digitizer clock is locked to the ...
    (rec.video)
  • Re: Using set up disks from Micorsoft download centre for XP Pro
    ... If the problem is related to wrong video drivers, ... In addition to Knoppix, the Ubuntu CD is bootable and will help you ... determine if the problem is hardware or software. ... OS Windows XP Pro SP2 ...
    (microsoft.public.windowsxp.general)
  • Re: Color Correction using Linux?
    ... buffer different from adjusting the lookup tables the frame buffer uses to generate the video signal? ... Doing it in software may be emulation of the hardware, ... So, to get the two in sync, you calibrate them so that when software says "red" the video card will say the correct thign to the monitor and the monitor will in turn interpret it correctly and actually display red, rather than pink for instance. ...
    (rec.photo.digital)